[9] RFR (S): 8133612: new clone logic added in 8042235 is missing from compiler intrinsics

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Dec 16 16:55:16 UTC 2015


http://cr.openjdk.java.net/~vlivanov/8133612/webrev.00
https://bugs.openjdk.java.net/browse/JDK-8133612

MemberName instances should be properly registered in the JVM to support 
class redefinition. JVM_Clone has special logic to do so, but C2 
intrinsic doesn't.

The proposed fix is to always call into JVM when cloning MemberNames. It 
is achieved by changing JVM_ACC_IS_CLONEABLE flag meaning and setting it 
only on classes which don't require any additional work when cloned. It 
allows to preserve exact intrinsic shape.

The downside is that before throwing CloneNotSupportedException, it is 
not enough to check JVM_ACC_IS_CLONEABLE anymore, but interface type 
check should be redone as well. Also, it affects MemberName case, which 
isn't performance critical.

The alternative would be to introduce 1 more guard on fast path 
(MemberName exact class check) which would affect all intrinsified cases.

Testing: manual (trivial test w/ -XX:+CountJVMCalls), JPRT.

Best regards,
Vladimir Ivanov


More information about the hotspot-compiler-dev mailing list