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

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

Issue 2523293002: PPC64: Changing test-spaces/SizeOfInitialHeap to accomodate 64K page size (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | 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 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // Freshly initialized VM gets by with the snapshot size (which is below 510 // Freshly initialized VM gets by with the snapshot size (which is below
511 // kMaxInitialSizePerSpace per space). 511 // kMaxInitialSizePerSpace per space).
512 Heap* heap = isolate->heap(); 512 Heap* heap = isolate->heap();
513 int page_count[LAST_PAGED_SPACE + 1] = {0, 0, 0, 0}; 513 int page_count[LAST_PAGED_SPACE + 1] = {0, 0, 0, 0};
514 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { 514 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. 515 // 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; 516 if (i == CODE_SPACE && i::FLAG_debug_code) continue;
517 517
518 page_count[i] = heap->paged_space(i)->CountTotalPages(); 518 page_count[i] = heap->paged_space(i)->CountTotalPages();
519 // Check that the initial heap is also below the limit. 519 // Check that the initial heap is also below the limit.
520 // In PPC the page size is 64K, hence no memory will be freed causing
521 // the initial committed memory in code spaces to be exactly 2M.
522 // changing the test case to accomodate this.
523 #if V8_OS_LINUX && V8_HOST_ARCH_PPC
524 CHECK_LE(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace);
Michael Lippautz 2016/11/25 15:23:51 I would put the #define_s around kMaxInitialSizePe
525 #else
520 CHECK_LT(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace); 526 CHECK_LT(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace);
527 #endif
521 } 528 }
522 529
523 // Executing the empty script gets by with the same number of pages, i.e., 530 // Executing the empty script gets by with the same number of pages, i.e.,
524 // requires no extra space. 531 // requires no extra space.
525 CompileRun("/*empty*/"); 532 CompileRun("/*empty*/");
526 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { 533 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) {
527 // Debug code can be very large, so skip CODE_SPACE if we are generating it. 534 // Debug code can be very large, so skip CODE_SPACE if we are generating it.
528 if (i == CODE_SPACE && i::FLAG_debug_code) continue; 535 if (i == CODE_SPACE && i::FLAG_debug_code) continue;
529 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages()); 536 CHECK_EQ(page_count[i], isolate->heap()->paged_space(i)->CountTotalPages());
530 } 537 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 HeapObject* filler = 799 HeapObject* filler =
793 HeapObject::FromAddress(array->address() + array->Size()); 800 HeapObject::FromAddress(array->address() + array->Size());
794 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map()); 801 CHECK_EQ(filler->map(), CcTest::heap()->two_pointer_filler_map());
795 802
796 const size_t shrinked = page->ShrinkToHighWaterMark(); 803 const size_t shrinked = page->ShrinkToHighWaterMark();
797 CHECK_EQ(0u, shrinked); 804 CHECK_EQ(0u, shrinked);
798 } 805 }
799 806
800 } // namespace internal 807 } // namespace internal
801 } // namespace v8 808 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698