4

I've just discovered the fantastic tool perf on Linux.

I profiled a D program with this but when I call

perf report 

the symbols are not demangled.

I'm aware of ddemangle but this only works in batch-processing mode. I could always dump the output to a file for viewing. But it would be great if someone have found a solution to demangle the symbols before they are added to the perf database file.

Nordlöw
  • 11,838
  • 10
  • 52
  • 99
  • 1
    I tried to get perf to work on my computer and it didn't want to.... but why doesn't perf report | ddemangle work? I think that should take care of the display demangling while still accepting input. If not maybe we can tweak it so it does. – Adam D. Ruppe Dec 19 '13 at 21:53
  • I forgot that I could pipe things with `ddemangle`. It would be nice though to get demangling in interactive calls to perf aswell. – Nordlöw Dec 20 '13 at 12:10
  • 2
    i did something silly... I wrote a terminal emulator back in October, including the ability to nest inside another terminal emulator. i just modified it to demangle all output on the fly. The code is here: https://github.com/adamdruppe/terminal-emulator also requires terminal, color, and eventloop from https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff compile `dmd nestedterminalemulator.d terminalemulator.d arsd/terminal.d arsd/color.d arsd/eventloop.d -version=with_eventloop -version=d_demangle` then run `./nestedterminalemulator` and have some fun – Adam D. Ruppe Dec 20 '13 at 17:09

0 Answers0