mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-11 15:40:53 +00:00
libsysprof: track which nodes are toplevel
We used to do this, and now we have space for it here as we added the categorization field.
This commit is contained in:
@ -47,7 +47,8 @@ struct _SysprofCallgraphNode
|
|||||||
SysprofCallgraphNode *children;
|
SysprofCallgraphNode *children;
|
||||||
SysprofCallgraphSummary *summary;
|
SysprofCallgraphSummary *summary;
|
||||||
gpointer augment[2];
|
gpointer augment[2];
|
||||||
SysprofCallgraphCategory category;
|
SysprofCallgraphCategory category : 7;
|
||||||
|
SysprofCallgraphCategory is_toplevel : 7;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _SysprofCallgraph
|
struct _SysprofCallgraph
|
||||||
|
|||||||
@ -191,6 +191,8 @@ sysprof_callgraph_populate_callers (SysprofCallgraph *self,
|
|||||||
g_assert (SYSPROF_IS_CALLGRAPH (self));
|
g_assert (SYSPROF_IS_CALLGRAPH (self));
|
||||||
g_assert (node != NULL);
|
g_assert (node != NULL);
|
||||||
|
|
||||||
|
node->is_toplevel = TRUE;
|
||||||
|
|
||||||
for (const SysprofCallgraphNode *iter = node;
|
for (const SysprofCallgraphNode *iter = node;
|
||||||
iter != NULL;
|
iter != NULL;
|
||||||
iter = iter->parent)
|
iter = iter->parent)
|
||||||
|
|||||||
@ -210,6 +210,8 @@ sysprof_descendants_model_add_traceable (SysprofDescendantsModel *self,
|
|||||||
|
|
||||||
node = sysprof_descendants_model_add_trace (self, symbols, n_symbols);
|
node = sysprof_descendants_model_add_trace (self, symbols, n_symbols);
|
||||||
|
|
||||||
|
node->is_toplevel = TRUE;
|
||||||
|
|
||||||
if (node && self->callgraph->augment_func)
|
if (node && self->callgraph->augment_func)
|
||||||
self->callgraph->augment_func (self->callgraph,
|
self->callgraph->augment_func (self->callgraph,
|
||||||
node,
|
node,
|
||||||
|
|||||||
Reference in New Issue
Block a user