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

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

Issue 1863983002: 🏄 [heap] Add page evacuation mode for new->old (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase on master Created 4 years, 8 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
« src/heap/spaces.h ('K') | « src/heap/spaces-inl.h ('k') | no next file » | 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 3540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3551 // The optimizer can allocate stuff, messing up the test. 3551 // The optimizer can allocate stuff, messing up the test.
3552 i::FLAG_crankshaft = false; 3552 i::FLAG_crankshaft = false;
3553 i::FLAG_always_opt = false; 3553 i::FLAG_always_opt = false;
3554 // Parallel compaction increases fragmentation, depending on how existing 3554 // Parallel compaction increases fragmentation, depending on how existing
3555 // memory is distributed. Since this is non-deterministic because of 3555 // memory is distributed. Since this is non-deterministic because of
3556 // concurrent sweeping, we disable it for this test. 3556 // concurrent sweeping, we disable it for this test.
3557 i::FLAG_parallel_compaction = false; 3557 i::FLAG_parallel_compaction = false;
3558 // Concurrent sweeping adds non determinism, depending on when memory is 3558 // Concurrent sweeping adds non determinism, depending on when memory is
3559 // available for further reuse. 3559 // available for further reuse.
3560 i::FLAG_concurrent_sweeping = false; 3560 i::FLAG_concurrent_sweeping = false;
3561 // Fast evacuation of pages may result in a different page count in old space.
3562 i::FLAG_page_evacuation = false;
3561 CcTest::InitializeVM(); 3563 CcTest::InitializeVM();
3562 Isolate* isolate = CcTest::i_isolate(); 3564 Isolate* isolate = CcTest::i_isolate();
3563 Factory* factory = isolate->factory(); 3565 Factory* factory = isolate->factory();
3564 Heap* heap = isolate->heap(); 3566 Heap* heap = isolate->heap();
3565 v8::HandleScope scope(CcTest::isolate()); 3567 v8::HandleScope scope(CcTest::isolate());
3566 static const int number_of_test_pages = 20; 3568 static const int number_of_test_pages = 20;
3567 3569
3568 // Prepare many pages with low live-bytes count. 3570 // Prepare many pages with low live-bytes count.
3569 PagedSpace* old_space = heap->old_space(); 3571 PagedSpace* old_space = heap->old_space();
3570 CHECK_EQ(1, old_space->CountTotalPages()); 3572 CHECK_EQ(1, old_space->CountTotalPages());
(...skipping 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after
6602 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); 6604 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1);
6603 } 6605 }
6604 } 6606 }
6605 // Force allocation from the free list. 6607 // Force allocation from the free list.
6606 heap->set_force_oom(true); 6608 heap->set_force_oom(true);
6607 heap->CollectGarbage(OLD_SPACE); 6609 heap->CollectGarbage(OLD_SPACE);
6608 } 6610 }
6609 6611
6610 } // namespace internal 6612 } // namespace internal
6611 } // namespace v8 6613 } // namespace v8
OLDNEW
« src/heap/spaces.h ('K') | « src/heap/spaces-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698