Skip to content

Commit

Permalink
cli: --perf-prof only works on Linux
Browse files Browse the repository at this point in the history
PR-URL: #31892
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
codebytere committed Feb 23, 2020
1 parent 97c8abe commit 72b6cea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions doc/api/cli.md
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions test/parallel/test-cli-node-options.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 72b6cea

Please sign in to comment.