Skip to content

Commit 116a336

Browse files
jdapenajuanarbol
authored andcommitted
src: add support for ETW stack walking
V8 supports native stack walking in Windows by providing JIT code information to ETW (Event Tracing for Windows). But the option to enable it is not exposed in NodeJS. Just add command line (and environment variable) support for --enable-etw-stack-walking, that maps to V8 option of the same name. Fixes: #46202 PR-URL: #46203 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 2f7319e commit 116a336

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/api/cli.md

+3
Original file line numberDiff line numberDiff line change
@@ -1926,6 +1926,7 @@ V8 options that are allowed are:
19261926

19271927
* `--abort-on-uncaught-exception`
19281928
* `--disallow-code-generation-from-strings`
1929+
* `--enable-etw-stack-walking`
19291930
* `--huge-max-old-generation-size`
19301931
* `--interpreted-frames-native-stack`
19311932
* `--jitless`
@@ -1942,6 +1943,8 @@ V8 options that are allowed are:
19421943
`--perf-basic-prof-only-functions`, `--perf-basic-prof`,
19431944
`--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux.
19441945

1946+
`--enable-etw-stack-walking` is only available on Windows.
1947+
19451948
### `NODE_PATH=path[:…]`
19461949

19471950
<!-- YAML

src/node_options.cc

+4
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,10 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
751751
&PerIsolateOptions::report_signal,
752752
kAllowedInEnvironment);
753753
Implies("--report-signal", "--report-on-signal");
754+
AddOption("--enable-etw-stack-walking",
755+
"provides heap data to ETW Windows native tracing",
756+
V8Option{},
757+
kAllowedInEnvironment);
754758

755759
AddOption(
756760
"--experimental-top-level-await", "", NoOp{}, kAllowedInEnvironment);

0 commit comments

Comments
 (0)