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

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

Issue 2322453002: [heap] Add histogram counters to track GC reasons. (Closed)
Patch Set: Add comment 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.h ('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 1b4279035d003c7ffeee4f818272860971b399b2..bd88ca891896e25bb32f60b08e6e3f48815005d2 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -515,8 +515,12 @@ void IncrementalMarking::Start(GarbageCollectionReason gc_reason) {
DCHECK(heap_->gc_state() == Heap::NOT_IN_GC);
DCHECK(!heap_->isolate()->serializer_enabled());
+ Counters* counters = heap_->isolate()->counters();
+
+ counters->incremental_marking_reason()->AddSample(
+ static_cast<int>(gc_reason));
HistogramTimerScope incremental_marking_scope(
- heap_->isolate()->counters()->gc_incremental_marking_start());
+ counters->gc_incremental_marking_start());
TRACE_EVENT0("v8", "V8.GCIncrementalMarkingStart");
ResetStepCounters();
heap_->tracer()->NotifyIncrementalMarkingStart();
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698