| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Object** slot, | 120 Object** slot, |
| 121 Isolate* isolate); | 121 Isolate* isolate); |
| 122 | 122 |
| 123 inline bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value); | 123 inline bool BaseRecordWrite(HeapObject* obj, Object** slot, Object* value); |
| 124 | 124 |
| 125 | 125 |
| 126 inline void RecordWrite(HeapObject* obj, Object** slot, Object* value); | 126 inline void RecordWrite(HeapObject* obj, Object** slot, Object* value); |
| 127 inline void RecordWriteIntoCode(HeapObject* obj, | 127 inline void RecordWriteIntoCode(HeapObject* obj, |
| 128 RelocInfo* rinfo, | 128 RelocInfo* rinfo, |
| 129 Object* value); | 129 Object* value); |
| 130 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); |
| 130 void RecordCodeTargetPatch(Address pc, HeapObject* value); | 131 void RecordCodeTargetPatch(Address pc, HeapObject* value); |
| 131 void RecordWriteOfCodeEntry(JSFunction* host, Object** slot, Code* value); | 132 void RecordWriteOfCodeEntry(JSFunction* host, Object** slot, Code* value); |
| 132 | 133 |
| 133 inline void RecordWrites(HeapObject* obj); | 134 inline void RecordWrites(HeapObject* obj); |
| 134 | 135 |
| 135 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); | 136 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); |
| 136 | 137 |
| 137 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); | 138 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); |
| 138 | 139 |
| 139 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); | 140 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (allocation_marking_factor_ < kFastMarking) { | 191 if (allocation_marking_factor_ < kFastMarking) { |
| 191 if (FLAG_trace_gc) { | 192 if (FLAG_trace_gc) { |
| 192 PrintF("Increasing marking speed to %d due to high promotion rate\n", | 193 PrintF("Increasing marking speed to %d due to high promotion rate\n", |
| 193 static_cast<int>(kFastMarking)); | 194 static_cast<int>(kFastMarking)); |
| 194 } | 195 } |
| 195 allocation_marking_factor_ = kFastMarking; | 196 allocation_marking_factor_ = kFastMarking; |
| 196 } | 197 } |
| 197 } | 198 } |
| 198 } | 199 } |
| 199 | 200 |
| 201 void EnterNoMarkingScope() { |
| 202 no_marking_scope_depth_++; |
| 203 } |
| 204 |
| 205 void LeaveNoMarkingScope() { |
| 206 no_marking_scope_depth_--; |
| 207 } |
| 208 |
| 200 private: | 209 private: |
| 201 void set_should_hurry(bool val) { | 210 void set_should_hurry(bool val) { |
| 202 should_hurry_ = val; | 211 should_hurry_ = val; |
| 203 } | 212 } |
| 204 | 213 |
| 205 int64_t SpaceLeftInOldSpace(); | 214 int64_t SpaceLeftInOldSpace(); |
| 206 | 215 |
| 207 void ResetStepCounters(); | 216 void ResetStepCounters(); |
| 208 | 217 |
| 209 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; | 218 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 double longest_step_; | 250 double longest_step_; |
| 242 int64_t old_generation_space_available_at_start_of_incremental_; | 251 int64_t old_generation_space_available_at_start_of_incremental_; |
| 243 int64_t old_generation_space_used_at_start_of_incremental_; | 252 int64_t old_generation_space_used_at_start_of_incremental_; |
| 244 int steps_count_since_last_gc_; | 253 int steps_count_since_last_gc_; |
| 245 double steps_took_since_last_gc_; | 254 double steps_took_since_last_gc_; |
| 246 int64_t bytes_rescanned_; | 255 int64_t bytes_rescanned_; |
| 247 bool should_hurry_; | 256 bool should_hurry_; |
| 248 int allocation_marking_factor_; | 257 int allocation_marking_factor_; |
| 249 intptr_t allocated_; | 258 intptr_t allocated_; |
| 250 | 259 |
| 260 int no_marking_scope_depth_; |
| 261 |
| 251 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 262 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 252 }; | 263 }; |
| 253 | 264 |
| 254 } } // namespace v8::internal | 265 } } // namespace v8::internal |
| 255 | 266 |
| 256 #endif // V8_INCREMENTAL_MARKING_H_ | 267 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |