public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org
Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@linux.intel.com,
	milian.wolff@kdab.com
Subject: [PATCH v3 3/5] perf report: Create new inline options
Date: Fri, 20 Jan 2017 17:39:24 +0800	[thread overview]
Message-ID: <1484905166-10609-4-git-send-email-yao.jin@linux.intel.com> (raw)
In-Reply-To: <1484905166-10609-1-git-send-email-yao.jin@linux.intel.com>

It takes some time to look for inline stack for callgraph addresses.
So it provides new options "--inline-line" and "--inline-name" to
let user decide if enable this feature.

--inline-name:
If a callgraph address belongs to an inlined function, the inline stack
will be printed. Each entry is the inline function name.

--inline-line:
If a callgraph address belongs to an inlined function, the inline stack
will be printed. Each entry is the inline function source line.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
 tools/perf/Documentation/perf-report.txt | 8 ++++++++
 tools/perf/builtin-report.c              | 4 ++++
 tools/perf/util/symbol.h                 | 4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index f2914f0..9db800b 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -420,6 +420,14 @@ include::itrace.txt[]
 --hierarchy::
 	Enable hierarchical output.
 
+--inline-name::
+	If a callgraph address belongs to an inlined function, the inline stack
+	will be printed. Each entry is the inline function name.
+
+--inline-line::
+	If a callgraph address belongs to an inlined function, the inline stack
+	will be printed. Each entry is the inline function source line.
+
 include::callchain-overhead-calculation.txt[]
 
 SEE ALSO
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 06cc759..66f8218 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -837,6 +837,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 			     stdio__config_color, "always"),
 	OPT_STRING(0, "time", &report.time_str, "str",
 		   "Time span of interest (start,stop)"),
+	OPT_BOOLEAN(0, "inline-name", &symbol_conf.inline_name,
+		    "Show inline function name"),
+	OPT_BOOLEAN(0, "inline-line", &symbol_conf.inline_line,
+		    "Show inline function source line"),
 	OPT_END()
 	};
 	struct perf_data_file file = {
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 8adf045..0b2a0d2 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -118,7 +118,9 @@ struct symbol_conf {
 			show_ref_callgraph,
 			hide_unresolved,
 			raw_trace,
-			report_hierarchy;
+			report_hierarchy,
+			inline_name,
+			inline_line;
 	const char	*vmlinux_name,
 			*kallsyms_name,
 			*source_prefix,
-- 
2.7.4

  parent reply	other threads:[~2017-01-20  1:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  9:39 [PATCH v3 0/5] perf report: Show inline stack Jin Yao
2017-01-20  9:39 ` [PATCH v3 1/5] perf report: Refactor common code in srcline.c Jin Yao
2017-01-20  9:39 ` [PATCH v3 2/5] perf report: Find the inline stack for a given address Jin Yao
2017-01-20  9:39 ` Jin Yao [this message]
2017-01-20  9:39 ` [PATCH v3 4/5] perf report: Show inline stack in stdio mode Jin Yao
2017-01-20  9:39 ` [PATCH v3 5/5] perf report: Show inline stack in browser mode Jin Yao
2017-02-21  0:28 ` [PATCH v3 0/5] perf report: Show inline stack Jin, Yao
2017-03-02 21:42   ` Milian Wolff
2017-03-03  2:38     ` Jin, Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484905166-10609-4-git-send-email-yao.jin@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=milian.wolff@kdab.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox