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

Unified Diff: src/heap/gc-tracer.cc

Issue 849693004: Use more conservative average promotion ratio for initial heap size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index a35872dc47e1380311f19d1415a22292505169db..d46ed239c99ce5e9cc3f56d253be10f0fb157ffe 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -31,8 +31,8 @@ GCTracer::ContextDisposalEvent::ContextDisposalEvent(double time) {
}
-GCTracer::SurvivalEvent::SurvivalEvent(double survival_rate) {
- survival_rate_ = survival_rate;
+GCTracer::PromotionEvent::PromotionEvent(double promotion_ratio) {
+ promotion_ratio_ = promotion_ratio;
}
@@ -257,8 +257,8 @@ void GCTracer::AddContextDisposalTime(double time) {
}
-void GCTracer::AddSurvivalRate(double survival_rate) {
- survival_events_.push_front(SurvivalEvent(survival_rate));
+void GCTracer::AddPromotionRatio(double promotion_ratio) {
+ promotion_events_.push_front(PromotionEvent(promotion_ratio));
}
@@ -372,9 +372,9 @@ void GCTracer::PrintNVP() const {
PrintF("nodes_copied_in_new=%d ", heap_->nodes_copied_in_new_space_);
PrintF("nodes_promoted=%d ", heap_->nodes_promoted_);
PrintF("promotion_ratio=%.1f%% ", heap_->promotion_ratio_);
+ PrintF("average_promotion_ratio=%.1f%% ", AveragePromotionRatio());
PrintF("promotion_rate=%.1f%% ", heap_->promotion_rate_);
PrintF("semi_space_copy_rate=%.1f%% ", heap_->semi_space_copied_rate_);
- PrintF("average_survival_rate%.1f%% ", AverageSurvivalRate());
PrintF("new_space_allocation_throughput=%" V8_PTR_PREFIX "d ",
NewSpaceAllocationThroughputInBytesPerMillisecond());
PrintF("context_disposal_rate=%.1f ", ContextDisposalRateInMilliseconds());
@@ -570,25 +570,25 @@ double GCTracer::ContextDisposalRateInMilliseconds() const {
}
-double GCTracer::AverageSurvivalRate() const {
- if (survival_events_.size() == 0) return 0.0;
+double GCTracer::AveragePromotionRatio() const {
+ if (promotion_events_.size() == 0) return 0.0;
double sum_of_rates = 0.0;
- SurvivalEventBuffer::const_iterator iter = survival_events_.begin();
- while (iter != survival_events_.end()) {
- sum_of_rates += iter->survival_rate_;
+ PromotionEventBuffer::const_iterator iter = promotion_events_.begin();
+ while (iter != promotion_events_.end()) {
+ sum_of_rates += iter->promotion_ratio_;
++iter;
}
- return sum_of_rates / static_cast<double>(survival_events_.size());
+ return sum_of_rates / static_cast<double>(promotion_events_.size());
}
bool GCTracer::SurvivalEventsRecorded() const {
- return survival_events_.size() > 0;
+ return promotion_events_.size() > 0;
}
-void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); }
+void GCTracer::ResetSurvivalEvents() { promotion_events_.reset(); }
}
} // namespace v8::internal
« 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