linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf annotate: add --demangle and --demangle-kernel
@ 2021-02-22  8:29 Martin Liška
  2021-02-23 19:49 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Liška @ 2021-02-22  8:29 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users; +Cc: Arnaldo Carvalho de Melo

Perf annotate supports --symbol but it's impossible to filter
a C++ symbol. With --no-demangle one can filter easily by
mangled function name.

Signed-off-by: Martin Liška <mliska@suse.cz>
---
  tools/perf/Documentation/perf-annotate.txt | 7 +++++++
  tools/perf/builtin-annotate.c              | 4 ++++
  2 files changed, 11 insertions(+)

diff --git a/tools/perf/Documentation/perf-annotate.txt b/tools/perf/Documentation/perf-annotate.txt
index 1b5042f134a8..80c1be5d566c 100644
--- a/tools/perf/Documentation/perf-annotate.txt
+++ b/tools/perf/Documentation/perf-annotate.txt
@@ -124,6 +124,13 @@ OPTIONS
  --group::
  	Show event group information together
  
+--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).
+
  --percent-type::
  	Set annotation percent type from following choices:
  	  global-period, local-period, global-hits, local-hits
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index a23ba6bb99b6..ef70a17b9b5b 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -538,6 +538,10 @@ int cmd_annotate(int argc, const char **argv)
  		    "Strip first N entries of source file path name in programs (with --prefix)"),
  	OPT_STRING(0, "objdump", &annotate.opts.objdump_path, "path",
  		   "objdump binary to use for disassembly and annotations"),
+	OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
+		    "Disable symbol demangling"),
+	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
+		    "Enable kernel symbol demangling"),
  	OPT_BOOLEAN(0, "group", &symbol_conf.event_group,
  		    "Show event group information together"),
  	OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period,
-- 
2.30.1


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

end of thread, other threads:[~2021-03-30 18:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  8:29 [PATCH] perf annotate: add --demangle and --demangle-kernel Martin Liška
2021-02-23 19:49 ` Arnaldo Carvalho de Melo
2021-02-26 10:01   ` Martin Liška
2021-03-07 19:23     ` Martin Liška
2021-03-30  7:41       ` Martin Liška
2021-03-30 15:42         ` Arnaldo Carvalho de Melo
2021-03-30 18:19           ` Martin Liška
2021-03-30 18:23             ` Arnaldo Carvalho de Melo
2021-03-30 18:33             ` Martin Liška
2021-02-26 10:03   ` [PATCH] perf config: add annotate.demangle{,_kernel} Martin Liška
2021-02-26 10:08     ` Martin Liška
2021-03-06 13:22       ` Arnaldo Carvalho de Melo

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).