RFR: 8304144: G1: Remove unnecessary is_survivor check in G1ClearCardTableTask

Albert Mingkun Yang ayang at openjdk.org
Thu Mar 16 13:15:19 UTC 2023


On Wed, 15 Mar 2023 21:36:45 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>I'd suggest adding an assert that the region for which cards are being cleared is not a survivor region,

That check existed before https://bugs.openjdk.org/browse/JDK-6819061 (more than a decade ago), so can't really say what the original intention was.

Viewing it with fresh eyes, mentioning anything around "survivor" in this context is weird -- from the surrounding code one can not say whether the current region should or should not be a "survivor".

(For testing purposes, I added an assert there and it was never triggered.)

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

PR: https://git.openjdk.org/jdk/pull/13023


More information about the hotspot-gc-dev mailing list