Design question: why not reuse the CMS slots in mark word?
Christine Flood
chf at redhat.com
Tue Sep 20 11:28:32 UTC 2016
Here's some recent work on the cost of barriers in GC.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.231.3040&rep=rep1&type=pdf
You can see that a conditional read barrier is three times as expensive as a non-conditional read barrier. Roman didn't believe me and insisted on testing it for himself and found the same result empirically ;-)
Christine
----- Original Message -----
> From: "Aleksey Shipilev" <shade at redhat.com>
> To: "Christine Flood" <chf at redhat.com>
> Cc: shenandoah-dev at openjdk.java.net
> Sent: Tuesday, September 20, 2016 4:53:36 AM
> Subject: Re: Design question: why not reuse the CMS slots in mark word?
>
> On 09/19/2016 11:00 PM, Christine Flood wrote:
> > The theory was to make the read barrier as efficient as possible.
> > It's always just a single read of a fixed offset. If we tried to
> > reuse the mark word we'd have to deal with locked objects and hash
> > codes and all that nonsense potentially making read barriers much
> > more expensive.
> >
> > If you have a protocol that uses the mark word and doesn't introduce
> > extra overhead in the common case (a conditional in a read barrier
> > would be deadly) I'd love to hear it.
>
> Okay, that makes sense, thanks.
>
> Is this a hunch about the read barriers cost, or we actually tried more
> complicated read barriers? Trying to understand if potentially worth
> investigating, or this road was taken already.
>
> Thanks,
> -Aleksey
>
>
More information about the shenandoah-dev
mailing list