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

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

Issue 2381493004: [heap] Set progress bar flag for FixedArray upon allocation (Closed)
Patch Set: Addressed comment Created 4 years, 2 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
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | test/cctest/heap/test-lab.cc » ('j') | 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 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 // may precede or follow the object. 2223 // may precede or follow the object.
2224 TEST(TestAlignedOverAllocation) { 2224 TEST(TestAlignedOverAllocation) {
2225 Heap* heap = CcTest::heap(); 2225 Heap* heap = CcTest::heap();
2226 // Test checks for fillers before and behind objects and requires a fresh 2226 // Test checks for fillers before and behind objects and requires a fresh
2227 // page and empty free list. 2227 // page and empty free list.
2228 heap::AbandonCurrentlyFreeMemory(heap->old_space()); 2228 heap::AbandonCurrentlyFreeMemory(heap->old_space());
2229 // Allocate a dummy object to properly set up the linear allocation info. 2229 // Allocate a dummy object to properly set up the linear allocation info.
2230 AllocationResult dummy = 2230 AllocationResult dummy =
2231 heap->old_space()->AllocateRawUnaligned(kPointerSize); 2231 heap->old_space()->AllocateRawUnaligned(kPointerSize);
2232 CHECK(!dummy.IsRetry()); 2232 CHECK(!dummy.IsRetry());
2233 heap->CreateFillerObjectAt( 2233 heap->CreateFillerObjectAt(dummy.ToObjectChecked()->address(), kPointerSize,
2234 HeapObject::cast(dummy.ToObjectChecked())->address(), kPointerSize, 2234 ClearRecordedSlots::kNo);
2235 ClearRecordedSlots::kNo);
2236 2235
2237 // Double misalignment is 4 on 32-bit platforms, 0 on 64-bit ones. 2236 // Double misalignment is 4 on 32-bit platforms, 0 on 64-bit ones.
2238 const intptr_t double_misalignment = kDoubleSize - kPointerSize; 2237 const intptr_t double_misalignment = kDoubleSize - kPointerSize;
2239 Address start; 2238 Address start;
2240 HeapObject* obj; 2239 HeapObject* obj;
2241 HeapObject* filler1; 2240 HeapObject* filler1;
2242 HeapObject* filler2; 2241 HeapObject* filler2;
2243 if (double_misalignment) { 2242 if (double_misalignment) {
2244 start = AlignOldSpace(kDoubleAligned, 0); 2243 start = AlignOldSpace(kDoubleAligned, 0);
2245 obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned); 2244 obj = OldSpaceAllocateAligned(kPointerSize, kDoubleAligned);
(...skipping 4860 matching lines...) Expand 10 before | Expand all | Expand 10 after
7106 chunk, chunk->area_end() - kPointerSize, chunk->area_end()); 7105 chunk, chunk->area_end() - kPointerSize, chunk->area_end());
7107 slots[chunk->area_end() - kPointerSize] = false; 7106 slots[chunk->area_end() - kPointerSize] = false;
7108 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { 7107 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) {
7109 CHECK(slots[addr]); 7108 CHECK(slots[addr]);
7110 return KEEP_SLOT; 7109 return KEEP_SLOT;
7111 }); 7110 });
7112 } 7111 }
7113 7112
7114 } // namespace internal 7113 } // namespace internal
7115 } // namespace v8 7114 } // namespace v8
OLDNEW
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | test/cctest/heap/test-lab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698