Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591755

[PATCH v4 3/5] perf report: Create new inline option

From Jin Yao <yao.jin@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v4 3/5] perf report: Create new inline option
Date 2017-03-03 10:00 +0100
Message-ID <tgRea-75L-11@gated-at.bofh.it> (permalink)
References <tgLs6-2V8-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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

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

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 33f9190..2bfd50b 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -425,6 +425,10 @@ include::itrace.txt[]
 --hierarchy::
 	Enable hierarchical output.
 
+--inline::
+	If a callgraph address belongs to an inlined function, the inline stack
+	will be printed. Each entry is the inline function name.
+
 include::callchain-overhead-calculation.txt[]
 
 SEE ALSO
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0a88670..900c020 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -845,6 +845,8 @@ 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", &symbol_conf.inline_name,
+		    "Show inline function"),
 	OPT_END()
 	};
 	struct perf_data_file file = {
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 8adf045..7b4a399 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -118,7 +118,8 @@ struct symbol_conf {
 			show_ref_callgraph,
 			hide_unresolved,
 			raw_trace,
-			report_hierarchy;
+			report_hierarchy,
+			inline_name;
 	const char	*vmlinux_name,
 			*kallsyms_name,
 			*source_prefix,
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/5] perf report: Show inline stack Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 03:50 +0100
  [PATCH v4 1/5] perf report: Refactor common code in srcline.c Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 03:50 +0100
  [PATCH v4 2/5] perf report: Find the inline stack for a given address Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 07:40 +0100
  [PATCH v4 4/5] perf report: Show inline stack in stdio mode Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 08:20 +0100
  [PATCH v4 3/5] perf report: Create new inline option Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 10:00 +0100
  [PATCH v4 5/5] perf report: Show inline stack in browser mode Jin Yao <yao.jin@linux.intel.com> - 2017-03-03 13:10 +0100
  Re: [PATCH v4 0/5] perf report: Show inline stack "Jin, Yao" <yao.jin@linux.intel.com> - 2017-03-14 02:20 +0100

csiph-web