Skip to content

Commit 5350abb

Browse files
bartlomiejury
authored andcommitted
manual: Edit note about V8 profiling (#2742)
1 parent 43d099c commit 5350abb

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

website/manual.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,10 @@ To start profiling,
901901
# Make sure we're only building release.
902902
# Build deno and V8's d8.
903903
./tools/build.py --release d8 deno
904+
904905
# Start the program we want to benchmark with --prof
905-
./target/release/deno tests/http_bench.ts --allow-net --prof &
906+
./target/release/deno tests/http_bench.ts --allow-net --v8-flags=--prof &
907+
906908
# Exercise it.
907909
third_party/wrk/linux/wrk http://localhost:4500/
908910
kill `pgrep deno`
@@ -929,6 +931,18 @@ isolate-0x7fad98242400-v8.log --preprocess > prof.json
929931
Open `third_party/v8/tools/profview/index.html` in your browser, and select
930932
`prof.json` to view the distribution graphically.
931933

934+
Useful V8 flags during profiling:
935+
936+
- --prof
937+
- --log-internal-timer-events
938+
- --log-timer-events
939+
- --track-gc
940+
- --log-source-code
941+
- --track-gc-object-stats
942+
943+
Note that you might need to run Deno with `--current-thread` flag to capture
944+
full V8 profiling output.
945+
932946
To learn more about `d8` and profiling, check out the following links:
933947

934948
- [https://v8.dev/docs/d8](https://v8.dev/docs/d8)

0 commit comments

Comments
 (0)