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

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

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase 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/incremental-marking.h ('k') | src/heap/incremental-marking-job.cc » ('j') | 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 d99b56be49a98ac5f69915141dacae8e9f08d3af..1b4279035d003c7ffeee4f818272860971b399b2 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -497,8 +497,7 @@ static void PatchIncrementalMarkingRecordWriteStubs(
}
}
-
-void IncrementalMarking::Start(const char* reason) {
+void IncrementalMarking::Start(GarbageCollectionReason gc_reason) {
if (FLAG_trace_incremental_marking) {
int old_generation_size_mb =
static_cast<int>(heap()->PromotedSpaceSizeOfObjects() / MB);
@@ -507,8 +506,8 @@ void IncrementalMarking::Start(const char* reason) {
heap()->isolate()->PrintWithTimestamp(
"[IncrementalMarking] Start (%s): old generation %dMB, limit %dMB, "
"slack %dMB\n",
- (reason == nullptr) ? "unknown reason" : reason, old_generation_size_mb,
- old_generation_limit_mb,
+ Heap::GarbageCollectionReasonToString(gc_reason),
+ old_generation_size_mb, old_generation_limit_mb,
Max(0, old_generation_limit_mb - old_generation_size_mb));
}
DCHECK(FLAG_incremental_marking);
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/incremental-marking-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698