mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: always increment count for callgraph nodes
This shouldn't affect categorizing because that only uses the value if is_toplevel. But with this added, we can use the count for weights in other tooling w/o needing augmentation.
This commit is contained in:
@ -247,6 +247,7 @@ sysprof_callgraph_add_trace (SysprofCallgraph *self,
|
||||
if (_sysprof_symbol_equal (iter->summary->symbol, symbol))
|
||||
{
|
||||
node = iter;
|
||||
node->count++;
|
||||
goto next_symbol;
|
||||
}
|
||||
}
|
||||
@ -256,6 +257,7 @@ sysprof_callgraph_add_trace (SysprofCallgraph *self,
|
||||
node->summary = sysprof_callgraph_get_summary (self, symbol);
|
||||
node->parent = parent;
|
||||
node->next = parent->children;
|
||||
node->count = 1;
|
||||
if (parent->children)
|
||||
parent->children->prev = node;
|
||||
parent->children = node;
|
||||
@ -431,7 +433,6 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
|
||||
!!(self->flags & SYSPROF_CALLGRAPH_FLAGS_HIDE_SYSTEM_LIBRARIES));
|
||||
|
||||
node->is_toplevel = TRUE;
|
||||
node->count++;
|
||||
|
||||
if (node && self->augment_func)
|
||||
self->augment_func (self,
|
||||
|
||||
@ -129,6 +129,7 @@ sysprof_descendants_model_add_trace (SysprofDescendantsModel *self,
|
||||
if (_sysprof_symbol_equal (iter->summary->symbol, symbol))
|
||||
{
|
||||
node = iter;
|
||||
node->count++;
|
||||
goto next_symbol;
|
||||
}
|
||||
}
|
||||
@ -144,6 +145,7 @@ sysprof_descendants_model_add_trace (SysprofDescendantsModel *self,
|
||||
node->summary = summary;
|
||||
node->parent = parent;
|
||||
node->next = parent->children;
|
||||
node->count = 1;
|
||||
if (parent->children)
|
||||
parent->children->prev = node;
|
||||
parent->children = node;
|
||||
@ -211,7 +213,6 @@ 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