RFR(S): 8238869: [lworld] C2's slow path allocation does not set the larval bit

Tobias Hartmann tobias.hartmann at oracle.com
Wed Feb 12 15:33:32 UTC 2020


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8238869
http://cr.openjdk.java.net/~thartmann/8238869/webrev.00/

C2's slow path allocation of a private inline type buffer (created via Unsafe.makePrivateBuffer)
does not set the larval bit. We didn't hit this yet because either the allocation fits in the TLAB
or all code is compiled/scalarized and no buffer is allocated.

I've fixed this by tagging the klass pointer passed to OptoRuntime::new_instance_C to mark a larval
buffer allocation. I also thought about doing this in the IR after the call but that turned out to
be quite complex and also might affect other optimizations.

Thanks,
Tobias


More information about the valhalla-dev mailing list