Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14.x] Backport Apple silicon support #38051

Closed

Conversation

a60814billy
Copy link

danbev and others added 30 commits February 23, 2021 12:17
    Original commit message:
      [heap] Make maximum regular code object size a runtime value.

      Executable V8 pages include 3 reserved OS pages: one for the writable
      header and two as guards. On systems with 64k OS pages, the amount of
      allocatable space left for objects can then be quite smaller than the
      page size, only 64k for each 256k page.

      This means regular code objects cannot be larger than 64k, while the
      maximum regular object size is fixed to 128k, half of the page size. As
      a result code object never reach this limit and we can end up filling
      regular pages with few large code objects.

      To fix this, we change the maximum code object size to be runtime value,
      set to half of the allocatable space per page. On systems with 64k OS
      pages, the limit will be 32k.

      Alternatively, we could increase the V8 page size to 512k on Arm64 linux
      so we wouldn't waste code space. However, systems with 4k OS pages are
      more common, and those with 64k pages tend to have more memory available
      so we should be able to live with it.

      Bug: v8:10808
      Change-Id: I5d807e7a3df89f1e9c648899e9ba2f8e2648264c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460809
      Reviewed-by: Igor Sheludko <[email protected]>
      Reviewed-by: Georg Neis <[email protected]>
      Reviewed-by: Ulan Degenbaev <[email protected]>
      Commit-Queue: Pierre Langlois <[email protected]>
      Cr-Commit-Position: refs/heads/master@{#70569}

PR-URL: nodejs#37225
Refs: nodejs/help#3202
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Stewart X Addison <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This commit adds arm64 to test-worker-prof status as this seems to be
flaky on arm64 in addition to arm.

PR-URL: nodejs#37225
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Stewart X Addison <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Original commit message:
```
cpu-profiler: Use Handle version of SourcePositionTableIterator

The surrounding code can trigger an allocation through InliningStack
which can eventually end up allocating a line ends array.

This is fine as-is because the existing iterator code makes a copy
of the byte array. It just triggers the no_gc dcheck in debug mode.

Fixed: v8:10778
Change-Id: Ic8c502767ec6c3d3b1f5e84df60638bd2fc6be75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339102
Auto-Submit: Peter Marshall <[email protected]>
Commit-Queue: Tobias Tebbi <[email protected]>
Reviewed-by: Tobias Tebbi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#69247}
```

Refs: v8/v8@beebee4

PR-URL: nodejs#37293
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
This test is added as it usually crashes without applying the v8 patch:
v8/v8@beebee4

PR-URL: nodejs#37293
Refs: v8/v8@beebee4
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Allow calling eventLoopUtilization() directly on a worker thread:

    const worker = new Worker('./foo.js');
    const elu = worker.performance.eventLoopUtilization();
    setTimeout(() => {
      worker.performance.eventLoopUtilization(elu);
    }, 10);

Add a new performance object on the Worker instance that will hopefully
one day hold all the other performance metrics, such as nodeTiming.

Include benchmarks and tests.

PR-URL: nodejs#35664
Backport-PR-URL: nodejs#37163
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
The active worker check compared the time from sending message till
response arrived from worker with the complete time the worker was
running till it responses to the spin request.

If sending back the message is slow for some reason the test fails.

Adapt the test to compare the time seen inside the worker with the
time read from main thread.

PR-URL: nodejs#35891
Fixes: nodejs#35844
Refs: nodejs#35886
Refs: nodejs#35664
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Rich Trott <[email protected]>

Backport-PR-URL: nodejs#37163
The property `process.report.reportOnFatalError`
was deemed experimental, as it was not honored
under certain scenarios (for example out of memory
conditions). The report configuration were previously
stored on the `environment` structure which was not
available on these types of fatal error cases.

The referenced PR has addressed this case (sometime
back), and the property is working as intended.

Refs: nodejs#32207
PR-URL: nodejs#35654
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Fixes: nodejs#34818

PR-URL: nodejs#34824
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Cleanup logic in Makefile for coverage. Update BUILDING.md
accordingly.

PR-URL: nodejs#35767
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: nodejs#35807
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
The new event signals that the subprocess has spawned successfully and
no 'error' event will be emitted from failing to spawn.

Fixes: nodejs#35288
PR-URL: nodejs#35369
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Add libuv's cumulative idle time in the diagnostic report.
Add the data under the libuv's loop section

Refs: nodejs#34938
PR-URL: nodejs#35940
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Notable changes:

- The IBM i platform has been promoted to a Tier 2 platform.
- libuv is now built with `-fno-strict-aliasing`, and recommends
  that projects using libuv do the same.
- `uv_fs_mkdir()` now returns `UV_EINVAL` for invalid directory
  names on Windows.
- `uv_uptime()` now returns the correct value on OpenVZ containers.
- Windows 8 is the new minimum supported version of Windows.
- Bind errors are now reported from `uv_tcp_connect()`.
- The `uv_pipe()` function has been added.
- The `uv_socketpair()` function has been added.
- `uv_read_start()` error handling has been unified across
  Windows and Unix.

PR-URL: nodejs#37360
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-1

PR-URL: nodejs#36187
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Correct md5sum hash for the tarball version of the ICU 68.1 source.
The previously recorded md5sum hash was for the zip version.

PR-URL: nodejs#36777
Fixes: nodejs#36776
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-2

PR-URL: nodejs#36980
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#36980
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Our current minimum ICU is 67, so we don't need to support those anymore

PR-URL: nodejs#36980
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
When --enable-source-maps is set, the error context displayed
above the stack trace now shows original source rather than
transpiled.

Backport-PR-URL: nodejs#37700
PR-URL: nodejs#33491
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: nodejs#37918
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
[top-level-await] Implement spec fix for cycle root detection

Refs: http://github.com/v8/v8/commit/9689b17687b21c800c3f7400df4255c55b9c6ec0
PR-URL: nodejs#37865
Reviewed-By: Michaël Zasso <[email protected]>
Original commit message:
    deps: V8: cherry-pick 27e1ac1a79ff

        [wasm][mac] Support w^x codespaces for Apple Silicon

        Apple's upcoming arm64 devices will prevent rwx access to memory,
        but in turn provide a new per-thread way to switch between write
        and execute permissions. This patch puts that system to use for
        the WebAssembly subsystem.
        The approach relies on CodeSpaceWriteScope objects for now. That
        isn't optimal for background threads (which could stay in "write"
        mode permanently instead of toggling), but its simplicity makes
        it a good first step.

        Background:
        https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon

        Bug: chromium:1117591
        Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
        Commit-Queue: Jakob Kummerow <[email protected]>
        Reviewed-by: Michael Lippautz <[email protected]>
        Reviewed-by: Thibaud Michaud <[email protected]>
        Cr-Commit-Position: refs/heads/master@{#69791}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Original commit message:

    [platform] Add Permission::kNoAccessWillJitLater enum value

    This value is unused for now. This CL is part 1 of a 3-step dance.
    Part 2 will be teaching Chrome's Platform implementation to accept
    the new value. Part 3 will then actually use it in V8.

    Bug: chromium:1117591
    Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
    Commit-Queue: Jakob Kummerow <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#70335}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Original commit message:

    [mac] Set MAP_JIT only when necessary

    This is a "minimal" change to achieve the required goal: seeing that
    there is only one place where we need to indicate that memory should
    be reserved with MAP_JIT, we can add a value to the Permissions enum
    instead of adding a second, orthogonal parameter.
    That way we avoid changing public API functions, which makes this CL
    easier to undo once we have platform-independent w^x in Wasm.

    Bug: chromium:1117591
    Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
    Commit-Queue: Jakob Kummerow <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Reviewed-by: Clemens Backes <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#70379}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Original commit message:

    [mac-arm64] Fix missing #include

    For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
    must be included in the compilation unit.

    Bug: chromium:1144200
    Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
    Reviewed-by: Clemens Backes <[email protected]>
    Reviewed-by: Igor Sheludko <[email protected]>
    Reviewed-by: Nico Weber <[email protected]>
    Commit-Queue: Jakob Kummerow <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#70986}

PR-URL: nodejs#35986
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
PR-URL: nodejs#36368
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Original commit message:

    [mac][wasm] Work around MacOS 11.2 code page decommit failures

    MacOS 11.2 refuses to set "no access" permissions on memory that
    we previously used for JIT-compiled code. It is still unclear
    whether this is WAI on the part of the kernel. In the meantime,
    as a workaround, we use madvise(..., MADV_FREE_REUSABLE) instead
    of mprotect(..., NONE) when discarding code pages. This is inspired
    by what Chromium's gin platform does.

    Fixed: v8:11389
    Change-Id: I866586932573b4253002436ae5eee4e0411c45fc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679688
    Commit-Queue: Jakob Kummerow <[email protected]>
    Commit-Queue: Michael Lippautz <[email protected]>
    Auto-Submit: Jakob Kummerow <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72559}

