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

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

Issue 2002013002: [heap] Pass a force_promotion flag to the evacuation routine in the scavenger. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 7 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.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 // 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 class HeapObjectsFilter; 294 class HeapObjectsFilter;
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 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to); 304 enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION };
305
306 typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to,
307 PromotionMode mode);
305 308
306 // A queue of objects promoted during scavenge. Each object is accompanied 309 // A queue of objects promoted during scavenge. Each object is accompanied
307 // by it's size to avoid dereferencing a map pointer for scanning. 310 // by it's size to avoid dereferencing a map pointer for scanning.
308 // The last page in to-space is used for the promotion queue. On conflict 311 // The last page in to-space is used for the promotion queue. On conflict
309 // during scavenge, the promotion queue is allocated externally and all 312 // during scavenge, the promotion queue is allocated externally and all
310 // entries are copied to the external queue. 313 // entries are copied to the external queue.
311 class PromotionQueue { 314 class PromotionQueue {
312 public: 315 public:
313 explicit PromotionQueue(Heap* heap) 316 explicit PromotionQueue(Heap* heap)
314 : front_(NULL), 317 : front_(NULL),
(...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 friend class LargeObjectSpace; 2650 friend class LargeObjectSpace;
2648 friend class NewSpace; 2651 friend class NewSpace;
2649 friend class PagedSpace; 2652 friend class PagedSpace;
2650 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2653 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2651 }; 2654 };
2652 2655
2653 } // namespace internal 2656 } // namespace internal
2654 } // namespace v8 2657 } // namespace v8
2655 2658
2656 #endif // V8_HEAP_HEAP_H_ 2659 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698