RFR 8225762 [lworld][c1] deoptimization fails with -XX:+StressValueTypeReturnedAsFields

Ioi Lam ioi.lam at oracle.com
Fri Jun 14 05:06:38 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8225762
http://cr.openjdk.java.net/~iklam/valhalla/8225762-c1-deopt-fails-with-StressValueTypeReturnedAsFields.v01/

Evaluation: with ValueTypeReturnedAsFields==true, when test14_interp 
returns a
value object, RAX contains (klass|0x1), and the fields of the value 
object is
stored in other registers. In the deoptimization handler of test14, it needs
to create a buffer object, in here:

http://hg.openjdk.java.net/valhalla/valhalla/file/fb97bb15ea8e/src/hotspot/share/runtime/deoptimization.cpp#l223

To handle this situation, when compiling test14(), C1 needs to set up the
ScopeDesc for the invocation to test14_interp(), such that 
ScopeDesc::return_oop()
and ScopeDesc::return_vt() both are true.


I added two new test case in TestCallingConvention.java that are similar 
to the
failed test14(), except that the call is made via a MethodHandle.

Thanks
- Ioi


More information about the valhalla-dev mailing list