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 3540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |