From 9804e7f3bbcebef251f2d31ea755cfd0281981dc Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Tue, 12 Dec 2017 13:21:30 -0800 Subject: [PATCH] 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: https://github.com/v8/v8/commit/9622696b5e225ca642f9ea88c0473d59cde062c2 --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/profiler/sampling-heap-profiler.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index f5e1bcbd30b..2c4fc5f7b09 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -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.) diff --git a/deps/v8/src/profiler/sampling-heap-profiler.cc b/deps/v8/src/profiler/sampling-heap-profiler.cc index a32cae3ef9c..282482e47ff 100644 --- a/deps/v8/src/profiler/sampling-heap-profiler.cc +++ b/deps/v8/src/profiler/sampling-heap-profiler.cc @@ -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(