RFR: 8319376: ParallelGC: Forwarded objects found during heap inspection [v3]

Albert Mingkun Yang ayang at openjdk.org
Tue Nov 7 10:04:31 UTC 2023


On Mon, 6 Nov 2023 19:46:07 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Would the failed-promotion slide directly into full-GC which repairs it?

No, promotion-fail objects are specially handled, as documented in `PSPromotionManager::oop_promotion_failed`. Other successfully forwarded objects are essentially dead, so during a full garbage collection, they are skipped.

If a young garbage collection is successful, the eden/from space is cleared, which is why object iteration doesn't expose the "forwarded" markword.

The patch above is just intended to demonstrate a way of suppressing the assertion, but it's likely not the best or correct way to proceed.

Perhaps object-iteration logic in ParallelGC should skip those with the "forwarded" markword (because they are dead objs)? (This makes sense to me semantically, but I'm not sure about the potential consequences, given that object iteration is possibly used in many places.)

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

PR Comment: https://git.openjdk.org/jdk/pull/16494#issuecomment-1798184871


More information about the hotspot-gc-dev mailing list