mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Compute the size by simply summing the size of the siblings. They are
2007-08-26 Soren Sandmann <sandmann@daimi.au.dk> * profile.c (profile_get_size): Compute the size by simply summing the size of the siblings. They are toplevel by definition, and this works if the siblings for some reason has the same address. svn path=/trunk/; revision=371
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
4194371d52
commit
39cb26654a
10
profile.c
10
profile.c
@ -595,7 +595,7 @@ compute_total (StackNode *node)
|
||||
if (n->toplevel)
|
||||
total += n->total;
|
||||
}
|
||||
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
@ -608,10 +608,10 @@ build_object_list (StackNode *node, gpointer data)
|
||||
|
||||
obj = g_new (ProfileObject, 1);
|
||||
obj->name = node->address;
|
||||
|
||||
obj->total = compute_total (node);
|
||||
|
||||
obj->total = compute_total (node);
|
||||
obj->self = 0;
|
||||
|
||||
for (n = node; n != NULL; n = n->next)
|
||||
obj->self += n->size;
|
||||
|
||||
@ -634,9 +634,9 @@ profile_get_size (Profile *profile)
|
||||
{
|
||||
StackNode *n;
|
||||
gint size = 0;
|
||||
|
||||
|
||||
for (n = stack_stash_get_root (profile->stash); n != NULL; n = n->siblings)
|
||||
size += compute_total (n);
|
||||
size += n->total;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user