From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbdGRMen (ORCPT ); Tue, 18 Jul 2017 08:34:43 -0400 Received: from mga06.intel.com ([134.134.136.31]:61431 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbdGRMel (ORCPT ); Tue, 18 Jul 2017 08:34:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,377,1496127600"; d="scan'208";a="112621581" From: Jin Yao To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, milian.wolff@kdab.com Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH] perf report: Enable finding the kernel inline function Date: Wed, 19 Jul 2017 04:31:32 +0800 Message-Id: <1500409892-15904-1-git-send-email-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently perf has supported a mode to query inline stack. It works well for finding the user space inline function but it doesn't work for finding kernel inline function due to some unnecessary checking. This patch removes these unnecessary checking. Now the kernel inline function 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 are match. Signed-off-by: Jin Yao --- tools/perf/ui/browsers/hists.c | 3 --- tools/perf/ui/stdio/hist.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 69f4570..f4bc246 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -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)); diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index 42e432b..2df8eb1 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c @@ -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) -- 2.7.4