On 20/06/2024 6:48 pm, Julian Waters wrote:
Hi Sanne,

The reason the build fails when disabling SerialGC is due to the build
process explicitly calling the newly compiled Java with
-XX:+UseSerialGC to do small workloads. This is not a bug in the JVM,
but rather an unfortunate consequence of the way the build system is
structured. I believe you would need to patch out certain uses of
-XX:+UseSerialGC in the build process with -XX:+UseG1GC instead for
this to work, see for instance the following line that shows up during
configure:

checking flags for boot jdk java command for small workloads...
-XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1

I'm not sure whether it is a must to use SerialGC when compiling jmods
or doing other small workloads during the build process, but I'm
leaning towards it just being there to make the build more efficient

As Erik noted the issue is not the boot JDK (as the flag logic checks if the small flags are valid on that), but elsewhere that uses the "small flags" variable with the built JDK, without checking validity.

One possible simple workaround would be to add -XX:+IgnoreUnrecognizedVMOptions to the small flags so that -XX:+UseSerialGC does not cause an error and the default GC would be used instead.

Though as I put in the bug report I found a different error building the tests when I tried to build without SerialGC.

David
-----


best regards,
Julian

Reply via email to