8214809: CDS storage improvements
authorccheung
Wed, 12 Dec 2018 11:57:22 -0800
changeset 54552 c09bdb9043f1
parent 53334 b94283cb226b
child 54553 62771002a1cb
8214809: CDS storage improvements Reviewed-by: acorn, iklam, ahgross, rhalade
src/hotspot/share/classfile/classFileParser.cpp
test/hotspot/jtreg/runtime/appcds/OldClassTest.java
--- a/src/hotspot/share/classfile/classFileParser.cpp	Thu Dec 13 11:51:06 2018 -0800
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Wed Dec 12 11:57:22 2018 -0800
@@ -6016,9 +6016,9 @@
   _minor_version = stream->get_u2_fast();
   _major_version = stream->get_u2_fast();
 
-  if (DumpSharedSpaces && _major_version < JAVA_1_5_VERSION) {
+  if (DumpSharedSpaces && _major_version < JAVA_6_VERSION) {
     ResourceMark rm;
-    warning("Pre JDK 1.5 class not supported by CDS: %u.%u %s",
+    warning("Pre JDK 6 class not supported by CDS: %u.%u %s",
             _major_version,  _minor_version, _class_name->as_C_string());
     Exceptions::fthrow(
       THREAD_AND_LOCATION,
--- a/test/hotspot/jtreg/runtime/appcds/OldClassTest.java	Thu Dec 13 11:51:06 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/OldClassTest.java	Wed Dec 12 11:57:22 2018 -0800
@@ -24,7 +24,7 @@
 
 /*
  * @test
- * @summary classes with major version < JDK_1.5 (48) should not be included in CDS
+ * @summary classes with major version < JDK_6 (50) should not be included in CDS
  * @requires vm.cds
  * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -61,9 +61,9 @@
 
     String appClasses[] = TestCommon.list("Hello");
 
-    // CASE 1: pre-JDK 1.5 compiled classes should be excluded from the dump
+    // CASE 1: pre-JDK 6 compiled classes should be excluded from the dump
     OutputAnalyzer output = TestCommon.dump(jar, appClasses);
-    TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
+    TestCommon.checkExecReturn(output, 0, true, "Pre JDK 6 class not supported by CDS");
 
     TestCommon.run(
         "-cp", jar,
@@ -74,7 +74,7 @@
     //         the newer version of this class in a subsequent classpath element.
     String classpath = jar + File.pathSeparator + jarSrcFile.getPath();
     output = TestCommon.dump(classpath, appClasses);
-    TestCommon.checkExecReturn(output, 0, true, "Pre JDK 1.5 class not supported by CDS");
+    TestCommon.checkExecReturn(output, 0, true, "Pre JDK 6 class not supported by CDS");
 
     TestCommon.run(
         "-cp", classpath,
@@ -127,8 +127,7 @@
     MethodVisitor mv;
     AnnotationVisitor av0;
 
-//WAS cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, "Hello", null, "java/lang/Object", null);
-      cw.visit(V1_4, ACC_PUBLIC + ACC_SUPER, "Hello", null, "java/lang/Object", null);
+      cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, "Hello", null, "java/lang/Object", null);
 
     {
       mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);