RFR: 8369068: GenShen: Generations still aren't reconciled assertion failure
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Oct 14 16:35:48 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.
Thanks. Lots of intricate work here.
-------------
Marked as reviewed by kdnilsen (Committer).
PR Review: https://git.openjdk.org/jdk/pull/27703#pullrequestreview-3336550852
More information about the shenandoah-dev
mailing list