RFR: 8234822: Limit ZGC jtreg-support to Windows 2019 Server

Stefan Karlsson stefan.karlsson at oracle.com
Tue Nov 26 17:24:09 UTC 2019

Hi all,

Please review this patch that makes sure we don't try to run ZGC on 
older Windows versions.


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 (ZInitialize::is_os_supported()) {
+    return true;
+  }
+  return false;

and call that from GCConfig::is_gc_supported.


More information about the hotspot-gc-dev mailing list