diff options
author | Andi Kleen <ak@linux.intel.com> | 2013-07-18 15:33:57 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-07-22 12:42:18 -0300 |
commit | 99571ab3d9b342a717295a9c7e2b4495ee19e32a (patch) | |
tree | 57ed4dcf8286243b1451e0c1c4b472e70b7bf2f7 /tools/perf/util/callchain.h | |
parent | a198996c7afae0097c67a61851f19863e59697b2 (diff) | |
download | op-kernel-dev-99571ab3d9b342a717295a9c7e2b4495ee19e32a.zip op-kernel-dev-99571ab3d9b342a717295a9c7e2b4495ee19e32a.tar.gz |
perf tools: Support callchain sorting based on addresses
With programs with very large functions it can be useful to distinguish
the callgraph nodes on more than just function names. So for example if
you have multiple calls to the same function, it ends up being separate
nodes in the chain.
This patch adds a new key field to the callgraph options, that allows
comparing nodes on functions (as today, default) and addresses.
Longer term it would be nice to also handle src lines, but that would
need more changes and address is a reasonable proxy for it today.
I right now reference the global params, as there was no simple way to
register a params pointer.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-0uskktybf0e7wrnoi5e9b9it@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r-- | tools/perf/util/callchain.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 3ee9f67..812d5a0 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -41,12 +41,18 @@ struct callchain_param; typedef void (*sort_chain_func_t)(struct rb_root *, struct callchain_root *, u64, struct callchain_param *); +enum chain_key { + CCKEY_FUNCTION, + CCKEY_ADDRESS +}; + struct callchain_param { enum chain_mode mode; u32 print_limit; double min_percent; sort_chain_func_t sort; enum chain_order order; + enum chain_key key; }; struct callchain_list { |