RFR: 8234822: Limit ZGC jtreg-support to Windows 2019 Server
Erik Österlund
erik.osterlund at oracle.com
Wed Nov 27 07:56:25 UTC 2019
Hi Stefan,
I think your proposal is good enough. Getting a filter in place is urgent. Making the filter precise is not, and can easily be tweaked later on.
Looks good.
Thanks,
/Erik
> On 26 Nov 2019, at 18:25, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>
> Hi all,
>
> Please review this patch that makes sure we don't try to run ZGC on older Windows versions.
>
> https://cr.openjdk.java.net/~stefank/8234822/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8234822
>
> It causes @requires vm.gc.Z to filter out the test if run on older Windows version.
>
> It's a bit of a hack, since it checks against a hard-coded Windows version. It makes the implementation easy, and doesn't drag in new dependencies to sun.hotspot.gc.GC, but it's not as precise as it could be. I'd prefer to push the code in webrev.01, but if I get push-back an alternative would be to extend GCConfig and add ZGC specific checks, and add suitable code to ZGC:
>
> +bool GCConfig::is_gc_supported_on_os(CollectedHeap::Name name) {
> + if (name != CollectedHeap::Z) {
> + return true;
> + }
> +
> +#if INCLUDE_ZGC
> + if (ZInitialize::is_os_supported()) {
> + return true;
> + }
> +#endif
> +
> + return false;
> +}
>
> and call that from GCConfig::is_gc_supported.
>
> Thanks,
> StefanK
More information about the hotspot-gc-dev
mailing list