RFR: 8274286: Skip null for make_referent_alive in referenceProcessor [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Wed Sep 29 12:39:42 UTC 2021


On Mon, 27 Sep 2021 18:05:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Answering my own question. Only G1 currently uses precleaning, and it looks fine wrto a concurrent clear. Indeed, I think it's an expensive nop. I suspect (though haven't thought about it carefully yet) that any GC that uses ReferenceProcessor would do nothing there, and I'm not sure preclean actually needs the keep-alive and complete-gc closures.
>
> @albertnetymk  pointed out that I was confused about what referent access we're dealing with in the assert.  That's the referent that was previously loaded and cached in the iterator.  But that just makes the assert confusing in my opinion.  There is nothing about make_referent_alive that depends on that precondition, and indeed the keep-alive function must *not* depend on it.  So I still think the assert should not be added.

My thought was that it can prevent the scenario of unintentionally introducing an expensive nop (marking null referent). Removed now.

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

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



More information about the hotspot-gc-dev mailing list