aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMark Drayton <mbd@fb.com>2015-08-26 15:18:15 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-08-28 10:47:40 -0400
commit77e0070da41f76e1ebd15291fb0254b0c174adfa (patch)
treedaf7fa3a6022da4cda64888fa90bddacdb4a1611 /tools
parentd1ee8bc195ffedbf91af0245a2406d6ebd2578f8 (diff)
perf script: Add --[no-]-demangle/--[no-]-demangle-kernel
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> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/1440616695-32340-1-git-send-email-scientist@fb.com Signed-off-by: Yannick Brosseau <scientist@fb.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Documentation/perf-script.txt7
-rw-r--r--tools/perf/builtin-script.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index c0d24791a7f3..614b2c7b0293 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -226,6 +226,13 @@ OPTIONS
226 Display context switch events i.e. events of type PERF_RECORD_SWITCH or 226 Display context switch events i.e. events of type PERF_RECORD_SWITCH or
227 PERF_RECORD_SWITCH_CPU_WIDE. 227 PERF_RECORD_SWITCH_CPU_WIDE.
228 228
229--demangle::
230 Demangle symbol names to human readable form. It's enabled by default,
231 disable with --no-demangle.
232
233--demangle-kernel::
234 Demangle kernel symbol names to human readable form (for C++ kernels).
235
229--header 236--header
230 Show perf.data header. 237 Show perf.data header.
231 238
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 105332e950a9..4430340292c0 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1671,6 +1671,11 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
1671 itrace_parse_synth_opts), 1671 itrace_parse_synth_opts),
1672 OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename, 1672 OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
1673 "Show full source file name path for source lines"), 1673 "Show full source file name path for source lines"),
1674 OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
1675 "Enable symbol demangling"),
1676 OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
1677 "Enable kernel symbol demangling"),
1678
1674 OPT_END() 1679 OPT_END()
1675 }; 1680 };
1676 const char * const script_subcommands[] = { "record", "report", NULL }; 1681 const char * const script_subcommands[] = { "record", "report", NULL };