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

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: Cleanup 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/mark-compact.cc ('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 3539 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 // The optimizer can allocate stuff, messing up the test. 3550 // The optimizer can allocate stuff, messing up the test.
3551 i::FLAG_crankshaft = false; 3551 i::FLAG_crankshaft = false;
3552 i::FLAG_always_opt = false; 3552 i::FLAG_always_opt = false;
3553 // Parallel compaction increases fragmentation, depending on how existing 3553 // Parallel compaction increases fragmentation, depending on how existing
3554 // memory is distributed. Since this is non-deterministic because of 3554 // memory is distributed. Since this is non-deterministic because of
3555 // concurrent sweeping, we disable it for this test. 3555 // concurrent sweeping, we disable it for this test.
3556 i::FLAG_parallel_compaction = false; 3556 i::FLAG_parallel_compaction = false;
3557 // Concurrent sweeping adds non determinism, depending on when memory is 3557 // Concurrent sweeping adds non determinism, depending on when memory is
3558 // available for further reuse. 3558 // available for further reuse.
3559 i::FLAG_concurrent_sweeping = false; 3559 i::FLAG_concurrent_sweeping = false;
3560 // Fast evacuation of pages may result in a different page count in old space.
3561 // Setting to 101% effectively disables this feature.
3562 i::FLAG_page_evacuation_threshold = 101;
Hannes Payer (out of office) 2016/04/08 10:42:40 That is not very nice... should we introduce a sep
Michael Lippautz 2016/04/08 11:30:00 Done.
3560 CcTest::InitializeVM(); 3563 CcTest::InitializeVM();
3561 Isolate* isolate = CcTest::i_isolate(); 3564 Isolate* isolate = CcTest::i_isolate();
3562 Factory* factory = isolate->factory(); 3565 Factory* factory = isolate->factory();
3563 Heap* heap = isolate->heap(); 3566 Heap* heap = isolate->heap();
3564 v8::HandleScope scope(CcTest::isolate()); 3567 v8::HandleScope scope(CcTest::isolate());
3565 static const int number_of_test_pages = 20; 3568 static const int number_of_test_pages = 20;
3566 3569
3567 // Prepare many pages with low live-bytes count. 3570 // Prepare many pages with low live-bytes count.
3568 PagedSpace* old_space = heap->old_space(); 3571 PagedSpace* old_space = heap->old_space();
3569 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
6601 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); 6604 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1);
6602 } 6605 }
6603 } 6606 }
6604 // Force allocation from the free list. 6607 // Force allocation from the free list.
6605 heap->set_force_oom(true); 6608 heap->set_force_oom(true);
6606 heap->CollectGarbage(OLD_SPACE); 6609 heap->CollectGarbage(OLD_SPACE);
6607 } 6610 }
6608 6611
6609 } // namespace internal 6612 } // namespace internal
6610 } // namespace v8 6613 } // namespace v8
OLDNEW
« src/heap/mark-compact.cc ('K') | « src/heap/spaces-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698