Build fails when excluding Serial GC
Stefan Karlsson
stefan.karlsson at oracle.com
Fri Jan 29 10:19:04 UTC 2021
On 2021-01-29 10:49, Magnus Ihse Bursie wrote:
>
>
> On 2021-01-29 09:03, Yang Yi wrote:
>> Hi,
>>
>> It's quite easy to reproduce this problem:
>> ./configure --with-jvm-features=-serialgc ... ; make images
>>
>> I got the following output
>> ```
>> ...
>> === Output from failing command(s) repeated here ===
>> * For target hotspot_variant-server_libjvm_objs_genCollectedHeap.o:
>> /home/qingfeng.yy/openjdk16_so_warning/jdk/src/hotspot/share/gc/shared/genCollectedHeap.cpp:
>> In member function 'virtual void GenCollectedHeap::post_initialize()':
>> /home/qingfeng.yy/openjdk16_so_warning/jdk/src/hotspot/share/gc/shared/genCollectedHeap.cpp:206:3:
>> error: 'MarkSweep' has not been declared
>> 206 | MarkSweep::initialize();
>> | ^~~~~~~~~
>> * All command lines available in
>> /home/qingfeng.yy/openjdk16_so_warning/jdk/build/linux-x86_64-server-release/make-support/failure-logs.
>> === End of repeated output ===
>> ```
>> I found current JVM features contain the serial gc, but actually I
>> can not
>> build an image that does not contain serial gc. This problem has existed
>> from jdk 11 to jdk head. I am somewhat surprised, so I haven't filed an
>> issue on JBS. Is this really a bug? Or actually we should revise the
>> building
>> document and remove all INCLUDE_SERIALGC macros?
>
> About a year ago I opened
> https://bugs.openjdk.java.net/browse/JDK-8240224, to fix this (and
> other things). This caused quite a heated debate [1], and the result
> was that I closed the bug again.
>
> In summary, my understanding is that hotspot developers view the
> serialgc as essential, and that there exists no reason beyond toy
> applications to remove it from compilation. But furthermore the
> INCLUDE_SERIALGC macros should remain, even though they do not really
> work, since they function as markers of intent for the code. I don't
> agree 100% with this stance, but it's not my code to complain about. :-)
I think you got push back on some of the changes. To me and many others
the gcConfig.* changes were really controversial. It doesn't mean that
fixes to clean this up won't be accepted. In that mail thread, there was
a reference to this bug '8234502: Merge GenCollectedHeap and
SerialHeap'. Chipping away at that would be good. Fixing that would not
only make it possible to build without Serial GC, but also help with the
maintainability of our code.
StefanK
>
> Possibly, the configure script should be changed so it does not look
> like it's possible to exclude the serialgc...
>
> /Magnus
>
>
> [1]
> https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-March/028779.html
>
>>
>> Cheers,Yang Yi
>>
>
More information about the hotspot-gc-dev
mailing list