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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 case Event::MARK_COMPACTOR: | 462 case Event::MARK_COMPACTOR: |
463 case Event::INCREMENTAL_MARK_COMPACTOR: | 463 case Event::INCREMENTAL_MARK_COMPACTOR: |
464 PrintIsolate(heap_->isolate(), | 464 PrintIsolate(heap_->isolate(), |
465 "[I:%p] %8.0f ms: " | 465 "[I:%p] %8.0f ms: " |
466 "pause=%.1f " | 466 "pause=%.1f " |
467 "mutator=%.1f " | 467 "mutator=%.1f " |
468 "gc=%s " | 468 "gc=%s " |
469 "reduce_memory=%d " | 469 "reduce_memory=%d " |
470 "external=%.1f " | 470 "external=%.1f " |
471 "mark=%.1f " | 471 "mark=%.1f " |
| 472 "mark_inc=%.1f " |
| 473 "mark_prepcodeflush=%.1f " |
| 474 "mark_root=%.1f " |
| 475 "mark_topopt=%.1f " |
| 476 "mark_retainmaps=%.1f " |
| 477 "mark_weakclosure=%.1f " |
| 478 "mark_stringtable=%.1f " |
| 479 "mark_weakrefs=%.1f " |
| 480 "mark_globalhandles=%.1f " |
| 481 "mark_codeflush=%.1f " |
472 "sweep=%.2f " | 482 "sweep=%.2f " |
473 "sweepns=%.2f " | 483 "sweepns=%.2f " |
474 "sweepos=%.2f " | 484 "sweepos=%.2f " |
475 "sweepcode=%.2f " | 485 "sweepcode=%.2f " |
476 "sweepcell=%.2f " | 486 "sweepcell=%.2f " |
477 "sweepmap=%.2f " | 487 "sweepmap=%.2f " |
478 "evacuate=%.1f " | 488 "evacuate=%.1f " |
479 "new_new=%.1f " | 489 "new_new=%.1f " |
480 "root_new=%.1f " | 490 "root_new=%.1f " |
481 "old_new=%.1f " | 491 "old_new=%.1f " |
482 "compaction_ptrs=%.1f " | 492 "compaction_ptrs=%.1f " |
483 "intracompaction_ptrs=%.1f " | 493 "intracompaction_ptrs=%.1f " |
484 "misc_compaction=%.1f " | 494 "misc_compaction=%.1f " |
485 "weak_closure=%.1f " | 495 "weak_closure=%.1f " |
486 "inc_weak_closure=%.1f " | 496 "inc_weak_closure=%.1f " |
487 "weakcollection_process=%.1f " | 497 "weakcollection_process=%.1f " |
488 "weakcollection_clear=%.1f " | 498 "weakcollection_clear=%.1f " |
489 "weakcollection_abort=%.1f " | 499 "weakcollection_abort=%.1f " |
490 "weakcells=%.1f " | 500 "weakcells=%.1f " |
491 "nonlive_refs=%.1f " | 501 "nonlive_refs=%.1f " |
492 "steps_count=%d " | 502 "steps_count=%d " |
493 "steps_took=%.1f " | 503 "steps_took=%.1f " |
494 "longest_step=%.1f " | 504 "longest_step=%.1f " |
495 "incremental_marking_throughput=%" V8_PTR_PREFIX "d " | 505 "incremental_marking_throughput=%" V8_PTR_PREFIX |
496 "total_size_before=%" V8_PTR_PREFIX "d " | 506 "d " |
497 "total_size_after=%" V8_PTR_PREFIX "d " | 507 "total_size_before=%" V8_PTR_PREFIX |
498 "holes_size_before=%" V8_PTR_PREFIX "d " | 508 "d " |
499 "holes_size_after=%" V8_PTR_PREFIX "d " | 509 "total_size_after=%" V8_PTR_PREFIX |
500 "allocated=%" V8_PTR_PREFIX "d " | 510 "d " |
501 "promoted=%" V8_PTR_PREFIX "d " | 511 "holes_size_before=%" V8_PTR_PREFIX |
502 "semi_space_copied=%" V8_PTR_PREFIX "d " | 512 "d " |
| 513 "holes_size_after=%" V8_PTR_PREFIX |
| 514 "d " |
| 515 "allocated=%" V8_PTR_PREFIX |
| 516 "d " |
| 517 "promoted=%" V8_PTR_PREFIX |
| 518 "d " |
| 519 "semi_space_copied=%" V8_PTR_PREFIX |
| 520 "d " |
503 "nodes_died_in_new=%d " | 521 "nodes_died_in_new=%d " |
504 "nodes_copied_in_new=%d " | 522 "nodes_copied_in_new=%d " |
505 "nodes_promoted=%d " | 523 "nodes_promoted=%d " |
506 "promotion_ratio=%.1f%% " | 524 "promotion_ratio=%.1f%% " |
507 "average_survival_ratio=%.1f%% " | 525 "average_survival_ratio=%.1f%% " |
508 "promotion_rate=%.1f%% " | 526 "promotion_rate=%.1f%% " |
509 "semi_space_copy_rate=%.1f%% " | 527 "semi_space_copy_rate=%.1f%% " |
510 "new_space_allocation_throughput=%" V8_PTR_PREFIX "d " | 528 "new_space_allocation_throughput=%" V8_PTR_PREFIX |
| 529 "d " |
511 "context_disposal_rate=%.1f\n", | 530 "context_disposal_rate=%.1f\n", |
512 heap_->isolate(), | 531 heap_->isolate(), heap_->isolate()->time_millis_since_init(), |
513 heap_->isolate()->time_millis_since_init(), | 532 duration, spent_in_mutator, current_.TypeName(true), |
514 duration, spent_in_mutator, | 533 current_.reduce_memory, current_.scopes[Scope::EXTERNAL], |
515 current_.TypeName(true), | |
516 current_.reduce_memory, | |
517 current_.scopes[Scope::EXTERNAL], | |
518 current_.scopes[Scope::MC_MARK], | 534 current_.scopes[Scope::MC_MARK], |
| 535 current_.scopes[Scope::MC_MARK_FINISH_INCREMENTAL], |
| 536 current_.scopes[Scope::MC_MARK_PREPARE_CODE_FLUSH], |
| 537 current_.scopes[Scope::MC_MARK_ROOT], |
| 538 current_.scopes[Scope::MC_MARK_TOPOPT], |
| 539 current_.scopes[Scope::MC_MARK_RETAIN_MAPS], |
| 540 current_.scopes[Scope::MC_MARK_WEAK_CLOSURE], |
| 541 current_.scopes[Scope::MC_MARK_STRING_TABLE], |
| 542 current_.scopes[Scope::MC_MARK_WEAK_REFERENCES], |
| 543 current_.scopes[Scope::MC_MARK_GLOBAL_HANDLES], |
| 544 current_.scopes[Scope::MC_MARK_CODE_FLUSH], |
519 current_.scopes[Scope::MC_SWEEP], | 545 current_.scopes[Scope::MC_SWEEP], |
520 current_.scopes[Scope::MC_SWEEP_NEWSPACE], | 546 current_.scopes[Scope::MC_SWEEP_NEWSPACE], |
521 current_.scopes[Scope::MC_SWEEP_OLDSPACE], | 547 current_.scopes[Scope::MC_SWEEP_OLDSPACE], |
522 current_.scopes[Scope::MC_SWEEP_CODE], | 548 current_.scopes[Scope::MC_SWEEP_CODE], |
523 current_.scopes[Scope::MC_SWEEP_CELL], | 549 current_.scopes[Scope::MC_SWEEP_CELL], |
524 current_.scopes[Scope::MC_SWEEP_MAP], | 550 current_.scopes[Scope::MC_SWEEP_MAP], |
525 current_.scopes[Scope::MC_EVACUATE_PAGES], | 551 current_.scopes[Scope::MC_EVACUATE_PAGES], |
526 current_.scopes[Scope::MC_UPDATE_NEW_TO_NEW_POINTERS], | 552 current_.scopes[Scope::MC_UPDATE_NEW_TO_NEW_POINTERS], |
527 current_.scopes[Scope::MC_UPDATE_ROOT_TO_NEW_POINTERS], | 553 current_.scopes[Scope::MC_UPDATE_ROOT_TO_NEW_POINTERS], |
528 current_.scopes[Scope::MC_UPDATE_OLD_TO_NEW_POINTERS], | 554 current_.scopes[Scope::MC_UPDATE_OLD_TO_NEW_POINTERS], |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 841 |
816 | 842 |
817 bool GCTracer::SurvivalEventsRecorded() const { | 843 bool GCTracer::SurvivalEventsRecorded() const { |
818 return survival_events_.size() > 0; | 844 return survival_events_.size() > 0; |
819 } | 845 } |
820 | 846 |
821 | 847 |
822 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } | 848 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } |
823 } // namespace internal | 849 } // namespace internal |
824 } // namespace v8 | 850 } // namespace v8 |
OLD | NEW |