• Arnaldo Carvalho de Melo's avatar
    perf annotate: Resolve 'call' operands to function names · 5f62d4fd
    Arnaldo Carvalho de Melo authored
    Before this patch the '_raw_spin_lock_irqsave' and 'update_rq_clock' operands
    were appearing just as hexadecimal numbers:
    
      update_blocked_averages  /proc/kcore
           │       push   %r12
           │       push   %rbx
           │       and    $0xfffffffffffffff0,%rsp
           │       sub    $0x40,%rsp
           │       add    -0x662cac00(,%rdi,8),%rax
           │       mov    %rax,%rbx
           │       mov    %rax,%rdi
           │       mov    %rax,0x38(%rsp)
           │     → callq  _raw_spin_lock_irqsave
           │       mov    %rbx,%rdi
           │       mov    %rax,0x30(%rsp)
           │     → callq  update_rq_clock
           │       mov    0x8d0(%rbx),%rax
           │       lea    0x8d0(%rbx),%r11
    
    To check that all is right one can always use the 'o' hotkey and see
    the original objdump -dS output, that for this case is:
    
      update_blocked_averages  /proc/kcore
           │ffffffff990d5489:   push   %r12
           │ffffffff990d548b:   push   %rbx
           │ffffffff990d548c:   and    $0xfffffffffffffff0,%rsp
           │ffffffff990d5490:   sub    $0x40,%rsp
           │ffffffff990d5494:   add    -0x662cac00(,%rdi,8),%rax
           │ffffffff990d549c:   mov    %rax,%rbx
           │ffffffff990d549f:   mov    %rax,%rdi
           │ffffffff990d54a2:   mov    %rax,0x38(%rsp)
           │ffffffff990d54a7: → callq  0xffffffff997eb7a0
           │ffffffff990d54ac:   mov    %rbx,%rdi
           │ffffffff990d54af:   mov    %rax,0x30(%rsp)
           │ffffffff990d54b4: → callq  0xffffffff990c7720
           │ffffffff990d54b9:   mov    0x8d0(%rbx),%rax
           │ffffffff990d54c0:   lea    0x8d0(%rbx),%r11
    
    Use the 'h' hotkey to see a list of available hotkeys.
    
    More work needed to cover operands for other instructions, such as 'mov',
    that can resolve variable names, etc.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Chris Riyder <chris.ryder@arm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Cc: Pawel Moll <pawel.moll@arm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
    Cc: Russell King <rmk+kernel@arm.linux.org.uk>
    Cc: Taeung Song <treeze.taeung@gmail.com>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/n/tip-xqgtw9mzmzcjgwkis9kiiv1p@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    5f62d4fd
annotate.c 42.3 KB