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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 if (allocation_marking_factor_ < kFastMarking) { | 191 if (allocation_marking_factor_ < kFastMarking) { |
192 if (FLAG_trace_gc) { | 192 if (FLAG_trace_gc) { |
193 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", |
194 static_cast<int>(kFastMarking)); | 194 static_cast<int>(kFastMarking)); |
195 } | 195 } |
196 allocation_marking_factor_ = kFastMarking; | 196 allocation_marking_factor_ = kFastMarking; |
197 } | 197 } |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
| 201 void EnterNoMarkingScope() { |
| 202 no_marking_scope_depth_++; |
| 203 } |
| 204 |
| 205 void LeaveNoMarkingScope() { |
| 206 no_marking_scope_depth_--; |
| 207 } |
| 208 |
201 private: | 209 private: |
202 void set_should_hurry(bool val) { | 210 void set_should_hurry(bool val) { |
203 should_hurry_ = val; | 211 should_hurry_ = val; |
204 } | 212 } |
205 | 213 |
206 int64_t SpaceLeftInOldSpace(); | 214 int64_t SpaceLeftInOldSpace(); |
207 | 215 |
208 void ResetStepCounters(); | 216 void ResetStepCounters(); |
209 | 217 |
210 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... |
242 double longest_step_; | 250 double longest_step_; |
243 int64_t old_generation_space_available_at_start_of_incremental_; | 251 int64_t old_generation_space_available_at_start_of_incremental_; |
244 int64_t old_generation_space_used_at_start_of_incremental_; | 252 int64_t old_generation_space_used_at_start_of_incremental_; |
245 int steps_count_since_last_gc_; | 253 int steps_count_since_last_gc_; |
246 double steps_took_since_last_gc_; | 254 double steps_took_since_last_gc_; |
247 int64_t bytes_rescanned_; | 255 int64_t bytes_rescanned_; |
248 bool should_hurry_; | 256 bool should_hurry_; |
249 int allocation_marking_factor_; | 257 int allocation_marking_factor_; |
250 intptr_t allocated_; | 258 intptr_t allocated_; |
251 | 259 |
| 260 int no_marking_scope_depth_; |
| 261 |
252 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 262 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
253 }; | 263 }; |
254 | 264 |
255 } } // namespace v8::internal | 265 } } // namespace v8::internal |
256 | 266 |
257 #endif // V8_INCREMENTAL_MARKING_H_ | 267 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |