RFR: 8328235: GenShen: Robustify ShenandoahGCSession and fix missing use

Y. Srinivas Ramakrishna ysr at openjdk.org
Wed Mar 20 10:21:12 UTC 2024


On Fri, 15 Mar 2024 01:45:51 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

> ShenandoahGCSession is intended to create a scope where the ShenandoahHeap's _gc_cause and _gc_generation field reflect the current gc cycle. We now check that we do not overwrite existing non-default settings (respectively _no_gc and nullptr). The destructor of the scope/stack object also resets these fields to their default settings, ensuring intended uses. This uncovered a situation where the scope was not entered when it should have been, which we have now fixed. A case of flickering of active_generation() was identified, and found to be benign. An assert now checks for this situation. The code has been made robust wrt the flickering (seen only by mutators executing load barriers).
> 
> *Testing*:
> - [ ] code pipeline : in progress
> - [x] specjbb
> - [x] jtreg:hotspot_gc w/fastdebug
> - [x] GHA: existing failures unrelated to this change

A case of flickering of active_generation() was identified, and found to be benign. An assert now checks for this situation. The code has been made robust wrt the flickering.

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

PR Comment: https://git.openjdk.org/shenandoah/pull/407#issuecomment-2009203885


More information about the shenandoah-dev mailing list