hotspot/src/share/vm/opto/compile.cpp
changeset 347 df859fcca515
parent 238 803c80713999
child 360 21d113ecbf6a
--- a/hotspot/src/share/vm/opto/compile.cpp	Fri Mar 28 09:00:39 2008 -0700
+++ b/hotspot/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) {