RFR: JDK-8266802: Shenandoah: Round up region size to page size unconditionally

Zhengyu Gu zgu at openjdk.java.net
Mon May 10 14:05:06 UTC 2021


On Mon, 10 May 2021 08:35:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Since JDK-8265239, runtime/os/TestTracePageSizes.java fails with Shenandoah like this:
> 
> 
> # Internal Error (/home/buildbot/worker/test-jdkX-linux/build/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp:156), pid=55712, tid=55720
> # assert(_num_regions == (max_byte_size / reg_size_bytes)) failed: Must match
> 
> 
> This is because Shenandoah region sizes are rounded up to page size only when `ShenandoahUncommit` is true. In the failing test configuration, `ShenandoahUncommit` is false, because Xmx == Xms.
> 
> Additional testing:
>  - [x] New regression test, now passes
>  - [x] `tier1` with Shenandoah

I filed JDK-8266740, that is related. I believe we should defer region count calculation after heap size adjustment to avoid miscalculating the value. Do you think we should consolidate the 2 CRs?

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

PR: https://git.openjdk.java.net/jdk/pull/3945



More information about the hotspot-gc-dev mailing list