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

Side by Side Diff: src/heap/scavenger.cc

Issue 1401173003: [heap] Reland decrease large object limit for regular heap objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/heap/mark-compact.cc ('k') | src/heap/spaces.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/scavenger.h" 5 #include "src/heap/scavenger.h"
6 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/heap/objects-visiting-inl.h" 9 #include "src/heap/objects-visiting-inl.h"
10 #include "src/heap/scavenger-inl.h" 10 #include "src/heap/scavenger-inl.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 heap->IncrementPromotedObjectsSize(object_size); 209 heap->IncrementPromotedObjectsSize(object_size);
210 return true; 210 return true;
211 } 211 }
212 return false; 212 return false;
213 } 213 }
214 214
215 215
216 template <ObjectContents object_contents, AllocationAlignment alignment> 216 template <ObjectContents object_contents, AllocationAlignment alignment>
217 static inline void EvacuateObject(Map* map, HeapObject** slot, 217 static inline void EvacuateObject(Map* map, HeapObject** slot,
218 HeapObject* object, int object_size) { 218 HeapObject* object, int object_size) {
219 SLOW_DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 219 SLOW_DCHECK(object_size <= Page::kAllocatableMemory);
220 SLOW_DCHECK(object->Size() == object_size); 220 SLOW_DCHECK(object->Size() == object_size);
221 Heap* heap = map->GetHeap(); 221 Heap* heap = map->GetHeap();
222 222
223 if (!heap->ShouldBePromoted(object->address(), object_size)) { 223 if (!heap->ShouldBePromoted(object->address(), object_size)) {
224 // A semi-space copy may fail due to fragmentation. In that case, we 224 // A semi-space copy may fail due to fragmentation. In that case, we
225 // try to promote the object. 225 // try to promote the object.
226 if (SemiSpaceCopyObject<alignment>(map, slot, object, object_size)) { 226 if (SemiSpaceCopyObject<alignment>(map, slot, object, object_size)) {
227 return; 227 return;
228 } 228 }
229 } 229 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 487
488 void ScavengeVisitor::ScavengePointer(Object** p) { 488 void ScavengeVisitor::ScavengePointer(Object** p) {
489 Object* object = *p; 489 Object* object = *p;
490 if (!heap_->InNewSpace(object)) return; 490 if (!heap_->InNewSpace(object)) return;
491 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 491 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
492 reinterpret_cast<HeapObject*>(object)); 492 reinterpret_cast<HeapObject*>(object));
493 } 493 }
494 494
495 } // namespace internal 495 } // namespace internal
496 } // namespace v8 496 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698