From 748275b760beb9da76f123099e248560e3dec162 Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Mon, 29 Aug 2022 14:22:04 +0200 Subject: [PATCH 1/2] src: add --max-semi-space-size to the options allowed in NODE_OPTIONS --- doc/api/cli.md | 1 + src/node_options.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index aeebb55933d622..7dde2fbb2f7852 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1936,6 +1936,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 ce353bbcf5cbbf..f04d2b0e791ec2 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -709,6 +709,7 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( V8Option{}, kAllowedInEnvvar); AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvvar); + AddOption("--max-semi-space-size", "", V8Option{}, kAllowedInEnvvar); AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvvar); AddOption( "--perf-basic-prof-only-functions", "", V8Option{}, kAllowedInEnvvar); From cfcaee66cfcea67f6f36522364ea4643a2f11170 Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Tue, 30 Aug 2022 18:33:16 +0200 Subject: [PATCH 2/2] test: add a test for --max-semi-space-size --- test/parallel/test-cli-node-options.js | 1 + 1 file changed, 1 insertion(+) 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(); })();',