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

Per Liden per.liden at oracle.com
Fri Jun 15 06:36:39 UTC 2018


On 2018-06-15 07:51, Aleksey Shipilev wrote:
> 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.
> 

Thanks for reviewing Aleksey. Dropping the auto-select part.

/Per

> -Aleksey
> 



More information about the hotspot-gc-dev mailing list