diff src/share/vm/opto/compile.cpp @ 100:c7c777385a15

6667042: PrintAssembly option does not work without special plugin Summary: remove old private plugin interface, simplify, rework old plugin to use unchanged Gnu sources Reviewed-by: kvn, rasbold
author jrose
date Wed, 02 Apr 2008 12:09:59 -0700
parents 99269dbf4ba8
children ba764ed4b6f2
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp	Fri Mar 28 09:00:39 2008 -0700
+++ b/src/share/vm/opto/compile.cpp	Wed Apr 02 12:09:59 2008 -0700
@@ -456,7 +456,15 @@
   }
   TraceTime t1("Total compilation time", &_t_totalCompilation, TimeCompiler, TimeCompiler2);
   TraceTime t2(NULL, &_t_methodCompilation, TimeCompiler, false);
-  set_print_assembly(PrintOptoAssembly || _method->should_print_assembly());
+  bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly");
+  if (!print_opto_assembly) {
+    bool print_assembly = (PrintAssembly || _method->should_print_assembly());
+    if (print_assembly && !Disassembler::can_decode()) {
+      tty->print_cr("PrintAssembly request changed to PrintOptoAssembly");
+      print_opto_assembly = true;
+    }
+  }
+  set_print_assembly(print_opto_assembly);
 #endif
 
   if (ProfileTraps) {