mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-analyze: don't duplicate callers
This commit is contained in:
@ -166,6 +166,7 @@ sysprof_callgraph_populate_callers (SysprofCallgraph *self,
|
|||||||
iter = iter->parent)
|
iter = iter->parent)
|
||||||
{
|
{
|
||||||
GPtrArray *callers;
|
GPtrArray *callers;
|
||||||
|
guint pos;
|
||||||
|
|
||||||
if (!(callers = g_hash_table_lookup (hash, iter->symbol)))
|
if (!(callers = g_hash_table_lookup (hash, iter->symbol)))
|
||||||
{
|
{
|
||||||
@ -175,7 +176,8 @@ sysprof_callgraph_populate_callers (SysprofCallgraph *self,
|
|||||||
|
|
||||||
g_assert (iter->parent->symbol != NULL);
|
g_assert (iter->parent->symbol != NULL);
|
||||||
|
|
||||||
g_ptr_array_add (callers, iter->parent->symbol);
|
if (!g_ptr_array_find (callers, iter->parent->symbol, &pos))
|
||||||
|
g_ptr_array_add (callers, iter->parent->symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user