Integrated: 8298647: GenShen require heap size 2MB granularity

Stuart Monteith smonteith at openjdk.org
Tue Jan 24 00:42:41 UTC 2023


On Mon, 16 Jan 2023 21:41:35 GMT, Stuart Monteith <smonteith at openjdk.org> wrote:

> Generational Shenandoah requires 2MB granularity in order for card tables to cover the allocated heap. Each byte in a page of card table represents 512 heap bytes. As card tables are allocated 4KB at a time, 4KB * 512 = 2MB.
> 
> There is a circular dependency between the region calculations and the heap size calculations. This unconditionally rounds up the heap size to 2MB. It might be preferable to do this only when generational mode is enabled.
> 
> Running with:
>   java -Xlog:gc*=trace -XX:+UseShenandoahGC -mx495m \
>        -XX:ShenandoahGCMode=generational -version
> 
> on a debug build is sufficient to reproduce this problem.

This pull request has now been integrated.

Changeset: 800c0c88
Author:    Stuart Monteith <smonteith at openjdk.org>
Committer: William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/shenandoah/commit/800c0c884631ae5b9c265c43dad8a49a17a8ec09
Stats:     6 lines in 1 file changed: 6 ins; 0 del; 0 mod

8298647: GenShen require heap size 2MB granularity

Reviewed-by: wkemper

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

PR: https://git.openjdk.org/shenandoah/pull/202


More information about the shenandoah-dev mailing list