Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: src/heap/gc-tracer.cc

Issue 1515503006: Clean up mark-compact phases and GC counter names. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments from Hannes Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 heap_->semi_space_copied_object_size(), 495 heap_->semi_space_copied_object_size(),
496 heap_->nodes_died_in_new_space_, 496 heap_->nodes_died_in_new_space_,
497 heap_->nodes_copied_in_new_space_, heap_->nodes_promoted_, 497 heap_->nodes_copied_in_new_space_, heap_->nodes_promoted_,
498 heap_->promotion_ratio_, AverageSurvivalRatio(), 498 heap_->promotion_ratio_, AverageSurvivalRatio(),
499 heap_->promotion_rate_, heap_->semi_space_copied_rate_, 499 heap_->promotion_rate_, heap_->semi_space_copied_rate_,
500 NewSpaceAllocationThroughputInBytesPerMillisecond(), 500 NewSpaceAllocationThroughputInBytesPerMillisecond(),
501 ContextDisposalRateInMilliseconds()); 501 ContextDisposalRateInMilliseconds());
502 break; 502 break;
503 case Event::MARK_COMPACTOR: 503 case Event::MARK_COMPACTOR:
504 case Event::INCREMENTAL_MARK_COMPACTOR: 504 case Event::INCREMENTAL_MARK_COMPACTOR:
505 PrintIsolate(heap_->isolate(), 505 PrintIsolate(
506 "%8.0f ms: " 506 heap_->isolate(),
507 "pause=%.1f " 507 "%8.0f ms: "
508 "mutator=%.1f " 508 "pause=%.1f "
509 "gc=%s " 509 "mutator=%.1f "
510 "reduce_memory=%d " 510 "gc=%s "
511 "external=%.1f " 511 "reduce_memory=%d "
512 "mark=%.1f " 512 "external=%.1f "
513 "mark_inc=%.1f " 513 "clear=%1.f "
514 "mark_prepcodeflush=%.1f " 514 "clear.code_flush=%.1f "
515 "mark_root=%.1f " 515 "clear.dependent_code=%.1f "
516 "mark_topopt=%.1f " 516 "clear.global_handles=%.1f "
517 "mark_weakclosure=%.1f " 517 "clear.maps=%.1f "
518 "mark_stringtable=%.1f " 518 "clear.slots_buffer=%.1f "
519 "mark_weakrefs=%.1f " 519 "clear.store_buffer=%.1f "
520 "mark_globalhandles=%.1f " 520 "clear.string_table=%.1f "
521 "mark_codeflush=%.1f " 521 "clear.weak_cells=%.1f "
522 "store_buffer_clear=%.1f " 522 "clear.weak_collections=%.1f "
523 "slots_buffer_clear=%.1f " 523 "clear.weak_lists=%.1f "
524 "sweep=%.2f " 524 "evacuate=%.1f "
525 "sweepns=%.2f " 525 "evacuate.candidates=%.1f "
526 "sweepos=%.2f " 526 "evacuate.clean_up=%.1f "
527 "sweepcode=%.2f " 527 "evacuate.new_space=%.1f "
528 "sweepcell=%.2f " 528 "evacuate.update_pointers=%.1f "
529 "sweepmap=%.2f " 529 "evacuate.update_pointers.between_evacuated=%.1f "
530 "sweepaborted=%.2f " 530 "evacuate.update_pointers.to_evacuated=%.1f "
531 "evacuate=%.1f " 531 "evacuate.update_pointers.to_new=%.1f "
532 "new_new=%.1f " 532 "evacuate.update_pointers.weak=%.1f "
533 "root_new=%.1f " 533 "finish=%.1f "
534 "old_new=%.1f " 534 "mark=%.1f "
535 "compaction_ptrs=%.1f " 535 "mark.finish_incremental=%.1f "
536 "intracompaction_ptrs=%.1f " 536 "mark.prepare_code_flush=%.1f "
537 "misc_compaction=%.1f " 537 "mark.roots=%.1f "
538 "inc_weak_closure=%.1f " 538 "mark.weak_closure=%.1f "
539 "weakcollection_process=%.1f " 539 "sweep=%.1f "
540 "weakcollection_clear=%.1f " 540 "sweep.code=%.1f "
541 "weakcollection_abort=%.1f " 541 "sweep.map=%.1f "
542 "clear=%1f" 542 "sweep.old=%.1f "
543 "clear_weakcell=%.1f " 543 "incremental_finalize=%.1f "
544 "clear_map=%.1f " 544 "steps_count=%d "
545 "clear_dependent_code=%.1f " 545 "steps_took=%.1f "
546 "steps_count=%d " 546 "longest_step=%.1f "
547 "steps_took=%.1f " 547 "finalization_steps_count=%d "
548 "longest_step=%.1f " 548 "finalization_steps_took=%.1f "
549 "finalization_steps_count=%d " 549 "finalization_longest_step=%.1f "
550 "finalization_steps_took=%.1f " 550 "incremental_marking_throughput=%" V8_PTR_PREFIX
551 "finalization_longest_step=%.1f " 551 "d "
552 "incremental_marking_throughput=%" V8_PTR_PREFIX 552 "total_size_before=%" V8_PTR_PREFIX
553 "d " 553 "d "
554 "total_size_before=%" V8_PTR_PREFIX 554 "total_size_after=%" V8_PTR_PREFIX
555 "d " 555 "d "
556 "total_size_after=%" V8_PTR_PREFIX 556 "holes_size_before=%" V8_PTR_PREFIX
557 "d " 557 "d "
558 "holes_size_before=%" V8_PTR_PREFIX 558 "holes_size_after=%" V8_PTR_PREFIX
559 "d " 559 "d "
560 "holes_size_after=%" V8_PTR_PREFIX 560 "allocated=%" V8_PTR_PREFIX
561 "d " 561 "d "
562 "allocated=%" V8_PTR_PREFIX 562 "promoted=%" V8_PTR_PREFIX
563 "d " 563 "d "
564 "promoted=%" V8_PTR_PREFIX 564 "semi_space_copied=%" V8_PTR_PREFIX
565 "d " 565 "d "
566 "semi_space_copied=%" V8_PTR_PREFIX 566 "nodes_died_in_new=%d "
567 "d " 567 "nodes_copied_in_new=%d "
568 "nodes_died_in_new=%d " 568 "nodes_promoted=%d "
569 "nodes_copied_in_new=%d " 569 "promotion_ratio=%.1f%% "
570 "nodes_promoted=%d " 570 "average_survival_ratio=%.1f%% "
571 "promotion_ratio=%.1f%% " 571 "promotion_rate=%.1f%% "
572 "average_survival_ratio=%.1f%% " 572 "semi_space_copy_rate=%.1f%% "
573 "promotion_rate=%.1f%% " 573 "new_space_allocation_throughput=%" V8_PTR_PREFIX
574 "semi_space_copy_rate=%.1f%% " 574 "d "
575 "new_space_allocation_throughput=%" V8_PTR_PREFIX 575 "context_disposal_rate=%.1f "
576 "d " 576 "compaction_speed=%" V8_PTR_PREFIX "d\n",
577 "context_disposal_rate=%.1f " 577 heap_->isolate()->time_millis_since_init(), duration,
578 "compaction_speed=%" V8_PTR_PREFIX "d\n", 578 spent_in_mutator, current_.TypeName(true), current_.reduce_memory,
579 heap_->isolate()->time_millis_since_init(), duration, 579 current_.scopes[Scope::EXTERNAL], current_.scopes[Scope::MC_CLEAR],
580 spent_in_mutator, current_.TypeName(true), 580 current_.scopes[Scope::MC_CLEAR_CODE_FLUSH],
581 current_.reduce_memory, current_.scopes[Scope::EXTERNAL], 581 current_.scopes[Scope::MC_CLEAR_DEPENDENT_CODE],
582 current_.scopes[Scope::MC_MARK], 582 current_.scopes[Scope::MC_CLEAR_GLOBAL_HANDLES],
583 current_.scopes[Scope::MC_MARK_FINISH_INCREMENTAL], 583 current_.scopes[Scope::MC_CLEAR_MAPS],
584 current_.scopes[Scope::MC_MARK_PREPARE_CODE_FLUSH], 584 current_.scopes[Scope::MC_CLEAR_SLOTS_BUFFER],
585 current_.scopes[Scope::MC_MARK_ROOT], 585 current_.scopes[Scope::MC_CLEAR_STORE_BUFFER],
586 current_.scopes[Scope::MC_MARK_TOPOPT], 586 current_.scopes[Scope::MC_CLEAR_STRING_TABLE],
587 current_.scopes[Scope::MC_MARK_WEAK_CLOSURE], 587 current_.scopes[Scope::MC_CLEAR_WEAK_CELLS],
588 current_.scopes[Scope::MC_MARK_STRING_TABLE], 588 current_.scopes[Scope::MC_CLEAR_WEAK_COLLECTIONS],
589 current_.scopes[Scope::MC_MARK_WEAK_REFERENCES], 589 current_.scopes[Scope::MC_CLEAR_WEAK_LISTS],
590 current_.scopes[Scope::MC_MARK_GLOBAL_HANDLES], 590 current_.scopes[Scope::MC_EVACUATE],
591 current_.scopes[Scope::MC_MARK_CODE_FLUSH], 591 current_.scopes[Scope::MC_EVACUATE_CANDIDATES],
592 current_.scopes[Scope::MC_STORE_BUFFER_CLEAR], 592 current_.scopes[Scope::MC_EVACUATE_CLEAN_UP],
593 current_.scopes[Scope::MC_SLOTS_BUFFER_CLEAR], 593 current_.scopes[Scope::MC_EVACUATE_NEW_SPACE],
594 current_.scopes[Scope::MC_SWEEP], 594 current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS],
595 current_.scopes[Scope::MC_SWEEP_NEWSPACE], 595 current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED],
596 current_.scopes[Scope::MC_SWEEP_OLDSPACE], 596 current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED],
597 current_.scopes[Scope::MC_SWEEP_CODE], 597 current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_TO_NEW],
598 current_.scopes[Scope::MC_SWEEP_CELL], 598 current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_WEAK],
599 current_.scopes[Scope::MC_SWEEP_MAP], 599 current_.scopes[Scope::MC_FINISH], current_.scopes[Scope::MC_MARK],
600 current_.scopes[Scope::MC_SWEEP_ABORTED], 600 current_.scopes[Scope::MC_MARK_FINISH_INCREMENTAL],
601 current_.scopes[Scope::MC_EVACUATE_PAGES], 601 current_.scopes[Scope::MC_MARK_PREPARE_CODE_FLUSH],
602 current_.scopes[Scope::MC_UPDATE_NEW_TO_NEW_POINTERS], 602 current_.scopes[Scope::MC_MARK_ROOTS],
603 current_.scopes[Scope::MC_UPDATE_ROOT_TO_NEW_POINTERS], 603 current_.scopes[Scope::MC_MARK_WEAK_CLOSURE],
604 current_.scopes[Scope::MC_UPDATE_OLD_TO_NEW_POINTERS], 604 current_.scopes[Scope::MC_SWEEP],
605 current_.scopes[Scope::MC_UPDATE_POINTERS_TO_EVACUATED], 605 current_.scopes[Scope::MC_SWEEP_CODE],
606 current_.scopes[Scope::MC_UPDATE_POINTERS_BETWEEN_EVACUATED], 606 current_.scopes[Scope::MC_SWEEP_MAP],
607 current_.scopes[Scope::MC_UPDATE_MISC_POINTERS], 607 current_.scopes[Scope::MC_SWEEP_OLD],
608 current_.scopes[Scope::MC_INCREMENTAL_FINALIZE], 608 current_.scopes[Scope::MC_INCREMENTAL_FINALIZE],
609 current_.scopes[Scope::MC_WEAKCOLLECTION_PROCESS], 609 current_.incremental_marking_steps,
610 current_.scopes[Scope::MC_WEAKCOLLECTION_CLEAR], 610 current_.incremental_marking_duration,
611 current_.scopes[Scope::MC_WEAKCOLLECTION_ABORT], 611 current_.longest_incremental_marking_step,
612 current_.scopes[Scope::MC_CLEAR], 612 cumulative_incremental_marking_finalization_steps_,
613 current_.scopes[Scope::MC_CLEAR_WEAKCELL], 613 cumulative_incremental_marking_finalization_duration_,
614 current_.scopes[Scope::MC_CLEAR_MAP], 614 longest_incremental_marking_finalization_step_,
615 current_.scopes[Scope::MC_CLEAR_DEPENDENT_CODE], 615 IncrementalMarkingSpeedInBytesPerMillisecond(),
616 current_.incremental_marking_steps, 616 current_.start_object_size, current_.end_object_size,
617 current_.incremental_marking_duration, 617 current_.start_holes_size, current_.end_holes_size,
618 current_.longest_incremental_marking_step, 618 allocated_since_last_gc, heap_->promoted_objects_size(),
619 cumulative_incremental_marking_finalization_steps_, 619 heap_->semi_space_copied_object_size(),
620 cumulative_incremental_marking_finalization_duration_, 620 heap_->nodes_died_in_new_space_, heap_->nodes_copied_in_new_space_,
621 longest_incremental_marking_finalization_step_, 621 heap_->nodes_promoted_, heap_->promotion_ratio_,
622 IncrementalMarkingSpeedInBytesPerMillisecond(), 622 AverageSurvivalRatio(), heap_->promotion_rate_,
623 current_.start_object_size, current_.end_object_size, 623 heap_->semi_space_copied_rate_,
624 current_.start_holes_size, current_.end_holes_size, 624 NewSpaceAllocationThroughputInBytesPerMillisecond(),
625 allocated_since_last_gc, heap_->promoted_objects_size(), 625 ContextDisposalRateInMilliseconds(),
626 heap_->semi_space_copied_object_size(), 626 CompactionSpeedInBytesPerMillisecond());
627 heap_->nodes_died_in_new_space_,
628 heap_->nodes_copied_in_new_space_, heap_->nodes_promoted_,
629 heap_->promotion_ratio_, AverageSurvivalRatio(),
630 heap_->promotion_rate_, heap_->semi_space_copied_rate_,
631 NewSpaceAllocationThroughputInBytesPerMillisecond(),
632 ContextDisposalRateInMilliseconds(),
633 CompactionSpeedInBytesPerMillisecond());
634 break; 627 break;
635 case Event::START: 628 case Event::START:
636 break; 629 break;
637 default: 630 default:
638 UNREACHABLE(); 631 UNREACHABLE();
639 } 632 }
640 } 633 }
641 634
642 635
643 double GCTracer::MeanDuration(const EventBuffer& events) const { 636 double GCTracer::MeanDuration(const EventBuffer& events) const {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 906
914 907
915 bool GCTracer::SurvivalEventsRecorded() const { 908 bool GCTracer::SurvivalEventsRecorded() const {
916 return survival_events_.size() > 0; 909 return survival_events_.size() > 0;
917 } 910 }
918 911
919 912
920 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } 913 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); }
921 } // namespace internal 914 } // namespace internal
922 } // namespace v8 915 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698