cli: --perf-prof only works on Linux

PR-URL: https://github.com/nodejs/node/pull/31892
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
Shelley Vohr 2020-02-20 16:58:58 -08:00
parent 97c8abe2c0
commit 72b6cea25d
No known key found for this signature in database
GPG Key ID: F13993A75599653C
2 changed files with 8 additions and 6 deletions

View File

@ -1164,6 +1164,9 @@ V8 options that are allowed are:
* `--stack-trace-limit`
<!-- node-options-v8 end -->
`--perf-basic-prof-only-functions`, `--perf-basic-prof`,
`--perf-prof-unwinding-info`, and `--perf-prof` are only available on Linux.
### `NODE_PATH=path[:…]`
<!-- YAML
added: v0.1.32

View File

@ -48,15 +48,14 @@ expectNoWorker('--trace-event-file-pattern {pid}-${rotation}.trace_events ' +
'--trace-event-categories node.async_hooks', 'B\n');
expect('--unhandled-rejections=none', 'B\n');
if (!common.isWindows) {
if (common.isLinux) {
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 (['arm', 'x64'].includes(process.arch)) {
expect('--perf-prof', 'B\n');
expect('--perf-prof-unwinding-info', 'B\n');
}
}
if (common.hasCrypto) {