| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 current_.end_object_size, current_.start_holes_size, | 497 current_.end_object_size, current_.start_holes_size, |
| 498 current_.end_holes_size, allocated_since_last_gc, | 498 current_.end_holes_size, allocated_since_last_gc, |
| 499 heap_->promoted_objects_size(), | 499 heap_->promoted_objects_size(), |
| 500 heap_->semi_space_copied_object_size(), | 500 heap_->semi_space_copied_object_size(), |
| 501 heap_->nodes_died_in_new_space_, heap_->nodes_copied_in_new_space_, | 501 heap_->nodes_died_in_new_space_, heap_->nodes_copied_in_new_space_, |
| 502 heap_->nodes_promoted_, heap_->promotion_ratio_, | 502 heap_->nodes_promoted_, heap_->promotion_ratio_, |
| 503 AverageSurvivalRatio(), heap_->promotion_rate_, | 503 AverageSurvivalRatio(), heap_->promotion_rate_, |
| 504 heap_->semi_space_copied_rate_, | 504 heap_->semi_space_copied_rate_, |
| 505 NewSpaceAllocationThroughputInBytesPerMillisecond(), | 505 NewSpaceAllocationThroughputInBytesPerMillisecond(), |
| 506 ContextDisposalRateInMilliseconds()); | 506 ContextDisposalRateInMilliseconds()); |
| 507 break; | 507 // Fall through to allow printing minor MC numbers in case of verifying. |
| 508 if (!FLAG_verify_minor_mc_marking) break; |
| 508 case Event::MINOR_MARK_COMPACTOR: | 509 case Event::MINOR_MARK_COMPACTOR: |
| 509 heap_->isolate()->PrintWithTimestamp( | 510 heap_->isolate()->PrintWithTimestamp( |
| 510 "pause=%.1f " | 511 "pause=%.1f " |
| 511 "mutator=%.1f " | 512 "mutator=%.1f " |
| 512 "gc=%s " | 513 "gc=%s " |
| 513 "reduce_memory=%d\n", | 514 "reduce_memory=%d " |
| 514 duration, spent_in_mutator, current_.TypeName(true), | 515 "mark=%.2f " |
| 515 current_.reduce_memory); | 516 "mark.roots=%.2f " |
| 517 "mark.old_to_new=%.2f\n", |
| 518 duration, spent_in_mutator, "mmc", current_.reduce_memory, |
| 519 current_.scopes[Scope::MINOR_MC_MARK], |
| 520 current_.scopes[Scope::MINOR_MC_MARK_ROOTS], |
| 521 current_.scopes[Scope::MINOR_MC_MARK_OLD_TO_NEW_POINTERS]); |
| 516 break; | 522 break; |
| 517 case Event::MARK_COMPACTOR: | 523 case Event::MARK_COMPACTOR: |
| 518 case Event::INCREMENTAL_MARK_COMPACTOR: | 524 case Event::INCREMENTAL_MARK_COMPACTOR: |
| 519 heap_->isolate()->PrintWithTimestamp( | 525 heap_->isolate()->PrintWithTimestamp( |
| 520 "pause=%.1f " | 526 "pause=%.1f " |
| 521 "mutator=%.1f " | 527 "mutator=%.1f " |
| 522 "gc=%s " | 528 "gc=%s " |
| 523 "reduce_memory=%d " | 529 "reduce_memory=%d " |
| 524 "clear=%1.f " | 530 "clear=%1.f " |
| 525 "clear.code_flush=%.1f " | 531 "clear.code_flush=%.1f " |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 } | 832 } |
| 827 | 833 |
| 828 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } | 834 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } |
| 829 | 835 |
| 830 void GCTracer::NotifyIncrementalMarkingStart() { | 836 void GCTracer::NotifyIncrementalMarkingStart() { |
| 831 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); | 837 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); |
| 832 } | 838 } |
| 833 | 839 |
| 834 } // namespace internal | 840 } // namespace internal |
| 835 } // namespace v8 | 841 } // namespace v8 |
| OLD | NEW |