Skip to content

Commit 464df6d

Browse files
LekoMylesBorins
authored andcommittedFeb 21, 2018
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 51a8e1d commit 464df6d

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
@@ -3871,6 +3871,8 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env,
38713871
"--icu-data-dir",
38723872

38733873
// V8 options (define with '_', which allows '-' or '_')
3874+
"--perf_prof",
3875+
"--perf_basic_prof",
38743876
"--abort_on_uncaught_exception",
38753877
"--max_old_space_size",
38763878
"--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)