Skip to content

8357143: New test AOTCodeCompressedOopsTest.java fails on platforms without AOT Code Cache support #25272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/hotspot/jtreg/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ requires.properties= \
vm.cds \
vm.cds.custom.loaders \
vm.cds.supports.aot.class.linking \
vm.cds.supports.aot.code.caching \
vm.cds.write.archived.java.heap \
vm.continuations \
vm.jvmti \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
/**
* @test
* @summary Sanity test of AOT Code Cache with compressed oops configurations
* @requires vm.cds
* @requires vm.cds.supports.aot.class.linking
* @requires vm.cds.supports.aot.code.caching
* @requires vm.flagless
* @requires !vm.jvmci.enabled
* @library /test/lib /test/setup_aot
* @build AOTCodeCompressedOopsTest JavacBenchApp
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@
/**
* @test
* @summary Sanity test of combinations of the AOT Code Caching diagnostic flags
* @requires vm.cds
* @requires vm.cds.supports.aot.class.linking
* @requires vm.flavor != "zero"
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* @requires vm.cds.supports.aot.code.caching
* @requires vm.flagless
* @comment work around JDK-8345635
* @requires !vm.jvmci.enabled
* @library /test/lib /test/setup_aot
* @build AOTCodeFlags JavacBenchApp
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar
Expand Down
15 changes: 15 additions & 0 deletions test/jtreg-ext/requires/VMProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public Map<String, String> call() {
map.put("vm.cds", this::vmCDS);
map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders);
map.put("vm.cds.supports.aot.class.linking", this::vmCDSSupportsAOTClassLinking);
map.put("vm.cds.supports.aot.code.caching", this::vmCDSSupportsAOTCodeCaching);
map.put("vm.cds.write.archived.java.heap", this::vmCDSCanWriteArchivedJavaHeap);
map.put("vm.continuations", this::vmContinuations);
// vm.graal.enabled is true if Graal is used as JIT
Expand Down Expand Up @@ -472,6 +473,20 @@ protected String vmCDSSupportsAOTClassLinking() {
return vmCDSCanWriteArchivedJavaHeap();
}

/**
* @return true if this VM can support the AOT Code Caching
*/
protected String vmCDSSupportsAOTCodeCaching() {
if ("true".equals(vmCDSSupportsAOTClassLinking()) &&
!"zero".equals(vmFlavor()) &&
"false".equals(vmJvmciEnabled()) &&
(Platform.isX64() || Platform.isAArch64())) {
return "true";
} else {
return "false";
}
}

/**
* @return true if the VM options specified via the "test.cds.runtime.options"
* property is compatible with writing Java heap objects into the CDS archive
Expand Down