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

Unified Diff: src/heap/heap.h

Issue 2005173003: Immediatelly promote marked objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | src/heap/scavenger-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 027dcf79554a9dafe8bcf3af7d659d6048899644..7570400b13ee4dc5becd730efdf9814b4100c0b2 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -303,10 +303,9 @@ class Scavenger;
class ScavengeJob;
class WeakObjectRetainer;
-enum PromotionMode { FORCE_PROMOTION, DEFAULT_PROMOTION };
+enum PromotionMode { FORCE_PROMOTION, PROMOTE_MARKED, DEFAULT_PROMOTION };
-typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to,
- PromotionMode mode);
+typedef void (*ObjectSlotCallback)(HeapObject** from, HeapObject* to);
// A queue of objects promoted during scavenge. Each object is accompanied
// by it's size to avoid dereferencing a map pointer for scanning.
@@ -777,8 +776,11 @@ class Heap {
void VisitExternalResources(v8::ExternalResourceVisitor* visitor);
+ inline PromotionMode CurrentPromotionMode();
ulan 2016/05/30 14:07:28 Not used anymore?
+
// An object should be promoted if the object has survived a
// scavenge operation.
+ template <PromotionMode promotion_mode>
inline bool ShouldBePromoted(Address old_address, int object_size);
void ClearNormalizedMapCaches();
@@ -1698,6 +1700,10 @@ class Heap {
// Performs a minor collection in new generation.
void Scavenge();
+ template <PromotionMode promotion_mode>
+ void Scavenge();
+
+ template <PromotionMode promotion_mode>
Address DoScavenge(ObjectVisitor* scavenge_visitor, Address new_space_front);
void UpdateNewSpaceReferencesInExternalStringTable(
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | src/heap/scavenger-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698