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

Side by Side Diff: test/cctest/heap/test-page-promotion.cc

Issue 2498583002: [heap] Minor MC: Add marking (Closed)
Patch Set: Move to concurrent uncomitting of marking deque Created 4 years, 1 month 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/test-serialize.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "src/factory.h" 5 #include "src/factory.h"
6 #include "src/heap/array-buffer-tracker.h" 6 #include "src/heap/array-buffer-tracker.h"
7 #include "src/heap/spaces-inl.h" 7 #include "src/heap/spaces-inl.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 // FIXME(mstarzinger, marja): This is weird, but required because of the missing 9 // FIXME(mstarzinger, marja): This is weird, but required because of the missing
10 // (disallowed) include: src/factory.h -> src/objects-inl.h 10 // (disallowed) include: src/factory.h -> src/objects-inl.h
(...skipping 24 matching lines...) Expand all
35 v8::Isolate* isolate = v8::Isolate::New(create_params); 35 v8::Isolate* isolate = v8::Isolate::New(create_params);
36 return isolate; 36 return isolate;
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace v8 { 41 namespace v8 {
42 namespace internal { 42 namespace internal {
43 43
44 UNINITIALIZED_TEST(PagePromotion_NewToOld) { 44 UNINITIALIZED_TEST(PagePromotion_NewToOld) {
45 if (!i::FLAG_incremental_marking) return;
45 v8::Isolate* isolate = NewIsolateForPagePromotion(); 46 v8::Isolate* isolate = NewIsolateForPagePromotion();
46 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 47 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
47 { 48 {
48 v8::Isolate::Scope isolate_scope(isolate); 49 v8::Isolate::Scope isolate_scope(isolate);
49 v8::HandleScope handle_scope(isolate); 50 v8::HandleScope handle_scope(isolate);
50 v8::Context::New(isolate)->Enter(); 51 v8::Context::New(isolate)->Enter();
51 Heap* heap = i_isolate->heap(); 52 Heap* heap = i_isolate->heap();
52 53
53 std::vector<Handle<FixedArray>> handles; 54 std::vector<Handle<FixedArray>> handles;
54 heap::SimulateFullSpace(heap->new_space(), &handles); 55 heap::SimulateFullSpace(heap->new_space(), &handles);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 heap->CollectGarbage(NEW_SPACE, i::GarbageCollectionReason::kTesting); 165 heap->CollectGarbage(NEW_SPACE, i::GarbageCollectionReason::kTesting);
165 heap->new_space()->Shrink(); 166 heap->new_space()->Shrink();
166 heap->memory_allocator()->unmapper()->WaitUntilCompleted(); 167 heap->memory_allocator()->unmapper()->WaitUntilCompleted();
167 heap->mark_compact_collector()->sweeper().StartSweeperTasks(); 168 heap->mark_compact_collector()->sweeper().StartSweeperTasks();
168 heap->mark_compact_collector()->EnsureSweepingCompleted(); 169 heap->mark_compact_collector()->EnsureSweepingCompleted();
169 } 170 }
170 } 171 }
171 172
172 } // namespace internal 173 } // namespace internal
173 } // namespace v8 174 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698