RFR: 8367401: Parallel: Remove unused field in PSKeepAliveClosure

Albert Mingkun Yang ayang at openjdk.org
Thu Sep 11 12:53:42 UTC 2025


On Thu, 11 Sep 2025 12:33:13 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> You would crash immediately during development if you ever try to pass in a null object here.

Not immediately. The actual use of this field is in `do_oop_work`, which might not be invoked, if there are no objs that need to be kept alive. OTOH, the constructor is always invoked during young-gc. Therefore, this `assert` will catch the misuse more promptly.

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

PR Comment: https://git.openjdk.org/jdk/pull/27210#issuecomment-3280488312


More information about the hotspot-gc-dev mailing list