Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 763122ad authored by Avi Kivity's avatar Avi Kivity Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Disable kernel symbol demangling by default



Some Linux symbols (for example __vt_event_wait) are interpreted by the
demangler as C++ mangled names, which of course they aren't.

Disable kernel symbol demangling by default to avoid this, and allow
enabling it with a new option --demangle-kernel for those who wish it.

Reported-by: default avatarJiri Olsa <jolsa@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1410581705-26968-1-git-send-email-avi@cloudius-systems.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 29a3ce31
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ OPTIONS
	Specify path to the executable or shared library file for user
	space tracing. Can also be used with --funcs option.

--demangle-kernel::
	Demangle kernel symbols.

In absence of -m/-x options, perf probe checks if the first argument after
the options is an absolute path name. If its an absolute path, perf probe
uses it as a target module/target user space binary to probe.
+3 −0
Original line number Diff line number Diff line
@@ -276,6 +276,9 @@ OPTIONS
	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).

--mem-mode::
	Use the data addresses of samples in addition to instruction addresses
	to build the histograms.  To generate meaningful output, the perf.data
+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,9 @@ Default is to monitor all CPUS.
--hide_user_symbols::
        Hide user symbols.

--demangle-kernel::
        Demangle kernel symbols.

-D::
--dump-symtab::
        Dump the symbol table used for profiling.
+2 −0
Original line number Diff line number Diff line
@@ -376,6 +376,8 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
			"target executable name or path", opt_set_target),
	OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
		    "Disable symbol demangling"),
	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
		    "Enable kernel symbol demangling"),
	OPT_END()
	};
	int ret;
+2 −0
Original line number Diff line number Diff line
@@ -680,6 +680,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
		   "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, "mem-mode", &report.mem_mode, "mem access profile"),
	OPT_CALLBACK(0, "percent-limit", &report, "percent",
		     "Don't show entries under that percent", parse_percent_limit),
Loading