Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: src/compiler/pipeline.cc

Issue 2293413004: trace-turbo should respect --redirect-code-traces (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()});
}
« no previous file with comments | « src/compiler/instruction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698