Netflix / flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Apache License 2.0
3.02k stars 169 forks source link

Add a note about c++filt #46

Closed bobrik closed 6 years ago

bobrik commented 6 years ago

Converting this:

_ZN8tcmalloc15CentralFreeList11RemoveRangeEPPvS2_i

into this:

tcmalloc::CentralFreeList::RemoveRange(void**, void**, int)
brendangregg commented 6 years ago

I'm fine with the change, although I think perf sometimes does this automatically (or maybe I was dreaming).

bobrik commented 6 years ago

I was surprised to not find this detail in your notes on flamegraphs, maybe there's something wrong with our setup. We just use stock perf that comes with 4.14.

Our target runs in a Docker container, maybe it makes the difference.

brendangregg commented 6 years ago

Yeah, I've seen it not work too, but I haven't dug into why. Normally it does work for us. Just taking a quick look at the perf source, it does have:

Makefile.perf:# Define NO_DEMANGLE if you do not want C++ symbol demangling.

So your perf is probably built with NO_DEMANGLE, which is probably autodetected based on available libraries. Anyway. We should note the c++filt workaround in the comments.

bobrik commented 6 years ago

Relevant snippet:

I added libberty-dev to the build dependencies and perf does demangle automatically.

Thanks for pointing in the right direction.