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

Side by Side Diff: test/cctest/heap/test-incremental-marking.cc

Issue 2900603004: [heap] Add --stress-incremental-marking flag. (Closed)
Patch Set: fix test Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #ifdef __linux__ 7 #ifdef __linux__
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return dummy; 94 return dummy;
95 } 95 }
96 96
97 private: 97 private:
98 v8::Platform* platform_; 98 v8::Platform* platform_;
99 Task* task_; 99 Task* task_;
100 }; 100 };
101 101
102 TEST(IncrementalMarkingUsingTasks) { 102 TEST(IncrementalMarkingUsingTasks) {
103 if (!i::FLAG_incremental_marking) return; 103 if (!i::FLAG_incremental_marking) return;
104 FLAG_stress_incremental_marking = false;
104 CcTest::InitializeVM(); 105 CcTest::InitializeVM();
105 v8::Platform* old_platform = i::V8::GetCurrentPlatform(); 106 v8::Platform* old_platform = i::V8::GetCurrentPlatform();
106 MockPlatform platform(old_platform); 107 MockPlatform platform(old_platform);
107 i::V8::SetPlatformForTesting(&platform); 108 i::V8::SetPlatformForTesting(&platform);
108 i::heap::SimulateFullSpace(CcTest::heap()->old_space()); 109 i::heap::SimulateFullSpace(CcTest::heap()->old_space());
109 i::IncrementalMarking* marking = CcTest::heap()->incremental_marking(); 110 i::IncrementalMarking* marking = CcTest::heap()->incremental_marking();
110 marking->Stop(); 111 marking->Stop();
111 marking->Start(i::GarbageCollectionReason::kTesting); 112 marking->Start(i::GarbageCollectionReason::kTesting);
112 CHECK(platform.PendingTask()); 113 CHECK(platform.PendingTask());
113 while (platform.PendingTask()) { 114 while (platform.PendingTask()) {
114 platform.PerformTask(); 115 platform.PerformTask();
115 } 116 }
116 CHECK(marking->IsStopped()); 117 CHECK(marking->IsStopped());
117 i::V8::SetPlatformForTesting(old_platform); 118 i::V8::SetPlatformForTesting(old_platform);
118 } 119 }
119 120
120 } // namespace internal 121 } // namespace internal
121 } // namespace v8 122 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698