aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/callchain.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-06-30 23:35:14 -0400
committerIngo Molnar <mingo@elte.hu>2009-07-01 03:58:26 -0400
commit4424961ad6621a02c6b4c9093e801002c1bb9f65 (patch)
tree9851ec33de4b89fee395941af8fbbaab60ab2028 /tools/perf/util/callchain.h
parent9198aa77b69647d1d91207f8075763abe7dc0bf4 (diff)
perf_counter tools: Resolve symbols in callchains
This patch resolves the names, when possible, of each ip present in the callchains while using the -c option with perf report. Example: 5.40% [k] __d_lookup 5.37% perf_callchain perf_counter_overflow intel_pmu_handle_irq perf_counter_nmi_handler notifier_call_chain atomic_notifier_call_chain notify_die do_nmi nmi do_lookup __link_path_walk path_walk do_path_lookup user_path_at sys_faccessat sys_access system_call_fastpath 0x7fb609846f77 0.01% perf_callchain perf_counter_overflow intel_pmu_handle_irq perf_counter_nmi_handler notifier_call_chain atomic_notifier_call_chain notify_die do_nmi nmi do_lookup __link_path_walk path_walk do_path_lookup user_path_at sys_faccessat Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Anton Blanchard <anton@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <1246419315-9968-3-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r--tools/perf/util/callchain.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index fa1cd2f71fd3..c942daa712e6 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -4,6 +4,7 @@
4#include "../perf.h" 4#include "../perf.h"
5#include "list.h" 5#include "list.h"
6#include "rbtree.h" 6#include "rbtree.h"
7#include "symbol.h"
7 8
8 9
9struct callchain_node { 10struct callchain_node {
@@ -18,6 +19,7 @@ struct callchain_node {
18 19
19struct callchain_list { 20struct callchain_list {
20 unsigned long ip; 21 unsigned long ip;
22 struct symbol *sym;
21 struct list_head list; 23 struct list_head list;
22}; 24};
23 25
@@ -28,6 +30,7 @@ static inline void callchain_init(struct callchain_node *node)
28 INIT_LIST_HEAD(&node->val); 30 INIT_LIST_HEAD(&node->val);
29} 31}
30 32
31void append_chain(struct callchain_node *root, struct ip_callchain *chain); 33void append_chain(struct callchain_node *root, struct ip_callchain *chain,
34 struct symbol **syms);
32void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node); 35void sort_chain_to_rbtree(struct rb_root *rb_root, struct callchain_node *node);
33#endif 36#endif