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

Side by Side Diff: src/heap/heap.cc

Issue 1186903005: Add option to compute average scavenge speed w.r.t survived objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: bump limit Created 5 years, 6 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/heap.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4664 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable"); 4675 CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable");
4676 } 4676 }
4677 if (mark_compact_collector()->sweeping_in_progress()) { 4677 if (mark_compact_collector()->sweeping_in_progress()) {
4678 mark_compact_collector()->EnsureSweepingCompleted(); 4678 mark_compact_collector()->EnsureSweepingCompleted();
4679 } 4679 }
4680 DCHECK(IsHeapIterable()); 4680 DCHECK(IsHeapIterable());
4681 } 4681 }
4682 4682
4683 4683
4684 bool Heap::HasLowYoungGenerationAllocationRate() { 4684 bool Heap::HasLowYoungGenerationAllocationRate() {
4685 const double high_mutator_utilization = 0.995; 4685 const double high_mutator_utilization = 0.993;
4686 double mutator_speed = static_cast<double>( 4686 double mutator_speed = static_cast<double>(
4687 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond()); 4687 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond());
4688 double gc_speed = 4688 double gc_speed = static_cast<double>(
4689 static_cast<double>(tracer()->ScavengeSpeedInBytesPerMillisecond()); 4689 tracer()->ScavengeSpeedInBytesPerMillisecond(kForSurvivedObjects));
4690 if (mutator_speed == 0 || gc_speed == 0) return false; 4690 if (mutator_speed == 0 || gc_speed == 0) return false;
4691 double mutator_utilization = gc_speed / (mutator_speed + gc_speed); 4691 double mutator_utilization = gc_speed / (mutator_speed + gc_speed);
4692 return mutator_utilization > high_mutator_utilization; 4692 return mutator_utilization > high_mutator_utilization;
4693 } 4693 }
4694 4694
4695 4695
4696 bool Heap::HasLowOldGenerationAllocationRate() { 4696 bool Heap::HasLowOldGenerationAllocationRate() {
4697 const double high_mutator_utilization = 0.995; 4697 const double high_mutator_utilization = 0.993;
4698 double mutator_speed = static_cast<double>( 4698 double mutator_speed = static_cast<double>(
4699 tracer()->OldGenerationAllocationThroughputInBytesPerMillisecond()); 4699 tracer()->OldGenerationAllocationThroughputInBytesPerMillisecond());
4700 double gc_speed = static_cast<double>( 4700 double gc_speed = static_cast<double>(
4701 tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond()); 4701 tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond());
4702 if (mutator_speed == 0 || gc_speed == 0) return false; 4702 if (mutator_speed == 0 || gc_speed == 0) return false;
4703 double mutator_utilization = gc_speed / (mutator_speed + gc_speed); 4703 double mutator_utilization = gc_speed / (mutator_speed + gc_speed);
4704 return mutator_utilization > high_mutator_utilization; 4704 return mutator_utilization > high_mutator_utilization;
4705 } 4705 }
4706 4706
4707 4707
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
6811 *object_type = "CODE_TYPE"; \ 6811 *object_type = "CODE_TYPE"; \
6812 *object_sub_type = "CODE_AGE/" #name; \ 6812 *object_sub_type = "CODE_AGE/" #name; \
6813 return true; 6813 return true;
6814 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6814 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6815 #undef COMPARE_AND_RETURN_NAME 6815 #undef COMPARE_AND_RETURN_NAME
6816 } 6816 }
6817 return false; 6817 return false;
6818 } 6818 }
6819 } // namespace internal 6819 } // namespace internal
6820 } // namespace v8 6820 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698