How do I enable C++ demangling for the perf callgraph? It seems to demangle symbols when I go into annotate mode, but not in the main callgraph.
Sample code (using G
I had the same problem on the Ubuntu 15.10 and I found the solution here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1396654
Update: works also for Ubuntu 18.10
Here are the steps:
sudo apt-get install libiberty-dev binutils-dev
mkdir ~/install
cd ~/install
# If the following apt-get doesn't work on your system,
# uncomment deb-src lines in your /etc/apt/sources.list,
# as suggested by @ctitze
# or you can download it manually from packages.ubuntu.com
# as @aleixrocks suggested in the comment below
apt-get source linux-tools-`uname -r`
sudo apt-get build-dep linux-tools-`uname -r`
cd linux-`uname -r | sed 's/-.*//'`/tools/perf
make
# now you should see the new "perf" executable here
./perf
There should be also some way to create a new linux-tools-common package to really integrate it into your system. For now to override the official perf with your new one, just set your PATH:
export PATH=~/install/linux-`uname -r | sed 's/-.*//'`/tools/perf:$PATH