| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index 93855ce49baf352c993c852ec06ff61f012ce4e5..19d91a9b613e4e2014ae868060e1efa0058215c4 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -1157,8 +1157,10 @@ class Heap {
|
| // Performs garbage collection operation.
|
| // Returns whether there is a chance that another major GC could
|
| // collect more garbage.
|
| - inline bool CollectGarbage(AllocationSpace space,
|
| - const char* gc_reason = NULL);
|
| + inline bool CollectGarbage(
|
| + AllocationSpace space,
|
| + const char* gc_reason = NULL,
|
| + const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
|
|
| static const int kNoGCFlags = 0;
|
| static const int kSweepPreciselyMask = 1;
|
| @@ -1173,7 +1175,10 @@ class Heap {
|
| // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
|
| // non-zero, then the slower precise sweeper is used, which leaves the heap
|
| // in a state where we can iterate over the heap visiting all objects.
|
| - void CollectAllGarbage(int flags, const char* gc_reason = NULL);
|
| + void CollectAllGarbage(
|
| + int flags,
|
| + const char* gc_reason = NULL,
|
| + const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
|
|
| // Last hope GC, should try to squeeze as much as possible.
|
| void CollectAllAvailableGarbage(const char* gc_reason = NULL);
|
| @@ -1701,7 +1706,7 @@ class Heap {
|
| inline Isolate* isolate();
|
|
|
| void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags);
|
| - void CallGCEpilogueCallbacks(GCType gc_type);
|
| + void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags);
|
|
|
| inline bool OldGenerationAllocationLimitReached();
|
|
|
| @@ -2042,6 +2047,7 @@ class Heap {
|
| // Pretenuring decisions are made based on feedback collected during new
|
| // space evacuation. Note that between feedback collection and calling this
|
| // method object in old space must not move.
|
| + // Right now we only process pretenuring feedback in high promotion mode.
|
| void ProcessPretenuringFeedback();
|
|
|
| // Checks whether a global GC is necessary
|
| @@ -2051,16 +2057,20 @@ class Heap {
|
| // Performs garbage collection operation.
|
| // Returns whether there is a chance that another major GC could
|
| // collect more garbage.
|
| - bool CollectGarbage(AllocationSpace space,
|
| - GarbageCollector collector,
|
| - const char* gc_reason,
|
| - const char* collector_reason);
|
| + bool CollectGarbage(
|
| + AllocationSpace space,
|
| + GarbageCollector collector,
|
| + const char* gc_reason,
|
| + const char* collector_reason,
|
| + const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
|
|
| // Performs garbage collection
|
| // Returns whether there is a chance another major GC could
|
| // collect more garbage.
|
| - bool PerformGarbageCollection(GarbageCollector collector,
|
| - GCTracer* tracer);
|
| + bool PerformGarbageCollection(
|
| + GarbageCollector collector,
|
| + GCTracer* tracer,
|
| + const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
|
|
| inline void UpdateOldSpaceLimits();
|
|
|
| @@ -2168,6 +2178,15 @@ class Heap {
|
| void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots);
|
| void ProcessAllocationSites(WeakObjectRetainer* retainer, bool record_slots);
|
|
|
| + // Deopts all code that contains allocation instruction which are tenured or
|
| + // not tenured. Moreover it clears the pretenuring allocation site statistics.
|
| + void ResetAllAllocationSitesDependentCode(PretenureFlag flag);
|
| +
|
| + // Evaluates local pretenuring for the old space and calls
|
| + // ResetAllTenuredAllocationSitesDependentCode if too many objects died in
|
| + // the old space.
|
| + void EvaluateOldSpaceLocalPretenuring(uint64_t size_of_objects_before_gc);
|
| +
|
| // Called on heap tear-down.
|
| void TearDownArrayBuffers();
|
|
|
| @@ -2211,6 +2230,8 @@ class Heap {
|
| static const int kYoungSurvivalRateLowThreshold = 10;
|
| static const int kYoungSurvivalRateAllowedDeviation = 15;
|
|
|
| + static const int kOldSurvivalRateLowThreshold = 20;
|
| +
|
| int young_survivors_after_last_gc_;
|
| int high_survival_rate_period_length_;
|
| int low_survival_rate_period_length_;
|
|
|