- Stackvis
- FlameGraph (cloned to
~/tools/FlameGraph
)
perf record -i -g -e cycles:u -- node --perf-basic-prof app.js
- generate some load!
perf script | egrep -v "( __libc_start| LazyCompile | v8::internal::| Builtin:| Stub:| LoadIC:|\[unknown\]| LoadPolymorphicIC:)" | sed 's/ LazyCompile:[*~]\?/ /' > intermediate.out
or collapsable using the Flamegraph toolkit
perf script | egrep -v "( __libc_start| LazyCompile | v8::internal::| Builtin:| Stub:| LoadIC:|\[unknown\]| LoadPolymorphicIC:)" | sed 's/ LazyCompile:[*~]\?/ /' | ~/tools/FlameGraph/stackcollapse-perf.pl > intermediate.out
- HTML (D3)
stackvis < intermediate.out > flamegraph.htm
- SVG
stackvis < intermediate.out > flamegraph.png
or
- FlameGraph SVG
~/tools/FlameGraph/flamegraph.pl intermediate.out > node-flame.svg