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

Unified Diff: src/heap/gc-tracer.cc

Issue 1496873002: [heap] Add timer to incremental marking finalization phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index 7b0b1ac9d5fd5661e14877440c61c7dfa14959ab..67bebdd37801ed49b73d8c25d0d8b895f8b20539 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -113,6 +113,9 @@ GCTracer::GCTracer(Heap* heap)
cumulative_incremental_marking_duration_(0.0),
cumulative_pure_incremental_marking_duration_(0.0),
longest_incremental_marking_step_(0.0),
+ cumulative_incremental_marking_finalization_steps_(0),
+ cumulative_incremental_marking_finalization_duration_(0.0),
+ longest_incremental_marking_finalization_step_(0.0),
cumulative_marking_duration_(0.0),
cumulative_sweeping_duration_(0.0),
allocation_time_ms_(0.0),
@@ -274,6 +277,10 @@ void GCTracer::Stop(GarbageCollector collector) {
if (FLAG_trace_gc) {
heap_->PrintShortHeapStatistics();
}
+
+ longest_incremental_marking_finalization_step_ = 0.0;
+ cumulative_incremental_marking_finalization_steps_ = 0;
+ cumulative_incremental_marking_finalization_duration_ = 0.0;
}
@@ -347,6 +354,14 @@ void GCTracer::AddIncrementalMarkingStep(double duration, intptr_t bytes) {
}
+void GCTracer::AddIncrementalMarkingFinalizationStep(double duration) {
+ cumulative_incremental_marking_finalization_steps_++;
+ cumulative_incremental_marking_finalization_duration_ += duration;
+ longest_incremental_marking_finalization_step_ =
+ Max(longest_incremental_marking_finalization_step_, duration);
+}
+
+
void GCTracer::Output(const char* format, ...) const {
if (FLAG_trace_gc) {
va_list arguments;
@@ -533,6 +548,9 @@ void GCTracer::PrintNVP() const {
"steps_count=%d "
"steps_took=%.1f "
"longest_step=%.1f "
+ "finalization_steps_count=%d "
+ "finalization_steps_took=%.1f "
+ "finalization_longest_step=%.1f "
"incremental_marking_throughput=%" V8_PTR_PREFIX
"d "
"total_size_before=%" V8_PTR_PREFIX
@@ -602,6 +620,9 @@ void GCTracer::PrintNVP() const {
current_.incremental_marking_steps,
current_.incremental_marking_duration,
current_.longest_incremental_marking_step,
+ cumulative_incremental_marking_finalization_steps_,
+ cumulative_incremental_marking_finalization_duration_,
+ longest_incremental_marking_finalization_step_,
IncrementalMarkingSpeedInBytesPerMillisecond(),
current_.start_object_size, current_.end_object_size,
current_.start_holes_size, current_.end_holes_size,
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698