Skip to content

Commit 9622696

Browse files
ofrobotsCommit bot
authored andcommitted
[profiler] sampled allocations should be marked as independent
Sampling heap profiler keeps weak references. These should be marked independent so that the weak callback can be dispatched on new space collections. BUG=v8:4959 LOG=N [email protected] Review-Url: https://codereview.chromium.org/1945193002 Cr-Commit-Position: refs/heads/master@{#36012}
1 parent 07c72af commit 9622696

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/profiler/sampling-heap-profiler.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ void SamplingHeapProfiler::SampleObject(Address soon_object, size_t size) {
109109
Sample* sample = new Sample(size, node, loc, this);
110110
samples_.insert(sample);
111111
sample->global.SetWeak(sample, OnWeakCallback, WeakCallbackType::kParameter);
112+
sample->global.MarkIndependent();
112113
}
113114

114115
void SamplingHeapProfiler::OnWeakCallback(

0 commit comments

Comments
 (0)