Skip to content

Commit 4c59b60

Browse files
jdapenaruyadorno
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 <[email protected]>
1 parent 4ae2492 commit 4c59b60

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
@@ -1970,6 +1970,7 @@ V8 options that are allowed are:
19701970

19711971
* `--abort-on-uncaught-exception`
19721972
* `--disallow-code-generation-from-strings`
1973+
* `--enable-etw-stack-walking`
19731974
* `--huge-max-old-generation-size`
19741975
* `--interpreted-frames-native-stack`
19751976
* `--jitless`
@@ -1986,6 +1987,8 @@ V8 options that are allowed are:
19861987
`--perf-basic-prof-only-functions`, `--perf-basic-prof`,
19871988
`--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux.
19881989

1990+
`--enable-etw-stack-walking` is only available on Windows.
1991+
19891992
### `NODE_PATH=path[:…]`
19901993

19911994
<!-- YAML

src/node_options.cc

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

756760
AddOption("--experimental-top-level-await", "", NoOp{}, kAllowedInEnvvar);
757761

0 commit comments

Comments
 (0)