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

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

Issue 2407153002: [heap] Use RAIL mode for initial heap sizing (Closed)
Patch Set: fix test Created 4 years 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 | « src/isolate.cc ('k') | test/cctest/test-api.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6582 matching lines...) Expand 10 before | Expand all | Expand 10 after
6593 6593
6594 Handle<FixedArray> root; 6594 Handle<FixedArray> root;
6595 } arr(isolate, kNumberOfObjects); 6595 } arr(isolate, kNumberOfObjects);
6596 6596
6597 CHECK_EQ(arr.get()->length(), kNumberOfObjects); 6597 CHECK_EQ(arr.get()->length(), kNumberOfObjects);
6598 CHECK(heap->lo_space()->Contains(arr.get())); 6598 CHECK(heap->lo_space()->Contains(arr.get()));
6599 LargePage* page = heap->lo_space()->FindPage(arr.get()->address()); 6599 LargePage* page = heap->lo_space()->FindPage(arr.get()->address());
6600 CHECK_NOT_NULL(page); 6600 CHECK_NOT_NULL(page);
6601 6601
6602 // GC to cleanup state 6602 // GC to cleanup state
6603 CcTest::CollectGarbage(OLD_SPACE); 6603 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
6604 MarkCompactCollector* collector = heap->mark_compact_collector(); 6604 MarkCompactCollector* collector = heap->mark_compact_collector();
6605 if (collector->sweeping_in_progress()) { 6605 if (collector->sweeping_in_progress()) {
6606 collector->EnsureSweepingCompleted(); 6606 collector->EnsureSweepingCompleted();
6607 } 6607 }
6608 6608
6609 CHECK(heap->lo_space()->Contains(arr.get())); 6609 CHECK(heap->lo_space()->Contains(arr.get()));
6610 CHECK(Marking::IsWhite(ObjectMarking::MarkBitFrom(arr.get()))); 6610 CHECK(Marking::IsWhite(ObjectMarking::MarkBitFrom(arr.get())));
6611 for (int i = 0; i < arr.get()->length(); i++) { 6611 for (int i = 0; i < arr.get()->length(); i++) {
6612 CHECK(Marking::IsWhite( 6612 CHECK(Marking::IsWhite(
6613 ObjectMarking::MarkBitFrom(HeapObject::cast(arr.get()->get(i))))); 6613 ObjectMarking::MarkBitFrom(HeapObject::cast(arr.get()->get(i)))));
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
7047 SlotSet::FREE_EMPTY_BUCKETS); 7047 SlotSet::FREE_EMPTY_BUCKETS);
7048 slots[chunk->area_end() - kPointerSize] = false; 7048 slots[chunk->area_end() - kPointerSize] = false;
7049 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { 7049 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) {
7050 CHECK(slots[addr]); 7050 CHECK(slots[addr]);
7051 return KEEP_SLOT; 7051 return KEEP_SLOT;
7052 }); 7052 });
7053 } 7053 }
7054 7054
7055 } // namespace internal 7055 } // namespace internal
7056 } // namespace v8 7056 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698