diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2010-11-16 09:09:42 (GMT) |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-11-16 09:09:42 (GMT) |
commit | a02056349cdea2252cd2b21643ebf025e83a29f2 (patch) | |
tree | b7c889d6cbe8e7188d07d99a5c9da858c53a5b6c /tools/perf/util/callchain.h | |
parent | 34db1d595ef6f183fbc1e42cda45a3dfa0035258 (diff) | |
parent | e53beacd23d9cb47590da6a7a7f6d417b941a994 (diff) | |
download | linux-fsl-qoriq-a02056349cdea2252cd2b21643ebf025e83a29f2.tar.xz |
Merge branch 'v2.6.37-rc2' into for-2.6.38/core
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r-- | tools/perf/util/callchain.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 6de4313..c15fb8c 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -26,9 +26,14 @@ struct callchain_node { u64 children_hit; }; +struct callchain_root { + u64 max_depth; + struct callchain_node node; +}; + struct callchain_param; -typedef void (*sort_chain_func_t)(struct rb_root *, struct callchain_node *, +typedef void (*sort_chain_func_t)(struct rb_root *, struct callchain_root *, u64, struct callchain_param *); struct callchain_param { @@ -44,15 +49,16 @@ struct callchain_list { struct list_head list; }; -static inline void callchain_init(struct callchain_node *node) +static inline void callchain_init(struct callchain_root *root) { - INIT_LIST_HEAD(&node->brothers); - INIT_LIST_HEAD(&node->children); - INIT_LIST_HEAD(&node->val); + INIT_LIST_HEAD(&root->node.brothers); + INIT_LIST_HEAD(&root->node.children); + INIT_LIST_HEAD(&root->node.val); - node->children_hit = 0; - node->parent = NULL; - node->hit = 0; + root->node.parent = NULL; + root->node.hit = 0; + root->node.children_hit = 0; + root->max_depth = 0; } static inline u64 cumul_hits(struct callchain_node *node) @@ -61,8 +67,9 @@ static inline u64 cumul_hits(struct callchain_node *node) } int register_callchain_param(struct callchain_param *param); -int append_chain(struct callchain_node *root, struct ip_callchain *chain, - struct map_symbol *syms, u64 period); +int callchain_append(struct callchain_root *root, struct ip_callchain *chain, + struct map_symbol *syms, u64 period); +int callchain_merge(struct callchain_root *dst, struct callchain_root *src); bool ip_callchain__valid(struct ip_callchain *chain, const event_t *event); #endif /* __PERF_CALLCHAIN_H */ |