28 #ifndef V8_INCREMENTAL_MARKING_INL_H_
29 #define V8_INCREMENTAL_MARKING_INL_H_
37 bool IncrementalMarking::BaseRecordWrite(HeapObject*
obj,
41 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
42 if (Marking::IsWhite(value_bit)) {
43 MarkBit obj_bit = Marking::MarkBitFrom(obj);
44 if (Marking::IsBlack(obj_bit)) {
47 if (chunk->IsLeftOfProgressBar(slot)) {
62 if (!is_compacting_)
return false;
63 MarkBit obj_bit = Marking::MarkBitFrom(obj);
64 return Marking::IsBlack(obj_bit);
68 void IncrementalMarking::RecordWrite(HeapObject* obj,
71 if (IsMarking() && value->NonFailureIsHeapObject()) {
77 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host,
84 void IncrementalMarking::RecordWriteIntoCode(HeapObject* obj,
87 if (IsMarking() && value->NonFailureIsHeapObject()) {
95 MarkBit obj_bit = Marking::MarkBitFrom(obj);
96 if (Marking::IsBlack(obj_bit)) {
110 ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
113 Marking::BlackToGrey(mark_bit);
114 int obj_size = obj->
Size();
116 bytes_scanned_ -= obj_size;
117 int64_t old_bytes_rescanned = bytes_rescanned_;
118 bytes_rescanned_ = old_bytes_rescanned + obj_size;
119 if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) {
127 PrintPID(
"Hurrying incremental marking because of lack of progress\n");
133 marking_deque_.UnshiftGrey(obj);
138 Marking::WhiteToGrey(mark_bit);
139 marking_deque_.PushGrey(obj);
145 #endif // V8_INCREMENTAL_MARKING_INL_H_
static MemoryChunk * FromAddress(Address a)
static HeapObject * cast(Object *obj)
kSerializedDataOffset Object
#define ASSERT(condition)
void RecordWriteIntoCodeSlow(HeapObject *obj, RelocInfo *rinfo, Object *value)
static void IncrementLiveBytesFromGC(Address address, int by)
static const intptr_t kMaxMarkingSpeed
void RecordWriteOfCodeEntrySlow(JSFunction *host, Object **slot, Code *value)
void RecordWrites(HeapObject *obj)
void set_progress_bar(int progress_bar)
void WhiteToGreyAndPush(HeapObject *obj, MarkBit mark_bit)
void PrintPID(const char *format,...)
void RecordWriteSlow(HeapObject *obj, Object **slot, Object *value)
intptr_t PromotedSpaceSizeOfObjects()
void RestartIfNotMarking()
void BlackToGreyAndUnshift(HeapObject *obj, MarkBit mark_bit)