Skip to content

Commit 05eb017

Browse files
committed
fix(diagnostics): Updated flamegraph tutorial to use better tools
1 parent 1f27135 commit 05eb017

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/site/pages/en/learn/diagnostics/flame-graphs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ Now let's get to work.
4040

4141
4. Disregard warnings unless they're saying you can't run perf due to missing packages; you may get some warnings about not being able to access kernel module samples which you're not after anyway.
4242
5. Run `perf script > perfs.out` to generate the data file you'll visualize in a moment. It's useful to [apply some cleanup](#filtering-out-nodejs-internal-functions) for a more readable graph
43-
6. Install stackvis if not yet installed `npm i -g stackvis`
44-
7. Run `stackvis perf < perfs.out > flamegraph.htm`
43+
6. Clone Brendan Gregg's FlameGraph tools: https://github.com/brendangregg/FlameGraph
44+
7. Run `cat perfs.out | ./FlameGraph/stackcollapse-perf.pl | ./FlameGraph/flamegraph.pl --colors=js > profile.svg`
4545

4646
Now open the flame graph file in your favorite browser and watch it burn. It's color-coded so you can focus on the most saturated orange bars first. They're likely to represent CPU heavy functions.
4747

48-
Worth mentioning - if you click an element of a flame graph a zoom-in of its surroundings will be displayed above the graph.
48+
Worth mentioning - if you click an element of a flame graph a it will zoom-in on the section you clicked.
4949

5050
### Using `perf` to sample a running process
5151

0 commit comments

Comments
 (0)