From c75ad3d87dfd0963fae1926d0fbba8343d6deb19 Mon Sep 17 00:00:00 2001 From: Ilyas Shabi Date: Thu, 22 Jan 2026 11:59:43 +0100 Subject: [PATCH] v8: add GCProfiler support for erm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61191 Reviewed-By: Aviv Keller Reviewed-By: Luigi Pinca Reviewed-By: René --- doc/api/v8.md | 11 +++++++- lib/v8.js | 4 +++ .../test-v8-collect-gc-profile-using.js | 26 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-v8-collect-gc-profile-using.js diff --git a/doc/api/v8.md b/doc/api/v8.md index c18b3b10412..d974910305f 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -1471,6 +1471,7 @@ added: --> Create a new instance of the `v8.GCProfiler` class. +This API supports `using` syntax. ### `profiler.start()` @@ -1490,7 +1491,7 @@ added: - v18.15.0 --> -Stop collecting GC data and return an object.The content of object +Stop collecting GC data and return an object. The content of object is as follows. ```json @@ -1575,6 +1576,14 @@ setTimeout(() => { }, 1000); ``` +### `profiler[Symbol.dispose]()` + + + +Stop collecting GC data, and discard the profile. + ## Class: `SyncCPUProfileHandle`