Skip to content

Commit

Permalink
cli: --perf-prof only works on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Feb 21, 2020
1 parent cdac185 commit 3fba7b4
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 @@ -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
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 3fba7b4

Please sign in to comment.