public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf script: Add --[no-]-demangle/--[no-]-demangle-kernel
@ 2015-08-26 19:18 Yannick Brosseau
  2015-08-27 14:13 ` Arnaldo Carvalho de Melo
  2015-08-31  8:30 ` [tip:perf/core] perf script: Add --[no-]-demangle/--[no-] -demangle-kernel tip-bot for Mark Drayton
  0 siblings, 2 replies; 3+ messages in thread
From: Yannick Brosseau @ 2015-08-26 19:18 UTC (permalink / raw)
  To: ak, acme, jolsa; +Cc: linux-kernel, Mark Drayton, Yannick Brosseau

From: Mark Drayton <mbd@fb.com>

Summary: Sometimes when post-processing output from `perf script` one
does not want to demangle C++ symbol names. Add an option to allow this.
Also add --[no-]demangle-kernel to be consistent with top/report/probe.

Signed-off-by: Mark Drayton <mbd@fb.com>
Signed-off-by: Yannick Brosseau <scientist@fb.com>
---
 tools/perf/Documentation/perf-script.txt | 7 +++++++
 tools/perf/builtin-script.c              | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index c82df57..347c73a 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -222,6 +222,13 @@ OPTIONS
 --show-mmap-events
 	Display mmap related events (e.g. MMAP, MMAP2).
 
+--demangle::
+	Demangle symbol names to human readable form. It's enabled by default,
+	disable with --no-demangle.
+
+--demangle-kernel::
+	Demangle kernel symbol names to human readable form (for C++ kernels).
+
 --header
 	Show perf.data header.
 
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 24809787..f3b3ba0 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1622,6 +1622,10 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 	OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
 			    "Instruction Tracing options",
 			    itrace_parse_synth_opts),
+	OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
+		    "Enable symbol demangling"),
+	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
+		    "Enable kernel symbol demangling"),
 	OPT_END()
 	};
 	const char * const script_subcommands[] = { "record", "report", NULL };
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-31  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 19:18 [PATCH] perf script: Add --[no-]-demangle/--[no-]-demangle-kernel Yannick Brosseau
2015-08-27 14:13 ` Arnaldo Carvalho de Melo
2015-08-31  8:30 ` [tip:perf/core] perf script: Add --[no-]-demangle/--[no-] -demangle-kernel tip-bot for Mark Drayton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox