perf enable demangling of callgraph

后端 未结 2 1391
旧时难觅i
旧时难觅i 2020-12-28 17:35

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

2条回答
  •  不知归路
    2020-12-28 18:17

    If you don't understand what to download from packages.ubuntu.com (as in the first answer), then you also can download linux kernel sources from git:

    sudo apt-get install libiberty-dev binutils-dev
    mkdir ~/install
    cd ~/install
    git clone https://github.com/torvalds/linux --depth 1
    cd linux/tools/perf
    make
    
    # now you should see the new "perf" executable here
    ./perf
    

    And modify path (as in the first answer):

    export PATH=~/install/linux/tools/perf:$PATH
    

提交回复
热议问题