From 70ca26a8588c749fa2b1bc7141e29e4660ea1ccc Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Tue, 15 Nov 2022 14:27:54 +0100 Subject: [PATCH] src: add --max-semi-space-size to the options allowed in NODE_OPTIONS PR-URL: https://github.com/nodejs/node/pull/44436 Reviewed-By: Luigi Pinca Reviewed-By: Ben Noordhuis Reviewed-By: Evan Lucas Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- doc/api/cli.md | 1 + src/node_options.cc | 1 + test/parallel/test-cli-node-options.js | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 2e8b5271b08d2c..af92173ee7e756 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1929,6 +1929,7 @@ V8 options that are allowed are: * `--interpreted-frames-native-stack` * `--jitless` * `--max-old-space-size` +* `--max-semi-space-size` * `--perf-basic-prof-only-functions` * `--perf-basic-prof` * `--perf-prof-unwinding-info` diff --git a/src/node_options.cc b/src/node_options.cc index 98dc04a1039e32..6bc34f2270ae99 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -713,6 +713,7 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( "help system profilers to translate JavaScript interpreted frames", V8Option{}, kAllowedInEnvironment); AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvironment); + AddOption("--max-semi-space-size", "", V8Option{}, kAllowedInEnvironment); AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvironment); AddOption("--perf-basic-prof-only-functions", "", diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 2d34a56e03c1a0..4d659a7b212441 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -72,6 +72,7 @@ expect('--disallow-code-generation-from-strings', 'B\n'); expect('--huge-max-old-generation-size', 'B\n'); expect('--jitless', 'B\n'); expect('--max-old-space-size=0', 'B\n'); +expect('--max-semi-space-size=0', 'B\n'); expect('--stack-trace-limit=100', /(\s*at f \(\[(eval|worker eval)\]:1:\d*\)\r?\n)/, '(function f() { f(); })();',