On Tue, 26 Sep 2023 12:47:42 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

> This change makes WeakHandle and OopHandle release null out the obj pointer, 
> at the cost of making the release function non-const and some changes that 
> propagated from that.  This enables ObjectMonitor code to test for null to 
> see if the obj was already released, and seems like the right thing to do.  
> See comments from related PR in the bug report.
> Tested with tier1-4.

Not a full review yet, but it looks like it achieves the same as 
https://github.com/openjdk/jdk/pull/13721 but differently. I opened that PR 
then for other reasons, and it has been rejected then, on the grounds that 
those reasons are not valid (which I agree). Since then I have found at least 
one other use of the same cleaning mechanism, which is ZGC support for 
Lilliput, but we decided to follow another, better route (full obj->OM 
mapping). Maybe you find inspiration by that old PR ;-) It seems to get away 
with less intrusions in unrelated code.

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

PR Comment: https://git.openjdk.org/jdk/pull/15920#issuecomment-1735534464

Reply via email to