From b88628c7df0ea6c789ca4bd3e1745e939cd664d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Dapena=20Paz?= Date: Tue, 24 Jan 2023 20:16:04 +0100 Subject: [PATCH] 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: /~https://github.com/nodejs/node/issues/46202 PR-URL: /~https://github.com/nodejs/node/pull/46203 Reviewed-By: Joyee Cheung --- doc/api/cli.md | 3 +++ src/node_options.cc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index c4c38650961246..a887f43349be0b 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1992,6 +1992,7 @@ V8 options that are allowed are: * `--abort-on-uncaught-exception` * `--disallow-code-generation-from-strings` +* `--enable-etw-stack-walking` * `--huge-max-old-generation-size` * `--interpreted-frames-native-stack` * `--jitless` @@ -2008,6 +2009,8 @@ V8 options that are allowed are: `--perf-basic-prof-only-functions`, `--perf-basic-prof`, `--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux. +`--enable-etw-stack-walking` is only available on Windows. + ### `NODE_PATH=path[:…]`