linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Mark Drayton <mbd@fb.com>,
	Andi Kleen <ak@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>,
	Yannick Brosseau <scientist@fb.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/10] perf script: Add --[no-]-demangle/--[no-]-demangle-kernel
Date: Fri, 28 Aug 2015 15:06:27 -0300	[thread overview]
Message-ID: <1440785196-27476-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1440785196-27476-1-git-send-email-acme@kernel.org>

From: Mark Drayton <mbd@fb.com>

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>
---
 tools/perf/Documentation/perf-script.txt | 7 +++++++
 tools/perf/builtin-script.c              | 5 +++++
 2 files changed, 12 insertions(+)

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
 	Display context switch events i.e. events of type PERF_RECORD_SWITCH or
 	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
 	Show perf.data header.
 
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)
 			    itrace_parse_synth_opts),
 	OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
 			"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()
 	};
 	const char * const script_subcommands[] = { "record", "report", NULL };
-- 
2.1.0


  reply	other threads:[~2015-08-28 18:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 18:06 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-08-28 18:06 ` Arnaldo Carvalho de Melo [this message]
2015-08-28 18:06 ` [PATCH 02/10] tools lib traceeveent: Allow for negative numbers in print format Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 03/10] perf scripts python: Add new compaction-times script Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 04/10] perf trace: Add header with copyright and background info Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 05/10] perf evsel: Add a backpointer to the evlist a evsel is in Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 06/10] perf buildid: Introduce sysfs/filename__sprintf_build_id Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 07/10] perf tools: Add tracing_path and remove unneeded functions Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 08/10] perf tools: Do not change lib/api/fs/debugfs directly Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 09/10] perf tools: Rename perf_session_env to perf_env Arnaldo Carvalho de Melo
2015-08-28 18:06 ` [PATCH 10/10] perf evlist: Add backpointer for perf_env to evlist Arnaldo Carvalho de Melo
2015-08-31  8:28 ` [GIT PULL 00/10] perf/core improvements and fixes Ingo Molnar

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=1440785196-27476-2-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbd@fb.com \
    --cc=mingo@kernel.org \
    --cc=scientist@fb.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;
as well as URLs for NNTP newsgroup(s).