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

Side by Side Diff: test/cctest/heap/test-spaces.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-incremental-marking.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 new_space->RemoveAllocationObserver(&observer1); 652 new_space->RemoveAllocationObserver(&observer1);
653 new_space->RemoveAllocationObserver(&observer2); 653 new_space->RemoveAllocationObserver(&observer2);
654 654
655 CHECK_EQ(observer1.count(), 32); 655 CHECK_EQ(observer1.count(), 32);
656 CHECK_EQ(observer2.count(), 28); 656 CHECK_EQ(observer2.count(), 28);
657 } 657 }
658 isolate->Dispose(); 658 isolate->Dispose();
659 } 659 }
660 660
661 TEST(ShrinkPageToHighWaterMarkFreeSpaceEnd) { 661 TEST(ShrinkPageToHighWaterMarkFreeSpaceEnd) {
662 FLAG_stress_incremental_marking = false;
662 CcTest::InitializeVM(); 663 CcTest::InitializeVM();
663 Isolate* isolate = CcTest::i_isolate(); 664 Isolate* isolate = CcTest::i_isolate();
664 HandleScope scope(isolate); 665 HandleScope scope(isolate);
665 666
666 heap::SealCurrentObjects(CcTest::heap()); 667 heap::SealCurrentObjects(CcTest::heap());
667 668
668 // Prepare page that only contains a single object and a trailing FreeSpace 669 // Prepare page that only contains a single object and a trailing FreeSpace
669 // filler. 670 // filler.
670 Handle<FixedArray> array = isolate->factory()->NewFixedArray(128, TENURED); 671 Handle<FixedArray> array = isolate->factory()->NewFixedArray(128, TENURED);
671 Page* page = Page::FromAddress(array->address()); 672 Page* page = Page::FromAddress(array->address());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 HeapObject* filler = 753 HeapObject* filler =
753 HeapObject::FromAddress(array->address() + array->Size()); 754 HeapObject::FromAddress(array->address() + array->Size());
754 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); 755 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map());
755 756
756 const size_t shrinked = page->ShrinkToHighWaterMark(); 757 const size_t shrinked = page->ShrinkToHighWaterMark();
757 CHECK_EQ(0u, shrinked); 758 CHECK_EQ(0u, shrinked);
758 } 759 }
759 760
760 } // namespace internal 761 } // namespace internal
761 } // namespace v8 762 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/test-incremental-marking.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698