OLD | NEW |
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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // Skip this test on the custom snapshot builder. | 496 // Skip this test on the custom snapshot builder. |
497 if (!CcTest::global() | 497 if (!CcTest::global() |
498 ->Get(context, v8_str("assertEquals")) | 498 ->Get(context, v8_str("assertEquals")) |
499 .ToLocalChecked() | 499 .ToLocalChecked() |
500 ->IsUndefined()) { | 500 ->IsUndefined()) { |
501 return; | 501 return; |
502 } | 502 } |
503 // Initial size of LO_SPACE | 503 // Initial size of LO_SPACE |
504 size_t initial_lo_space = isolate->heap()->lo_space()->Size(); | 504 size_t initial_lo_space = isolate->heap()->lo_space()->Size(); |
505 | 505 |
506 // The limit for each space for an empty isolate containing just the | 506 // The limit for each space for an empty isolate containing just the |
507 // snapshot. | 507 // snapshot. |
| 508 // In PPC the page size is 64K, causing more internal fragmentation |
| 509 // hence requiring a larger limit. |
| 510 #if V8_OS_LINUX && V8_HOST_ARCH_PPC |
| 511 const size_t kMaxInitialSizePerSpace = 3 * MB; |
| 512 #else |
508 const size_t kMaxInitialSizePerSpace = 2 * MB; | 513 const size_t kMaxInitialSizePerSpace = 2 * MB; |
| 514 #endif |
509 | 515 |
510 // Freshly initialized VM gets by with the snapshot size (which is below | 516 // Freshly initialized VM gets by with the snapshot size (which is below |
511 // kMaxInitialSizePerSpace per space). | 517 // kMaxInitialSizePerSpace per space). |
512 Heap* heap = isolate->heap(); | 518 Heap* heap = isolate->heap(); |
513 int page_count[LAST_PAGED_SPACE + 1] = {0, 0, 0, 0}; | 519 int page_count[LAST_PAGED_SPACE + 1] = {0, 0, 0, 0}; |
514 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { | 520 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { |
515 // Debug code can be very large, so skip CODE_SPACE if we are generating it. | 521 // Debug code can be very large, so skip CODE_SPACE if we are generating it. |
516 if (i == CODE_SPACE && i::FLAG_debug_code) continue; | 522 if (i == CODE_SPACE && i::FLAG_debug_code) continue; |
517 | 523 |
518 page_count[i] = heap->paged_space(i)->CountTotalPages(); | 524 page_count[i] = heap->paged_space(i)->CountTotalPages(); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 HeapObject* filler = | 798 HeapObject* filler = |
793 HeapObject::FromAddress(array->address() + array->Size()); | 799 HeapObject::FromAddress(array->address() + array->Size()); |
794 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); | 800 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); |
795 | 801 |
796 const size_t shrinked = page->ShrinkToHighWaterMark(); | 802 const size_t shrinked = page->ShrinkToHighWaterMark(); |
797 CHECK_EQ(0u, shrinked); | 803 CHECK_EQ(0u, shrinked); |
798 } | 804 } |
799 | 805 |
800 } // namespace internal | 806 } // namespace internal |
801 } // namespace v8 | 807 } // namespace v8 |
OLD | NEW |