diff --git a/src/libsysprof/sysprof-callgraph.c b/src/libsysprof/sysprof-callgraph.c index a8ef4736..561c4d6b 100644 --- a/src/libsysprof/sysprof-callgraph.c +++ b/src/libsysprof/sysprof-callgraph.c @@ -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, diff --git a/src/libsysprof/sysprof-descendants-model.c b/src/libsysprof/sysprof-descendants-model.c index c3b37654..a5a5fcc3 100644 --- a/src/libsysprof/sysprof-descendants-model.c +++ b/src/libsysprof/sysprof-descendants-model.c @@ -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,