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

Unified Diff: src/heap/incremental-marking.cc

Issue 2299543010: [heap] Print more info in incremental marking tracing. (Closed)
Patch Set: Created 4 years, 3 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/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 57ed020228ab600222bdb25ca05018cec545462a..bed093e05c860c7ca44f62e2bcc7319e938cc406 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -487,9 +487,16 @@ static void PatchIncrementalMarkingRecordWriteStubs(
void IncrementalMarking::Start(const char* reason) {
if (FLAG_trace_incremental_marking) {
+ int old_generation_size_mb =
+ static_cast<int>(heap()->PromotedSpaceSizeOfObjects() / MB);
+ int old_generation_limit_mb =
+ static_cast<int>(heap()->old_generation_allocation_limit() / MB);
heap()->isolate()->PrintWithTimestamp(
- "[IncrementalMarking] Start (%s)\n",
- (reason == nullptr) ? "unknown reason" : reason);
+ "[IncrementalMarking] Start (%s): old generation %dMB, limit %dMB, "
+ "slack %dMB\n",
+ (reason == nullptr) ? "unknown reason" : reason, old_generation_size_mb,
+ old_generation_limit_mb,
+ Max(0, old_generation_limit_mb - old_generation_size_mb));
}
DCHECK(FLAG_incremental_marking);
DCHECK(state_ == STOPPED);
@@ -959,7 +966,15 @@ void IncrementalMarking::Hurry() {
void IncrementalMarking::Stop() {
if (IsStopped()) return;
if (FLAG_trace_incremental_marking) {
- heap()->isolate()->PrintWithTimestamp("[IncrementalMarking] Stopping.\n");
+ int old_generation_size_mb =
+ static_cast<int>(heap()->PromotedSpaceSizeOfObjects() / MB);
+ int old_generation_limit_mb =
+ static_cast<int>(heap()->old_generation_allocation_limit() / MB);
+ heap()->isolate()->PrintWithTimestamp(
+ "[IncrementalMarking] Stopping: old generation %dMB, limit %dMB, "
+ "overshoot %dMB\n",
+ old_generation_size_mb, old_generation_limit_mb,
+ Max(0, old_generation_size_mb - old_generation_limit_mb));
}
heap_->new_space()->RemoveAllocationObserver(&observer_);
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698