Skip to content

Commit c75cb5a

Browse files
LekoMayaLekova
authored andcommitted
src: allow --perf-(basic-)?prof in NODE_OPTIONS
PR-URL: nodejs#17600 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent b6e1f26 commit c75cb5a

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

doc/api/cli.md

+2
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ Node options that are allowed are:
475475
V8 options that are allowed are:
476476
- `--abort-on-uncaught-exception`
477477
- `--max-old-space-size`
478+
- `--perf-basic-prof`
479+
- `--perf-prof`
478480
- `--stack-trace-limit`
479481

480482
### `NODE_PENDING_DEPRECATION=1`

src/node.cc

+2
Original file line numberDiff line numberDiff line change
@@ -3530,6 +3530,8 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env,
35303530
"--icu-data-dir",
35313531

35323532
// V8 options (define with '_', which allows '-' or '_')
3533+
"--perf_prof",
3534+
"--perf_basic_prof",
35333535
"--abort_on_uncaught_exception",
35343536
"--max_old_space_size",
35353537
"--stack_trace_limit",

test/parallel/test-cli-node-options.js

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ expect('--zero-fill-buffers', 'B\n');
2626
expect('--v8-pool-size=10', 'B\n');
2727
expect('--trace-event-categories node', 'B\n');
2828

29+
if (!common.isWindows) {
30+
expect('--perf-basic-prof', 'B\n');
31+
}
32+
33+
if (common.isLinux && ['arm', 'x64', 'mips'].includes(process.arch)) {
34+
// PerfJitLogger is only implemented in Linux.
35+
expect('--perf-prof', 'B\n');
36+
}
37+
2938
if (common.hasCrypto) {
3039
expect('--use-openssl-ca', 'B\n');
3140
expect('--use-bundled-ca', 'B\n');

0 commit comments

Comments
 (0)