Skip to content

Commit 161869e

Browse files
LekoMylesBorins
authored andcommitted
src: allow --perf-(basic-)?prof in NODE_OPTIONS
PR-URL: #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 ebd73ad commit 161869e

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
@@ -494,6 +494,8 @@ Node options that are allowed are:
494494
V8 options that are allowed are:
495495
- `--abort-on-uncaught-exception`
496496
- `--max-old-space-size`
497+
- `--perf-basic-prof`
498+
- `--perf-prof`
497499
- `--stack-trace-limit`
498500

499501
### `NODE_PENDING_DEPRECATION=1`

src/node.cc

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

32693269
// V8 options (define with '_', which allows '-' or '_')
3270+
"--perf_prof",
3271+
"--perf_basic_prof",
32703272
"--abort_on_uncaught_exception",
32713273
"--max_old_space_size",
32723274
"--stack_trace_limit",

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

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ expect('--trace-event-categories node', 'B\n');
2828
// eslint-disable-next-line no-template-curly-in-string
2929
expect('--trace-event-file-pattern {pid}-${rotation}.trace_events', 'B\n');
3030

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

0 commit comments

Comments
 (0)