Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8273522: Rename test property vm.cds.archived.java.heap to vm.cds.wri…
…te.archived.java.heap

Reviewed-by: minqi, ccheung, mseledtsov
  • Loading branch information
iklam committed Sep 10, 2021
1 parent f42b927 commit 922e86f
Show file tree
Hide file tree
Showing 40 changed files with 50 additions and 53 deletions.
1 change: 0 additions & 1 deletion src/hotspot/share/cds/heapShared.hpp
Expand Up @@ -155,7 +155,6 @@ class HeapShared: AllStatic {

// Can this VM write heap regions into the CDS archive? Currently only G1+compressed{oops,cp}
static bool can_write() {
assert(DumpSharedSpaces, "only when writing static archive");
CDS_JAVA_HEAP_ONLY(return (UseG1GC && UseCompressedOops && UseCompressedClassPointers);)
NOT_CDS_JAVA_HEAP(return false;)
}
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/prims/whitebox.cpp
Expand Up @@ -2001,8 +2001,8 @@ WB_ENTRY(jboolean, WB_IsJVMCISupportedByGC(JNIEnv* env))
#endif
WB_END

WB_ENTRY(jboolean, WB_IsJavaHeapArchiveSupported(JNIEnv* env))
return HeapShared::can_use();
WB_ENTRY(jboolean, WB_CanWriteJavaHeapArchive(JNIEnv* env))
return HeapShared::can_write();
WB_END


Expand Down Expand Up @@ -2640,7 +2640,7 @@ static JNINativeMethod methods[] = {
{CC"isJFRIncluded", CC"()Z", (void*)&WB_IsJFRIncluded },
{CC"isC2OrJVMCIIncluded", CC"()Z", (void*)&WB_isC2OrJVMCIIncluded },
{CC"isJVMCISupportedByGC", CC"()Z", (void*)&WB_IsJVMCISupportedByGC},
{CC"isJavaHeapArchiveSupported", CC"()Z", (void*)&WB_IsJavaHeapArchiveSupported },
{CC"canWriteJavaHeapArchive", CC"()Z", (void*)&WB_CanWriteJavaHeapArchive },
{CC"cdsMemoryMappingFailed", CC"()Z", (void*)&WB_CDSMemoryMappingFailed },

{CC"clearInlineCaches0", CC"(Z)V", (void*)&WB_ClearInlineCaches },
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/TEST.ROOT
Expand Up @@ -67,7 +67,7 @@ requires.properties= \
vm.rtm.compiler \
vm.cds \
vm.cds.custom.loaders \
vm.cds.archived.java.heap \
vm.cds.write.archived.java.heap \
vm.jvmti \
vm.graal.enabled \
vm.compiler1.enabled \
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/SharedStrings.java
Expand Up @@ -25,7 +25,7 @@
* @test
* @summary Check to make sure that shared strings in the bootstrap CDS archive
* are actually shared
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.flagless
* @library /test/lib
* @build SharedStringsWb sun.hotspot.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/SharedStringsDedup.java
Expand Up @@ -24,7 +24,7 @@
/**
* @test SharedStringsDedup
* @summary Test -Xshare:auto with shared strings and -XX:+UseStringDeduplication
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib
* @run driver SharedStringsDedup
*/
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/SharedStringsRunAuto.java
Expand Up @@ -24,7 +24,7 @@
/**
* @test SharedStringsAuto
* @summary Test -Xshare:auto with shared strings.
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib
* @run driver SharedStringsRunAuto
*/
Expand Down
Expand Up @@ -24,7 +24,7 @@

/*
* @test CommandLineFlagCombo
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set
* via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed
* vm options.
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test primitive box caches integrity in various scenarios (IntegerCache etc)
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
* @compile CheckIntegerCacheApp.java
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test archived system module sub-graph and verify objects are archived.
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
* @compile CheckArchivedModuleApp.java
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Compare archived system modules with non-archived.
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @compile PrintSystemModulesApp.java
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar app.jar PrintSystemModulesApp
Expand Down
Expand Up @@ -24,7 +24,7 @@
/*
* @test
* @summary Test archived module graph with custom runtime image
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.flagless
* @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test archived mirror
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.cds.custom.loaders
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test automatic relocation of archive heap regions dur to heap size changes.
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @compile ../test-classes/Hello.java
* @build sun.hotspot.WhiteBox
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,7 +26,7 @@
* @test
* @summary Dump time should not crash if any class with shared strings fails verification due to missing dependencies.
* @bug 8186789
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @compile MyOuter.java MyException.java
* @run driver DumpTimeVerifyFailure
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @key randomness
* @summary
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox jdk.test.lib.Utils
* @compile GCStressApp.java
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @summary Relocate CDS archived regions to the top of the G1 heap
* @bug 8214455
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires (sun.arch.data.model == "64" & os.maxMemory > 4g)
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HeapFragmentationApp
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test archived mirror with reference fields
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
* @compile MirrorWithReferenceFieldsApp.java
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,7 +25,7 @@
/*
* @test
* @summary Test open archive heap regions
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set
* via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed
* vm options.
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test archived primitive type mirrors
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
* @compile PrimitiveTypesApp.java
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @summary Redefine shared class. GC should not cause crash with cached resolved_references.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes /test/hotspot/jtreg/runtime/cds/appcds/jvmti
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.jvmti
* @build sun.hotspot.WhiteBox
* RedefineClassApp
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @summary Out of memory When dumping the CDS archive
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.jvmti
* @run driver ExceptionDuringDumpAtObjectsInitPhase
*/
Expand Down
Expand Up @@ -27,7 +27,7 @@
* @summary Similar to GCDuringDumping.java, this test adds the -XX:SharedArchiveConfigFile
* option for testing the interaction with GC and shared strings.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.jvmti
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @summary Test how CDS dumping handles the existence of humongous G1 regions.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.jvmti
* @run driver/timeout=240 HumongousDuringDump
*/
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Exercise GC with shared strings
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloStringGC sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -25,7 +25,7 @@
/**
* @test
* @summary Test relevant combinations of command line flags with shared strings
* @requires vm.cds.archived.java.heap & vm.hasJFR
* @requires vm.cds.write.archived.java.heap & vm.hasJFR
* @requires vm.gc == null
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
Expand All @@ -36,7 +36,7 @@
* @test
* @summary Test relevant combinations of command line flags with shared strings
* @comment A special test excluding the case that requires JFR
* @requires vm.cds.archived.java.heap & !vm.hasJFR
* @requires vm.cds.write.archived.java.heap & !vm.hasJFR
* @requires vm.gc == null
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
Expand Down
Expand Up @@ -31,7 +31,7 @@
* @test
* @summary Test options that are incompatible with use of shared strings
* Also test mismatch in oops encoding between dump time and run time
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set
* via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed
* vm options.
Expand All @@ -46,7 +46,7 @@

/*
* @test
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires (vm.gc=="null")
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
Expand All @@ -57,7 +57,7 @@

/*
* @test
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires (vm.gc=="null")
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test shared strings together with string intern operation
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @compile InternStringTest.java
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,7 +25,7 @@
/*
* @test
* @summary Check most common errors in file format
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
* @run driver InvalidFileFormat
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Basic shared string test with large pages
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Test locking on shared strings
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @compile LockStringTest.java LockStringValueTest.java
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Basic test for shared strings
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloString
* @run driver SharedStringsBasic
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Basic plus test for shared strings
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloStringPlus sun.hotspot.WhiteBox
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @test
* @summary Use a shared string allocated in a humongous G1 region.
* @comment -- the following implies that G1 is used (by command-line or by default)
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
*
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloString
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary Write a lots of shared strings.
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloString
* @run driver/timeout=500 SharedStringsStress
Expand Down
Expand Up @@ -25,7 +25,7 @@
/*
* @test
* @summary White box test for shared strings
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @requires vm.gc == null
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build sun.hotspot.WhiteBox SharedStringsWb