• Masami Hiramatsu's avatar
    perf probe: Support DW_OP_call_frame_cfa in debuginfo · a34a9854
    Masami Hiramatsu authored
    When building kernel without CONFIG_FRAME_POINTER, gcc uses
    CFA (canonical frame address) for frame base. With this patch,
    perf probe just gets CFI (call frame information) from debuginfo
    and search corresponding CFA from the CFI. IOW, this allows
    perf probe works correctly on the kernel without CONFIG_FRAME_POINTER.
    
    <Before>
     ./perf probe -fn sched_slice:12 lw.weight
      Fatal: DW_OP 156 is not supported.
                  (^^^ DW_OP_call_frame_cfa)
    
    <After>
    ./perf probe -fn sched_slice:12 lw.weight
    Add new event:
      probe:sched_slice    (on sched_slice:12 with weight=lw.weight)
    
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <20100412171728.3790.98217.stgit@localhost6.localdomain6>
    Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    a34a9854
probe-finder.h 1.69 KB