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

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

Issue 1308363002: Revert of Version 4.5.103.23 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 3 months 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/heap.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap/gc-tracer.h" 7 #include "src/heap/gc-tracer.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 } 675 }
676 676
677 677
678 size_t GCTracer::AllocationThroughputInBytesPerMillisecond( 678 size_t GCTracer::AllocationThroughputInBytesPerMillisecond(
679 double time_ms) const { 679 double time_ms) const {
680 return NewSpaceAllocationThroughputInBytesPerMillisecond(time_ms) + 680 return NewSpaceAllocationThroughputInBytesPerMillisecond(time_ms) +
681 OldGenerationAllocationThroughputInBytesPerMillisecond(time_ms); 681 OldGenerationAllocationThroughputInBytesPerMillisecond(time_ms);
682 } 682 }
683 683
684 684
685 size_t GCTracer::CurrentAllocationThroughputInBytesPerMillisecond() const {
686 return AllocationThroughputInBytesPerMillisecond(kThroughputTimeFrameMs);
687 }
688
689
690 size_t GCTracer::CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() 685 size_t GCTracer::CurrentOldGenerationAllocationThroughputInBytesPerMillisecond()
691 const { 686 const {
687 static const double kThroughputTimeFrame = 5000;
692 return OldGenerationAllocationThroughputInBytesPerMillisecond( 688 return OldGenerationAllocationThroughputInBytesPerMillisecond(
693 kThroughputTimeFrameMs); 689 kThroughputTimeFrame);
694 } 690 }
695 691
696 692
697 double GCTracer::ContextDisposalRateInMilliseconds() const { 693 double GCTracer::ContextDisposalRateInMilliseconds() const {
698 if (context_disposal_events_.size() < kRingBufferMaxSize) return 0.0; 694 if (context_disposal_events_.size() < kRingBufferMaxSize) return 0.0;
699 695
700 double begin = base::OS::TimeCurrentMillis(); 696 double begin = base::OS::TimeCurrentMillis();
701 double end = 0.0; 697 double end = 0.0;
702 ContextDisposalEventBuffer::const_iterator iter = 698 ContextDisposalEventBuffer::const_iterator iter =
703 context_disposal_events_.begin(); 699 context_disposal_events_.begin();
(...skipping 21 matching lines...) Expand all
725 721
726 722
727 bool GCTracer::SurvivalEventsRecorded() const { 723 bool GCTracer::SurvivalEventsRecorded() const {
728 return survival_events_.size() > 0; 724 return survival_events_.size() > 0;
729 } 725 }
730 726
731 727
732 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } 728 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); }
733 } // namespace internal 729 } // namespace internal
734 } // namespace v8 730 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698