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

Side by Side Diff: runtime/vm/compiler.cc

Issue 905363002: Add --print-flow-graph-filter to allow filtering debugging output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 420 }
421 } 421 }
422 } 422 }
423 423
424 flow_graph = pipeline->BuildFlowGraph(parsed_function, 424 flow_graph = pipeline->BuildFlowGraph(parsed_function,
425 *ic_data_array, 425 *ic_data_array,
426 osr_id); 426 osr_id);
427 } 427 }
428 428
429 const bool print_flow_graph = 429 const bool print_flow_graph =
430 FLAG_print_flow_graph || 430 (FLAG_print_flow_graph ||
431 (optimized && FLAG_print_flow_graph_optimized); 431 (optimized && FLAG_print_flow_graph_optimized)) &&
432 FlowGraphPrinter::ShouldPrint(function);
432 433
433 if (print_flow_graph) { 434 if (print_flow_graph) {
434 if (osr_id == Isolate::kNoDeoptId) { 435 if (osr_id == Isolate::kNoDeoptId) {
435 FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph); 436 FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
436 } else { 437 } else {
437 FlowGraphPrinter::PrintGraph("For OSR", flow_graph); 438 FlowGraphPrinter::PrintGraph("For OSR", flow_graph);
438 } 439 }
439 } 440 }
440 441
441 BlockScheduler block_scheduler(flow_graph); 442 BlockScheduler block_scheduler(flow_graph);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 if (FLAG_trace_compiler) { 993 if (FLAG_trace_compiler) {
993 OS::Print("--> '%s' entry: %#" Px " size: %" Pd " time: %" Pd64 " us\n", 994 OS::Print("--> '%s' entry: %#" Px " size: %" Pd " time: %" Pd64 " us\n",
994 function.ToFullyQualifiedCString(), 995 function.ToFullyQualifiedCString(),
995 Code::Handle(function.CurrentCode()).EntryPoint(), 996 Code::Handle(function.CurrentCode()).EntryPoint(),
996 Code::Handle(function.CurrentCode()).Size(), 997 Code::Handle(function.CurrentCode()).Size(),
997 per_compile_timer.TotalElapsedTime()); 998 per_compile_timer.TotalElapsedTime());
998 } 999 }
999 1000
1000 isolate->debugger()->NotifyCompilation(function); 1001 isolate->debugger()->NotifyCompilation(function);
1001 1002
1002 if (FLAG_disassemble) { 1003 if (FLAG_disassemble && FlowGraphPrinter::ShouldPrint(function)) {
1003 DisassembleCode(function, optimized); 1004 DisassembleCode(function, optimized);
1004 } else if (FLAG_disassemble_optimized && optimized) { 1005 } else if (FLAG_disassemble_optimized &&
1006 optimized &&
1007 FlowGraphPrinter::ShouldPrint(function)) {
1005 // TODO(fschneider): Print unoptimized code along with the optimized code. 1008 // TODO(fschneider): Print unoptimized code along with the optimized code.
1006 OS::Print("*** BEGIN CODE\n"); 1009 OS::Print("*** BEGIN CODE\n");
1007 DisassembleCode(function, true); 1010 DisassembleCode(function, true);
1008 OS::Print("*** END CODE\n"); 1011 OS::Print("*** END CODE\n");
1009 } 1012 }
1010 1013
1011 return Error::null(); 1014 return Error::null();
1012 } else { 1015 } else {
1013 Error& error = Error::Handle(); 1016 Error& error = Error::Handle();
1014 // We got an error during compilation. 1017 // We got an error during compilation.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 const Object& result = 1209 const Object& result =
1207 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1210 PassiveObject::Handle(isolate->object_store()->sticky_error());
1208 isolate->object_store()->clear_sticky_error(); 1211 isolate->object_store()->clear_sticky_error();
1209 return result.raw(); 1212 return result.raw();
1210 } 1213 }
1211 UNREACHABLE(); 1214 UNREACHABLE();
1212 return Object::null(); 1215 return Object::null();
1213 } 1216 }
1214 1217
1215 } // namespace dart 1218 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698