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 Mar 30, 2020
1 parent 3deee05 commit 70dc1ce
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
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,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
Original file line number Diff line number Diff line change
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 70dc1ce

Please sign in to comment.