diff --git a/doc/api/cli.md b/doc/api/cli.md index b8ea4826dec2fe..6bae0a67c3d101 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -475,6 +475,8 @@ Node options that are allowed are: V8 options that are allowed are: - `--abort-on-uncaught-exception` - `--max-old-space-size` +- `--perf-basic-prof` +- `--perf-prof` - `--stack-trace-limit` ### `NODE_PENDING_DEPRECATION=1` diff --git a/src/node.cc b/src/node.cc index 86cbe3138789f2..683e053c7b7d5f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3871,6 +3871,8 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env, "--icu-data-dir", // V8 options (define with '_', which allows '-' or '_') + "--perf_prof", + "--perf_basic_prof", "--abort_on_uncaught_exception", "--max_old_space_size", "--stack_trace_limit", diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 29358134c22c99..c9f2d5eace022d 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -26,6 +26,15 @@ expect('--zero-fill-buffers', 'B\n'); expect('--v8-pool-size=10', 'B\n'); expect('--trace-event-categories node', 'B\n'); +if (!common.isWindows) { + expect('--perf-basic-prof', 'B\n'); +} + +if (common.isLinux && ['arm', 'x64', 'mips'].includes(process.arch)) { + // PerfJitLogger is only implemented in Linux. + expect('--perf-prof', 'B\n'); +} + if (common.hasCrypto) { expect('--use-openssl-ca', 'B\n'); expect('--use-bundled-ca', 'B\n');