perf script: Print branch_from and branch_to of BTS events
authorAkihiro Nagai <akihiro.nagai.hw@hitachi.com>
Mon, 30 Jan 2012 04:43:09 +0000 (13:43 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Jan 2012 20:08:43 +0000 (18:08 -0200)
commit9558259697b827106b464648e850e568e0b0c931
tree34d1656764bfcee2d5c931d73f2519c78f7cfd95
parent547a92e0aedb88129e7fbd804697a11949de2e5a
perf script: Print branch_from and branch_to of BTS events

BTS records branch_from_addr and branch_to_addr in IP and ADDR field in perf_sample.
This patch enables to print them in following format,

<from_addr> <from_symbol> (<from_dso>) => <to_addr> <to_symbol> (<to_dso>)

Sample:
 ffffffff814675d2 irq_return ([kernel.kallsyms]) => 3f03e016b0    _start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) => 3f03e016b0    _start (/lib64/ld-2.14.so)
       3f03e016b3     _start (/lib64/ld-2.14.so) => 3f03e04b80 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) => 3f03e04b80 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) => 3f03e04ba6 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) => 3f03e04bad _dl_start (/lib64/ld-2.14.so)
       3f03e04bfb  _dl_start (/lib64/ld-2.14.so) => 3f03e04c1d _dl_start (/lib64/ld-2.14.so)
[snip]

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20120130044309.2384.44252.stgit@linux3
Signed-off-by: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c