• Akihiro Nagai's avatar
    perf script: Print branch_from and branch_to of BTS events · 95582596
    Akihiro Nagai authored
    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@linux3Signed-off-by: default avatarAkihiro Nagai <akihiro.nagai.hw@hitachi.com>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    95582596
builtin-script.c 32.4 KB