< prev index next >

test/jtreg-ext/requires/VMProps.java

Print this page

105         map.put("vm.simpleArch", this::vmArch);
106         map.put("vm.debug", this::vmDebug);
107         map.put("vm.jvmci", this::vmJvmci);
108         map.put("vm.jvmci.enabled", this::vmJvmciEnabled);
109         map.put("vm.emulatedClient", this::vmEmulatedClient);
110         // vm.hasSA is "true" if the VM contains the serviceability agent
111         // and jhsdb.
112         map.put("vm.hasSA", this::vmHasSA);
113         // vm.hasJFR is "true" if JFR is included in the build of the VM and
114         // so tests can be executed.
115         map.put("vm.hasJFR", this::vmHasJFR);
116         map.put("vm.hasDTrace", this::vmHasDTrace);
117         map.put("vm.jvmti", this::vmHasJVMTI);
118         map.put("vm.cpu.features", this::cpuFeatures);
119         map.put("vm.pageSize", this::vmPageSize);
120         map.put("vm.rtm.cpu", this::vmRTMCPU);
121         map.put("vm.rtm.compiler", this::vmRTMCompiler);
122         // vm.cds is true if the VM is compiled with cds support.
123         map.put("vm.cds", this::vmCDS);
124         map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders);

125         map.put("vm.cds.write.archived.java.heap", this::vmCDSCanWriteArchivedJavaHeap);
126         map.put("vm.continuations", this::vmContinuations);
127         // vm.graal.enabled is true if Graal is used as JIT
128         map.put("vm.graal.enabled", this::isGraalEnabled);
129         // jdk.hasLibgraal is true if the libgraal shared library file is present
130         map.put("jdk.hasLibgraal", this::hasLibgraal);
131         // vm.libgraal.enabled is true if libgraal is used as JIT
132         map.put("vm.libgraal.enabled", this::isLibgraalEnabled);
133         map.put("vm.compiler1.enabled", this::isCompiler1Enabled);
134         map.put("vm.compiler2.enabled", this::isCompiler2Enabled);
135         map.put("docker.support", this::dockerSupport);
136         map.put("vm.musl", this::isMusl);
137         map.put("release.implementor", this::implementor);
138         map.put("jdk.containerized", this::jdkContainerized);
139         map.put("vm.flagless", this::isFlagless);
140         map.put("jdk.foreign.linker", this::jdkForeignLinker);
141         vmGC(map); // vm.gc.X = true/false
142         vmGCforCDS(map); // may set vm.gc
143         vmOptFinalFlags(map);
144 

449         return "" + WB.isCDSIncluded();
450     }
451 
452     /**
453      * Check for CDS support for custom loaders.
454      *
455      * @return true if CDS provides support for customer loader in the VM to be tested.
456      */
457     protected String vmCDSForCustomLoaders() {
458         return "" + ("true".equals(vmCDS()) && Platform.areCustomLoadersSupportedForCDS());
459     }
460 
461     /**
462      * @return true if this VM can write Java heap objects into the CDS archive
463      */
464     protected String vmCDSCanWriteArchivedJavaHeap() {
465         return "" + ("true".equals(vmCDS()) && WB.canWriteJavaHeapArchive()
466                      && isCDSRuntimeOptionsCompatible());
467     }
468 








