| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/gc-tracer.h" | 5 #include "src/heap/gc-tracer.h" |
| 6 | 6 |
| 7 #include "src/counters.h" | 7 #include "src/counters.h" |
| 8 #include "src/heap/heap-inl.h" | 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 end_holes_size(0), | 77 end_holes_size(0), |
| 78 new_space_object_size(0), | 78 new_space_object_size(0), |
| 79 survived_new_space_object_size(0), | 79 survived_new_space_object_size(0), |
| 80 incremental_marking_bytes(0), | 80 incremental_marking_bytes(0), |
| 81 incremental_marking_duration(0.0) { | 81 incremental_marking_duration(0.0) { |
| 82 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { | 82 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { |
| 83 scopes[i] = 0; | 83 scopes[i] = 0; |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 | |
| 88 const char* GCTracer::Event::TypeName(bool short_name) const { | 87 const char* GCTracer::Event::TypeName(bool short_name) const { |
| 89 switch (type) { | 88 switch (type) { |
| 90 case SCAVENGER: | 89 case SCAVENGER: |
| 91 if (short_name) { | 90 return (short_name) ? "s" : "Scavenge"; |
| 92 return "s"; | |
| 93 } else { | |
| 94 return "Scavenge"; | |
| 95 } | |
| 96 case MARK_COMPACTOR: | 91 case MARK_COMPACTOR: |
| 97 case INCREMENTAL_MARK_COMPACTOR: | 92 case INCREMENTAL_MARK_COMPACTOR: |
| 98 if (short_name) { | 93 return (short_name) ? "ms" : "Mark-sweep"; |
| 99 return "ms"; | 94 case MINOR_MARK_COMPACTOR: |
| 100 } else { | 95 return (short_name) ? "mmc" : "Minor Mark-Compact"; |
| 101 return "Mark-sweep"; | |
| 102 } | |
| 103 case START: | 96 case START: |
| 104 if (short_name) { | 97 return (short_name) ? "st" : "Start"; |
| 105 return "st"; | |
| 106 } else { | |
| 107 return "Start"; | |
| 108 } | |
| 109 } | 98 } |
| 110 return "Unknown Event Type"; | 99 return "Unknown Event Type"; |
| 111 } | 100 } |
| 112 | 101 |
| 113 GCTracer::GCTracer(Heap* heap) | 102 GCTracer::GCTracer(Heap* heap) |
| 114 : heap_(heap), | 103 : heap_(heap), |
| 115 current_(Event::START, GarbageCollectionReason::kUnknown, nullptr), | 104 current_(Event::START, GarbageCollectionReason::kUnknown, nullptr), |
| 116 previous_(current_), | 105 previous_(current_), |
| 117 incremental_marking_bytes_(0), | 106 incremental_marking_bytes_(0), |
| 118 incremental_marking_duration_(0.0), | 107 incremental_marking_duration_(0.0), |
| 108 incremental_marking_start_time_(0.0), |
| 119 recorded_incremental_marking_speed_(0.0), | 109 recorded_incremental_marking_speed_(0.0), |
| 120 allocation_time_ms_(0.0), | 110 allocation_time_ms_(0.0), |
| 121 new_space_allocation_counter_bytes_(0), | 111 new_space_allocation_counter_bytes_(0), |
| 122 old_generation_allocation_counter_bytes_(0), | 112 old_generation_allocation_counter_bytes_(0), |
| 123 allocation_duration_since_gc_(0.0), | 113 allocation_duration_since_gc_(0.0), |
| 124 new_space_allocation_in_bytes_since_gc_(0), | 114 new_space_allocation_in_bytes_since_gc_(0), |
| 125 old_generation_allocation_in_bytes_since_gc_(0), | 115 old_generation_allocation_in_bytes_since_gc_(0), |
| 126 combined_mark_compact_speed_cache_(0.0), | 116 combined_mark_compact_speed_cache_(0.0), |
| 127 start_counter_(0) { | 117 start_counter_(0) { |
| 128 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); | 118 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); |
| 129 } | 119 } |
| 130 | 120 |
| 131 void GCTracer::ResetForTesting() { | 121 void GCTracer::ResetForTesting() { |
| 132 current_ = Event(Event::START, GarbageCollectionReason::kTesting, nullptr); | 122 current_ = Event(Event::START, GarbageCollectionReason::kTesting, nullptr); |
| 133 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); | 123 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); |
| 134 previous_ = current_; | 124 previous_ = current_; |
| 135 ResetIncrementalMarkingCounters(); | 125 ResetIncrementalMarkingCounters(); |
| 136 allocation_time_ms_ = 0.0; | 126 allocation_time_ms_ = 0.0; |
| 137 new_space_allocation_counter_bytes_ = 0.0; | 127 new_space_allocation_counter_bytes_ = 0.0; |
| 138 old_generation_allocation_counter_bytes_ = 0.0; | 128 old_generation_allocation_counter_bytes_ = 0.0; |
| 139 allocation_duration_since_gc_ = 0.0; | 129 allocation_duration_since_gc_ = 0.0; |
| 140 new_space_allocation_in_bytes_since_gc_ = 0.0; | 130 new_space_allocation_in_bytes_since_gc_ = 0.0; |
| 141 old_generation_allocation_in_bytes_since_gc_ = 0.0; | 131 old_generation_allocation_in_bytes_since_gc_ = 0.0; |
| 142 combined_mark_compact_speed_cache_ = 0.0; | 132 combined_mark_compact_speed_cache_ = 0.0; |
| 143 recorded_scavenges_total_.Reset(); | 133 recorded_minor_gcs_total_.Reset(); |
| 144 recorded_scavenges_survived_.Reset(); | 134 recorded_minor_gcs_survived_.Reset(); |
| 145 recorded_compactions_.Reset(); | 135 recorded_compactions_.Reset(); |
| 146 recorded_mark_compacts_.Reset(); | 136 recorded_mark_compacts_.Reset(); |
| 147 recorded_incremental_mark_compacts_.Reset(); | 137 recorded_incremental_mark_compacts_.Reset(); |
| 148 recorded_new_generation_allocations_.Reset(); | 138 recorded_new_generation_allocations_.Reset(); |
| 149 recorded_old_generation_allocations_.Reset(); | 139 recorded_old_generation_allocations_.Reset(); |
| 150 recorded_context_disposal_times_.Reset(); | 140 recorded_context_disposal_times_.Reset(); |
| 151 recorded_survival_ratios_.Reset(); | 141 recorded_survival_ratios_.Reset(); |
| 152 start_counter_ = 0; | 142 start_counter_ = 0; |
| 153 } | 143 } |
| 154 | 144 |
| 155 void GCTracer::Start(GarbageCollector collector, | 145 void GCTracer::Start(GarbageCollector collector, |
| 156 GarbageCollectionReason gc_reason, | 146 GarbageCollectionReason gc_reason, |
| 157 const char* collector_reason) { | 147 const char* collector_reason) { |
| 158 start_counter_++; | 148 start_counter_++; |
| 159 if (start_counter_ != 1) return; | 149 if (start_counter_ != 1) return; |
| 160 | 150 |
| 161 previous_ = current_; | 151 previous_ = current_; |
| 162 double start_time = heap_->MonotonicallyIncreasingTimeInMs(); | 152 double start_time = heap_->MonotonicallyIncreasingTimeInMs(); |
| 163 SampleAllocation(start_time, heap_->NewSpaceAllocationCounter(), | 153 SampleAllocation(start_time, heap_->NewSpaceAllocationCounter(), |
| 164 heap_->OldGenerationAllocationCounter()); | 154 heap_->OldGenerationAllocationCounter()); |
| 165 | 155 |
| 166 if (collector == SCAVENGER) { | 156 switch (collector) { |
| 167 current_ = Event(Event::SCAVENGER, gc_reason, collector_reason); | 157 case SCAVENGER: |
| 168 } else if (collector == MARK_COMPACTOR) { | 158 current_ = Event(Event::SCAVENGER, gc_reason, collector_reason); |
| 169 if (heap_->incremental_marking()->WasActivated()) { | 159 break; |
| 160 case MINOR_MARK_COMPACTOR: |
| 170 current_ = | 161 current_ = |
| 171 Event(Event::INCREMENTAL_MARK_COMPACTOR, gc_reason, collector_reason); | 162 Event(Event::MINOR_MARK_COMPACTOR, gc_reason, collector_reason); |
| 172 } else { | 163 break; |
| 173 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); | 164 case MARK_COMPACTOR: |
| 174 } | 165 if (heap_->incremental_marking()->WasActivated()) { |
| 166 current_ = Event(Event::INCREMENTAL_MARK_COMPACTOR, gc_reason, |
| 167 collector_reason); |
| 168 } else { |
| 169 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); |
| 170 } |
| 171 break; |
| 175 } | 172 } |
| 176 | 173 |
| 177 current_.reduce_memory = heap_->ShouldReduceMemory(); | 174 current_.reduce_memory = heap_->ShouldReduceMemory(); |
| 178 current_.start_time = start_time; | 175 current_.start_time = start_time; |
| 179 current_.start_object_size = heap_->SizeOfObjects(); | 176 current_.start_object_size = heap_->SizeOfObjects(); |
| 180 current_.start_memory_size = heap_->memory_allocator()->Size(); | 177 current_.start_memory_size = heap_->memory_allocator()->Size(); |
| 181 current_.start_holes_size = CountTotalHolesSize(heap_); | 178 current_.start_holes_size = CountTotalHolesSize(heap_); |
| 182 current_.new_space_object_size = | 179 current_.new_space_object_size = |
| 183 heap_->new_space()->top() - heap_->new_space()->bottom(); | 180 heap_->new_space()->top() - heap_->new_space()->bottom(); |
| 184 | 181 |
| 185 current_.incremental_marking_bytes = 0; | 182 current_.incremental_marking_bytes = 0; |
| 186 current_.incremental_marking_duration = 0; | 183 current_.incremental_marking_duration = 0; |
| 187 | 184 |
| 188 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { | 185 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { |
| 189 current_.scopes[i] = 0; | 186 current_.scopes[i] = 0; |
| 190 } | 187 } |
| 191 | 188 |
| 192 size_t committed_memory = heap_->CommittedMemory() / KB; | 189 size_t committed_memory = heap_->CommittedMemory() / KB; |
| 193 size_t used_memory = current_.start_object_size / KB; | 190 size_t used_memory = current_.start_object_size / KB; |
| 194 | 191 |
| 195 Counters* counters = heap_->isolate()->counters(); | 192 Counters* counters = heap_->isolate()->counters(); |
| 196 | 193 |
| 197 if (collector == SCAVENGER) { | 194 if (Heap::IsYoungGenerationCollector(collector)) { |
| 198 counters->scavenge_reason()->AddSample(static_cast<int>(gc_reason)); | 195 counters->scavenge_reason()->AddSample(static_cast<int>(gc_reason)); |
| 199 } else { | 196 } else { |
| 200 counters->mark_compact_reason()->AddSample(static_cast<int>(gc_reason)); | 197 counters->mark_compact_reason()->AddSample(static_cast<int>(gc_reason)); |
| 201 } | 198 } |
| 202 counters->aggregated_memory_heap_committed()->AddSample(start_time, | 199 counters->aggregated_memory_heap_committed()->AddSample(start_time, |
| 203 committed_memory); | 200 committed_memory); |
| 204 counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory); | 201 counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory); |
| 205 // TODO(cbruni): remove once we fully moved to a trace-based system. | 202 // TODO(cbruni): remove once we fully moved to a trace-based system. |
| 206 if (V8_UNLIKELY(FLAG_runtime_stats)) { | 203 if (V8_UNLIKELY(FLAG_runtime_stats)) { |
| 207 RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(), | 204 RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(), |
| 208 &timer_, &RuntimeCallStats::GC); | 205 &timer_, &RuntimeCallStats::GC); |
| 209 } | 206 } |
| 210 } | 207 } |
| 211 | 208 |
| 212 void GCTracer::ResetIncrementalMarkingCounters() { | 209 void GCTracer::ResetIncrementalMarkingCounters() { |
| 213 incremental_marking_bytes_ = 0; | 210 incremental_marking_bytes_ = 0; |
| 214 incremental_marking_duration_ = 0; | 211 incremental_marking_duration_ = 0; |
| 215 for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) { | 212 for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) { |
| 216 incremental_marking_scopes_[i].ResetCurrentCycle(); | 213 incremental_marking_scopes_[i].ResetCurrentCycle(); |
| 217 } | 214 } |
| 218 } | 215 } |
| 219 | 216 |
| 220 void GCTracer::Stop(GarbageCollector collector) { | 217 void GCTracer::Stop(GarbageCollector collector) { |
| 221 start_counter_--; | 218 start_counter_--; |
| 222 if (start_counter_ != 0) { | 219 if (start_counter_ != 0) { |
| 223 heap_->isolate()->PrintWithTimestamp( | 220 heap_->isolate()->PrintWithTimestamp("[Finished reentrant %s during %s.]\n", |
| 224 "[Finished reentrant %s during %s.]\n", | 221 Heap::CollectorName(collector), |
| 225 collector == SCAVENGER ? "Scavenge" : "Mark-sweep", | 222 current_.TypeName(false)); |
| 226 current_.TypeName(false)); | |
| 227 return; | 223 return; |
| 228 } | 224 } |
| 229 | 225 |
| 230 DCHECK(start_counter_ >= 0); | 226 DCHECK(start_counter_ >= 0); |
| 231 DCHECK((collector == SCAVENGER && current_.type == Event::SCAVENGER) || | 227 DCHECK((collector == SCAVENGER && current_.type == Event::SCAVENGER) || |
| 228 (collector == MINOR_MARK_COMPACTOR && |
| 229 current_.type == Event::MINOR_MARK_COMPACTOR) || |
| 232 (collector == MARK_COMPACTOR && | 230 (collector == MARK_COMPACTOR && |
| 233 (current_.type == Event::MARK_COMPACTOR || | 231 (current_.type == Event::MARK_COMPACTOR || |
| 234 current_.type == Event::INCREMENTAL_MARK_COMPACTOR))); | 232 current_.type == Event::INCREMENTAL_MARK_COMPACTOR))); |
| 235 | 233 |
| 236 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); | 234 current_.end_time = heap_->MonotonicallyIncreasingTimeInMs(); |
| 237 current_.end_object_size = heap_->SizeOfObjects(); | 235 current_.end_object_size = heap_->SizeOfObjects(); |
| 238 current_.end_memory_size = heap_->memory_allocator()->Size(); | 236 current_.end_memory_size = heap_->memory_allocator()->Size(); |
| 239 current_.end_holes_size = CountTotalHolesSize(heap_); | 237 current_.end_holes_size = CountTotalHolesSize(heap_); |
| 240 current_.survived_new_space_object_size = heap_->SurvivedNewSpaceObjectSize(); | 238 current_.survived_new_space_object_size = heap_->SurvivedNewSpaceObjectSize(); |
| 241 | 239 |
| 242 AddAllocation(current_.end_time); | 240 AddAllocation(current_.end_time); |
| 243 | 241 |
| 244 size_t committed_memory = heap_->CommittedMemory() / KB; | 242 size_t committed_memory = heap_->CommittedMemory() / KB; |
| 245 size_t used_memory = current_.end_object_size / KB; | 243 size_t used_memory = current_.end_object_size / KB; |
| 246 heap_->isolate()->counters()->aggregated_memory_heap_committed()->AddSample( | 244 heap_->isolate()->counters()->aggregated_memory_heap_committed()->AddSample( |
| 247 current_.end_time, committed_memory); | 245 current_.end_time, committed_memory); |
| 248 heap_->isolate()->counters()->aggregated_memory_heap_used()->AddSample( | 246 heap_->isolate()->counters()->aggregated_memory_heap_used()->AddSample( |
| 249 current_.end_time, used_memory); | 247 current_.end_time, used_memory); |
| 250 | 248 |
| 251 double duration = current_.end_time - current_.start_time; | 249 double duration = current_.end_time - current_.start_time; |
| 252 | 250 |
| 253 if (current_.type == Event::SCAVENGER) { | 251 switch (current_.type) { |
| 254 recorded_scavenges_total_.Push( | 252 case Event::SCAVENGER: |
| 255 MakeBytesAndDuration(current_.new_space_object_size, duration)); | 253 case Event::MINOR_MARK_COMPACTOR: |
| 256 recorded_scavenges_survived_.Push(MakeBytesAndDuration( | 254 recorded_minor_gcs_total_.Push( |
| 257 current_.survived_new_space_object_size, duration)); | 255 MakeBytesAndDuration(current_.new_space_object_size, duration)); |
| 258 } else if (current_.type == Event::INCREMENTAL_MARK_COMPACTOR) { | 256 recorded_minor_gcs_survived_.Push(MakeBytesAndDuration( |
| 259 current_.incremental_marking_bytes = incremental_marking_bytes_; | 257 current_.survived_new_space_object_size, duration)); |
| 260 current_.incremental_marking_duration = incremental_marking_duration_; | 258 break; |
| 261 for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) { | 259 case Event::INCREMENTAL_MARK_COMPACTOR: |
| 262 current_.incremental_marking_scopes[i] = incremental_marking_scopes_[i]; | 260 current_.incremental_marking_bytes = incremental_marking_bytes_; |
| 263 current_.scopes[i] = incremental_marking_scopes_[i].duration; | 261 current_.incremental_marking_duration = incremental_marking_duration_; |
| 264 } | 262 for (int i = 0; i < Scope::NUMBER_OF_INCREMENTAL_SCOPES; i++) { |
| 265 RecordIncrementalMarkingSpeed(current_.incremental_marking_bytes, | 263 current_.incremental_marking_scopes[i] = incremental_marking_scopes_[i]; |
| 266 current_.incremental_marking_duration); | 264 current_.scopes[i] = incremental_marking_scopes_[i].duration; |
| 267 recorded_incremental_mark_compacts_.Push( | 265 } |
| 268 MakeBytesAndDuration(current_.start_object_size, duration)); | 266 RecordIncrementalMarkingSpeed(current_.incremental_marking_bytes, |
| 269 ResetIncrementalMarkingCounters(); | 267 current_.incremental_marking_duration); |
| 270 combined_mark_compact_speed_cache_ = 0.0; | 268 recorded_incremental_mark_compacts_.Push( |
| 271 } else { | 269 MakeBytesAndDuration(current_.start_object_size, duration)); |
| 272 DCHECK_EQ(0u, current_.incremental_marking_bytes); | 270 ResetIncrementalMarkingCounters(); |
| 273 DCHECK_EQ(0, current_.incremental_marking_duration); | 271 combined_mark_compact_speed_cache_ = 0.0; |
| 274 recorded_mark_compacts_.Push( | 272 break; |
| 275 MakeBytesAndDuration(current_.start_object_size, duration)); | 273 case Event::MARK_COMPACTOR: |
| 276 ResetIncrementalMarkingCounters(); | 274 DCHECK_EQ(0u, current_.incremental_marking_bytes); |
| 277 combined_mark_compact_speed_cache_ = 0.0; | 275 DCHECK_EQ(0, current_.incremental_marking_duration); |
| 276 recorded_mark_compacts_.Push( |
| 277 MakeBytesAndDuration(current_.start_object_size, duration)); |
| 278 ResetIncrementalMarkingCounters(); |
| 279 combined_mark_compact_speed_cache_ = 0.0; |
| 280 break; |
| 281 case Event::START: |
| 282 UNREACHABLE(); |
| 278 } | 283 } |
| 279 | 284 |
| 280 heap_->UpdateTotalGCTime(duration); | 285 heap_->UpdateTotalGCTime(duration); |
| 281 | 286 |
| 282 if (current_.type == Event::SCAVENGER && FLAG_trace_gc_ignore_scavenger) | 287 if ((current_.type == Event::SCAVENGER || |
| 288 current_.type == Event::MINOR_MARK_COMPACTOR) && |
| 289 FLAG_trace_gc_ignore_scavenger) |
| 283 return; | 290 return; |
| 284 | 291 |
| 285 if (FLAG_trace_gc_nvp) { | 292 if (FLAG_trace_gc_nvp) { |
| 286 PrintNVP(); | 293 PrintNVP(); |
| 287 } else { | 294 } else { |
| 288 Print(); | 295 Print(); |
| 289 } | 296 } |
| 290 | 297 |
| 291 if (FLAG_trace_gc) { | 298 if (FLAG_trace_gc) { |
| 292 heap_->PrintShortHeapStatistics(); | 299 heap_->PrintShortHeapStatistics(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 current_.end_holes_size, allocated_since_last_gc, | 500 current_.end_holes_size, allocated_since_last_gc, |
| 494 heap_->promoted_objects_size(), | 501 heap_->promoted_objects_size(), |
| 495 heap_->semi_space_copied_object_size(), | 502 heap_->semi_space_copied_object_size(), |
| 496 heap_->nodes_died_in_new_space_, heap_->nodes_copied_in_new_space_, | 503 heap_->nodes_died_in_new_space_, heap_->nodes_copied_in_new_space_, |
| 497 heap_->nodes_promoted_, heap_->promotion_ratio_, | 504 heap_->nodes_promoted_, heap_->promotion_ratio_, |
| 498 AverageSurvivalRatio(), heap_->promotion_rate_, | 505 AverageSurvivalRatio(), heap_->promotion_rate_, |
| 499 heap_->semi_space_copied_rate_, | 506 heap_->semi_space_copied_rate_, |
| 500 NewSpaceAllocationThroughputInBytesPerMillisecond(), | 507 NewSpaceAllocationThroughputInBytesPerMillisecond(), |
| 501 ContextDisposalRateInMilliseconds()); | 508 ContextDisposalRateInMilliseconds()); |
| 502 break; | 509 break; |
| 510 case Event::MINOR_MARK_COMPACTOR: |
| 511 heap_->isolate()->PrintWithTimestamp( |
| 512 "pause=%.1f " |
| 513 "mutator=%.1f " |
| 514 "gc=%s " |
| 515 "reduce_memory=%d\n", |
| 516 duration, spent_in_mutator, current_.TypeName(true), |
| 517 current_.reduce_memory); |
| 518 break; |
| 503 case Event::MARK_COMPACTOR: | 519 case Event::MARK_COMPACTOR: |
| 504 case Event::INCREMENTAL_MARK_COMPACTOR: | 520 case Event::INCREMENTAL_MARK_COMPACTOR: |
| 505 heap_->isolate()->PrintWithTimestamp( | 521 heap_->isolate()->PrintWithTimestamp( |
| 506 "pause=%.1f " | 522 "pause=%.1f " |
| 507 "mutator=%.1f " | 523 "mutator=%.1f " |
| 508 "gc=%s " | 524 "gc=%s " |
| 509 "reduce_memory=%d " | 525 "reduce_memory=%d " |
| 510 "clear=%1.f " | 526 "clear=%1.f " |
| 511 "clear.code_flush=%.1f " | 527 "clear.code_flush=%.1f " |
| 512 "clear.dependent_code=%.1f " | 528 "clear.dependent_code=%.1f " |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 } | 730 } |
| 715 if (incremental_marking_duration_ != 0.0) { | 731 if (incremental_marking_duration_ != 0.0) { |
| 716 return incremental_marking_bytes_ / incremental_marking_duration_; | 732 return incremental_marking_bytes_ / incremental_marking_duration_; |
| 717 } | 733 } |
| 718 return kConservativeSpeedInBytesPerMillisecond; | 734 return kConservativeSpeedInBytesPerMillisecond; |
| 719 } | 735 } |
| 720 | 736 |
| 721 double GCTracer::ScavengeSpeedInBytesPerMillisecond( | 737 double GCTracer::ScavengeSpeedInBytesPerMillisecond( |
| 722 ScavengeSpeedMode mode) const { | 738 ScavengeSpeedMode mode) const { |
| 723 if (mode == kForAllObjects) { | 739 if (mode == kForAllObjects) { |
| 724 return AverageSpeed(recorded_scavenges_total_); | 740 return AverageSpeed(recorded_minor_gcs_total_); |
| 725 } else { | 741 } else { |
| 726 return AverageSpeed(recorded_scavenges_survived_); | 742 return AverageSpeed(recorded_minor_gcs_survived_); |
| 727 } | 743 } |
| 728 } | 744 } |
| 729 | 745 |
| 730 double GCTracer::CompactionSpeedInBytesPerMillisecond() const { | 746 double GCTracer::CompactionSpeedInBytesPerMillisecond() const { |
| 731 return AverageSpeed(recorded_compactions_); | 747 return AverageSpeed(recorded_compactions_); |
| 732 } | 748 } |
| 733 | 749 |
| 734 double GCTracer::MarkCompactSpeedInBytesPerMillisecond() const { | 750 double GCTracer::MarkCompactSpeedInBytesPerMillisecond() const { |
| 735 return AverageSpeed(recorded_mark_compacts_); | 751 return AverageSpeed(recorded_mark_compacts_); |
| 736 } | 752 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 } | 828 } |
| 813 | 829 |
| 814 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } | 830 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } |
| 815 | 831 |
| 816 void GCTracer::NotifyIncrementalMarkingStart() { | 832 void GCTracer::NotifyIncrementalMarkingStart() { |
| 817 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); | 833 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); |
| 818 } | 834 } |
| 819 | 835 |
| 820 } // namespace internal | 836 } // namespace internal |
| 821 } // namespace v8 | 837 } // namespace v8 |
| OLD | NEW |