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

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

Issue 1273083002: Partially revert https://crrev.com/7e53749df0a10f475404e86ef0ca8df02bb79e7a (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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.cc » ('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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 } 695 }
696 696
697 697
698 size_t GCTracer::AllocationThroughputInBytesPerMillisecond( 698 size_t GCTracer::AllocationThroughputInBytesPerMillisecond(
699 double time_ms) const { 699 double time_ms) const {
700 return NewSpaceAllocationThroughputInBytesPerMillisecond(time_ms) + 700 return NewSpaceAllocationThroughputInBytesPerMillisecond(time_ms) +
701 OldGenerationAllocationThroughputInBytesPerMillisecond(time_ms); 701 OldGenerationAllocationThroughputInBytesPerMillisecond(time_ms);
702 } 702 }
703 703
704 704
705 size_t GCTracer::CurrentAllocationThroughputInBytesPerMillisecond() const {
706 return AllocationThroughputInBytesPerMillisecond(kThroughputTimeFrameMs);
707 }
708
709
705 size_t GCTracer::CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() 710 size_t GCTracer::CurrentOldGenerationAllocationThroughputInBytesPerMillisecond()
706 const { 711 const {
707 static const double kThroughputTimeFrame = 5000;
708 return OldGenerationAllocationThroughputInBytesPerMillisecond( 712 return OldGenerationAllocationThroughputInBytesPerMillisecond(
709 kThroughputTimeFrame); 713 kThroughputTimeFrameMs);
710 } 714 }
711 715
712 716
713 double GCTracer::ContextDisposalRateInMilliseconds() const { 717 double GCTracer::ContextDisposalRateInMilliseconds() const {
714 if (context_disposal_events_.size() < kRingBufferMaxSize) return 0.0; 718 if (context_disposal_events_.size() < kRingBufferMaxSize) return 0.0;
715 719
716 double begin = base::OS::TimeCurrentMillis(); 720 double begin = base::OS::TimeCurrentMillis();
717 double end = 0.0; 721 double end = 0.0;
718 ContextDisposalEventBuffer::const_iterator iter = 722 ContextDisposalEventBuffer::const_iterator iter =
719 context_disposal_events_.begin(); 723 context_disposal_events_.begin();
(...skipping 21 matching lines...) Expand all
741 745
742 746
743 bool GCTracer::SurvivalEventsRecorded() const { 747 bool GCTracer::SurvivalEventsRecorded() const {
744 return survival_events_.size() > 0; 748 return survival_events_.size() > 0;
745 } 749 }
746 750
747 751
748 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } 752 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); }
749 } // namespace internal 753 } // namespace internal
750 } // namespace v8 754 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698