469     /**
470      * @return true if the VM options specified via the "test.cds.runtime.options"
471      * property is compatible with writing Java heap objects into the CDS archive
472      */
473     protected boolean isCDSRuntimeOptionsCompatible() {
474         String jtropts = System.getProperty("test.cds.runtime.options");
475         if (jtropts == null) {
476             return true;
477         }
478         String CCP_DISABLED = "-XX:-UseCompressedClassPointers";
479         String G1GC_ENABLED = "-XX:+UseG1GC";
480         for (String opt : jtropts.split(",")) {
481             if (opt.equals(CCP_DISABLED)) {
482                 return false;
483             }
484             if (opt.startsWith(GC_PREFIX) && opt.endsWith(GC_SUFFIX) &&
485                 !opt.equals(G1GC_ENABLED)) {
486                 return false;
487             }
488         }

105         map.put("vm.simpleArch", this::vmArch);
106         map.put("vm.debug", this::vmDebug);
107         map.put("vm.jvmci", this::vmJvmci);
108         map.put("vm.jvmci.enabled", this::vmJvmciEnabled);
109         map.put("vm.emulatedClient", this::vmEmulatedClient);
110         // vm.hasSA is "true" if the VM contains the serviceability agent
111         // and jhsdb.
112         map.put("vm.hasSA", this::vmHasSA);
113         // vm.hasJFR is "true" if JFR is included in the build of the VM and
114         // so tests can be executed.
115         map.put("vm.hasJFR", this::vmHasJFR);
116         map.put("vm.hasDTrace", this::vmHasDTrace);
117         map.put("vm.jvmti", this::vmHasJVMTI);
118         map.put("vm.cpu.features", this::cpuFeatures);
119         map.put("vm.pageSize", this::vmPageSize);
120         map.put("vm.rtm.cpu", this::vmRTMCPU);
121         map.put("vm.rtm.compiler", this::vmRTMCompiler);
122         // vm.cds is true if the VM is compiled with cds support.
123         map.put("vm.cds", this::vmCDS);
124         map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders);
125         map.put("vm.cds.supports.aot.class.linking", this::vmCDSSupportsAOTClassLinking);
126         map.put("vm.cds.write.archived.java.heap", this::vmCDSCanWriteArchivedJavaHeap);
127         map.put("vm.continuations", this::vmContinuations);
128         // vm.graal.enabled is true if Graal is used as JIT
129         map.put("vm.graal.enabled", this::isGraalEnabled);
130         // jdk.hasLibgraal is true if the libgraal shared library file is present
131         map.put("jdk.hasLibgraal", this::hasLibgraal);
132         // vm.libgraal.enabled is true if libgraal is used as JIT
133         map.put("vm.libgraal.enabled", this::isLibgraalEnabled);
134         map.put("vm.compiler1.enabled", this::isCompiler1Enabled);
135         map.put("vm.compiler2.enabled", this::isCompiler2Enabled);
136         map.put("docker.support", this::dockerSupport);
137         map.put("vm.musl", this::isMusl);
138         map.put("release.implementor", this::implementor);
139         map.put("jdk.containerized", this::jdkContainerized);
140         map.put("vm.flagless", this::isFlagless);
141         map.put("jdk.foreign.linker", this::jdkForeignLinker);
142         vmGC(map); // vm.gc.X = true/false
143         vmGCforCDS(map); // may set vm.gc
144         vmOptFinalFlags(map);
145 

450         return "" + WB.isCDSIncluded();
451     }
452 
453     /**
454      * Check for CDS support for custom loaders.
455      *
456      * @return true if CDS provides support for customer loader in the VM to be tested.
457      */
458     protected String vmCDSForCustomLoaders() {
459         return "" + ("true".equals(vmCDS()) && Platform.areCustomLoadersSupportedForCDS());
460     }
461 
462     /**
463      * @return true if this VM can write Java heap objects into the CDS archive
464      */
465     protected String vmCDSCanWriteArchivedJavaHeap() {
466         return "" + ("true".equals(vmCDS()) && WB.canWriteJavaHeapArchive()
467                      && isCDSRuntimeOptionsCompatible());
468     }
469 
470     /**
471      * @return true if this VM can support the -XX:AOTClassLinking option
472      */
473     protected String vmCDSSupportsAOTClassLinking() {
474       // Currently, the VM supports AOTClassLinking as long as it's able to write archived java heap.
475       return vmCDSCanWriteArchivedJavaHeap();
476     }
477 
478     /**
479      * @return true if the VM options specified via the "test.cds.runtime.options"
480      * property is compatible with writing Java heap objects into the CDS archive
481      */
482     protected boolean isCDSRuntimeOptionsCompatible() {
483         String jtropts = System.getProperty("test.cds.runtime.options");
484         if (jtropts == null) {
485             return true;
486         }
487         String CCP_DISABLED = "-XX:-UseCompressedClassPointers";
488         String G1GC_ENABLED = "-XX:+UseG1GC";
489         for (String opt : jtropts.split(",")) {
490             if (opt.equals(CCP_DISABLED)) {
491                 return false;
492             }
493             if (opt.startsWith(GC_PREFIX) && opt.endsWith(GC_SUFFIX) &&
494                 !opt.equals(G1GC_ENABLED)) {
495                 return false;
496             }
497         }
< prev index next >