Skip to content

Commit 8c6896e

Browse files
mmarchiniBridgeAR
authored andcommitted
src: allow --interpreted-frames-native-stack in NODE_OPTIONS
PR-URL: #27744 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 30b80e5 commit 8c6896e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

doc/api/cli.md

+1
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ Node.js options that are allowed are:
10641064
V8 options that are allowed are:
10651065
<!-- node-options-v8 start -->
10661066
- `--abort-on-uncaught-exception`
1067+
- `--interpreted-frames-native-stack`
10671068
- `--max-old-space-size`
10681069
- `--perf-basic-prof-only-functions`
10691070
- `--perf-basic-prof`

src/node_options.cc

+3
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
563563
"for analysis",
564564
V8Option{},
565565
kAllowedInEnvironment);
566+
AddOption("--interpreted-frames-native-stack",
567+
"help system profilers to translate JavaScript interpreted frames",
568+
V8Option{}, kAllowedInEnvironment);
566569
AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvironment);
567570
AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvironment);
568571
AddOption("--perf-basic-prof-only-functions",

test/parallel/test-cli-node-options.js

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ expect('--stack-trace-limit=100',
6565
/(\s*at f \(\[eval\]:1:\d*\)\r?\n){100}/,
6666
'(function f() { f(); })();',
6767
true);
68+
// Unsupported on arm. See https://crbug.com/v8/8713.
69+
if (!['arm', 'arm64'].includes(process.arch))
70+
expect('--interpreted-frames-native-stack', 'B\n');
6871

6972
function expect(opt, want, command = 'console.log("B")', wantsError = false) {
7073
const argv = ['-e', command];

0 commit comments

Comments
 (0)