]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf report: Enable finding kernel inline functions
authorJin Yao <yao.jin@linux.intel.com>
Tue, 18 Jul 2017 20:31:32 +0000 (04:31 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Jul 2017 02:14:27 +0000 (23:14 -0300)
Currently perf supports a mode to query inline stack. It works well for
finding user space inline functions but it doesn't work for kernel ones,
due to some unnecessary check.

This patch removes these unnecessary checks. Now kernel inline functions
can be reported.

For example:

  perf report --inline -g func --stdio

  |--46.19%--do_huge_pmd_anonymous_page
  |          do_huge_pmd_anonymous_page (inline)
  |          __do_huge_pmd_anonymous_page (inline)
  |          __SetPageUptodate (inline)
  |          __set_bit (inline)

  The result is compared with the output of addr2line. They match.

Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1500409892-15904-1-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/hists.c
tools/perf/ui/stdio/hist.c

index 69f4570bd4f941bee8a67fc48741994ce41a127e..f4bc2462bc2ce5587721de5441d935223d615348 100644 (file)
@@ -166,9 +166,6 @@ static struct inline_node *inline_node__create(struct map *map, u64 ip)
        if (dso == NULL)
                return NULL;
 
-       if (dso->kernel != DSO_TYPE_USER)
-               return NULL;
-
        node = dso__parse_addr_inlines(dso,
                                       map__rip_2objdump(map, ip));
 
index 42e432bd2eb4b59a1f15f6af69c788c66a62f1af..2df8eb1ed3c01c55dc84f2bc19285507223e7764 100644 (file)
@@ -35,9 +35,6 @@ static size_t inline__fprintf(struct map *map, u64 ip, int left_margin,
        if (dso == NULL)
                return 0;
 
-       if (dso->kernel != DSO_TYPE_USER)
-               return 0;
-
        node = dso__parse_addr_inlines(dso,
                                       map__rip_2objdump(map, ip));
        if (node == NULL)