RFR: 8327388: GenShen: census during marking is partial
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Mar 7 02:36:24 UTC 2024
There was a bug in the placement of the call to clear stale census data before starting a fresh one for a new marking cycle that marks through the younger generation. This bug resulted in the use of a co-terminal suffix of the census collection, losing all data from the earlier iterations of an iterative collection process that may run up to 5 times.
We stumbled upon the defect when working on a refactoring task involving separation of generational extensions of Shenandoah from its non-generational version. The (performance) defect has existed since day zero of the adaptive tenuring code in GenShen.
Along with fixing the defect, an assertion has been added to check the "reasonable completeness" of the census, which came in useful to detect a reset call inadvertently left behind in one place.
Some ShenandoahAgeCensus APIs have been narrowed and cleaned up a bit, and documentation clarified a bit more.
**Testing**: TBD
- [ ] GHA
- [ ] Code pipeline testing
- [ ] SpecJBB
**Performance**: TBD
In an early round of measurements, we saw no statistically significant change in performance (including with SPECjbb) -- we eyeballed the tenuring threshold values over a random pair of runs and didn't notice any differences either. A fresh round of tests will be done and updated here.
-------------
Commit messages:
- Remove local_reset of age_census object inadvertently left behind in the
- Avoid divide-by-zero.
- Merge branch 'master' into clear_census
- Fix word and byte size unit confusion in comparison/assert.
- Loose verification of "reasonable completeness" of census.
- Fix release build.
- Support for verification of census' reasonableness, but no verification
- ShenandoahGlobalGeneration also resets local age census data in
- Fix/elaborate some more documentation. Move age census reset to young
- Narrower public inerface; documentation.
- ... and 3 more: https://git.openjdk.org/shenandoah/compare/e9a1c699...be38e9e6
Changes: https://git.openjdk.org/shenandoah/pull/403/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=403&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327388
Stats: 167 lines in 11 files changed: 122 ins; 27 del; 18 mod
Patch: https://git.openjdk.org/shenandoah/pull/403.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/403/head:pull/403
PR: https://git.openjdk.org/shenandoah/pull/403
More information about the shenandoah-dev
mailing list