Repository navigation
v8: add heap profiling setSampleInterval - #67626
Open
IlyasShabi wants to merge 4 commits into
Open
IlyasShabi wants to merge 4 commits into
IlyasShabi wants to merge 4 commits into
Conversation
IlyasShabi
force-pushed
the
ishabi/profiling-sample-interval
branch
from
November 19, 2026 20:11
c414e6a to
8d819d6
Compare
IlyasShabi
marked this pull request as ready for review
November 19, 2026 20:12
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67626 +/- ##
========================================
Coverage 90.53% 90.54%
========================================
Files 803 803
Lines 285110 285278 +168
Branches 55032 55068 +36
========================================
+ Hits 258122 258298 +176
+ Misses 17133 17099 -34
- Partials 9855 9881 +26
🚀 New features to boost your workflow:
|
jasnell
reviewed
Nov 22, 2026
jasnell
reviewed
Nov 22, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
IlyasShabi
force-pushed
the
ishabi/profiling-sample-interval
branch
from
November 24, 2026 09:51
14f3a33 to
11e2053
Compare
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.
The heap profiler’s sampling interval is currently fixed for each session. Changing it requires stopping and restarting profiling, which breaks profile continuity.
This PR exposes the APIs added in the V8 change:
setSampleInterval(sampleInterval)updates the interval without restarting profiling or discarding existing samples.getSamples()retrieves retained allocation samples without stopping profiling or building the full profile call tree.sampleInterval, recording the interval used when it was selected.Both methods are available on handles returned by
v8.startHeapProfile()andworker.startHeapProfile().