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

Unified Diff: src/compiler/pipeline.cc

Issue 786763002: Silence --trace-turbo a bit and behave graceful in sandbox. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | src/ostreams.cc » ('j') | 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 bc4c045f6fea9e689d9c64c6caf954d606ae283b..c8ce77e00f5df4c6ada56254a687b4a4b6d31f3b 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -251,7 +251,7 @@ struct TurboCfgFile : public std::ofstream {
static void TraceSchedule(Schedule* schedule) {
- if (!FLAG_trace_turbo) return;
+ if (!FLAG_trace_turbo_graph && !FLAG_trace_turbo_scheduler) return;
OFStream os(stdout);
os << "-- Schedule --------------------------------------\n" << *schedule;
}
@@ -646,6 +646,7 @@ struct PrintGraphPhase {
Vector<char> dot_filename(dot_buffer, sizeof(dot_buffer));
SNPrintF(dot_filename, "%s.dot", filename.start());
FILE* dot_file = base::OS::FOpen(dot_filename.start(), "w+");
+ if (dot_file == nullptr) return;
OFStream dot_of(dot_file);
dot_of << AsDOT(*graph);
fclose(dot_file);
@@ -656,6 +657,7 @@ struct PrintGraphPhase {
Vector<char> json_filename(json_buffer, sizeof(json_buffer));
SNPrintF(json_filename, "%s.json", filename.start());
FILE* json_file = base::OS::FOpen(json_filename.start(), "w+");
+ if (json_file == nullptr) return;
OFStream json_of(json_file);
json_of << AsJSON(*graph);
fclose(json_file);
@@ -818,7 +820,7 @@ Handle<Code> Pipeline::GenerateCode() {
if (FLAG_trace_turbo) {
OFStream os(stdout);
- os << "--------------------------------------------------\n"
+ os << "---------------------------------------------------\n"
<< "Finished compiling method " << GetDebugName(info()).get()
<< " using Turbofan" << std::endl;
}
@@ -982,7 +984,7 @@ void Pipeline::AllocateRegisters(const RegisterConfiguration* config,
Run<MeetRegisterConstraintsPhase>();
Run<ResolvePhisPhase>();
Run<BuildLiveRangesPhase>();
- if (FLAG_trace_turbo) {
+ if (FLAG_trace_turbo_graph) {
OFStream os(stdout);
PrintableInstructionSequence printable = {config, data->sequence()};
os << "----- Instruction sequence before register allocation -----\n"
@@ -1007,7 +1009,7 @@ void Pipeline::AllocateRegisters(const RegisterConfiguration* config,
Run<ResolveControlFlowPhase>();
Run<OptimizeMovesPhase>();
- if (FLAG_trace_turbo) {
+ if (FLAG_trace_turbo_graph) {
OFStream os(stdout);
PrintableInstructionSequence printable = {config, data->sequence()};
os << "----- Instruction sequence after register allocation -----\n"
« no previous file with comments | « no previous file | src/ostreams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698