Repository navigation
v8: add heap profiling setSampleInterval - #67626
Open
IlyasShabi wants to merge 2 commits into
Open
IlyasShabi wants to merge 2 commits into
IlyasShabi wants to merge 2 commits into
Conversation
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
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.66% 90.71% +0.05%
==========================================
Files 799 801 +2
Lines 280252 281071 +819
Branches 54121 54286 +165
==========================================
+ Hits 254088 254980 +892
+ Misses 16285 16260 -25
+ Partials 9879 9831 -48
🚀 New features to boost your workflow:
|
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().