RFR: 8187033: [PPC] Imporve performance of ObjectStreamClass.getClassDataLayout()

Peter Levart peter.levart at gmail.com
Mon Sep 4 08:06:21 UTC 2017

Hi Ogata,

On 09/04/2017 07:20 AM, Kazunori Ogata wrote:
> 4) Put reference to ClassDataSlot[] into a final field of an object, read
> the final field immediately after the object creation, and store it to
> non-volatile dataLayout.  I think this is also correct based on the
> semantics of final fields and data dependency.
>    Webrev:http://cr.openjdk.java.net/~horii/8187033/webrev.01-final2/

I'm sure others will tell you that final field semantics only works 
across threads when you also read the final field in the other thread 
from the thread that writes to it. Storing and reading the final field 
in the same thread won't help order the write to a non final field after 
writes that precede it in program order nor to order the read of a 
non-final field in the other thread before reads that follow it in 
program order.

Regards, Peter

More information about the core-libs-dev mailing list