Bug 55571 - Have a --no-demangle option for "perf report"
Summary: Have a --no-demangle option for "perf report"
Status: ASSIGNED
Alias: None
Product: Tracing/Profiling
Classification: Unclassified
Component: Perf tool (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Namhyung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-21 19:34 UTC by William Cohen
Modified: 2013-07-08 19:16 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description William Cohen 2013-03-21 19:34:00 UTC
There are cases when one would want to know the actual function name in the binary rather the the demangled human readable name, for example other tools using the perf output to do manipulation of binaries. Having a means of turning off the demangling in perf report would useful.
Comment 1 Arnaldo Carvalho de Melo 2013-03-25 20:47:24 UTC
I merged Namhyung --no-demangle patch, but I think it would be great to be able to switch this on the fly, i.e. to assign a hotkey to toggle symbol_conf.demangle

For that we would have to save both the mangled and demangled symbol name on 'struct symbol', having a bool symbol->demangled that if true means that symbol->name + symbol->namelen + 1 had the demangled symbol name and symbol->name had the mangled name, symbol__name(symbol) would check symbol_conf->demangle, etc.
Comment 2 William Cohen 2013-03-25 22:08:45 UTC
For the purposes that I have, Namhyung's patch works well.  However, I can see where it would be nice to toggle between the mangled/demangled as the developer is referring to both things in binaries and source code.
Comment 3 Namhyung Kim 2013-03-26 00:16:42 UTC
I'm not sure it'd ok to have both symbol names always.  In most cases user might want demangled names only, and if so it's just wasting the memory.

Note You need to log in before you can comment on or make changes to this bug.