RFR: JDK-8240224 Allow building hotspot without the serial gc
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Mar 10 14:51:54 UTC 2020
On 2020-03-09 10:10, David Holmes wrote:
> Hi Magnus,
>
> On 9/03/2020 6:30 pm, Magnus Ihse Bursie wrote:
>> When reworking the JVM feature handling, I wanted to try to compile
>> Hotspot with various features enabled/disabled. I quickly found out
>> that it's not really possible to build hotspot without the serial gc.
>> While this is not a terribly important use case, I think it's good to
>> be able to select serial freely, just as with the other collectors.
>
> Really not sure this is a worthwhile exercise.
While I agree that it is not very much important per se to build Hotspot
without the Serial GC, I do want to make sure that we uphold the promise
that configure fails early if you try to build with invalid options.
So it's either not allowing configure to let you to build without the
Serial GC, or it's fixing Hotspot so that it can build without it. My
judgement was that the fixes required to make this work was minimal,
without any impact to scenarios that *do* include Serial GC, and thus it
was "worthwile" to fix this in Hotspot, rather than to make a limitation
in the configure script.
>> With this patch it is possible to build a truly minimal JVM using
>> 'configure --with-jvm-variants=custom --with-jvm-features=g1gc'.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8240224
>> WebRev:
>> http://cr.openjdk.java.net/~ihse/JDK-8240224-building-without-serial-gc/webrev.01
>
>
> make/ModuleTools.gmk
>
> ! TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA)
> $(JAVA_FLAGS_SMALL_BUILDJDK) \
>
> that should be BUILDJDK_JAVA_FLAGS_SMALL.
Good catch! I renamed this at the very last moment, but missed this. :-(
>
>
> make/RunTestsPrebuiltSpec.gmk
> make/autoconf/boot-jdk.m4
>
> ! BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
>
> Depending on the default GC those -Xms and -Xmx settings may not be
> valid/possible.
Eh, okaaaay, this is not really something new, we're already setting
this for the buildjdk. The only difference is that we mis-used the
JAVA_FLAGS_SMALL variable, that was technically only valid for the
bootjdk. So we have not seen any issues with this in practice. I'm still
a bit worried though that you say that this might not work. How can the
-Xms/mx values be invalid?
>
> Other changes seem okay but I'll leave it for GC folk to comment on that.
Thanks for the review!
/Magnus
>
> Cheers,
> David
>
>
>>
>> /Magnus
More information about the build-dev
mailing list