Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 23762:a5a2ac8dfaba
Reduce the size of the deopt entry points in the interpreter
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 26 Sep 2016 13:54:28 -0700 |
parents | ca5c97226d1c |
children | 0e0a4ebf09d7 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Fri Sep 23 17:54:00 2016 +0200 +++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Mon Sep 26 13:54:28 2016 -0700 @@ -205,8 +205,9 @@ __ restore_bcp(); __ restore_locals(); #if INCLUDE_JVMCI - // Check if we need to take lock at entry of synchronized method. - { + // 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 (state == vtos && step == 0) { Label L; __ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0); __ jcc(Assembler::zero, L); @@ -217,6 +218,14 @@ // Take lock. lock_method(); __ bind(L); + } else { +#ifdef ASSERT + Label L; + __ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0); + __ jccb(Assembler::zero, L); + __ stop("unexpected pending monitor in deopt entry"); + __ bind(L); +#endif } #endif // handle exceptions