diff --git a/doc/api/cli.md b/doc/api/cli.md index 06de886c69499a..04f4801c3d4c93 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -712,6 +712,7 @@ V8 options that are allowed are: - `--abort-on-uncaught-exception` - `--max-old-space-size` - `--perf-basic-prof` +- `--perf-basic-prof-only-functions` - `--perf-prof` - `--stack-trace-limit` diff --git a/src/node_options.cc b/src/node_options.cc index d163d73f2246aa..4494dda7d9a22b 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -299,6 +299,10 @@ PerIsolateOptionsParser::PerIsolateOptionsParser() { kAllowedInEnvironment); AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvironment); AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvironment); + AddOption("--perf-basic-prof-only-functions", + "", + V8Option{}, + kAllowedInEnvironment); AddOption("--perf-prof", "", V8Option{}, kAllowedInEnvironment); AddOption("--stack-trace-limit", "", V8Option{}, kAllowedInEnvironment); diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 4ff63009a7a1e3..1554e80c0b8de0 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -38,6 +38,7 @@ expect('--trace-event-file-pattern {pid}-${rotation}.trace_events ' + if (!common.isWindows) { expect('--perf-basic-prof', 'B\n'); + expect('--perf-basic-prof-only-functions', 'B\n'); } if (common.isLinux && ['arm', 'x64'].includes(process.arch)) {