public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Drayton <mbd@fb.com>
To: <acme@kernel.org>
Cc: <a.p.zijlstra@chello.nl>, <paulus@samba.org>, <mingo@redhat.com>,
	<linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
	Mark Drayton <mbd@fb.com>
Subject: [PATCH] perf script: Add --[no-]-demangle/--[no-]-demangle-kernel
Date: Mon, 9 Feb 2015 09:21:07 -0800	[thread overview]
Message-ID: <1423502467-1497010-1-git-send-email-mbd@fb.com> (raw)

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>
---
 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 2149480..4b8a42e 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -209,6 +209,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 ce304df..95d3cd9 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1570,6 +1570,10 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "Show the fork/comm/exit events"),
 	OPT_BOOLEAN('\0', "show-mmap-events", &script.show_mmap_events,
 		    "Show the mmap events"),
+	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_usage[] = {
-- 
1.8.1


             reply	other threads:[~2015-02-09 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 17:21 Mark Drayton [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=1423502467-1497010-1-git-send-email-mbd@fb.com \
    --to=mbd@fb.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /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