Commit 4fd954bb authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] More evacuation tracing

BUG=chromium:524425
LOG=N

Review URL: https://codereview.chromium.org/1807923004

Cr-Commit-Position: refs/heads/master@{#34861}
parent 7b9dca76
......@@ -676,6 +676,7 @@ DEFINE_INT(trace_allocation_stack_interval, -1,
DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space")
DEFINE_BOOL(trace_fragmentation_verbose, false,
"report fragmentation for old space (detailed)")
DEFINE_BOOL(trace_evacuation, false, "report evacuation statistics")
DEFINE_BOOL(trace_mutator_utilization, false,
"print mutator utilization, allocation speed, gc speed")
DEFINE_BOOL(weak_embedded_maps_in_optimized_code, true,
......
......@@ -524,7 +524,7 @@ void GCTracer::PrintNVP() const {
"evacuate=%.1f "
"evacuate.candidates=%.1f "
"evacuate.clean_up=%.1f "
"evacuate.new_space=%.1f "
"evacuate.copy=%.1f "
"evacuate.update_pointers=%.1f "
"evacuate.update_pointers.between_evacuated=%.1f "
"evacuate.update_pointers.to_evacuated=%.1f "
......@@ -590,7 +590,7 @@ void GCTracer::PrintNVP() const {
current_.scopes[Scope::MC_EVACUATE],
current_.scopes[Scope::MC_EVACUATE_CANDIDATES],
current_.scopes[Scope::MC_EVACUATE_CLEAN_UP],
current_.scopes[Scope::MC_EVACUATE_NEW_SPACE],
current_.scopes[Scope::MC_EVACUATE_COPY],
current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS],
current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED],
current_.scopes[Scope::MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED],
......
......@@ -112,7 +112,7 @@ class GCTracer {
MC_EVACUATE,
MC_EVACUATE_CANDIDATES,
MC_EVACUATE_CLEAN_UP,
MC_EVACUATE_NEW_SPACE,
MC_EVACUATE_COPY,
MC_EVACUATE_UPDATE_POINTERS,
MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED,
MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED,
......
......@@ -3053,6 +3053,14 @@ bool MarkCompactCollector::Evacuator::EvacuateSinglePage(
TimedScope timed_scope(&evacuation_time);
success = collector_->VisitLiveObjects(p, visitor, kClearMarkbits);
}
if (FLAG_trace_evacuation) {
PrintIsolate(heap()->isolate(),
"evacuation[%p]: page=%p new_space=%d executable=%d "
"live_bytes=%d time=%f\n",
this, p, p->InNewSpace(),
p->IsFlagSet(MemoryChunk::IS_EXECUTABLE), saved_live_bytes,
evacuation_time);
}
if (success) {
ReportCompactionProgress(evacuation_time, saved_live_bytes);
}
......@@ -3195,7 +3203,7 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
// Used for trace summary.
intptr_t compaction_speed = 0;
if (FLAG_trace_fragmentation) {
if (FLAG_trace_evacuation) {
compaction_speed = heap()->tracer()->CompactionSpeedInBytesPerMillisecond();
}
......@@ -3212,16 +3220,17 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
}
delete[] evacuators;
if (FLAG_trace_fragmentation) {
PrintIsolate(isolate(),
"%8.0f ms: compaction: parallel=%d pages=%d aborted=%d "
"wanted_tasks=%d tasks=%d cores=%d live_bytes=%" V8_PTR_PREFIX
"d compaction_speed=%" V8_PTR_PREFIX "d\n",
isolate()->time_millis_since_init(), FLAG_parallel_compaction,
job.NumberOfPages(), abandoned_pages, wanted_num_tasks,
job.NumberOfTasks(),
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads(),
live_bytes, compaction_speed);
if (FLAG_trace_evacuation) {
PrintIsolate(
isolate(),
"%8.0f ms: evacuation-summary: parallel=%s pages=%d aborted=%d "
"wanted_tasks=%d tasks=%d cores=%d live_bytes=%" V8_PTR_PREFIX
"d compaction_speed=%" V8_PTR_PREFIX "d\n",
isolate()->time_millis_since_init(),
FLAG_parallel_compaction ? "yes" : "no", job.NumberOfPages(),
abandoned_pages, wanted_num_tasks, job.NumberOfTasks(),
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads(),
live_bytes, compaction_speed);
}
}
......@@ -3460,7 +3469,7 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
{
GCTracer::Scope gc_scope(heap()->tracer(),
GCTracer::Scope::MC_EVACUATE_NEW_SPACE);
GCTracer::Scope::MC_EVACUATE_COPY);
EvacuationScope evacuation_scope(this);
EvacuateNewSpacePrologue();
......
......@@ -66,7 +66,7 @@ INTERESTING_OLD_GEN_KEYS="\
evacuate \
evacuate.candidates \
evacuate.clean_up \
evacuate.new_space \
evacuate.copy \
evacuate.update_pointers \
evacuate.update_pointers.between_evacuated \
evacuate.update_pointers.to_evacuated \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment