RFR: 8286830: ~HandshakeState should not touch oops

Patricio Chilano Mateo pchilanomate at openjdk.java.net
Thu May 26 18:23:35 UTC 2022


On Thu, 26 May 2022 07:00:35 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Hi Patricio,
> 
> I've had a much closer look at the details and have been surprised at how "loose" the coordination between handshakes and thread termination actually is. It would be good, IMO, if there was a point (like setting is_exiting) where you knew that once that was reached a thread would have zero interaction with handshakes and could delete everything handshake related if you wanted to.
> 
> The fact that the acquisition of the Threads_lock in Threads::remove might process any handshake certainly complicates things. I think, at a minimum, it would be preferable if we actually checked _is_exiting in that polling/checking logic so that we knew no further handshakes could be executed once _is_exiting is true - rather than placing the check in the operation (e.g. in install_async_exception()). That still relies on your changes for the destroy_vm case of course.
> 
> So future RFE's aside everything you are doing seems fine and reasonable. Thanks for your patience walking me through this one.
>
Thanks for the review David! I'll make sure to wait until Dan comes back next week before integrating since he might also want to take a look.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8795


More information about the hotspot-runtime-dev mailing list