RFR: 8343704: Bad GC parallelism with processing Cleaner queues [v4]

Brent Christian bchristi at openjdk.org
Wed Nov 13 20:00:28 UTC 2024


On Wed, 13 Nov 2024 08:16:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java line 300:
>> 
>>> 298:                 return true;
>>> 299:             }
>>> 300:         }
>> 
>> It looks like the new `PhantomCleanableList.remove()` puts 100% trust in the correctness of the PhantomCleanable's `index`.
>> 
>> What would you think of adding some sort of check/assert that `list.get(phc.index) == phc` ?
>
> Right, tracking indexes is the part of the algo. I added asserts in most important sites, `java/lang` still passes with `-esa`. Please take a look again.

Better - thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22043#discussion_r1841081278


More information about the core-libs-dev mailing list