Skip to content
Advertisement

perf enable demangling of callgraph

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 Google Benchmark):

JavaScript

build command:

JavaScript

perf commands:

JavaScript

I’ve also tried enabling the –demangle option, but that doesn’t seem to affect the output.

callgraph missing demangled symbols:

JavaScript

annotated disassembly showing demangled calls:

JavaScript

System info:

  • Ubuntu 15.04 64-bit
  • Intel i5-6600k
  • perf 3.19.8-ckt6
  • clang 3.6.0-2ubuntu1

Advertisement

Answer

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:

JavaScript

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:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement