Commit 77e0070d authored by Mark Drayton's avatar Mark Drayton Committed by Arnaldo Carvalho de Melo

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: default avatarMark 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.comSigned-off-by: default avatarYannick Brosseau <scientist@fb.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d1ee8bc1
...@@ -226,6 +226,13 @@ OPTIONS ...@@ -226,6 +226,13 @@ OPTIONS
Display context switch events i.e. events of type PERF_RECORD_SWITCH or Display context switch events i.e. events of type PERF_RECORD_SWITCH or
PERF_RECORD_SWITCH_CPU_WIDE. PERF_RECORD_SWITCH_CPU_WIDE.
--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 --header
Show perf.data header. Show perf.data header.
......
...@@ -1671,6 +1671,11 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) ...@@ -1671,6 +1671,11 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
itrace_parse_synth_opts), itrace_parse_synth_opts),
OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename, OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
"Show full source file name path for source lines"), "Show full source file name path for source lines"),
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() OPT_END()
}; };
const char * const script_subcommands[] = { "record", "report", NULL }; const char * const script_subcommands[] = { "record", "report", NULL };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment