8182755: [JVMCI] Deoptimization in synchronized methods can lead to a crash or exception when using EnableJVMCI but not UseJVMCICompiler
authorgdub
Fri, 10 Nov 2017 14:57:38 +0100
changeset 47823 9c77ebad8c3a
parent 47822 7437dc810834
child 47824 cf127be65014
8182755: [JVMCI] Deoptimization in synchronized methods can lead to a crash or exception when using EnableJVMCI but not UseJVMCICompiler Reviewed-by: kvn, thartmann
src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp
src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp	Fri Nov 10 13:10:54 2017 +0100
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp	Fri Nov 10 14:57:38 2017 +0100
@@ -472,7 +472,7 @@
 #if INCLUDE_JVMCI
   // Check if we need to take lock at entry of synchronized method.  This can
   // only occur on method entry so emit it only for vtos with step 0.
-  if (UseJVMCICompiler && state == vtos && step == 0) {
+  if (EnableJVMCI && state == vtos && step == 0) {
     Label L;
     __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
     __ cbz(rscratch1, L);
@@ -483,7 +483,7 @@
     __ bind(L);
   } else {
 #ifdef ASSERT
-    if (UseJVMCICompiler) {
+    if (EnableJVMCI) {
       Label L;
       __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
       __ cbz(rscratch1, L);
--- a/src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp	Fri Nov 10 13:10:54 2017 +0100
+++ b/src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp	Fri Nov 10 14:57:38 2017 +0100
@@ -319,7 +319,7 @@
 #if INCLUDE_JVMCI
   // Check if we need to take lock at entry of synchronized method.  This can
   // only occur on method entry so emit it only for vtos with step 0.
-  if (UseJVMCICompiler && state == vtos && step == 0) {
+  if (EnableJVMCI && state == vtos && step == 0) {
     Label L;
     Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
     __ ldbool(pending_monitor_enter_addr, Gtemp);  // Load if pending monitor enter
@@ -331,7 +331,7 @@
     __ bind(L);
   } else {
 #ifdef ASSERT
-    if (UseJVMCICompiler) {
+    if (EnableJVMCI) {
       Label L;
       Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
       __ ldbool(pending_monitor_enter_addr, Gtemp);  // Load if pending monitor enter
--- a/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp	Fri Nov 10 13:10:54 2017 +0100
+++ b/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp	Fri Nov 10 14:57:38 2017 +0100
@@ -257,7 +257,7 @@
 #if INCLUDE_JVMCI
   // Check if we need to take lock at entry of synchronized method.  This can
   // only occur on method entry so emit it only for vtos with step 0.
-  if ((UseJVMCICompiler || UseAOT) && state == vtos && step == 0) {
+  if ((EnableJVMCI || UseAOT) && state == vtos && step == 0) {
     Label L;
     __ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
     __ jcc(Assembler::zero, L);
@@ -270,7 +270,7 @@
     __ bind(L);
   } else {
 #ifdef ASSERT
-    if (UseJVMCICompiler) {
+    if (EnableJVMCI) {
       Label L;
       __ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
       __ jccb(Assembler::zero, L);