mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: keep count in callgraph node
I don't want this to overlap with augmentation data, or be augmentation data specific, so just keep our own private copy of this data in the node to do the sort of things we want with it (such as summaries).
This commit is contained in:
@ -47,8 +47,9 @@ struct _SysprofCallgraphNode
|
||||
SysprofCallgraphNode *children;
|
||||
SysprofCallgraphSummary *summary;
|
||||
gpointer augment[2];
|
||||
SysprofCallgraphCategory category : 7;
|
||||
SysprofCallgraphCategory is_toplevel : 7;
|
||||
guint category : 7;
|
||||
guint is_toplevel : 1;
|
||||
guint count : 24;
|
||||
};
|
||||
|
||||
struct _SysprofCallgraph
|
||||
|
||||
@ -191,8 +191,6 @@ 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)
|
||||
@ -431,6 +429,9 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
|
||||
list_model_index,
|
||||
!!(self->flags & SYSPROF_CALLGRAPH_FLAGS_HIDE_SYSTEM_LIBRARIES));
|
||||
|
||||
node->is_toplevel = TRUE;
|
||||
node->count++;
|
||||
|
||||
if (node && self->augment_func)
|
||||
self->augment_func (self,
|
||||
node,
|
||||
|
||||
@ -211,6 +211,7 @@ sysprof_descendants_model_add_traceable (SysprofDescendantsModel *self,
|
||||
node = sysprof_descendants_model_add_trace (self, symbols, n_symbols);
|
||||
|
||||
node->is_toplevel = TRUE;
|
||||
node->count++;
|
||||
|
||||
if (node && self->callgraph->augment_func)
|
||||
self->callgraph->augment_func (self->callgraph,
|
||||
|
||||
Reference in New Issue
Block a user