RFR: 8205064: Fail immediately if an unsupported GC is selected

Aleksey Shipilev shade at redhat.com
Fri Jun 15 05:51:50 UTC 2018


On 06/15/2018 12:15 AM, Roman Kennke wrote:
> Am 14.06.2018 um 22:34 schrieb Per Liden:
>> If an unsupported GC (i.e. a GC that is not built into the VM) is
>> selected by the user, the VM issues a warning and then continues and
>> (silently) selects a different GC. Aleksey brought this up on the ZGC
>> list [1]. I agree that this behavior seems dubious. With this patch we
>> instead fail immediately to avoid unnecessary confusion.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8205064
>> Webrev: http://cr.openjdk.java.net/~pliden/8205064/webrev.0

Thanks! Looks good, modulo the comment below:

> I am not sure I'd ever set Epsilon as default, but it's the last in
> line, i.e. selected when built *only* with Epsilon, is that right?
> Why not include CMS in that list? If I build with CMS and Epsilon, I get
> Epsilon selected?

Also, IIRC, if we do autoselect either ZGC or Epsilon, the argument checking would fail right away,
because we need to unlock them with UnlockExperimentalVMOptions first:

  experimental(bool, UseEpsilonGC, false,                                   \
          "Use the Epsilon (no-op) garbage collector")                      \
                                                                            \
  experimental(bool, UseZGC, false,                                         \
          "Use the Z garbage collector")                                    \
                                                                            \

I think we better avoid adding experimental GCs to auto-selection, and just leave
GCConfig::select_gc_ergonomically alone.

-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180615/8fbf4a04/signature.asc>


More information about the hotspot-gc-dev mailing list