Report precise number of incrementally marked bytes to gc tracer.
BUG= R=ernstm@chromium.org Review URL: https://codereview.chromium.org/428263006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cd2a39e3ab
commit
6af92903bb
@ -280,8 +280,8 @@ void GCTracer::PrintNVP() const {
|
|||||||
PrintF("steps_count=%d ", current_.incremental_marking_steps);
|
PrintF("steps_count=%d ", current_.incremental_marking_steps);
|
||||||
PrintF("steps_took=%.1f ", current_.incremental_marking_duration);
|
PrintF("steps_took=%.1f ", current_.incremental_marking_duration);
|
||||||
PrintF("longest_step=%.1f ", current_.longest_incremental_marking_step);
|
PrintF("longest_step=%.1f ", current_.longest_incremental_marking_step);
|
||||||
PrintF("marking_throughput=%" V8_PTR_PREFIX "d ",
|
PrintF("incremental_marking_throughput=%" V8_PTR_PREFIX "d ",
|
||||||
MarkingSpeedInBytesPerMillisecond());
|
IncrementalMarkingSpeedInBytesPerMillisecond());
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintF("\n");
|
PrintF("\n");
|
||||||
@ -355,7 +355,7 @@ double GCTracer::MaxIncrementalMarkingDuration() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
intptr_t GCTracer::MarkingSpeedInBytesPerMillisecond() const {
|
intptr_t GCTracer::IncrementalMarkingSpeedInBytesPerMillisecond() const {
|
||||||
if (cumulative_incremental_marking_duration_ == 0.0) return 0;
|
if (cumulative_incremental_marking_duration_ == 0.0) return 0;
|
||||||
|
|
||||||
// We haven't completed an entire round of incremental marking, yet.
|
// We haven't completed an entire round of incremental marking, yet.
|
||||||
|
@ -252,7 +252,7 @@ class GCTracer BASE_EMBEDDED {
|
|||||||
|
|
||||||
// Compute the average incremental marking speed in bytes/second. Returns 0 if
|
// Compute the average incremental marking speed in bytes/second. Returns 0 if
|
||||||
// no events have been recorded.
|
// no events have been recorded.
|
||||||
intptr_t MarkingSpeedInBytesPerMillisecond() const;
|
intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Print one detailed trace line in name=value format.
|
// Print one detailed trace line in name=value format.
|
||||||
|
@ -677,9 +677,10 @@ void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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();
|
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();
|
HeapObject* obj = marking_deque_.Pop();
|
||||||
|
|
||||||
// Explicitly skip one word fillers. Incremental markbit patterns are
|
// Explicitly skip one word fillers. Incremental markbit patterns are
|
||||||
@ -693,8 +694,9 @@ void IncrementalMarking::ProcessMarkingDeque(intptr_t bytes_to_process) {
|
|||||||
int delta = (size - unscanned_bytes_of_large_object_);
|
int delta = (size - unscanned_bytes_of_large_object_);
|
||||||
// TODO(jochen): remove after http://crbug.com/381820 is resolved.
|
// TODO(jochen): remove after http://crbug.com/381820 is resolved.
|
||||||
CHECK_LT(0, delta);
|
CHECK_LT(0, delta);
|
||||||
bytes_to_process -= delta;
|
bytes_processed += delta;
|
||||||
}
|
}
|
||||||
|
return bytes_processed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -873,6 +875,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
|
|||||||
write_barriers_invoked_since_last_step_ = 0;
|
write_barriers_invoked_since_last_step_ = 0;
|
||||||
|
|
||||||
bytes_scanned_ += bytes_to_process;
|
bytes_scanned_ += bytes_to_process;
|
||||||
|
intptr_t bytes_processed = 0;
|
||||||
|
|
||||||
if (state_ == SWEEPING) {
|
if (state_ == SWEEPING) {
|
||||||
if (heap_->mark_compact_collector()->sweeping_in_progress() &&
|
if (heap_->mark_compact_collector()->sweeping_in_progress() &&
|
||||||
@ -884,7 +887,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
|
|||||||
StartMarking(PREVENT_COMPACTION);
|
StartMarking(PREVENT_COMPACTION);
|
||||||
}
|
}
|
||||||
} else if (state_ == MARKING) {
|
} else if (state_ == MARKING) {
|
||||||
ProcessMarkingDeque(bytes_to_process);
|
bytes_processed = ProcessMarkingDeque(bytes_to_process);
|
||||||
if (marking_deque_.IsEmpty()) MarkingComplete(action);
|
if (marking_deque_.IsEmpty()) MarkingComplete(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,7 +959,10 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
|
|||||||
|
|
||||||
double end = base::OS::TimeCurrentMillis();
|
double end = base::OS::TimeCurrentMillis();
|
||||||
double duration = (end - start);
|
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);
|
heap_->AddMarkingTime(duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ class IncrementalMarking {
|
|||||||
|
|
||||||
INLINE(void ProcessMarkingDeque());
|
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));
|
INLINE(void VisitObject(Map* map, HeapObject* obj, int size));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user