Revision: 22776
Author: [email protected]
Date: Fri Aug 1 07:34:49 2014 UTC
Log: Report precise number of incrementally marked bytes to gc tracer.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/428263006
http://code.google.com/p/v8/source/detail?r=22776
Modified:
/branches/bleeding_edge/src/gc-tracer.cc
/branches/bleeding_edge/src/gc-tracer.h
/branches/bleeding_edge/src/incremental-marking.cc
/branches/bleeding_edge/src/incremental-marking.h
=======================================
--- /branches/bleeding_edge/src/gc-tracer.cc Mon Jul 28 15:01:57 2014 UTC
+++ /branches/bleeding_edge/src/gc-tracer.cc Fri Aug 1 07:34:49 2014 UTC
@@ -280,8 +280,8 @@
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");
@@ -355,7 +355,7 @@
}
-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.
=======================================
--- /branches/bleeding_edge/src/gc-tracer.h Mon Jul 28 14:48:53 2014 UTC
+++ /branches/bleeding_edge/src/gc-tracer.h Fri Aug 1 07:34:49 2014 UTC
@@ -252,7 +252,7 @@
// Compute the average incremental marking speed in bytes/second.
Returns 0 if
// no events have been recorded.
- intptr_t MarkingSpeedInBytesPerMillisecond() const;
+ intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const;
private:
// Print one detailed trace line in name=value format.
=======================================
--- /branches/bleeding_edge/src/incremental-marking.cc Mon Jul 28 14:48:53
2014 UTC
+++ /branches/bleeding_edge/src/incremental-marking.cc Fri Aug 1 07:34:49
2014 UTC
@@ -677,9 +677,10 @@
}
-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
@@ -693,8 +694,9 @@
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;
}
@@ -873,6 +875,7 @@
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() &&
@@ -884,7 +887,7 @@
StartMarking(PREVENT_COMPACTION);
}
} else if (state_ == MARKING) {
- ProcessMarkingDeque(bytes_to_process);
+ bytes_processed = ProcessMarkingDeque(bytes_to_process);
if (marking_deque_.IsEmpty()) MarkingComplete(action);
}
@@ -956,7 +959,10 @@
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);
}
}
=======================================
--- /branches/bleeding_edge/src/incremental-marking.h Thu Jul 24 11:16:01
2014 UTC
+++ /branches/bleeding_edge/src/incremental-marking.h Fri Aug 1 07:34:49
2014 UTC
@@ -202,7 +202,7 @@
INLINE(void ProcessMarkingDeque());
- INLINE(void ProcessMarkingDeque(intptr_t bytes_to_process));
+ INLINE(intptr_t ProcessMarkingDeque(intptr_t bytes_to_process));
INLINE(void VisitObject(Map* map, HeapObject* obj, int size));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.