What is a structured locking in the JVM specification?
陈雨亭
chenyt at cs.sjtu.edu.cn
Wed May 17 21:08:14 UTC 2017
According to the definition, it seems that a structured locking appears
like: Monitorenter r0; …monitorenter r0; …; monitorexit r0; …monitorexit
r0;
* The definition is given as follows: Structured locking is the situation
when, during a method invocation, every exit on a given monitor matches a
preceding entry on that monitor.
(https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.11.10
)
I’m a little curious whether a structured locking can be composed by the
following instructions:
Monitorenter r0; monitorenter r2; …; monitorexit r0; monitorexit r2;
In addition, should this sequence be accepted or rejected? At runtime or
during the verification time?
Yuting
More information about the csr-discuss
mailing list