Skip to content

Instantly share code, notes, and snippets.

@kedashoe
Created November 21, 2014 00:01
Show Gist options
  • Save kedashoe/ef9487f73d55d7a82bde to your computer and use it in GitHub Desktop.
Save kedashoe/ef9487f73d55d7a82bde to your computer and use it in GitHub Desktop.
nodejs flame graphs
> sudo sysctl kernel/kptr_restrict=0
> node --perf-basic-prof hello.js >hello.log &
[1] 16961
> perf record -F 997 -p 16961 -g
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.034 MB perf.data (~1501 samples) ]
> perf script^C
> perf script > perf.out
> stackvis perf < perf.out > perf.html
note: perf from linux-tools-generic did not work on kernel 3.13.0-24, had to install linux-tools-3.13.0-24-generic
sources:
http://techblog.netflix.com/2014/11/nodejs-in-flames.html
http://www.brendangregg.com/blog/2014-09-17/node-flame-graphs-on-linux.html
https://gist.github.com/trevnorris/9616784
https://github.com/davepacheco/node-stackvis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment