mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-analyze: cleanup walking to root
This commit is contained in:
@ -198,16 +198,19 @@ sysprof_callgraph_populate_callers (SysprofCallgraph *self,
|
|||||||
g_assert (node != NULL);
|
g_assert (node != NULL);
|
||||||
|
|
||||||
for (const SysprofCallgraphNode *iter = node;
|
for (const SysprofCallgraphNode *iter = node;
|
||||||
iter != NULL && iter->parent != NULL;
|
iter != NULL;
|
||||||
iter = iter->parent)
|
iter = iter->parent)
|
||||||
{
|
{
|
||||||
SysprofSymbol *parent_symbol = iter->parent->summary->symbol;
|
|
||||||
guint pos;
|
|
||||||
|
|
||||||
egg_bitset_add (iter->summary->traceables, list_model_index);
|
egg_bitset_add (iter->summary->traceables, list_model_index);
|
||||||
|
|
||||||
if (!g_ptr_array_find (iter->summary->callers, parent_symbol, &pos))
|
if (iter->parent != NULL)
|
||||||
g_ptr_array_add (iter->summary->callers, parent_symbol);
|
{
|
||||||
|
SysprofSymbol *parent_symbol = iter->parent->summary->symbol;
|
||||||
|
guint pos;
|
||||||
|
|
||||||
|
if (!g_ptr_array_find (iter->summary->callers, parent_symbol, &pos))
|
||||||
|
g_ptr_array_add (iter->summary->callers, parent_symbol);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user