[codex] Implement node:v8 heap snapshot and GCProfiler output - #4182
Merged
proggeramlug merged 2 commits intoJun 3, 2026
Merged
Conversation
proggeramlug
marked this pull request as ready for review
June 3, 2026 03:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node:v8heap snapshot output forgetHeapSnapshot()andwriteHeapSnapshot(), including readable stream/file behavior, path/options validation, and minimal heap snapshot JSON.GCProfilerconstruction withstart()/stop()behavior and a Node-shaped report object for namespace and named-import construction.Issues
Closes #3140
Closes #3142
Why batched
Both changes cover
node:v8output/reporting surfaces and share the same runtime export, native dispatch, and parity documentation area. Landing them together keeps the v8 compatibility slice coherent while still leaving exact V8 internals out of scope.Tests
cargo fmt --allcargo fmt --all -- --checkgit diff --checkgit diff --cached --check./scripts/check_file_size.shRUSTC_WRAPPER= SCCACHE_DISABLE=1 CARGO_BUILD_JOBS=2 cargo check -p perry-runtime -p perry-codegen -p perry-hirRUSTC_WRAPPER= SCCACHE_DISABLE=1 CARGO_BUILD_JOBS=2 cargo build --release -p perry -p perry-runtimeRUSTC_WRAPPER= SCCACHE_DISABLE=1 CARGO_BUILD_JOBS=2 cargo test -p perry-runtime readable_from_set_encoding_read_decodes_buffer_chunkstest-parity/node-suite/v8/gc-profiler/report-shape.tstest-parity/node-suite/v8/heap-snapshot/output.tstest-parity/node-suite/v8/startup-snapshot/shape.tstest-parity/node-suite/v8/exports/diagnostics-surface.ts; local Node v22.22.1 lacks thestartCpuProfilenamed export needed to run that fixture as a Node baseline.Non-goals / limitations