Skip to content

Commit 0150490

Browse files
committed
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 c246f81 commit 0150490

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
@@ -1052,6 +1052,7 @@ Node.js options that are allowed are:
10521052
V8 options that are allowed are:
10531053
<!-- node-options-v8 start -->
10541054
- `--abort-on-uncaught-exception`
1055+
- `--interpreted-frames-native-stack`
10551056
- `--max-old-space-size`
10561057
- `--perf-basic-prof-only-functions`
10571058
- `--perf-basic-prof`

src/node_options.cc

+3
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,9 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
558558
"for analysis",
559559
V8Option{},
560560
kAllowedInEnvironment);
561+
AddOption("--interpreted-frames-native-stack",
562+
"help system profilers to translate JavaScript interpreted frames",
563+
V8Option{}, kAllowedInEnvironment);
561564
AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvironment);
562565
AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvironment);
563566
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)