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

Side by Side Diff: src/heap/heap.h

Issue 2005173003: Immediatelly promote marked objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Polish Created 4 years, 6 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 | « no previous file | src/heap/heap-inl.h » ('j') | src/heap/heap-inl.h » ('J')
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 // 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 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 class HeapStats; 295 class HeapStats;
296 class HistogramTimer; 296 class HistogramTimer;
297 class Isolate; 297 class Isolate;
298 class MemoryReducer; 298 class MemoryReducer;
299 class ObjectStats; 299 class ObjectStats;
300 class Scavenger; 300 class Scavenger;
301 class ScavengeJob; 301 class ScavengeJob;
302 class WeakObjectRetainer; 302 class WeakObjectRetainer;
303 303
304 enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION }; 304 enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION };
305 enum MarksHandling { TRANSFER_MARKS, IGNORE_MARKS };
305 306
306 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to, 307 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to,
307 PromotionMode mode); 308 PromotionMode mode);
308 309
309 // A queue of objects promoted during scavenge. Each object is accompanied 310 // A queue of objects promoted during scavenge. Each object is accompanied
310 // by it's size to avoid dereferencing a map pointer for scanning. 311 // by it's size to avoid dereferencing a map pointer for scanning.
311 // The last page in to-space is used for the promotion queue. On conflict 312 // The last page in to-space is used for the promotion queue. On conflict
312 // during scavenge, the promotion queue is allocated externally and all 313 // during scavenge, the promotion queue is allocated externally and all
313 // entries are copied to the external queue. 314 // entries are copied to the external queue.
314 class PromotionQueue { 315 class PromotionQueue {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 771
771 if (HighMemoryPressure()) return true; 772 if (HighMemoryPressure()) return true;
772 773
773 return false; 774 return false;
774 } 775 }
775 776
776 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); 777 void VisitExternalResources(v8::ExternalResourceVisitor* visitor);
777 778
778 // An object should be promoted if the object has survived a 779 // An object should be promoted if the object has survived a
779 // scavenge operation. 780 // scavenge operation.
781 template <MarksHandling marks_handling>
780 inline bool ShouldBePromoted(Address old_address, int object_size); 782 inline bool ShouldBePromoted(Address old_address, int object_size);
781 783
782 void ClearNormalizedMapCaches(); 784 void ClearNormalizedMapCaches();
783 785
784 void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature); 786 void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature);
785 787
786 inline bool OldGenerationAllocationLimitReached(); 788 inline bool OldGenerationAllocationLimitReached();
787 789
788 // Completely clear the Instanceof cache (to stop it keeping objects alive 790 // Completely clear the Instanceof cache (to stop it keeping objects alive
789 // around a GC). 791 // around a GC).
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 friend class LargeObjectSpace; 2664 friend class LargeObjectSpace;
2663 friend class NewSpace; 2665 friend class NewSpace;
2664 friend class PagedSpace; 2666 friend class PagedSpace;
2665 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2667 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2666 }; 2668 };
2667 2669
2668 } // namespace internal 2670 } // namespace internal
2669 } // namespace v8 2671 } // namespace v8
2670 2672
2671 #endif // V8_HEAP_HEAP_H_ 2673 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap-inl.h » ('j') | src/heap/heap-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698