From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935556AbdGTJAt (ORCPT ); Thu, 20 Jul 2017 05:00:49 -0400 Received: from terminus.zytor.com ([65.50.211.136]:48389 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934945AbdGTJAq (ORCPT ); Thu, 20 Jul 2017 05:00:46 -0400 Date: Thu, 20 Jul 2017 01:58:01 -0700 From: tip-bot for Jin Yao Message-ID: Cc: yao.jin@linux.intel.com, ak@linux.intel.com, alexander.shishkin@linux.intel.com, kan.liang@intel.com, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, hpa@zytor.com, peterz@infradead.org, milian.wolff@kdab.com, linux-kernel@vger.kernel.org, acme@redhat.com Reply-To: hpa@zytor.com, jolsa@kernel.org, peterz@infradead.org, milian.wolff@kdab.com, linux-kernel@vger.kernel.org, acme@redhat.com, yao.jin@linux.intel.com, alexander.shishkin@linux.intel.com, ak@linux.intel.com, kan.liang@intel.com, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1500409892-15904-1-git-send-email-yao.jin@linux.intel.com> References: <1500409892-15904-1-git-send-email-yao.jin@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf report: Enable finding kernel inline functions Git-Commit-ID: 8b8ef2d74dec305b99dd43ec71d3ba2f502100b9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8b8ef2d74dec305b99dd43ec71d3ba2f502100b9 Gitweb: http://git.kernel.org/tip/8b8ef2d74dec305b99dd43ec71d3ba2f502100b9 Author: Jin Yao AuthorDate: Wed, 19 Jul 2017 04:31:32 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 18 Jul 2017 23:14:27 -0300 perf report: Enable finding kernel inline functions 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 Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Milian Wolff Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1500409892-15904-1-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- 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)