Commit 6cb8e561 authored by Frederic Weisbecker's avatar Frederic Weisbecker

perf: Rename append_callchain into callchain_append

Do that to start a consistant callchain API namespace.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Christoph Hellwig <hch@infradead.org>
parent d2009c51
...@@ -107,7 +107,8 @@ static int perf_session__add_hist_entry(struct perf_session *self, ...@@ -107,7 +107,8 @@ static int perf_session__add_hist_entry(struct perf_session *self,
goto out_free_syms; goto out_free_syms;
err = 0; err = 0;
if (symbol_conf.use_callchain) { if (symbol_conf.use_callchain) {
err = append_chain(he->callchain, data->callchain, syms, data->period); err = callchain_append(he->callchain, data->callchain, syms,
data->period);
if (err) if (err)
goto out_free_syms; goto out_free_syms;
} }
......
...@@ -284,19 +284,18 @@ split_add_child(struct callchain_node *parent, struct resolved_chain *chain, ...@@ -284,19 +284,18 @@ split_add_child(struct callchain_node *parent, struct resolved_chain *chain,
} }
static int static int
__append_chain(struct callchain_node *root, struct resolved_chain *chain, append_chain(struct callchain_node *root, struct resolved_chain *chain,
unsigned int start, u64 period); unsigned int start, u64 period);
static void static void
__append_chain_children(struct callchain_node *root, append_chain_children(struct callchain_node *root, struct resolved_chain *chain,
struct resolved_chain *chain, unsigned int start, u64 period)
unsigned int start, u64 period)
{ {
struct callchain_node *rnode; struct callchain_node *rnode;
/* lookup in childrens */ /* lookup in childrens */
chain_for_each_child(rnode, root) { chain_for_each_child(rnode, root) {
unsigned int ret = __append_chain(rnode, chain, start, period); unsigned int ret = append_chain(rnode, chain, start, period);
if (!ret) if (!ret)
goto inc_children_hit; goto inc_children_hit;
...@@ -309,8 +308,8 @@ __append_chain_children(struct callchain_node *root, ...@@ -309,8 +308,8 @@ __append_chain_children(struct callchain_node *root,
} }
static int static int
__append_chain(struct callchain_node *root, struct resolved_chain *chain, append_chain(struct callchain_node *root, struct resolved_chain *chain,
unsigned int start, u64 period) unsigned int start, u64 period)
{ {
struct callchain_list *cnode; struct callchain_list *cnode;
unsigned int i = start; unsigned int i = start;
...@@ -357,7 +356,7 @@ __append_chain(struct callchain_node *root, struct resolved_chain *chain, ...@@ -357,7 +356,7 @@ __append_chain(struct callchain_node *root, struct resolved_chain *chain,
} }
/* We match the node and still have a part remaining */ /* We match the node and still have a part remaining */
__append_chain_children(root, chain, i, period); append_chain_children(root, chain, i, period);
return 0; return 0;
} }
...@@ -380,8 +379,8 @@ static void filter_context(struct ip_callchain *old, struct resolved_chain *new, ...@@ -380,8 +379,8 @@ static void filter_context(struct ip_callchain *old, struct resolved_chain *new,
} }
int append_chain(struct callchain_root *root, struct ip_callchain *chain, int callchain_append(struct callchain_root *root, struct ip_callchain *chain,
struct map_symbol *syms, u64 period) struct map_symbol *syms, u64 period)
{ {
struct resolved_chain *filtered; struct resolved_chain *filtered;
...@@ -398,7 +397,7 @@ int append_chain(struct callchain_root *root, struct ip_callchain *chain, ...@@ -398,7 +397,7 @@ int append_chain(struct callchain_root *root, struct ip_callchain *chain,
if (!filtered->nr) if (!filtered->nr)
goto end; goto end;
__append_chain_children(&root->node, filtered, 0, period); append_chain_children(&root->node, filtered, 0, period);
if (filtered->nr > root->max_depth) if (filtered->nr > root->max_depth)
root->max_depth = filtered->nr; root->max_depth = filtered->nr;
......
...@@ -66,8 +66,8 @@ static inline u64 cumul_hits(struct callchain_node *node) ...@@ -66,8 +66,8 @@ static inline u64 cumul_hits(struct callchain_node *node)
} }
int register_callchain_param(struct callchain_param *param); int register_callchain_param(struct callchain_param *param);
int append_chain(struct callchain_root *root, struct ip_callchain *chain, int callchain_append(struct callchain_root *root, struct ip_callchain *chain,
struct map_symbol *syms, u64 period); struct map_symbol *syms, u64 period);
bool ip_callchain__valid(struct ip_callchain *chain, const event_t *event); bool ip_callchain__valid(struct ip_callchain *chain, const event_t *event);
#endif /* __PERF_CALLCHAIN_H */ #endif /* __PERF_CALLCHAIN_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment