[concurrency-interest] DirectByteBuffers and reachabilityFence

Andrew Haley aph at redhat.com
Wed Dec 9 13:26:16 EST 2015

On 12/09/2015 05:23 PM, Gil Tene wrote:
>> On Dec 9, 2015, at 9:18 AM, Andrew Haley <aph at redhat.com> wrote:
>> On 12/09/2015 04:16 PM, Vitaly Davidovich wrote:
>>>> an implicit implication that 'this' must remain reachable until after the
>>>> last instruction in each of its instance methods
>>> Why wouldn't this work, at least as a compromise?
>> It would, but it would hurt performance because of increased register
>> pressure.
> Actually, it would only add a stack slot. And a spill into it if needed.

Hesitant as I am to argue with you, I'm not so sure.  There'd
definitely have to be a USE in order to keep the oop alive, and C2
would surely try not to spill the oop.  The USE would be at the end of
every method.  Unless there's some sort of "sink" node in the ideal
graph which keeps an oop alive but does not refill from a stack slot,
and I don't think there is.


More information about the Concurrency-interest mailing list