diff --git a/doc/api/cli.md b/doc/api/cli.md index 5d34d476e4697d..d347fc3fc45d91 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -727,7 +727,9 @@ V8 options that are allowed are: - `--abort-on-uncaught-exception` - `--max-old-space-size` - `--perf-basic-prof` +- `--perf-basic-prof-only-functions` - `--perf-prof` +- `--perf-prof-unwinding-info` - `--stack-trace-limit` ### `NODE_PATH=path[:…]` diff --git a/src/node_options.cc b/src/node_options.cc index 9abd6c870a589e..3ebdb37c1563e3 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -289,7 +289,15 @@ 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("--perf-prof-unwinding-info", + "", + V8Option{}, + kAllowedInEnvironment); AddOption("--stack-trace-limit", "", V8Option{}, kAllowedInEnvironment); #ifdef NODE_REPORT diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 4ff63009a7a1e3..8f65a8cb7e8121 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -38,11 +38,13 @@ 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)) { // PerfJitLogger is only implemented in Linux. expect('--perf-prof', 'B\n'); + expect('--perf-prof-unwinding-info', 'B\n'); } if (common.hasCrypto) {