mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Use stack_node_new() o (profile_load): Use set_root() instead of
2006-11-19 Soren Sandmann <sandmann@redhat.com> * profile.c (profile_load): Use stack_node_new() o (profile_load): Use set_root() instead of new_from_root(); * stackstash.c (stack_stash_new_from_root): Delete this function (stack_stash_set_root): Add this function (stack_node_new): Export this function
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
9af533a11f
commit
0b718ee95c
16
stackstash.c
16
stackstash.c
@ -27,7 +27,7 @@ struct StackStash
|
||||
GDestroyNotify destroy;
|
||||
};
|
||||
|
||||
static StackNode *
|
||||
StackNode *
|
||||
stack_node_new (void)
|
||||
{
|
||||
StackNode *node = g_new (StackNode, 1);
|
||||
@ -296,15 +296,13 @@ build_hash_table (StackNode *node,
|
||||
stash->nodes_by_data, node->address, node);
|
||||
}
|
||||
|
||||
StackStash *
|
||||
stack_stash_new_from_root (StackNode *root,
|
||||
GDestroyNotify destroy)
|
||||
void
|
||||
stack_stash_set_root (StackStash *stash,
|
||||
StackNode *root)
|
||||
{
|
||||
StackStash *stash = create_stack_stash (destroy);
|
||||
|
||||
stash->root = root;
|
||||
g_return_if_fail (stash->root == NULL);
|
||||
g_return_if_fail (g_hash_table_size (stash->nodes_by_data) == 0);
|
||||
|
||||
stash->root = root;
|
||||
build_hash_table (stash->root, stash);
|
||||
|
||||
return stash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user