Skip to content
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
4 changes: 2 additions & 2 deletions src/hotspot/share/prims/whitebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ WB_ENTRY(jboolean, WB_IsJVMCISupportedByGC(JNIEnv* env))
#endif
WB_END

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

Expand Down Expand Up @@ -2585,7 +2585,7 @@ static JNINativeMethod methods[] = {
{CC"isDTraceIncluded", CC"()Z", (void*)&WB_IsDTraceIncluded },
{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
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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
Original file line number Diff line number Diff line change
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
* @library /test/lib
* @build SharedStringsWb jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/runtime/cds/SharedStringsDedup.java
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* @compile CheckIntegerCacheApp.java
Expand Down
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* @compile CheckArchivedModuleApp.java
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
* @library /test/jdk/lib/testlibrary /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build jdk.test.whitebox.WhiteBox
* @compile CheckArchivedModuleApp.java
Expand Down
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox jdk.test.lib.Utils
* @compile GCStressApp.java
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* @compile MirrorWithReferenceFieldsApp.java
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* @compile PrimitiveTypesApp.java
Expand Down
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* RedefineClassApp
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloStringGC jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
* @run driver FlagCombo
Expand All @@ -35,7 +35,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
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
* @run driver FlagCombo noJfr
Expand Down
Original file line number Diff line number Diff line change
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 jdk.test.whitebox.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 jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @compile InternStringTest.java
* @build jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build HelloString
* @run driver LargePages
Expand Down
Original file line number Diff line number Diff line change
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
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @compile LockStringTest.java LockStringValueTest.java
* @build jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
* @library /test/hotspot/jtreg/runtime/cds/appcds /test/lib
* @build HelloStringPlus jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @build jdk.test.whitebox.WhiteBox SharedStringsWb
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @run driver SysDictCrash
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox
* @run main/othervm/native ReplaceCriticalClassesForSubgraphs
Expand Down
Loading