Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: test/cctest/heap/test-concurrent-marking.cc

Issue 2728363002: [heap] Implement concurrent marking boilerplate. (Closed)
Patch Set: Add missing test file Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/heap/concurrent-marking.h ('K') | « test/cctest/cctest.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« src/heap/concurrent-marking.h ('K') | « test/cctest/cctest.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698