[concurrency-interest] DirectByteBuffers and reachabilityFence

Vitaly Davidovich vitalyd at gmail.com
Wed Dec 9 21:10:32 EST 2015

sent from my phone
On Dec 9, 2015 4:01 PM, "Andrew Haley" <aph at redhat.com> wrote:
> On 12/09/2015 08:36 PM, Vitaly Davidovich wrote:
> >>
> >> Yes, you do increment the counter at each operation.  There has to be
> >> a use of the counter in the finalizer to keep it alive.
> >
> > Right, that's what I thought would need to happen, but then you made it
> > sound like only finalizer actually does something.  So here you have a
> > possible performance degradation ...
> Yes.  To be clear: I do not believe that a correct solution to
> this problem which has no performance degradation is possible.
> All we can do is minimize it.  With some fairly substantial
> compiler work we can get pretty close.

Stack slot and spilling the oop (and never reloading it of course) under
register pressure ought to be close to, if not, zero cost.  Of course the
compiler will need to be taught about this, but I don't see any serious
fundamental/technical impediments.

> Andrew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20151209/7e84722b/attachment.html>

More information about the Concurrency-interest mailing list