You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3ea13e8
Browse filesBrowse the repository at this point in the historyBrowse files
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>
0 commit comments