Add "total" field.

Mon Oct 31 23:41:33 2005  Soeren Sandmann  <sandmann@redhat.com>

        * stackstash.h (struct StackNode): Add "total" field.

        * stackstash.c (stack_stash_add_trace): Keep track of the
        aggregate size.

        * profile.c (profile_get_size): Sum the totals of the siblings
        instead of all the children.

        * profile.c (build_object_list): Correctly compute obj->self

        * profile.c (profile_load): Don't ignore the node->total field.

        * profile.c (serialize_call_tree): Save node->total instead of the
        computed total

        * profile.c (compute_total): Use n->total instead of computing it
        from scratch.

        * profile.c: Remove unused sum_children() function.

        * TODO: Updates

        * process.c (process_get_from_pid): Plug leak.
This commit is contained in:
Soeren Sandmann
2005-11-01 04:37:16 +00:00
committed by Søren Sandmann Pedersen
parent 81ad181667
commit c778a1b1ec
7 changed files with 62 additions and 34 deletions

View File

@ -35,6 +35,7 @@ stack_node_new (void)
node->parent = NULL;
node->size = 0;
node->next = NULL;
node->total = 0;
return node;
}
@ -46,7 +47,7 @@ stack_stash_new (void)
stash->root = NULL;
stash->nodes_by_data = g_hash_table_new (g_direct_hash, g_direct_equal);
return stash;
}
@ -116,6 +117,8 @@ stack_stash_add_trace (StackStash *stash,
decorate_node (stash, match);
}
match->total += size;
location = &(match->children);
parent = match;
}