RFR: Preserve and restore original element count for card table barrier
William Kemper
wkemper at openjdk.java.net
Thu Aug 19 22:42:07 UTC 2021
The "pre-write" barrier for Generational Shenandoah was missing a bit of code to store away the original `count` of elements in the array being copied. As the array copy code decrements through the `count` it is reduced to zero. This caused the "post-write" barrier to believe we just copied an empty array and that it would be safe to skip card marking. This change preserves the original `count` in the prologue and restores it in the epilogue.
-------------
Commit messages:
- Preserve and restore original element count for card table barrier
Changes: https://git.openjdk.java.net/shenandoah/pull/59/files
Webrev: https://webrevs.openjdk.java.net/?repo=shenandoah&pr=59&range=00
Stats: 33 lines in 1 file changed: 26 ins; 6 del; 1 mod
Patch: https://git.openjdk.java.net/shenandoah/pull/59.diff
Fetch: git fetch https://git.openjdk.java.net/shenandoah pull/59/head:pull/59
PR: https://git.openjdk.java.net/shenandoah/pull/59
More information about the shenandoah-dev
mailing list