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

Unified Diff: runtime/vm/compiler.cc

Issue 12321111: Add machine readable markers around code and flow graph output printed for --print-flow-graph and -… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 149691b14b5ce0c5a6b994d2a37f287a0943c81a..4513bae19dc6d135585096a2d08a158efffad40d 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -112,6 +112,14 @@ static void InstallUnoptimizedCode(const Function& function) {
}
+static void PrintGraph(const char* phase, FlowGraph* flow_graph) {
+ OS::Print("*** BEGIN CFG\n%s\n", phase);
+ FlowGraphPrinter printer(*flow_graph);
+ printer.PrintBlocks();
+ OS::Print("*** END CFG\n");
+}
+
+
// Return false if bailed out.
static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
bool optimized) {
@@ -164,9 +172,7 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
if (FLAG_print_flow_graph ||
(optimized && FLAG_print_flow_graph_optimized)) {
- OS::Print("Before Optimizations\n");
- FlowGraphPrinter printer(*flow_graph);
- printer.PrintBlocks();
+ PrintGraph("Before Optimizations", flow_graph);
}
if (optimized) {
@@ -257,9 +263,7 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
allocator.AllocateRegisters();
if (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized) {
- OS::Print("After Optimizations:\n");
- FlowGraphPrinter printer(*flow_graph);
- printer.PrintBlocks();
+ PrintGraph("After Optimizations", flow_graph);
}
}
@@ -513,7 +517,9 @@ static RawError* CompileFunctionHelper(const Function& function,
DisassembleCode(function, optimized);
} else if (FLAG_disassemble_optimized && optimized) {
// TODO(fschneider): Print unoptimized code along with the optimized code.
+ OS::Print("*** BEGIN CODE\n");
DisassembleCode(function, true);
+ OS::Print("*** END CODE\n");
}
isolate->set_long_jump_base(base);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698