perf probe: Show appropriate symbol for ref_reloc_sym based kprobes
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 6 Feb 2014 05:32:20 +0000 (05:32 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Feb 2014 12:34:51 +0000 (09:34 -0300)
commit8f33f7deac485a61f38aa690b85489322a4d958e
tree7b04900ac991f0022cdfcd3f4fdda8fccf7bb485
parentf90acac75713cc6f18a4b2f1b9162bc1cd893c20
perf probe: Show appropriate symbol for ref_reloc_sym based kprobes

Show appropriate symbol for ref_reloc_sym based kprobes instead of
refpoint+offset when perf-probe -l runs without debuginfo.

Without this change:
  # ./perf probe -l
    probe:t_show         (on _stext+889880 with m v)
    probe:t_show_1       (on _stext+928568 with m v t)
    probe:t_show_2       (on _stext+969512 with m v fmt)
    probe:t_show_3       (on _stext+1001416 with m v file)

With this change:
  # ./perf probe -l
    probe:t_show         (on t_show with m v)
    probe:t_show_1       (on t_show with m v t)
    probe:t_show_2       (on t_show with m v fmt)
    probe:t_show_3       (on t_show with m v file)

Changes from v2:
 - Check ref_reloc_sym to find correct unrelocated address.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: "David A. Long" <dave.long@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20140206053220.29635.81819.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c