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

Unified Diff: src/heap/heap.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index e37c9f6b11de8b333743e8f296486d3561721013..4647157e8e3443275064997d92c326207fe297cc 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4763,7 +4763,13 @@ bool Heap::HasHighFragmentation(intptr_t used, intptr_t committed) {
void Heap::ReduceNewSpaceSize() {
- if (!FLAG_predictable && HasLowAllocationRate()) {
+ // TODO(ulan): Unify this constant with the similar constant in
+ // GCIdleTimeHandler once the change is merged to 4.5.
+ static const size_t kLowAllocationThroughput = 1000;
+ size_t allocation_throughput =
+ tracer()->CurrentAllocationThroughputInBytesPerMillisecond();
+ if (FLAG_predictable || allocation_throughput == 0) return;
+ if (allocation_throughput < kLowAllocationThroughput) {
new_space_.Shrink();
UncommitFromSpace();
}
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698