diff --git a/src/libsysprof/sysprof-callgraph-private.h b/src/libsysprof/sysprof-callgraph-private.h index b4d7ad3a..217dd6c2 100644 --- a/src/libsysprof/sysprof-callgraph-private.h +++ b/src/libsysprof/sysprof-callgraph-private.h @@ -47,7 +47,8 @@ struct _SysprofCallgraphNode SysprofCallgraphNode *children; SysprofCallgraphSummary *summary; gpointer augment[2]; - SysprofCallgraphCategory category; + SysprofCallgraphCategory category : 7; + SysprofCallgraphCategory is_toplevel : 7; }; struct _SysprofCallgraph diff --git a/src/libsysprof/sysprof-callgraph.c b/src/libsysprof/sysprof-callgraph.c index 9055f846..ec2bca0f 100644 --- a/src/libsysprof/sysprof-callgraph.c +++ b/src/libsysprof/sysprof-callgraph.c @@ -191,6 +191,8 @@ sysprof_callgraph_populate_callers (SysprofCallgraph *self, g_assert (SYSPROF_IS_CALLGRAPH (self)); g_assert (node != NULL); + node->is_toplevel = TRUE; + for (const SysprofCallgraphNode *iter = node; iter != NULL; iter = iter->parent) diff --git a/src/libsysprof/sysprof-descendants-model.c b/src/libsysprof/sysprof-descendants-model.c index e7f6c1f8..3507c2e3 100644 --- a/src/libsysprof/sysprof-descendants-model.c +++ b/src/libsysprof/sysprof-descendants-model.c @@ -210,6 +210,8 @@ sysprof_descendants_model_add_traceable (SysprofDescendantsModel *self, node = sysprof_descendants_model_add_trace (self, symbols, n_symbols); + node->is_toplevel = TRUE; + if (node && self->callgraph->augment_func) self->callgraph->augment_func (self->callgraph, node,