RFC: 8160369 - Memory fences needed around setting and reading object lengths

Andrew Haley aph at redhat.com
Thu Jun 30 08:34:32 UTC 2016

On 29/06/16 20:46, Derek White wrote:
> It might be a good idea to only do the memory barriers when the object 
> is in the old gen, but I'm not sure how the cost of testing this at 
> runtime compares to the cost of the barriers themselves.

Exactly.  The cost of a mispredicted branch at runtime isn't
necessarily less than that cost of a read fence.


More information about the hotspot-gc-dev mailing list