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

Unified Diff: runtime/vm/heap_test.cc

Issue 1351453008: Parallel marking. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add TODO to remove busy wait Created 5 years, 2 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
Index: runtime/vm/heap_test.cc
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc
index 47cfafe2980823ee7141be0978929f50a3a33eb6..e609901f8c5e8a10a6f2f9d0a81c65a66318e6b2 100644
--- a/runtime/vm/heap_test.cc
+++ b/runtime/vm/heap_test.cc
@@ -12,6 +12,8 @@
namespace dart {
+DECLARE_FLAG(int, marker_tasks);
+
TEST_CASE(OldGC) {
const char* kScriptChars =
"main() {\n"
@@ -30,6 +32,25 @@ TEST_CASE(OldGC) {
}
+TEST_CASE(OldGC_Unsync) {
+ FLAG_marker_tasks = 0;
+ const char* kScriptChars =
+ "main() {\n"
+ " return [1, 2, 3];\n"
+ "}\n";
+ FLAG_verbose_gc = true;
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+
+ EXPECT_VALID(result);
+ EXPECT(!Dart_IsNull(result));
+ EXPECT(Dart_IsList(result));
+ Isolate* isolate = Isolate::Current();
+ Heap* heap = isolate->heap();
+ heap->CollectGarbage(Heap::kOld);
+}
+
+
TEST_CASE(LargeSweep) {
const char* kScriptChars =
"main() {\n"
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/gc_marker.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698