28 #ifndef V8_INCREMENTAL_MARKING_H_
29 #define V8_INCREMENTAL_MARKING_H_
123 if (FLAG_trace_incremental_marking) {
124 PrintF(
"[IncrementalMarking] Restarting (new grey objects)\n");
171 if (mark_bit.
Get()) {
189 return longest_step_;
193 return steps_count_since_last_gc_;
197 return steps_took_since_last_gc_;
218 PrintPID(
"Increasing marking speed to %d "
219 "due to high promotion rate\n",
228 no_marking_scope_depth_++;
232 no_marking_scope_depth_--;
238 int64_t SpaceLeftInOldSpace();
240 void ResetStepCounters();
242 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION };
244 void StartMarking(CompactionFlag
flag);
246 void ActivateIncrementalWriteBarrier(PagedSpace* space);
247 static void ActivateIncrementalWriteBarrier(NewSpace* space);
248 void ActivateIncrementalWriteBarrier();
250 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space);
251 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space);
252 void DeactivateIncrementalWriteBarrier();
260 void EnsureMarkingDequeIsCommitted();
267 VirtualMemory* marking_deque_memory_;
268 bool marking_deque_memory_committed_;
269 MarkingDeque marking_deque_;
273 double longest_step_;
274 int64_t old_generation_space_available_at_start_of_incremental_;
275 int64_t old_generation_space_used_at_start_of_incremental_;
276 int steps_count_since_last_gc_;
277 double steps_took_since_last_gc_;
278 int64_t bytes_rescanned_;
281 intptr_t bytes_scanned_;
283 intptr_t write_barriers_invoked_since_last_step_;
285 int no_marking_scope_depth_;
292 #endif // V8_INCREMENTAL_MARKING_H_
static bool IsBlack(MarkBit mark_bit)
void PrintF(const char *format,...)
bool IsMarkingIncomplete()
static const intptr_t kWriteBarriersInvokedThreshold
void LeaveNoMarkingScope()
void SetNewSpacePageFlags(NewSpacePage *chunk)
static void RecordWriteForEvacuationFromCode(HeapObject *obj, Object **slot, Isolate *isolate)
#define ASSERT(condition)
static const intptr_t kMarkingSpeedAccelleration
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)
static const intptr_t kMarkingSpeedAccellerationInterval
static const intptr_t kMaxMarkingSpeed
void MarkingComplete(CompletionAction action)
IncrementalMarking(Heap *heap)
void RecordWriteOfCodeEntrySlow(JSFunction *host, Object **slot, Code *value)
void UncommitMarkingDeque()
void RecordWrites(HeapObject *obj)
static bool IsImpossible(MarkBit mark_bit)
void UpdateMarkingDequeAfterScavenge()
void SetOldSpacePageFlags(MemoryChunk *chunk)
void WhiteToGreyAndPush(HeapObject *obj, MarkBit mark_bit)
int steps_count_since_last_gc()
void set_should_hurry(bool val)
void NotifyOfHighPromotionRate()
void PrintPID(const char *format,...)
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 kInitialMarkingSpeed
void PrepareForScavenge()
void BlackToGreyAndUnshift(HeapObject *obj, MarkBit mark_bit)
void EnterNoMarkingScope()
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kInstanceClassNameOffset flag