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

Unified Diff: vm/flow_graph_builder.cc

Issue 10446116: Add flow graph printing into a .cfg file with flag --print-flow-graph-file. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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
« vm/dart.h ('K') | « vm/dart_api_impl.cc ('k') | vm/il_printer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_builder.cc
===================================================================
--- vm/flow_graph_builder.cc (revision 8145)
+++ vm/flow_graph_builder.cc (working copy)
@@ -2301,14 +2301,22 @@
GrowableArray<BitVector*> dominance_frontier;
ComputeDominators(&preorder_block_entries_, &parent, &dominance_frontier);
}
- if (FLAG_print_flow_graph) {
+ if (FLAG_print_flow_graph || (Dart::flow_graph_writer() != NULL)) {
intptr_t length = postorder_block_entries_.length();
GrowableArray<BlockEntryInstr*> reverse_postorder(length);
for (intptr_t i = length - 1; i >= 0; --i) {
reverse_postorder.Add(postorder_block_entries_[i]);
}
- FlowGraphPrinter printer(function, reverse_postorder);
- printer.PrintBlocks();
+ if (FLAG_print_flow_graph) {
+ // Print flow graph to stdout.
+ FlowGraphPrinter printer(function, reverse_postorder);
+ printer.PrintBlocks();
+ }
+ if (Dart::flow_graph_writer() != NULL) {
+ // Write flow graph to file.
+ FlowGraphVisualizer printer(function, reverse_postorder);
siva 2012/06/04 18:23:57 Over here this appears to be a per isolate object
+ printer.PrintFunction();
+ }
}
}
« vm/dart.h ('K') | « vm/dart_api_impl.cc ('k') | vm/il_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698