]> git.karo-electronics.de Git - linux-beck.git/commit
perf probe: Fix to show lines of sys_ functions correctly
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Wed, 12 Aug 2015 01:24:07 +0000 (10:24 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Aug 2015 16:20:27 +0000 (13:20 -0300)
commit75186a9b09e47072f442f43e292cd47180b67b5c
tree6e2dd157afabc61379468d0e8b8ad378c6a34069
parent63ab1749f39aeec27b0dcf71cd7996d862c5ad63
perf probe: Fix to show lines of sys_ functions correctly

"perf probe --lines sys_poll" shows only the first line of sys_poll,
because the SYSCALL_DEFINE macro:

  ----
  SYSCALL_DEFINE*(foo,...)
  {
    body;
  }
  ----

  is expanded as below (on debuginfo)

  ----

  static inline int SYSC_foo(...)
  {
    body;
  }
  int SyS_foo(...) <- is an alias of sys_foo.
  {
    return SYSC_foo(...);
  }
  ----

So, "perf probe --lines sys_foo" decodes SyS_foo function and it also skips
inlined functions(SYSC_foo) inside the target function because those functions
are usually defined somewhere else.

To fix this issue, this fix checks whether the inlined function is defined at
the same point of the target function, and if so, it doesn't skip the inline
function.

Reported-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: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150812012406.11811.94691.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dwarf-aux.c