Refs: v8/v8@0c8b6e4
Fixes: nodejs#37061
PR-URL: nodejs#37276
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ash Cripps <[email protected]>
Original commit message:
    Fix GetSharedLibraryAddresses

    This patch fixes a segmentation fault which occurs when using `--prof` flag on a Darwin ARM64 architecture.
    See nodejs#36656

    Change-Id: Idc3ce6c8fd8a24f76f1b356f629e37340045b51e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609413
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72886}

    Refs: v8/v8@8957d46
    Fixes: nodejs#36656

PR-URL: nodejs#37471
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Ash Cripps <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    [mac][wasm] Work around MacOS 11.2 code page decommit failures

    MacOS 11.2 refuses to set "no access" permissions on memory that
    we previously used for JIT-compiled code. It is still unclear
    whether this is WAI on the part of the kernel. In the meantime,
    as a workaround, we use madvise(..., MADV_FREE_REUSABLE) instead
    of mprotect(..., NONE) when discarding code pages. This is inspired
    by what Chromium's gin platform does.

    Fixed: v8:11389
    Change-Id: I866586932573b4253002436ae5eee4e0411c45fc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679688
    Commit-Queue: Jakob Kummerow <[email protected]>
    Commit-Queue: Michael Lippautz <[email protected]>
    Auto-Submit: Jakob Kummerow <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72559}

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <[email protected]>

