RFR: 8328235: GenShen: Robustify ShenandoahGCSession and fix missing use [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Wed Mar 20 10:21:11 UTC 2024
> 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
Y. Srinivas Ramakrishna has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Refine assertion further & modify comment block.
- Merge branch 'master' into active_generation
- jcheck cleanup.
- Weaken assertion so it passes for now; add comment.
- Clean up assertion checking for race.
- Read active_generetion() only once in is_is_active_generation() to work
around potential flicker; interlocking reads to detect flicker. Need
better checks.
- Robustify ShenandoahGCSession, and fix a missing use for
coalesce_and_fill of old gen.
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/407/files
- new: https://git.openjdk.org/shenandoah/pull/407/files/6663406a..a86d3edd
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=407&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=407&range=00-01
Stats: 1488 lines in 24 files changed: 668 ins; 670 del; 150 mod
Patch: https://git.openjdk.org/shenandoah/pull/407.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/407/head:pull/407
PR: https://git.openjdk.org/shenandoah/pull/407
More information about the shenandoah-dev
mailing list