deps: V8: cherry-pick 92ac9425fa52 - #66527
Open
IlyasShabi wants to merge 1 commit into
Open
IlyasShabi wants to merge 1 commit into
IlyasShabi wants to merge 1 commit into
Conversation
Original commit message:
[profiler] Adjustable heap profiler sampling interval
This change makes the V8 sampling heap profiler interval adjustable
while heap sampling is running. Today, the sampling interval is fixed
for the whole profiling session. Developers who want to adapt sampling
under high allocation load have to stop the profiler and start it again
with a new interval, which loses continuity.
This PR adds a small API surface for adaptive heap sampling:
- SetSamplingHeapProfilerInterval(sample_interval) updates the active sampling interval.
- GetSamplingHeapProfilerSamples() returns the current retained samples without materializing the full allocation profile tree.
- AllocationProfile::Sample now includes sample_interval, so consumers know which interval was used when the sample was generated.
The new sample getter is intended for lightweight polling. It avoids the
extra work done by GetAllocationProfile(), such as translating the
allocation tree and resolving script metadata, when callers only need
sample information.
This keeps the adaptive policy outside V8: embedders can decide how to
adjust the interval, while V8 exposes the mechanism needed to do it.
Change-Id: I7cff46a13c02617d04149c8d5c273a8d9ef4bb9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8130742
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#109934}
Refs: v8/v8@92ac942
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
Collaborator
|
Review requested:
|
Member
|
From my understanding a V8 15.5 PR is planned for the main branch/v27.x, so I don't think there'll be any benefit to landing this separately? |
Contributor
Optimistic POV: yeah you're right |
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.
Original commit message:
Refs: v8/v8@92ac942