perf annotate: Do not ignore call instruction with indirect target
authorRavi Bangoria <[email protected]>
Fri, 19 Aug 2016 12:59:35 +0000 (18:29 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Tue, 20 Sep 2016 15:28:29 +0000 (12:28 -0300)
commit88a7fcf961a27fbd248e3c914fc9df8327f7cdbb
treeda007b6b00f0c1977cae62dce4eb9d996291c161
parentf666ac0dab5afaf6ebed2c361251581bfccc4003
perf annotate: Do not ignore call instruction with indirect target

Do not ignore call instruction with indirect target when its already
identified as a call. This is an extension of commit e8ea1561952b ("perf
annotate: Use raw form for register indirect call instructions") to
generalize annotation for all instructions with indirect calls.

This is needed for certain powerpc call instructions that use address in
a register (such as bctrl, btarl, ...).

Apart from that, when kcore is used to disassemble function, all call
instructions were ignored. This patch will fix it as a side effect by
not ignoring them. For example,

Before (with kcore):
       mov    %r13,%rdi
       callq  0xffffffff811a7e70
     ^ jmpq   64
       mov    %gs:0x7ef41a6e(%rip),%al

After (with kcore):
       mov    %r13,%rdi
     > callq  0xffffffff811a7e70
     ^ jmpq   64
       mov    %gs:0x7ef41a6e(%rip),%al

Suggested-by: Michael Ellerman <[email protected]>
[Suggested about 'bctrl' instruction]
Signed-off-by: Ravi Bangoria <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Chris Riyder <[email protected]>
Cc: Hemant Kumar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Markus Trippelsdorf <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Naveen N. Rao <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Russell King <[email protected]>
Cc: Taeung Song <[email protected]>
Link: http://lkml.kernel.org/r/1471611578-11255-5-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/annotate.c