Integrated: 8369068: GenShen: Generations still aren't reconciled assertion failure

William Kemper wkemper at openjdk.org
Thu Oct 23 19:09:58 UTC 2025


On Wed, 8 Oct 2025 19:26:19 GMT, William Kemper <wkemper at openjdk.org> wrote:

> There are certain code paths in Shenandoah's generational mode that need to _know_ which generation is being collected, but it is not possible to pass this information on the stack (barriers, for example). To address this, we introduced an `_active_generation` member in `ShenandoahHeap`. Over time, the usage of this field grew beyond its intended purpose and we began to have issues where not all threads would see a consistent value for this field. To address _this_ issue, we added another field `_gc_generation` which was only meant to be used by GC threads. At this point, we have three different ways to determine which generation is being collected: the _active_ generation, the _gc_ generation, and the usual function parameters and member fields of the gc components. This PR removes `_gc_generation` and reduces the use of `_active_generation` to only those places where it is not possible to get this information from other means (barriers, mostly). All GC components that can have th
 is information passed through function calls, now do so.

This pull request has now been integrated.

Changeset: b2e431a1
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/b2e431a1cb22b78eca396ac1d97e6c272de72aa9
Stats:     522 lines in 32 files changed: 121 ins; 161 del; 240 mod

8369068: GenShen: Generations still aren't reconciled assertion failure

Reviewed-by: ysr, kdnilsen

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

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


More information about the shenandoah-dev mailing list