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

Unified Diff: src/heap/heap.cc

Issue 1128483003: Add heap growing strategy details to --trace-gc-verbose. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | 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 83fb6394f96e500027120929fbe70b93a438209b..74154ef5020d42ba6648463a571ee91662577583 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -329,7 +329,7 @@ void Heap::PrintShortHeapStatistics() {
", committed: %6" V8_PTR_PREFIX "d KB\n",
new_space_.Size() / KB, new_space_.Available() / KB,
new_space_.CommittedMemory() / KB);
- PrintIsolate(isolate_, "Old space, used: %6" V8_PTR_PREFIX
+ PrintIsolate(isolate_, "Old space, used: %6" V8_PTR_PREFIX
"d KB"
", available: %6" V8_PTR_PREFIX
"d KB"
@@ -5266,6 +5266,7 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size,
// TODO(hpayer): The idle factor could make the handles heuristic obsolete.
// Look into that.
double factor;
+ double idle_factor;
if (freed_global_handles <= kMinHandles) {
factor = max_factor;
} else if (freed_global_handles >= kMaxHandles) {
@@ -5283,10 +5284,21 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size,
factor = min_factor;
}
+ idle_factor = Min(factor, idle_max_factor);
+
old_generation_allocation_limit_ =
CalculateOldGenerationAllocationLimit(factor, old_gen_size);
- idle_old_generation_allocation_limit_ = CalculateOldGenerationAllocationLimit(
- Min(factor, idle_max_factor), old_gen_size);
+ idle_old_generation_allocation_limit_ =
+ CalculateOldGenerationAllocationLimit(idle_factor, old_gen_size);
+
+ if (FLAG_trace_gc_verbose) {
+ PrintIsolate(
+ isolate_,
+ "Grow: old size: %" V8_PTR_PREFIX "d KB, new limit: %" V8_PTR_PREFIX
+ "d KB (%.1f), new idle limit: %" V8_PTR_PREFIX "d KB (%.1f)\n",
+ old_gen_size / KB, old_generation_allocation_limit_ / KB, factor,
+ idle_old_generation_allocation_limit_ / KB, idle_factor);
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698