Integrated: Preserve and restore original element count for card table barrier

William Kemper wkemper at openjdk.java.net
Fri Aug 20 21:21:00 UTC 2021


On Thu, 19 Aug 2021 22:36:39 GMT, William Kemper <wkemper at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 9f0f23b7
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.java.net/shenandoah/commit/9f0f23b719fd90387c4e735ced5b825c4d56ff92
Stats:     33 lines in 1 file changed: 26 ins; 6 del; 1 mod

Preserve and restore original element count for card table barrier

Reviewed-by: rkennke

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

PR: https://git.openjdk.java.net/shenandoah/pull/59


More information about the shenandoah-dev mailing list