changeset 1939:b7fb5f1e0747

Two new flags: -XX:MaxCompilationID (to enable debugging binary search for problematic method) and -XX:C1XBailoutIsFatal.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Mon, 27 Dec 2010 20:33:00 +0100
parents 1aa5b22a7716
children e92a9a73324e
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java src/share/vm/c1/c1_globals.hpp src/share/vm/c1x/c1x_VMEntries.cpp src/share/vm/compiler/compileBroker.cpp src/share/vm/runtime/globals.hpp src/share/vm/runtime/stackValue.cpp
diffstat 6 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java	Mon Dec 27 14:22:55 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java	Mon Dec 27 20:33:00 2010 +0100
@@ -52,8 +52,7 @@
         C1XOptions.IRChecking = false;
         C1XOptions.DetailedAsserts = false;
         C1XOptions.CommentedAssembly = true;
-        C1XOptions.MethodEndBreakpointGuards = 10;
-        C1XOptions.ZapStackOnMethodEntry = true;
+        C1XOptions.MethodEndBreakpointGuards = 2;
     }
 
     @Override
--- a/src/share/vm/c1/c1_globals.hpp	Mon Dec 27 14:22:55 2010 +0100
+++ b/src/share/vm/c1/c1_globals.hpp	Mon Dec 27 20:33:00 2010 +0100
@@ -29,6 +29,8 @@
                                                                             \
   product(bool, UseC1X, false,                                              \
           "Use C1X instead of C1")                                          \
+  product(bool, C1XBailoutIsFatal, true,                                    \
+          "Abort the VM on C1X bailout")                                    \
   product(bool, BootstrapC1X, false,                                        \
           "Bootstrap C1X before running Java main method")                  \
   product(intx, TraceC1X, 0,                                                \
--- a/src/share/vm/c1x/c1x_VMEntries.cpp	Mon Dec 27 14:22:55 2010 +0100
+++ b/src/share/vm/c1x/c1x_VMEntries.cpp	Mon Dec 27 20:33:00 2010 +0100
@@ -517,7 +517,7 @@
 
 // public void recordBailout(String reason);
 JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_recordBailout(JNIEnv *jniEnv, jobject) {
-  //fatal("Bailout in C1X");
+  if (C1XBailoutIsFatal) fatal("Bailout in C1X");
 }
 
 
--- a/src/share/vm/compiler/compileBroker.cpp	Mon Dec 27 14:22:55 2010 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Mon Dec 27 20:33:00 2010 +0100
@@ -1585,8 +1585,9 @@
   // Allocate a new set of JNI handles.
   push_jni_handle_block();
   jobject target_handle = JNIHandles::make_local(thread, JNIHandles::resolve(task->method_handle()));
-  int compilable = ciEnv::MethodCompilable;
-  {
+  int compilable = ciEnv::MethodCompilable_never;
+  if (MaxCompilationID == -1 || compile_id <= (uint)MaxCompilationID) {
+    compilable = ciEnv::MethodCompilable;
     int system_dictionary_modification_counter;
     {
       MutexLocker locker(Compile_lock, thread);
--- a/src/share/vm/runtime/globals.hpp	Mon Dec 27 14:22:55 2010 +0100
+++ b/src/share/vm/runtime/globals.hpp	Mon Dec 27 20:33:00 2010 +0100
@@ -728,6 +728,9 @@
   diagnostic(bool, LogCompilation, false,                                   \
           "Log compilation activity in detail to hotspot.log or LogFile")   \
                                                                             \
+  product(intx, MaxCompilationID, -1,                                       \
+          "All methods with greater compilation ID are skipped")            \
+                                                                            \
   product(bool, PrintCompilation, false,                                    \
           "Print compilations")                                             \
                                                                             \
--- a/src/share/vm/runtime/stackValue.cpp	Mon Dec 27 14:22:55 2010 +0100
+++ b/src/share/vm/runtime/stackValue.cpp	Mon Dec 27 20:33:00 2010 +0100
@@ -115,7 +115,7 @@
       }
 #endif
 #ifndef PRODUCT
-      if (!val->is_oop()) {
+      if (val != NULL && !val->is_oop()) {
         tty->print_cr("found wrong oop " INTPTR_FORMAT " at location:", val);
         sv->print();
         tty->print_cr("");