PrintF("steps_count=%d ", current_.incremental_marking_steps);
PrintF("steps_took=%.1f ", current_.incremental_marking_duration);
PrintF("longest_step=%.1f ", current_.longest_incremental_marking_step);
- PrintF("marking_throughput=%" V8_PTR_PREFIX "d ",
- MarkingSpeedInBytesPerMillisecond());
+ PrintF("incremental_marking_throughput=%" V8_PTR_PREFIX "d ",
+ IncrementalMarkingSpeedInBytesPerMillisecond());
}
PrintF("\n");
}
-intptr_t GCTracer::MarkingSpeedInBytesPerMillisecond() const {
+intptr_t GCTracer::IncrementalMarkingSpeedInBytesPerMillisecond() const {
if (cumulative_incremental_marking_duration_ == 0.0) return 0;
// We haven't completed an entire round of incremental marking, yet.
}
-void IncrementalMarking::ProcessMarkingDeque(intptr_t bytes_to_process) {
+intptr_t IncrementalMarking::ProcessMarkingDeque(intptr_t bytes_to_process) {
+ intptr_t bytes_processed = 0;
Map* filler_map = heap_->one_pointer_filler_map();
- while (!marking_deque_.IsEmpty() && bytes_to_process > 0) {
+ while (!marking_deque_.IsEmpty() && bytes_processed < bytes_to_process) {
HeapObject* obj = marking_deque_.Pop();
// Explicitly skip one word fillers. Incremental markbit patterns are
int delta = (size - unscanned_bytes_of_large_object_);
// TODO(jochen): remove after http://crbug.com/381820 is resolved.
CHECK_LT(0, delta);
- bytes_to_process -= delta;
+ bytes_processed += delta;
}
+ return bytes_processed;
}
write_barriers_invoked_since_last_step_ = 0;
bytes_scanned_ += bytes_to_process;
+ intptr_t bytes_processed = 0;
if (state_ == SWEEPING) {
if (heap_->mark_compact_collector()->sweeping_in_progress() &&
StartMarking(PREVENT_COMPACTION);
}
} else if (state_ == MARKING) {
- ProcessMarkingDeque(bytes_to_process);
+ bytes_processed = ProcessMarkingDeque(bytes_to_process);
if (marking_deque_.IsEmpty()) MarkingComplete(action);
}
double end = base::OS::TimeCurrentMillis();
double duration = (end - start);
- heap_->tracer()->AddIncrementalMarkingStep(duration, allocated_bytes);
+ // Note that we report zero bytes here when sweeping was in progress or
+ // when we just started incremental marking. In these cases we did not
+ // process the marking deque.
+ heap_->tracer()->AddIncrementalMarkingStep(duration, bytes_processed);
heap_->AddMarkingTime(duration);
}
}