# HG changeset patch # User Thomas Wuerthinger # Date 1329849066 -3600 # Node ID 9ae5048b915391a4d9086707baa952ce1b79a304 # Parent b06ade6e927c644d309e2b1fe2fa260d13456e58 Call uncommon_trap instead of fetch_unroll_info to correctly revoke biased locks on deopt. diff -r b06ade6e927c -r 9ae5048b9153 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Tue Feb 21 19:30:33 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Tue Feb 21 19:31:06 2012 +0100 @@ -94,7 +94,7 @@ /** * The frame state of the caller of the method performing the lock, or null if the outermost method * performs the lock. This information is used to compute the {@link CiFrame} that this lock belongs to. - * We cannot use the actual frame state of the locking method, because it is now unique for a method. The + * We cannot use the actual frame state of the locking method, because it is not unique for a method. The * caller frame states are unique, i.e., all frame states of inlined methods refer to the same caller frame state. */ public final FrameState callerState; diff -r b06ade6e927c -r 9ae5048b9153 src/cpu/x86/vm/sharedRuntime_x86_64.cpp --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Feb 21 19:30:33 2012 +0100 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Feb 21 19:31:06 2012 +0100 @@ -2702,12 +2702,18 @@ __ bind(L); } #endif // ASSERT + + __ movl(c_rarg1, (int32_t)(Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none))); __ mov(c_rarg0, r15_thread); - __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info))); + __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); + oop_maps->add_gc_map( __ pc()-start, map->deep_copy()); + + //__ reset_last_Java_frame(false, false); + //__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::fetch_unroll_info))); // Need to have an oopmap that tells fetch_unroll_info where to // find any register it might need. - oop_maps->add_gc_map(__ pc() - start, map); +// oop_maps->add_gc_map(__ pc() - start, map); __ reset_last_Java_frame(false, false); diff -r b06ade6e927c -r 9ae5048b9153 src/share/vm/runtime/deoptimization.cpp --- a/src/share/vm/runtime/deoptimization.cpp Tue Feb 21 19:30:33 2012 +0100 +++ b/src/share/vm/runtime/deoptimization.cpp Tue Feb 21 19:31:06 2012 +0100 @@ -19,7 +19,6 @@ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. - * */ #include "precompiled.hpp"