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