28 #ifndef V8_INCREMENTAL_MARKING_H_
29 #define V8_INCREMENTAL_MARKING_H_
119 if (FLAG_trace_incremental_marking) {
120 PrintF(
"[IncrementalMarking] Restarting (new grey objects)\n");
161 if (mark_bit.
Get()) {
189 return longest_step_;
193 return steps_count_since_last_gc_;
197 return steps_took_since_last_gc_;
218 PrintF(
"Increasing marking speed to %d due to high promotion rate\n",
227 no_marking_scope_depth_++;
231 no_marking_scope_depth_--;
237 int64_t SpaceLeftInOldSpace();
239 void ResetStepCounters();
241 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION };
243 void StartMarking(CompactionFlag
flag);
245 void ActivateIncrementalWriteBarrier(PagedSpace* space);
246 static void ActivateIncrementalWriteBarrier(NewSpace* space);
247 void ActivateIncrementalWriteBarrier();
249 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space);
250 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space);
251 void DeactivateIncrementalWriteBarrier();
259 void EnsureMarkingDequeIsCommitted();
261 void VisitGlobalContext(
Context* ctx, ObjectVisitor* v);
268 VirtualMemory* marking_deque_memory_;
269 bool marking_deque_memory_committed_;
270 MarkingDeque marking_deque_;
271 Marker<IncrementalMarking> marker_;
275 double longest_step_;
276 int64_t old_generation_space_available_at_start_of_incremental_;
277 int64_t old_generation_space_used_at_start_of_incremental_;
278 int steps_count_since_last_gc_;
279 double steps_took_since_last_gc_;
280 int64_t bytes_rescanned_;
282 int allocation_marking_factor_;
283 intptr_t bytes_scanned_;
286 int no_marking_scope_depth_;
293 #endif // V8_INCREMENTAL_MARKING_H_
static bool IsBlack(MarkBit mark_bit)
void PrintF(const char *format,...)
bool IsMarkingIncomplete()
void LeaveNoMarkingScope()
void SetNewSpacePageFlags(NewSpacePage *chunk)
static void RecordWriteForEvacuationFromCode(HeapObject *obj, Object **slot, Isolate *isolate)
#define ASSERT(condition)
void RecordWriteIntoCodeSlow(HeapObject *obj, RelocInfo *rinfo, Object *value)
void Step(intptr_t allocated, CompletionAction action)
void RecordCodeTargetPatch(Code *host, Address pc, HeapObject *value)
static void RecordWriteFromCode(HeapObject *obj, Object *value, Isolate *isolate)
void ActivateGeneratedStub(Code *stub)
void MarkingComplete(CompletionAction action)
IncrementalMarking(Heap *heap)
void RecordWriteOfCodeEntrySlow(JSFunction *host, Object **slot, Code *value)
void UncommitMarkingDeque()
void RecordWrites(HeapObject *obj)
static const intptr_t kInitialAllocationMarkingFactor
static bool IsImpossible(MarkBit mark_bit)
void UpdateMarkingDequeAfterScavenge()
void SetOldSpacePageFlags(MemoryChunk *chunk)
void WhiteToGreyAndPush(HeapObject *obj, MarkBit mark_bit)
static const intptr_t kAllocationMarkingFactorSpeedupInterval
int steps_count_since_last_gc()
void set_should_hurry(bool val)
static const intptr_t kAllocationMarkingFactorSpeedup
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset flag
void NotifyOfHighPromotionRate()
void RecordWriteSlow(HeapObject *obj, Object **slot, Object *value)
double steps_took_since_last_gc()
bool MarkBlackOrKeepGrey(MarkBit mark_bit)
MarkingDeque * marking_deque()
static const intptr_t kFastMarking
void RestartIfNotMarking()
static const intptr_t kAllocatedThreshold
void OldSpaceStep(intptr_t allocated)
static const intptr_t kMaxAllocationMarkingFactor
void PrepareForScavenge()
void BlackToGreyAndUnshift(HeapObject *obj, MarkBit mark_bit)
void EnterNoMarkingScope()