| Index: test/cctest/heap/test-concurrent-marking.cc
|
| diff --git a/test/cctest/heap/test-concurrent-marking.cc b/test/cctest/heap/test-concurrent-marking.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9a50f33f58b3e7eb8c8189d5fbc4b1e0c6f9db7b
|
| --- /dev/null
|
| +++ b/test/cctest/heap/test-concurrent-marking.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2017 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 <stdlib.h>
|
| +
|
| +#include "src/v8.h"
|
| +
|
| +#include "src/heap/concurrent-marking.h"
|
| +#include "src/heap/heap-inl.h"
|
| +#include "src/heap/heap.h"
|
| +#include "test/cctest/cctest.h"
|
| +#include "test/cctest/heap/heap-utils.h"
|
| +
|
| +namespace v8 {
|
| +namespace internal {
|
| +TEST(ConcurrentMarking) {
|
| + i::FLAG_concurrent_marking = true;
|
| + CcTest::InitializeVM();
|
| + Heap* heap = CcTest::heap();
|
| + ConcurrentMarking* concurrent_marking = new ConcurrentMarking(heap);
|
| + for (int i = 0; i < 10; i++) {
|
| + concurrent_marking->EnqueueObject(heap->undefined_value());
|
| + }
|
| + concurrent_marking->StartMarkingTasks(3);
|
| + while (!concurrent_marking->IsQueueEmpty()) {
|
| + }
|
| + concurrent_marking->WaitForTasksToComplete();
|
| + delete concurrent_marking;
|
| +}
|
| +
|
| +} // namespace internal
|
| +} // namespace v8
|
|
|