Refs: v8/v8@0c8b6e4
Fixes: #37061
PR-URL: #37276
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ash Cripps <[email protected]>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:
    Fix GetSharedLibraryAddresses

    This patch fixes a segmentation fault which occurs when using `--prof` flag on a Darwin ARM64 architecture.
    See #36656

    Change-Id: Idc3ce6c8fd8a24f76f1b356f629e37340045b51e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609413
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72886}

    Refs: v8/v8@8957d46
    Fixes: #36656

Backport-PR-URL: #38051
Co-authored-by: BoHong Li <[email protected]>

PR-URL: #37471
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Ash Cripps <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
targos pushed a commit that referenced this pull request Apr 11, 2021
Original commit message:

    mac/arm64: Port SignalHandler::FillRegisterState().

    Bug: chromium:1098899
    Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
    Commit-Queue: Peter Marshall <[email protected]>
    Reviewed-by: Peter Marshall <[email protected]>
    Auto-Submit: Nico Weber <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#68568}

Refs: v8/v8@cf71540

PR-URL: #38051
Refs: #35415
Fixes: #38005
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
@targos
Copy link
Member

targos commented Apr 11, 2021

Landed in 6b115d7...866e324

@targos targos closed this Apr 11, 2021
@aduh95 aduh95 added arm Issues and PRs related to the ARM platform. macos Issues and PRs related to the macOS platform / OSX. labels Apr 13, 2021
@aduh95 aduh95 mentioned this pull request Apr 13, 2021
11 tasks
danielleadams added a commit that referenced this pull request May 3, 2021
Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
@danielleadams danielleadams mentioned this pull request May 3, 2021
danielleadams added a commit that referenced this pull request May 3, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 3, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 4, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: cherry-pick cf71540c684c (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* fs:
  * add promisified readFile benchmark (Nitzan Uziely) (#37608)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 7, 2021
PR-URL: #38507

Notable changes:

* assert:
  * change status of legacy asserts (James M Snell) (#38113)
* crypto:
  * implement randomuuid (James M Snell) (#36729)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 8, 2021
PR-URL: #38507

Notable changes:

* crypto:
  * implement randomuuid (James M Snell) (#36729)
* doc:
  * apply style for legacy status (James M Snell) (#37784)
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* lib:
  * create diagnostics\_channel module (Stephen Belanger) (#34895)
  * implement AbortSignal.abort() (James M Snell) (#37693)
* test:
  * update dom/abort tests (James M Snell) (#37693)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)
danielleadams added a commit that referenced this pull request May 10, 2021
Notable changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0
to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with `dc.channel(name)` and call `channel.publish(data)` to send the data to any listeners to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using `channel.subscribe(listener)` to run a function whenever a message is published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (#34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (#36729.

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController` and `AbortSignal`.

Both constructors can be enabled globally using the `--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support `AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives
should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)

PR-URL: #38507
danielleadams added a commit that referenced this pull request May 11, 2021
Notable Changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API
to create named channels to report arbitrary message data for
diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is
backported to v14.17.0 to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish
contextual data about what they are doing at a given time. This could
be the hostname and query string of a mysql query, for example. Just
create a named channel with `dc.channel(name)` and call
`channel.publish(data)` to send the data to any listeners to that
channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into
separate objects to ensure they get the best performance. If nothing is
listening to the channel, the publishing overhead should be as close to
zero as possible. Consuming channel data is as easy as using
`channel.subscribe(listener)` to run a function whenever a message is
published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is
doing at a given time. This can be used for things like augmenting
tracing data, tracking network and filesystem activity, logging
queries, and many other things. It's also a very useful data source
for diagnostics tools to provide a clearer picture of exactly what the
application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (#34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4 UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (#36729).

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController`
and `AbortSignal`.

Both constructors can be enabled globally using the
`--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support
`AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any
spec-compliant third-party alternatives should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)

PR-URL: #38507
danielleadams added a commit that referenced this pull request May 11, 2021
Notable Changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API
to create named channels to report arbitrary message data for
diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is
backported to v14.17.0 to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish
contextual data about what they are doing at a given time. This could
be the hostname and query string of a mysql query, for example. Just
create a named channel with `dc.channel(name)` and call
`channel.publish(data)` to send the data to any listeners to that
channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into
separate objects to ensure they get the best performance. If nothing is
listening to the channel, the publishing overhead should be as close to
zero as possible. Consuming channel data is as easy as using
`channel.subscribe(listener)` to run a function whenever a message is
published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is
doing at a given time. This can be used for things like augmenting
tracing data, tracking network and filesystem activity, logging
queries, and many other things. It's also a very useful data source
for diagnostics tools to provide a clearer picture of exactly what the
application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (#34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4
UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (#36729).

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController`
and `AbortSignal`.

Both constructors can be enabled globally using the
`--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support
`AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any
spec-compliant third-party alternatives should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)

PR-URL: #38507
danielleadams added a commit that referenced this pull request May 11, 2021
Notable Changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API
to create named channels to report arbitrary message data for
diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is
backported to v14.17.0 to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish
contextual data about what they are doing at a given time. This could
be the hostname and query string of a mysql query, for example. Just
create a named channel with `dc.channel(name)` and call
`channel.publish(data)` to send the data to any listeners to that
channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into
separate objects to ensure they get the best performance. If nothing is
listening to the channel, the publishing overhead should be as close to
zero as possible. Consuming channel data is as easy as using
`channel.subscribe(listener)` to run a function whenever a message is
published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is
doing at a given time. This can be used for things like augmenting
tracing data, tracking network and filesystem activity, logging
queries, and many other things. It's also a very useful data source
for diagnostics tools to provide a clearer picture of exactly what the
application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (#34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4
UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (#36729).

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController`
and `AbortSignal`.

Both constructors can be enabled globally using the
`--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support
`AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any
spec-compliant third-party alternatives should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)

PR-URL: #38507
danielleadams added a commit that referenced this pull request May 11, 2021
Notable Changes:

Diagnostics channel (experimental module):

`diagnostics_channel` is a new experimental module that provides an API
to create named channels to report arbitrary message data for
diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is
backported to v14.17.0 to enable testing it at a larger scale.

With `diagnostics_channel`, Node.js core and module authors can publish
contextual data about what they are doing at a given time. This could
be the hostname and query string of a mysql query, for example. Just
create a named channel with `dc.channel(name)` and call
`channel.publish(data)` to send the data to any listeners to that
channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};
```

Channels are like one big global event emitter but are split into
separate objects to ensure they get the best performance. If nothing is
listening to the channel, the publishing overhead should be as close to
zero as possible. Consuming channel data is as easy as using
`channel.subscribe(listener)` to run a function whenever a message is
published to that channel.

```js
const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});
```

The data captured can be used to provide context for what an app is
doing at a given time. This can be used for things like augmenting
tracing data, tracking network and filesystem activity, logging
queries, and many other things. It's also a very useful data source
for diagnostics tools to provide a clearer picture of exactly what the
application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger (#34895).

UUID support in the crypto module:

The new `crypto.randomUUID()` method now allows to generate random
[RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) Version 4
UUID strings:

```js
const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'
```

Contributed by James M Snell (#36729).

Experimental support for `AbortController` and `AbortSignal`:

Node.js 14.17.0 adds experimental partial support for `AbortController`
and `AbortSignal`.

Both constructors can be enabled globally using the
`--experimental-abortcontroller` flag.

Additionally, several Node.js APIs have been updated to support
`AbortSignal` for cancellation.
It is not mandatory to use the built-in constructors with them. Any
spec-compliant third-party alternatives should be compatible.

`AbortSignal` support was added to the following methods:

* `child_process.exec`
* `child_process.execFile`
* `child_process.fork`
* `child_process.spawn`
* `dgram.createSocket`
* `events.on`
* `events.once`
* `fs.readFile`
* `fs.watch`
* `fs.writeFile`
* `http.request`
* `https.request`
* `http2Session.request`
* The promisified variants of `setImmediate` and `setTimeout`

Other notable changes:

* doc:
  * revoke deprecation of legacy url, change status to legacy (James M Snell) (#37784)
  * add legacy status to stability index (James M Snell) (#37784)
  * upgrade stability status of report API (Gireesh Punathil) (#35654)
* deps:
  * V8: Backport various patches for Apple Silicon support (BoHong Li) (#38051)
  * update ICU to 68.1 (Michaël Zasso) (#36187)
  * upgrade to libuv 1.41.0 (Colin Ihrig) (#37360)
* http:
  * add http.ClientRequest.getRawHeaderNames() (simov) (#37660)
  * report request start and end with diagnostics\_channel (Stephen Belanger) (#34895)
* util:
  * add getSystemErrorMap() impl (eladkeyshawn) (#38101)

PR-URL: #38507
zac1st1k referenced this pull request in Homebrew/homebrew-core Sep 22, 2021
amcaplan added a commit to Shopify/cli that referenced this pull request Nov 9, 2022
Node 14 has issues with M1s, which were solved in 14.17, see
nodejs/node#38051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm Issues and PRs related to the ARM platform. build Issues and PRs related to build files or the CI. macos Issues and PRs related to the macOS platform / OSX. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.