diff options
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/builtin-report.c | 3 | ||||
| -rw-r--r-- | tools/perf/util/callchain.c | 23 | ||||
| -rw-r--r-- | tools/perf/util/callchain.h | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 7d35a719c950..5de405d45230 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
| @@ -107,7 +107,8 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
| 107 | goto out_free_syms; | 107 | goto out_free_syms; |
| 108 | err = 0; | 108 | err = 0; |
| 109 | if (symbol_conf.use_callchain) { | 109 | if (symbol_conf.use_callchain) { |
| 110 | err = append_chain(he->callchain, data->callchain, syms, data->period); | 110 | err = callchain_append(he->callchain, data->callchain, syms, |
| 111 | data->period); | ||
| 111 | if (err) | 112 | if (err) |
| 112 | goto out_free_syms; | 113 | goto out_free_syms; |
| 113 | } | 114 | } |
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index f0b23f309edc..59cc0e12dd40 100644 --- a/tools/perf/util/callchain.c +++ b/tools/perf/util/callchain.c | |||
| @@ -284,19 +284,18 @@ split_add_child(struct callchain_node *parent, struct resolved_chain *chain, | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | static int | 286 | static int |
| 287 | __append_chain(struct callchain_node *root, struct resolved_chain *chain, | 287 | append_chain(struct callchain_node *root, struct resolved_chain *chain, |
| 288 | unsigned int start, u64 period); | 288 | unsigned int start, u64 period); |
| 289 | 289 | ||
| 290 | static void | 290 | static void |
| 291 | __append_chain_children(struct callchain_node *root, | 291 | append_chain_children(struct callchain_node *root, struct resolved_chain *chain, |
| 292 | struct resolved_chain *chain, | 292 | unsigned int start, u64 period) |
| 293 | unsigned int start, u64 period) | ||
| 294 | { | 293 | { |
| 295 | struct callchain_node *rnode; | 294 | struct callchain_node *rnode; |
| 296 | 295 | ||
| 297 | /* lookup in childrens */ | 296 | /* lookup in childrens */ |
| 298 | chain_for_each_child(rnode, root) { | 297 | chain_for_each_child(rnode, root) { |
| 299 | unsigned int ret = __append_chain(rnode, chain, start, period); | 298 | unsigned int ret = append_chain(rnode, chain, start, period); |
| 300 | 299 | ||
| 301 | if (!ret) | 300 | if (!ret) |
| 302 | goto inc_children_hit; | 301 | goto inc_children_hit; |
| @@ -309,8 +308,8 @@ inc_children_hit: | |||
| 309 | } | 308 | } |
| 310 | 309 | ||
| 311 | static int | 310 | static int |
| 312 | __append_chain(struct callchain_node *root, struct resolved_chain *chain, | 311 | append_chain(struct callchain_node *root, struct resolved_chain *chain, |
| 313 | unsigned int start, u64 period) | 312 | unsigned int start, u64 period) |
| 314 | { | 313 | { |
| 315 | struct callchain_list *cnode; | 314 | struct callchain_list *cnode; |
| 316 | unsigned int i = start; | 315 | unsigned int i = start; |
| @@ -357,7 +356,7 @@ __append_chain(struct callchain_node *root, struct resolved_chain *chain, | |||
| 357 | } | 356 | } |
| 358 | 357 | ||
| 359 | /* We match the node and still have a part remaining */ | 358 | /* We match the node and still have a part remaining */ |
| 360 | __append_chain_children(root, chain, i, period); | 359 | append_chain_children(root, chain, i, period); |
| 361 | 360 | ||
| 362 | return 0; | 361 | return 0; |
| 363 | } | 362 | } |
| @@ -380,8 +379,8 @@ static void filter_context(struct ip_callchain *old, struct resolved_chain *new, | |||
| 380 | } | 379 | } |
| 381 | 380 | ||
| 382 | 381 | ||
| 383 | int append_chain(struct callchain_root *root, struct ip_callchain *chain, | 382 | int callchain_append(struct callchain_root *root, struct ip_callchain *chain, |
| 384 | struct map_symbol *syms, u64 period) | 383 | struct map_symbol *syms, u64 period) |
| 385 | { | 384 | { |
| 386 | struct resolved_chain *filtered; | 385 | struct resolved_chain *filtered; |
| 387 | 386 | ||
| @@ -398,7 +397,7 @@ int append_chain(struct callchain_root *root, struct ip_callchain *chain, | |||
| 398 | if (!filtered->nr) | 397 | if (!filtered->nr) |
| 399 | goto end; | 398 | goto end; |
| 400 | 399 | ||
| 401 | __append_chain_children(&root->node, filtered, 0, period); | 400 | append_chain_children(&root->node, filtered, 0, period); |
| 402 | 401 | ||
| 403 | if (filtered->nr > root->max_depth) | 402 | if (filtered->nr > root->max_depth) |
| 404 | root->max_depth = filtered->nr; | 403 | root->max_depth = filtered->nr; |
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 9b93a38e88ec..85b50fbeae52 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h | |||
| @@ -66,8 +66,8 @@ static inline u64 cumul_hits(struct callchain_node *node) | |||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | int register_callchain_param(struct callchain_param *param); | 68 | int register_callchain_param(struct callchain_param *param); |
| 69 | int append_chain(struct callchain_root *root, struct ip_callchain *chain, | 69 | int callchain_append(struct callchain_root *root, struct ip_callchain *chain, |
| 70 | struct map_symbol *syms, u64 period); | 70 | struct map_symbol *syms, u64 period); |
| 71 | 71 | ||
| 72 | bool ip_callchain__valid(struct ip_callchain *chain, const event_t *event); | 72 | bool ip_callchain__valid(struct ip_callchain *chain, const event_t *event); |
| 73 | #endif /* __PERF_CALLCHAIN_H */ | 73 | #endif /* __PERF_CALLCHAIN_H */ |
