Permalink
Browse files

deps: V8: cherry-pick 9622696 from upstream

Original commit message:
  [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
  R=ulan@chromium.org

  Review-Url: https://codereview.chromium.org/1945193002
  Cr-Commit-Position: refs/heads/master@{#36012}

Ref: https://bugs.chromium.org/p/v8/issues/detail?id=4959
Ref: v8/v8@9622696
  • Loading branch information...
ofrobots authored and MylesBorins committed Dec 12, 2017
1 parent 93ca2f7 commit 9804e7f3bbcebef251f2d31ea755cfd0281981dc
Showing with 2 additions and 1 deletion.
  1. +1 −1 deps/v8/include/v8-version.h
  2. +1 −0 deps/v8/src/profiler/sampling-heap-profiler.cc
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 281
#define V8_PATCH_LEVEL 109
#define V8_PATCH_LEVEL 110
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
@@ -109,6 +109,7 @@ void SamplingHeapProfiler::SampleObject(Address soon_object, size_t size) {
Sample* sample = new Sample(size, node, loc, this);
samples_.insert(sample);
sample->global.SetWeak(sample, OnWeakCallback, WeakCallbackType::kParameter);
sample->global.MarkIndependent();
}
void SamplingHeapProfiler::OnWeakCallback(

0 comments on commit 9804e7f

Please sign in to comment.