perf probe: Improve error message when %return is on inlined function
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Wed, 30 Sep 2015 16:41:37 +0000 (01:41 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 30 Sep 2015 21:34:37 +0000 (18:34 -0300)
commit6cca13bdf5a5d561a855259689874e0c7266eec3
tree2e038c865fd5197ff47ab1f1648058014b359046
parent20f49859c785183d5296670a10dace454131274b
perf probe: Improve error message when %return is on inlined function

perf probe shows more precisely message when it finds given
%return target function is inlined.

Without this fix:
  ----
  # ./perf probe -V getname_flags%return
  Return probe must be on the head of a real function.
  Debuginfo analysis failed.
    Error: Failed to show vars.
  ----

With this fix:
  ----
  # ./perf probe -V getname_flags%return
  Failed to find "getname_flags%return",
   because getname_flags is an inlined function and has no return point.
  Debuginfo analysis failed.
    Error: Failed to show vars.
  ----

Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20150930164137.3733.55055.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-finder.c