Merge
authorcoleenp
Wed, 09 Aug 2017 23:26:38 +0000
changeset 46784 066ef355b10c
parent 46783 bfa353c0d440 (current diff)
parent 46780 50dca6b8294e (diff)
child 46785 ba5420d60314
Merge
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Wed Aug 09 23:26:38 2017 +0000
@@ -1700,6 +1700,14 @@
   return StringTable::shared_string_ignored();
 WB_END
 
+WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
+#if INCLUDE_CDS
+  return true;
+#else
+  return false;
+#endif
+WB_END
+
 //Some convenience methods to deal with objects from java
 int WhiteBox::offset_for_field(const char* field_name, oop object,
     Symbol* signature_symbol) {
@@ -1993,6 +2001,7 @@
   {CC"isShared",           CC"(Ljava/lang/Object;)Z", (void*)&WB_IsShared },
   {CC"isSharedClass",      CC"(Ljava/lang/Class;)Z",  (void*)&WB_IsSharedClass },
   {CC"areSharedStringsIgnored",           CC"()Z",    (void*)&WB_AreSharedStringsIgnored },
+  {CC"isCDSIncludedInVmBuild",            CC"()Z",    (void*)&WB_IsCDSIncludedInVmBuild },
   {CC"clearInlineCaches0",  CC"(Z)V",                 (void*)&WB_ClearInlineCaches },
   {CC"addCompilerDirective",    CC"(Ljava/lang/String;)I",
                                                       (void*)&WB_AddCompilerDirective },
--- a/hotspot/test/TEST.ROOT	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/TEST.ROOT	Wed Aug 09 23:26:38 2017 +0000
@@ -51,7 +51,8 @@
     vm.debug \
     vm.rtm.cpu \
     vm.rtm.os \
-    vm.aot
+    vm.aot \
+    vm.cds
 
 # Tests using jtreg 4.2 b07 features
 requiredVersion=4.2 b07
--- a/hotspot/test/gc/g1/TestSharedArchiveWithPreTouch.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/gc/g1/TestSharedArchiveWithPreTouch.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -21,13 +21,13 @@
  * questions.
  */
 
-/*
+/**
  * @test
  * @bug 8169703
  * @summary Verifies that dumping and loading a CDS archive succeeds with AlwaysPreTouch
  * @requires vm.gc.G1
- * @key gc
- * @key regression
+ * @key gc regression
+ * @requires vm.cds
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8003424
  * @summary Testing UseCompressedClassPointers with CDS
  * @library /test/lib
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8003424
  * @summary Test that cannot use CDS if UseCompressedClassPointers is turned off.
  * @library /test/lib
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8005933
  * @summary Test that -Xshare:auto uses CDS when explicitly specified with -server.
  * @library /test/lib
--- a/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -106,6 +106,9 @@
             "-XX:+VerifyBeforeGC",
             "-Xshare:dump");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        if (output.firstMatch("Shared spaces are not supported in this VM") != null) {
+            return;
+        }
         try {
           output.shouldContain("Loading classes to share");
           output.shouldHaveExitValue(0);
--- a/hotspot/test/runtime/NMT/NMTWithCDS.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/NMT/NMTWithCDS.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, 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
@@ -21,15 +21,17 @@
  * questions.
  */
 
-/*
+/**
  * @test
  * @bug 8055061
  * @key nmt
+ * @requires vm.cds
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main NMTWithCDS
  */
+
 import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.process.OutputAnalyzer;
 
--- a/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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
--- a/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java	Wed Aug 09 23:26:38 2017 +0000
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @requires vm.cds
  * @summary Testing -Xbootclasspath/a support for CDS
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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
--- a/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/DumpSharedDictionary.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/DumpSharedDictionary.java	Wed Aug 09 23:26:38 2017 +0000
@@ -26,6 +26,7 @@
  * @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.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8067187
  * @summary Testing CDS dumping with the -XX:MaxMetaspaceSize=<size> option
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8066670
  * @summary Testing -XX:+PrintSharedArchiveAndExit option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SASymbolTableTest
+ * @requires vm.cds
  * @summary Walk symbol table using SA, with and without CDS.
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8014138
  * @summary Testing new -XX:SharedArchiveFile=<file-name> option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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")
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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")
--- a/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8059510
  * @summary Test SharedSymbolTableBucketSize option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SpaceUtilizationCheck
+ * @requires vm.cds
  * @summary Check if the space utilization for shared spaces is adequate
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/TestInterpreterMethodEntries.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/TestInterpreterMethodEntries.java	Wed Aug 09 23:26:38 2017 +0000
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @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.
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Exercise initial transformation (ClassFileLoadHook)
  *  with CDS with Interface/Implementor pair
  * @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -22,8 +22,9 @@
  */
 
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Exercise initial transformation (ClassFileLoadHook)
  *  with CDS with SubClass and SuperClass
  * @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -22,8 +22,9 @@
  */
 
 
-/*
+/**
  * @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
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary test that --patch-module works with CDS
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java	Wed Aug 09 19:00:54 2017 -0400
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java	Wed Aug 09 23:26:38 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary classes which are not useable during run time should not be included in the classlist
  * @library /test/lib
  * @modules java.base/jdk.internal.misc