Skip to content
Permalink
Browse files
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 922e86f4ff28c7b17af8e7b5867a40fc76b7fdd7
Showing 40 changed files with 50 additions and 53 deletions.
@@ -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;)
}
@@ -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


@@ -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 },
@@ -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 \
@@ -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
@@ -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
*/
@@ -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
*/
@@ -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.
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -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
*/
@@ -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
@@ -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
*/
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -26,7 +26,7 @@
* @test
* @summary Regression test for JDK-8098821
* @bug 8098821
* @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
* @run driver SysDictCrash
@@ -26,7 +26,7 @@
* @test
* @summary Tests how CDS works when critical library classes are replaced with JVMTI ClassFileLoadHook
* @library /test/lib
* @requires vm.cds.archived.java.heap
* @requires vm.cds.write.archived.java.heap
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
* @run main/othervm/native ReplaceCriticalClassesForSubgraphs

1 comment on commit 922e86f

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 922e86f Sep 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.