8191375: Add high-level jtreg VMProps to filter out CDS tests

Added vm.cds.archived.java.heap

Reviewed-by: mseledtsov, jiangli, ccheung, gtriantafill
This commit is contained in:
Ioi Lam 2018-02-15 11:39:42 -08:00
parent 75c57161f1
commit 96eb1f1fdd
41 changed files with 84 additions and 152 deletions

View File

@ -1740,6 +1740,10 @@ WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
#endif // INCLUDE_CDS
WB_END
WB_ENTRY(jboolean, WB_IsJavaHeapArchiveSupported(JNIEnv* env))
return MetaspaceShared::is_heap_object_archiving_allowed();
WB_END
#if INCLUDE_CDS
@ -2116,6 +2120,8 @@ static JNINativeMethod methods[] = {
{CC"getResolvedReferences", CC"(Ljava/lang/Class;)Ljava/lang/Object;", (void*)&WB_GetResolvedReferences},
{CC"areOpenArchiveHeapObjectsMapped", CC"()Z", (void*)&WB_AreOpenArchiveHeapObjectsMapped},
{CC"isCDSIncludedInVmBuild", CC"()Z", (void*)&WB_IsCDSIncludedInVmBuild },
{CC"isJavaHeapArchiveSupported", CC"()Z", (void*)&WB_IsJavaHeapArchiveSupported },
{CC"clearInlineCaches0", CC"(Z)V", (void*)&WB_ClearInlineCaches },
{CC"handshakeWalkStack", CC"(Ljava/lang/Thread;Z)I", (void*)&WB_HandshakeWalkStack },
{CC"addCompilerDirective", CC"(Ljava/lang/String;)I",

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2018, 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
@ -54,6 +54,7 @@ requires.properties= \
vm.aot \
vm.cds \
vm.cds.custom.loaders \
vm.cds.archived.java.heap \
vm.graal.enabled \
docker.support

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -23,7 +23,6 @@
/**
* @test ArchiveDoesNotExist
* @requires vm.cds
* @summary Test how VM handles "file does not exist" situation while
* attempting to use CDS archive. JVM should exit gracefully
* when sharing mode is ON, and continue w/o sharing if sharing

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, 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
@ -23,7 +23,6 @@
/**
* @test CdsDifferentCompactStrings
* @requires vm.cds
* @summary CDS (class data sharing) requires the same -XX:[+-]CompactStrings
* setting between archive creation time and load time.
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, 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
@ -23,7 +23,6 @@
/**
* @test CdsDifferentObjectAlignment
* @requires vm.cds
* @summary Testing CDS (class data sharing) using varying object alignment.
* Using different object alignment for each dump/load pair.
* This is a negative test; using object alignment for loading that

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, 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
@ -23,7 +23,6 @@
/**
* @test CdsSameObjectAlignment
* @requires vm.cds
* @summary Testing CDS (class data sharing) using varying object alignment.
* Using same object alignment for each dump/load pair
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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,9 +25,6 @@
* @test
* @bug 8130072
* @summary Check that Shared Dictionary is printed out with jcmd
* Feature support: compressed oops/kptrs, 64-bit os, not on windows
* @requires vm.cds
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @library /test/lib
* @modules java.base/jdk.internal.misc
@ -47,7 +44,6 @@ public class DumpSharedDictionary {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./DumpSharedDictionary.jsa",
"-XX:+UseCompressedOops",
"-Xshare:dump");
OutputAnalyzer out = CDSTestUtils.executeAndLog(pb, "dump");
@ -58,7 +54,6 @@ public class DumpSharedDictionary {
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./DumpSharedDictionary.jsa",
"-XX:+UseCompressedOops",
"-Dtest.jdk=" + testjdkPath,
"-Xshare:on", "DumpSharedDictionary", "test");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -23,7 +23,6 @@
/**
* @test
* @requires vm.cds
* @bug 8066670
* @summary Testing -XX:+PrintSharedArchiveAndExit option
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -23,7 +23,6 @@
/**
* @test SASymbolTableTest
* @requires vm.cds
* @summary Walk symbol table using SA, with and without CDS.
* @requires vm.cds
* @library /test/lib

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, 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
@ -23,7 +23,6 @@
/**
* @test
* @requires vm.cds
* @bug 8014138
* @summary Testing new -XX:SharedArchiveFile=<file-name> option
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -23,7 +23,6 @@
/**
* @test SharedBaseAddress
* @requires vm.cds
* @summary Test variety of values for SharedBaseAddress, making sure
* VM handles normal values as well as edge values w/o a crash.
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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
@ -23,13 +23,9 @@
/**
* @test
* @requires vm.cds
* @summary Check to make sure that shared strings in the bootstrap CDS archive
* are actually shared
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@ -51,8 +47,6 @@ public class SharedStrings {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./SharedStrings.jsa",
"-XX:+UseG1GC",
"-XX:+UseCompressedOops",
"-Xlog:cds,cds+hashtables",
// Needed for bootclasspath match, for CDS to work with WhiteBox API
"-Xbootclasspath/a:" + ClassFileInstaller.getJarPath("whitebox.jar"),
@ -65,8 +59,6 @@ public class SharedStrings {
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./SharedStrings.jsa",
// these are required modes for shared strings
"-XX:+UseCompressedOops", "-XX:+UseG1GC",
// needed for access to white box test API
"-Xbootclasspath/a:" + ClassFileInstaller.getJarPath("whitebox.jar"),
"-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -23,12 +23,8 @@
/**
* @test SharedStringsDedup
* @requires vm.cds
* @summary Test -Xshare:auto with shared strings and -XX:+UseStringDeduplication
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@ -46,9 +42,8 @@ import java.io.File;
public class SharedStringsDedup {
public static void main(String[] args) throws Exception {
OutputAnalyzer out =
CDSTestUtils.createArchive("-XX:+UseCompressedOops", "-XX:+UseG1GC");
CDSTestUtils.createArchive();
CDSTestUtils.checkDump(out, "Shared string table stats");
CDSTestUtils.runWithArchiveAndCheck("-XX:+UseCompressedOops", "-XX:+UseG1GC",
"-XX:+UseStringDeduplication");
CDSTestUtils.runWithArchiveAndCheck("-XX:+UseStringDeduplication");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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
@ -23,12 +23,8 @@
/**
* @test SharedStringsAuto
* @requires vm.cds
* @summary Test -Xshare:auto with shared strings.
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@ -42,8 +38,8 @@ import java.io.File;
public class SharedStringsRunAuto {
public static void main(String[] args) throws Exception {
OutputAnalyzer out =
CDSTestUtils.createArchive("-XX:+UseCompressedOops", "-XX:+UseG1GC");
CDSTestUtils.createArchive();
CDSTestUtils.checkDump(out, "Shared string table stats");
CDSTestUtils.runWithArchiveAndCheck("-XX:+UseCompressedOops", "-XX:+UseG1GC");
CDSTestUtils.runWithArchiveAndCheck();
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -23,7 +23,6 @@
/**
* @test
* @requires vm.cds
* @bug 8059510
* @summary Test SharedSymbolTableBucketSize option
* @requires vm.cds

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -23,7 +23,6 @@
/**
* @test SpaceUtilizationCheck
* @requires vm.cds
* @summary Check if the space utilization for shared spaces is adequate
* @requires vm.cds
* @library /test/lib

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -23,7 +23,6 @@
/**
* @test InterpreterMethodEntries
* @requires vm.cds
* @bug 8169711
* @summary Test interpreter method entries for intrinsics with CDS (class data sharing)
* and different settings of the intrinsic flag during dump/use of the archive.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -23,7 +23,6 @@
/**
* @test
* @requires vm.cds
* @summary Exercise initial transformation (ClassFileLoadHook)
* with CDS with Interface/Implementor pair
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -24,7 +24,6 @@
/**
* @test
* @requires vm.cds
* @summary Exercise initial transformation (ClassFileLoadHook)
* with CDS with SubClass and SuperClass
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -24,7 +24,6 @@
/**
* @test
* @requires vm.cds
* @summary Exercise initial transformation (ClassFileLoadHook)
* with CDS with SubClass and SuperClass, each lives in own separate package
* @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti

View File

@ -26,7 +26,6 @@
* @test
* @summary AppCDS handling of prohibited package.
* @requires vm.cds
* @requires vm.cds
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018 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
@ -27,7 +27,6 @@
* @summary Test resolved_references
* @requires vm.cds
* @requires vm.cds.custom.loaders
* @requires (vm.gc=="null")
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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,9 +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
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires (vm.gc=="null")
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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,9 +25,7 @@
/*
* @test
* @summary
* @requires vm.cds
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires (vm.gc=="null")
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018 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,8 +25,7 @@
/*
* @test
* @summary Test open archive heap regions
* @requires vm.cds
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds.archived.java.heap
* @requires (vm.gc=="null")
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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
@ -28,9 +28,8 @@
* mapped due to out of range, and -Xshare:on should not fail. Test on
* linux 64-bit only since the HeapBaseMinAddress value is platform specific.
* The value used in the test may cause different behavior on other platforms.
* @requires vm.cds
* @requires (os.family == "linux") & (os.arch == "amd64") & (sun.arch.data.model == "64")
* @requires (vm.gc=="null")
* @requires vm.cds.archived.java.heap
* @requires os.family == "linux"
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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,10 +26,7 @@
* @test
* @summary Redefine shared class. GC should not cause crash with cached resolved_references.
* @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/test-classes /test/hotspot/jtreg/runtime/appcds/jvmti
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.flavor != "minimal"
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds.archived.java.heap
* @modules java.base/jdk.internal.misc
* jdk.jartool/sun.tools.jar
* java.management

View File

@ -27,10 +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/appcds /test/hotspot/jtreg/runtime/appcds/test-classes
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @modules java.base/jdk.internal.misc
* jdk.jartool/sun.tools.jar
* java.management
@ -94,8 +91,6 @@ public class GCSharedStringsDuringDump {
OutputAnalyzer output = TestCommon.dump(
appJar, TestCommon.list("GCSharedStringsDuringDumpWb"),
bootClassPath, extraArg, "-Xmx32m", gcLog,
"-XX:+UseCompressedOops", "-XX:+UseG1GC",
"-XX:SharedReadOnlySize=30m",
"-XX:SharedArchiveConfigFile=" + sharedArchiveCfgFile);
if (output.getStdout().contains("Too many string space regions") ||
@ -108,8 +103,6 @@ public class GCSharedStringsDuringDump {
TestCommon.testDump(
appJar, TestCommon.list("GCSharedStringsDuringDumpWb"),
bootClassPath, extraArg, "-Xmx8g", "-XX:NewSize=8m", gcLog,
"-XX:+UseCompressedOops", "-XX:+UseG1GC",
"-XX:SharedReadOnlySize=30m",
"-XX:SharedArchiveConfigFile=" + sharedArchiveCfgFile);
}
@ -118,8 +111,6 @@ public class GCSharedStringsDuringDump {
bootClassPath,
"-Xmx32m",
"-XX:+PrintSharedSpaces",
"-XX:+UseCompressedOops",
"-XX:+UseG1GC",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
"-XX:SharedReadOnlySize=30m",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,9 +25,7 @@
/*
* @test
* @summary Exercise GC with shared strings
* @requires vm.cds
* @requires vm.gc.G1
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,9 +25,7 @@
/*
* @test
* @summary Test relevant combinations of command line flags with shared strings
* @requires vm.cds
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires (vm.gc=="null")
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,9 +26,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
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.cds.archived.java.heap
* @requires (vm.gc=="null")
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Test shared strings together with string intern operation
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Check most common errors in file format
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Basic shared string test with large pages
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Test locking on shared strings
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -25,10 +25,7 @@
/*
* @test
* @summary Basic test for shared strings
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management
@ -52,8 +49,6 @@ public class SharedStringsBasic {
ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
TestCommon.makeCommandLineForAppCDS(
"-XX:+UseAppCDS",
"-XX:+UseCompressedOops",
"-XX:+UseG1GC",
"-cp", appJar,
"-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
@ -67,8 +62,6 @@ public class SharedStringsBasic {
ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
TestCommon.makeCommandLineForAppCDS(
"-XX:+UseAppCDS",
"-XX:+UseCompressedOops",
"-XX:+UseG1GC",
"-cp", appJar,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:auto",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Basic plus test for shared strings
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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,10 +25,7 @@
/*
* @test
* @summary Write a lots of shared strings.
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @modules jdk.jartool/sun.tools.jar
* @build HelloString

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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,10 +25,7 @@
/*
* @test
* @summary White box test for shared strings
* Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
* @requires (sun.arch.data.model != "32") & (os.family != "windows")
* @requires vm.cds
* @requires vm.gc.G1
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -75,6 +75,7 @@ public class VMProps implements Callable<Map<String, String>> {
// vm.cds is true if the VM is compiled with cds support.
map.put("vm.cds", vmCDS());
map.put("vm.cds.custom.loaders", vmCDSForCustomLoaders());
map.put("vm.cds.archived.java.heap", vmCDSForArchivedJavaHeap());
// vm.graal.enabled is true if Graal is used as JIT
map.put("vm.graal.enabled", isGraalEnabled());
map.put("docker.support", dockerSupport());
@ -300,7 +301,7 @@ public class VMProps implements Callable<Map<String, String>> {
/**
* Check for CDS support for custom loaders.
*
* @return true if CDS is supported for customer loader by the VM to be tested.
* @return true if CDS provides support for customer loader in the VM to be tested.
*/
protected String vmCDSForCustomLoaders() {
if (vmCDS().equals("true") && Platform.areCustomLoadersSupportedForCDS()) {
@ -310,6 +311,19 @@ public class VMProps implements Callable<Map<String, String>> {
}
}
/**
* Check for CDS support for archived Java heap regions.
*
* @return true if CDS provides support for archive Java heap regions in the VM to be tested.
*/
protected String vmCDSForArchivedJavaHeap() {
if (vmCDS().equals("true") && WB.isJavaHeapArchiveSupported()) {
return "true";
} else {
return "false";
}
}
/**
* Check if Graal is used as JIT compiler.
*

View File

@ -524,6 +524,7 @@ public class WhiteBox {
public native boolean isSharedClass(Class<?> c);
public native boolean areSharedStringsIgnored();
public native boolean isCDSIncludedInVmBuild();
public native boolean isJavaHeapArchiveSupported();
public native Object getResolvedReferences(Class<?> c);
public native boolean areOpenArchiveHeapObjectsMapped();