# HG changeset patch # User Thomas Wuerthinger # Date 1293478380 -3600 # Node ID b7fb5f1e0747a2d8248883530fb9b9460d24d662 # Parent 1aa5b22a77166f35fa085554146593c8939a4e65 Two new flags: -XX:MaxCompilationID (to enable debugging binary search for problematic method) and -XX:C1XBailoutIsFatal. diff -r 1aa5b22a7716 -r b7fb5f1e0747 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java --- 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 diff -r 1aa5b22a7716 -r b7fb5f1e0747 src/share/vm/c1/c1_globals.hpp --- 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, \ diff -r 1aa5b22a7716 -r b7fb5f1e0747 src/share/vm/c1x/c1x_VMEntries.cpp --- 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"); } diff -r 1aa5b22a7716 -r b7fb5f1e0747 src/share/vm/compiler/compileBroker.cpp --- 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); diff -r 1aa5b22a7716 -r b7fb5f1e0747 src/share/vm/runtime/globals.hpp --- 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") \ \ diff -r 1aa5b22a7716 -r b7fb5f1e0747 src/share/vm/runtime/stackValue.cpp --- 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("");