src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java
changeset 57537 ecc6e394475f
parent 54328 37648a9c4a6a
child 58299 6df94ce3ab2f
equal deleted inserted replaced
57536:67cce1b84a9a 57537:ecc6e394475f
   209             } else if (object instanceof ScheduleResult) {
   209             } else if (object instanceof ScheduleResult) {
   210                 cfgPrinter.printSchedule(message, (ScheduleResult) object);
   210                 cfgPrinter.printSchedule(message, (ScheduleResult) object);
   211             } else if (object instanceof StructuredGraph) {
   211             } else if (object instanceof StructuredGraph) {
   212                 if (cfgPrinter.cfg == null) {
   212                 if (cfgPrinter.cfg == null) {
   213                     StructuredGraph graph = (StructuredGraph) object;
   213                     StructuredGraph graph = (StructuredGraph) object;
   214                     cfgPrinter.cfg = ControlFlowGraph.compute(graph, true, true, true, false);
   214                     ScheduleResult scheduleResult = GraalDebugHandlersFactory.tryGetSchedule(debug, graph);
       
   215                     if (scheduleResult != null) {
       
   216                         cfgPrinter.cfg = scheduleResult.getCFG();
       
   217                     }
       
   218                 }
       
   219                 if (cfgPrinter.cfg != null) {
   215                     cfgPrinter.printCFG(message, cfgPrinter.cfg.getBlocks(), true);
   220                     cfgPrinter.printCFG(message, cfgPrinter.cfg.getBlocks(), true);
   216                 } else {
   221                 }
   217                     cfgPrinter.printCFG(message, cfgPrinter.cfg.getBlocks(), true);
       
   218                 }
       
   219 
       
   220             } else if (object instanceof CompilationResult) {
   222             } else if (object instanceof CompilationResult) {
   221                 final CompilationResult compResult = (CompilationResult) object;
   223                 final CompilationResult compResult = (CompilationResult) object;
   222                 cfgPrinter.printMachineCode(disassemble(codeCache, compResult, null), message);
   224                 cfgPrinter.printMachineCode(disassemble(codeCache, compResult, null), message);
   223             } else if (object instanceof InstalledCode) {
   225             } else if (object instanceof InstalledCode) {
   224                 CompilationResult compResult = debug.contextLookup(CompilationResult.class);
   226                 CompilationResult compResult = debug.contextLookup(CompilationResult.class);