path: root/tools/perf/builtin-probe.c
diff options
authorAzat Khuzhin <>2013-10-28 12:04:24 +0400
committerArnaldo Carvalho de Melo <>2013-11-14 16:06:28 -0300
commit35e17b2450e09968f9702d4048c228199af171bc (patch)
tree27f883b5c0be369a5b13ea0da695ef08925a06ce /tools/perf/builtin-probe.c
parent48d038fcd09fa231e254965c3b69f8f640c9e62d (diff)
perf probe: Add '--demangle'/'--no-demangle'
You can't pass demangled name into "perf probe", because of special chars: ./perf probe -f -x /tmp/a.out 'foo(int)' Semantic error :There is non-digit char in line number. And you can't even pass without demangling (because it search symbol in DSO with demangle=true): ./perf probe -f -x /tmp/a.out _Z3fooi no symbols found in /tmp/a.out, maybe install a debug package? However: nm /tmp/a.out | grep foo 000000000040056d T _Z3fooi After this patch, using the next command: ./perf probe -f --no-demangle -x /tmp/a.out _Z3fooi probe will be successfully added. Signed-off-by: Azat Khuzhin <> Cc: Ingo Molnar <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-probe.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 89acc17cf2a0..6ea9e85bdc00 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -325,6 +325,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
OPT_CALLBACK('x', "exec", NULL, "executable|path",
"target executable name or path", opt_set_target),
+ OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
+ "Disable symbol demangling"),
int ret;