perf-cpuprofile
v0.0.5
Published
Converts linux `perf` tool output to .cpuprofile files readable by chromiums devtools
Readme
PerfCpuprofile
Converts linux perf tool output to .cpuprofile files readable by chromiums devtools
Installation
$ npm install -g perf-cpuprofileUsage
Generate a perf trace:
$ perf record -p `pidof sourceview` -g dwarfThen simply run:
$ perf-cpuprofileOr if you have custom file names or just love to pipe:
$ cat custom.perf.data | perf script | perf-cpuprofile -- > custom.cpuprofileCalling perf-cpuprofile with the argument -- makes it output to stdout instead
of writing to the default perf.cpuprofile file.
Then just open up the file in chromiums devtools profile tab, and voilà:

It still has some issues with unresolvable functions and finding the callers for
_mcount, but overall, I’m very happy with it :-)
Helpers
Run node with --perf-basic-prof to prodive js stacks.
You can then try to filter the output as explained in
this gist.
$ time perf record -F 10000 --no-buffering -g node --harmony --perf-basic-prof /usr/lib/node_modules/nlz/bin/nlz-build.js
$ perf script | egrep "(cycles|LazyCompile|(^$))" | perf-cpuprofileLicense
GPLv3



