v8/test/unittests/heap/local-heap-unittest.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

197 lines
5.0 KiB
C++
Raw Normal View History

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/heap/local-heap.h"
#include "src/base/platform/condition-variable.h"
#include "src/base/platform/mutex.h"
#include "src/heap/heap.h"
#include "src/heap/parked-scope.h"
#include "src/heap/safepoint.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
using LocalHeapTest = TestWithIsolate;
TEST_F(LocalHeapTest, Initialize) {
Heap* heap = i_isolate()->heap();
Reland "[heap] Optimize time to reach global safepoint" This is a reland of 86038ecfdc8315e394880a9decfa1bbda7d11748 Compared to the previous CL this one is adding a TSAN suppression for GlobalSafepoint::EnterSafepointScope. local_heaps_mutex_ of client isolates may be locked in any order. This would be detected by TSAN as a potential race. Add some additional DCHECKs to compensate for that missing test coverage. As a cleanup this CL also removes the unused methods ContainsLocalHeap() and ContainsAnyLocalHeap() from LocalHeap. Original change's description: > [heap] Optimize time to reach global safepoint > > Initial support for global safepoints kept it simple by entering a > safepoint for each of them one after another. This means > time-to-global-safepoint is the sum of all time-to-safepoint operations. > We can improve this slightly by splitting up the safepoint iteration > into two operations: > > 1) Initiate safepoint lock (locks local_heaps_mutex_, arms the barrier > and sets SafepointRequested flag for all client threads) > 2) Block until all runnning client threads reach a safepoint > > We now perform operation 1) for all clients first and only then start > with operation 2). > > Bug: v8:11708 > Change-Id: Iaafd3c6d70bcf7026f722633e9250b04148b3da6 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310910 > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78308} Bug: v8:11708, v8:12492 Change-Id: I7087ba23c08f2d4edb9b632eef3c218fc76342e7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3328786 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#78583}
2021-12-10 14:49:54 +00:00
heap->safepoint()->AssertMainThreadIsOnlyThread();
}
TEST_F(LocalHeapTest, Current) {
Heap* heap = i_isolate()->heap();
CHECK_NULL(LocalHeap::Current());
{
LocalHeap lh(heap, ThreadKind::kMain);
Reland "[heap] Attach to shared isolate after setting up main thread" This is a reland of 929b83fb7b54aebf9b0170e4c8719b357b0393a8 This version of the CL also fixes initialization of the marking_barrier_ in the LocalHeap constructor. This CL also got rebased on Victor's CL in https://crrev.com/c/3229361. It added a code_space_allocator_ in LocalHeap which needs to be initialized a bit later on the main thread as well. Original change's description: > [heap] Attach to shared isolate after setting up main thread > > Attach to the shared isolate after the main thread was set up. Otherwise > it could happen that a shared GC initiated from another isolate might > see no threads are running and performs the safepoint operation in the > middle of isolate deserialization. > > We use DisallowSafepoints to check that the isolate doesn't join a > global safepoint before deserialization is complete. DisallowSafepoints > used to prevent only invocations of Safepoint() but was updated to > also prevent Park() and Unpark() invocations. Each state change could > cause the thread to reach a safepoint, which would allow a shared GC > to run. > > We now also DCHECK that every isolate has at least one local heap and > that shared collections aren't started before deserialization is > complete. > > Bug: v8:11708 > Change-Id: Iba3fb59dd951d5ee4fc9934158062287302fc279 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3221157 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77424} Bug: v8:11708 Change-Id: I7d44e4a5f76cc09092c2444cede10e9331222c1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229361 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77448}
2021-10-18 15:07:26 +00:00
lh.SetUpMainThreadForTesting();
Reland "[heap] Introduce LocalIsolate for main thread" This is a reland of e95e1b62342659b8c7dda5ce3d3a2f13f554342d After landing https://crrev.com/c/2546682, this CL can be relanded without changes. Original change's description: > [heap] Introduce LocalIsolate for main thread > > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is > kept alive during the whole lifetime of the Isolate. The main thread > LocalIsolate starts in the Running state in contrast to the background > thread LocalIsolates (those start in Parked). > > Code paths in Turbofan that used to create a LocalIsolate on the main > thread can now simply use the main thread LocalIsolate. > > LocalIsolate for the main thread will help in reducing differences > between the main and background threads. The goal is that the main > thread behaves more like a background thread. > > The main thread LocalIsolate should also make it simpler to share code > between main thread and background threads by using LocalIsolate for > both. > > Bug: v8:10315 > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593 > Reviewed-by: Simon Zünd <szuend@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71226} Bug: v8:10315 Change-Id: I418b1217aeac4f3c44a0aa514dea9864f8a58656 TBR: szuend@chromium.org, yangguo@chromium.org, ulan@chromium.org, leszeks@chromium.org, neis@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543399 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#71274}
2020-11-17 10:16:09 +00:00
CHECK_NULL(LocalHeap::Current());
}
CHECK_NULL(LocalHeap::Current());
{
LocalHeap lh(heap, ThreadKind::kMain);
Reland "[heap] Attach to shared isolate after setting up main thread" This is a reland of 929b83fb7b54aebf9b0170e4c8719b357b0393a8 This version of the CL also fixes initialization of the marking_barrier_ in the LocalHeap constructor. This CL also got rebased on Victor's CL in https://crrev.com/c/3229361. It added a code_space_allocator_ in LocalHeap which needs to be initialized a bit later on the main thread as well. Original change's description: > [heap] Attach to shared isolate after setting up main thread > > Attach to the shared isolate after the main thread was set up. Otherwise > it could happen that a shared GC initiated from another isolate might > see no threads are running and performs the safepoint operation in the > middle of isolate deserialization. > > We use DisallowSafepoints to check that the isolate doesn't join a > global safepoint before deserialization is complete. DisallowSafepoints > used to prevent only invocations of Safepoint() but was updated to > also prevent Park() and Unpark() invocations. Each state change could > cause the thread to reach a safepoint, which would allow a shared GC > to run. > > We now also DCHECK that every isolate has at least one local heap and > that shared collections aren't started before deserialization is > complete. > > Bug: v8:11708 > Change-Id: Iba3fb59dd951d5ee4fc9934158062287302fc279 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3221157 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77424} Bug: v8:11708 Change-Id: I7d44e4a5f76cc09092c2444cede10e9331222c1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229361 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77448}
2021-10-18 15:07:26 +00:00
lh.SetUpMainThreadForTesting();
Reland "[heap] Introduce LocalIsolate for main thread" This is a reland of e95e1b62342659b8c7dda5ce3d3a2f13f554342d After landing https://crrev.com/c/2546682, this CL can be relanded without changes. Original change's description: > [heap] Introduce LocalIsolate for main thread > > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is > kept alive during the whole lifetime of the Isolate. The main thread > LocalIsolate starts in the Running state in contrast to the background > thread LocalIsolates (those start in Parked). > > Code paths in Turbofan that used to create a LocalIsolate on the main > thread can now simply use the main thread LocalIsolate. > > LocalIsolate for the main thread will help in reducing differences > between the main and background threads. The goal is that the main > thread behaves more like a background thread. > > The main thread LocalIsolate should also make it simpler to share code > between main thread and background threads by using LocalIsolate for > both. > > Bug: v8:10315 > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593 > Reviewed-by: Simon Zünd <szuend@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71226} Bug: v8:10315 Change-Id: I418b1217aeac4f3c44a0aa514dea9864f8a58656 TBR: szuend@chromium.org, yangguo@chromium.org, ulan@chromium.org, leszeks@chromium.org, neis@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543399 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#71274}
2020-11-17 10:16:09 +00:00
CHECK_NULL(LocalHeap::Current());
}
CHECK_NULL(LocalHeap::Current());
}
namespace {
class BackgroundThread final : public v8::base::Thread {
public:
explicit BackgroundThread(Heap* heap)
: v8::base::Thread(base::Thread::Options("BackgroundThread")),
heap_(heap) {}
void Run() override {
CHECK_NULL(LocalHeap::Current());
{
LocalHeap lh(heap_, ThreadKind::kBackground);
CHECK_EQ(&lh, LocalHeap::Current());
}
CHECK_NULL(LocalHeap::Current());
}
Heap* heap_;
};
} // anonymous namespace
TEST_F(LocalHeapTest, CurrentBackground) {
Heap* heap = i_isolate()->heap();
CHECK_NULL(LocalHeap::Current());
{
LocalHeap lh(heap, ThreadKind::kMain);
Reland "[heap] Attach to shared isolate after setting up main thread" This is a reland of 929b83fb7b54aebf9b0170e4c8719b357b0393a8 This version of the CL also fixes initialization of the marking_barrier_ in the LocalHeap constructor. This CL also got rebased on Victor's CL in https://crrev.com/c/3229361. It added a code_space_allocator_ in LocalHeap which needs to be initialized a bit later on the main thread as well. Original change's description: > [heap] Attach to shared isolate after setting up main thread > > Attach to the shared isolate after the main thread was set up. Otherwise > it could happen that a shared GC initiated from another isolate might > see no threads are running and performs the safepoint operation in the > middle of isolate deserialization. > > We use DisallowSafepoints to check that the isolate doesn't join a > global safepoint before deserialization is complete. DisallowSafepoints > used to prevent only invocations of Safepoint() but was updated to > also prevent Park() and Unpark() invocations. Each state change could > cause the thread to reach a safepoint, which would allow a shared GC > to run. > > We now also DCHECK that every isolate has at least one local heap and > that shared collections aren't started before deserialization is > complete. > > Bug: v8:11708 > Change-Id: Iba3fb59dd951d5ee4fc9934158062287302fc279 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3221157 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77424} Bug: v8:11708 Change-Id: I7d44e4a5f76cc09092c2444cede10e9331222c1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229361 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77448}
2021-10-18 15:07:26 +00:00
lh.SetUpMainThreadForTesting();
auto thread = std::make_unique<BackgroundThread>(heap);
CHECK(thread->Start());
Reland "[heap] Introduce LocalIsolate for main thread" This is a reland of e95e1b62342659b8c7dda5ce3d3a2f13f554342d After landing https://crrev.com/c/2546682, this CL can be relanded without changes. Original change's description: > [heap] Introduce LocalIsolate for main thread > > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is > kept alive during the whole lifetime of the Isolate. The main thread > LocalIsolate starts in the Running state in contrast to the background > thread LocalIsolates (those start in Parked). > > Code paths in Turbofan that used to create a LocalIsolate on the main > thread can now simply use the main thread LocalIsolate. > > LocalIsolate for the main thread will help in reducing differences > between the main and background threads. The goal is that the main > thread behaves more like a background thread. > > The main thread LocalIsolate should also make it simpler to share code > between main thread and background threads by using LocalIsolate for > both. > > Bug: v8:10315 > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593 > Reviewed-by: Simon Zünd <szuend@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71226} Bug: v8:10315 Change-Id: I418b1217aeac4f3c44a0aa514dea9864f8a58656 TBR: szuend@chromium.org, yangguo@chromium.org, ulan@chromium.org, leszeks@chromium.org, neis@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543399 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#71274}
2020-11-17 10:16:09 +00:00
CHECK_NULL(LocalHeap::Current());
thread->Join();
Reland "[heap] Introduce LocalIsolate for main thread" This is a reland of e95e1b62342659b8c7dda5ce3d3a2f13f554342d After landing https://crrev.com/c/2546682, this CL can be relanded without changes. Original change's description: > [heap] Introduce LocalIsolate for main thread > > Add a LocalIsolate for the main thread to Isolate. This LocalIsolate is > kept alive during the whole lifetime of the Isolate. The main thread > LocalIsolate starts in the Running state in contrast to the background > thread LocalIsolates (those start in Parked). > > Code paths in Turbofan that used to create a LocalIsolate on the main > thread can now simply use the main thread LocalIsolate. > > LocalIsolate for the main thread will help in reducing differences > between the main and background threads. The goal is that the main > thread behaves more like a background thread. > > The main thread LocalIsolate should also make it simpler to share code > between main thread and background threads by using LocalIsolate for > both. > > Bug: v8:10315 > Change-Id: I7fd61d305a6fd7079e2319d75c291c1021e70018 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2509593 > Reviewed-by: Simon Zünd <szuend@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#71226} Bug: v8:10315 Change-Id: I418b1217aeac4f3c44a0aa514dea9864f8a58656 TBR: szuend@chromium.org, yangguo@chromium.org, ulan@chromium.org, leszeks@chromium.org, neis@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543399 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#71274}
2020-11-17 10:16:09 +00:00
CHECK_NULL(LocalHeap::Current());
}
CHECK_NULL(LocalHeap::Current());
}
namespace {
class GCEpilogue {
public:
static void Callback(void* data) {
reinterpret_cast<GCEpilogue*>(data)->was_invoked_ = true;
}
void NotifyStarted() {
base::LockGuard<base::Mutex> lock_guard(&mutex_);
started_ = true;
cv_.NotifyOne();
}
void WaitUntilStarted() {
base::LockGuard<base::Mutex> lock_guard(&mutex_);
while (!started_) {
cv_.Wait(&mutex_);
}
}
void RequestStop() {
base::LockGuard<base::Mutex> lock_guard(&mutex_);
stop_requested_ = true;
}
bool StopRequested() {
base::LockGuard<base::Mutex> lock_guard(&mutex_);
return stop_requested_;
}
bool WasInvoked() { return was_invoked_; }
private:
bool was_invoked_ = false;
bool started_ = false;
bool stop_requested_ = false;
base::Mutex mutex_;
base::ConditionVariable cv_;
};
class BackgroundThreadForGCEpilogue final : public v8::base::Thread {
public:
explicit BackgroundThreadForGCEpilogue(Heap* heap, bool parked,
GCEpilogue* epilogue)
: v8::base::Thread(base::Thread::Options("BackgroundThread")),
heap_(heap),
parked_(parked),
epilogue_(epilogue) {}
void Run() override {
LocalHeap lh(heap_, ThreadKind::kBackground);
base::Optional<UnparkedScope> unparked_scope;
if (!parked_) {
unparked_scope.emplace(&lh);
}
{
base::Optional<UnparkedScope> nested_unparked_scope;
if (parked_) nested_unparked_scope.emplace(&lh);
lh.AddGCEpilogueCallback(&GCEpilogue::Callback, epilogue_);
}
epilogue_->NotifyStarted();
while (!epilogue_->StopRequested()) {
lh.Safepoint();
}
{
base::Optional<UnparkedScope> nested_unparked_scope;
if (parked_) nested_unparked_scope.emplace(&lh);
lh.RemoveGCEpilogueCallback(&GCEpilogue::Callback, epilogue_);
}
}
Heap* heap_;
bool parked_;
GCEpilogue* epilogue_;
};
} // anonymous namespace
TEST_F(LocalHeapTest, GCEpilogue) {
Heap* heap = i_isolate()->heap();
LocalHeap lh(heap, ThreadKind::kMain);
Reland "[heap] Attach to shared isolate after setting up main thread" This is a reland of 929b83fb7b54aebf9b0170e4c8719b357b0393a8 This version of the CL also fixes initialization of the marking_barrier_ in the LocalHeap constructor. This CL also got rebased on Victor's CL in https://crrev.com/c/3229361. It added a code_space_allocator_ in LocalHeap which needs to be initialized a bit later on the main thread as well. Original change's description: > [heap] Attach to shared isolate after setting up main thread > > Attach to the shared isolate after the main thread was set up. Otherwise > it could happen that a shared GC initiated from another isolate might > see no threads are running and performs the safepoint operation in the > middle of isolate deserialization. > > We use DisallowSafepoints to check that the isolate doesn't join a > global safepoint before deserialization is complete. DisallowSafepoints > used to prevent only invocations of Safepoint() but was updated to > also prevent Park() and Unpark() invocations. Each state change could > cause the thread to reach a safepoint, which would allow a shared GC > to run. > > We now also DCHECK that every isolate has at least one local heap and > that shared collections aren't started before deserialization is > complete. > > Bug: v8:11708 > Change-Id: Iba3fb59dd951d5ee4fc9934158062287302fc279 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3221157 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77424} Bug: v8:11708 Change-Id: I7d44e4a5f76cc09092c2444cede10e9331222c1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229361 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77448}
2021-10-18 15:07:26 +00:00
lh.SetUpMainThreadForTesting();
std::array<GCEpilogue, 3> epilogue;
{
UnparkedScope unparked(&lh);
lh.AddGCEpilogueCallback(&GCEpilogue::Callback, &epilogue[0]);
}
auto thread1 =
std::make_unique<BackgroundThreadForGCEpilogue>(heap, true, &epilogue[1]);
auto thread2 = std::make_unique<BackgroundThreadForGCEpilogue>(heap, false,
&epilogue[2]);
CHECK(thread1->Start());
CHECK(thread2->Start());
epilogue[1].WaitUntilStarted();
epilogue[2].WaitUntilStarted();
{
UnparkedScope scope(&lh);
heap->PreciseCollectAllGarbage(Heap::kNoGCFlags,
GarbageCollectionReason::kTesting);
}
epilogue[1].RequestStop();
epilogue[2].RequestStop();
thread1->Join();
thread2->Join();
{
UnparkedScope unparked(&lh);
lh.RemoveGCEpilogueCallback(&GCEpilogue::Callback, &epilogue[0]);
}
for (auto& e : epilogue) {
CHECK(e.WasInvoked());
}
}
} // namespace internal
} // namespace v8