[sysprof] callgraph: add information about expectations



commit 0ddab3db6e40ec7168edd9fec131f677f4e5b65e
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 29 02:11:03 2018 -0800

    callgraph: add information about expectations

 lib/callgraph/sp-callgraph-profile.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib/callgraph/sp-callgraph-profile.c b/lib/callgraph/sp-callgraph-profile.c
index a29a16e..d0c0442 100644
--- a/lib/callgraph/sp-callgraph-profile.c
+++ b/lib/callgraph/sp-callgraph-profile.c
@@ -332,6 +332,15 @@ sp_callgraph_profile_generate_worker (GTask        *task,
 
       cmdline = g_hash_table_lookup (cmdlines, GINT_TO_POINTER (sample->frame.pid));
 
+#if 0
+      /* This assertion appears to hold true, but since we're taking in
+       * untrusted data from capture files, it's not safe to assume. But in
+       * practice it is.
+       */
+      g_assert (sp_address_is_context_switch (sample->addrs[0], &last_context));
+      last_context = SP_ADDRESS_CONTEXT_NONE;
+#endif
+
       node = stack_stash_add_trace (stash, sample->addrs, sample->n_addrs, 1);
 
       for (iter = node; iter != NULL; iter = iter->parent)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]