Flame graphs are a visualization of profiled software, allowing the most frequent code-paths to be identified quickly and accurately — Brendan Gregg on flame graph
Using node --perf-basic-prof with Xcode Instruments (on Mac) should help to generate a flame graph for performance analysis. Following this guide, it's rather easy:
perf-<pid>.map using node --perf-basic-prof app.jsprofile.csv)./stackcollapse-instruments.pl profile.csv | ./flamegraph.pl > graph.svgSadly, the generated flame graph does not benefit from the perf-<pid>.map thus leaving method adresses instead of their name (1cfc9a09b880 instead of LazyCompile:~ /node_modules/benchmark/benchmark.js:1870).
Is there any way to give the mappings / symbols to Xcode instruments, to made it generate a csv file with method names (this doesn't work)?
This can be done through the ui of the node flamegraph module.
ps. a pull request offers to add the option to the npm command line tool to allow typing flamegraph -t instruments -f profile.csv -m perf-4499.map -o flamegraph.svg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With