Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |