Skip to content

Commit

Permalink
Fixup --perf-prof cli option error
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Feb 21, 2020
1 parent a015a62 commit ba7ffac
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ fix_use_crypto_impls_for_compat.patch
fix_ensure_clocks_header_included_in_impl.patch
fix_remove_implicit_type_conversions.patch
fix_include_io_h_in_uvwasi_for_win.patch
fix_--perf-prof_only_works_on_linux.patch
38 changes: 38 additions & 0 deletions patches/node/fix_--perf-prof_only_works_on_linux.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 20 Feb 2020 17:22:58 -0800
Subject: fix: --perf-prof only works on Linux

`--perf-prof`-related flags have been removed in V8 on non-linux devices.

See:
* https://chromium-review.googlesource.com/c/v8/v8/+/1993969
* https://chromium-review.googlesource.com/c/v8/v8/+/1993978

Upstreamed in https://github.com/nodejs/node/pull/31892.

diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
index 698f463b627644a85db0fcddfcd471ebd91934e5..63cb22c8693447da94f4ba2f8c4082ea6bf49d6a 100644
--- a/test/parallel/test-cli-node-options.js
+++ b/test/parallel/test-cli-node-options.js
@@ -41,15 +41,14 @@ expect('--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) {

0 comments on commit ba7ffac

Please sign in to comment.