Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index bdbfccd01d8ba8d1a3afcd7834f3bfcf718868e7..3219af70b61fb9285eaea8f4debbe3fa2329f3fc 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -427,7 +427,8 @@ void TraceSchedule(CompilationInfo* info, Schedule* schedule) { |
} |
if (FLAG_trace_turbo_graph || FLAG_trace_turbo_scheduler) { |
AllowHandleDereference allow_deref; |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "-- Schedule --------------------------------------\n" << *schedule; |
} |
} |
@@ -1434,7 +1435,8 @@ struct PrintGraphPhase { |
if (FLAG_trace_turbo_graph) { // Simple textual RPO. |
AllowHandleDereference allow_deref; |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "-- Graph after " << phase << " -- " << std::endl; |
os << AsRPO(*graph); |
} |
@@ -1467,7 +1469,8 @@ bool PipelineImpl::CreateGraph() { |
data->BeginPhaseKind("graph creation"); |
if (FLAG_trace_turbo) { |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "---------------------------------------------------\n" |
<< "Begin compiling method " << info()->GetDebugName().get() |
<< " using Turbofan" << std::endl; |
@@ -1833,7 +1836,8 @@ Handle<Code> PipelineImpl::GenerateCode(Linkage* linkage) { |
json_of << data->source_position_output(); |
json_of << "}"; |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "---------------------------------------------------\n" |
<< "Finished compiling method " << info()->GetDebugName().get() |
<< " using Turbofan" << std::endl; |
@@ -1884,7 +1888,8 @@ void PipelineImpl::AllocateRegisters(const RegisterConfiguration* config, |
Run<BuildLiveRangesPhase>(); |
if (FLAG_trace_turbo_graph) { |
AllowHandleDereference allow_deref; |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "----- Instruction sequence before register allocation -----\n" |
<< PrintableInstructionSequence({config, data->sequence()}); |
} |
@@ -1919,7 +1924,8 @@ void PipelineImpl::AllocateRegisters(const RegisterConfiguration* config, |
if (FLAG_trace_turbo_graph) { |
AllowHandleDereference allow_deref; |
- OFStream os(stdout); |
+ CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer()); |
+ OFStream os(tracing_scope.file()); |
os << "----- Instruction sequence after register allocation -----\n" |
<< PrintableInstructionSequence({config, data->sequence()}); |
} |