OpenJDK / jdk / jdk
changeset 54552:c09bdb9043f1
8214809: CDS storage improvements
Reviewed-by: acorn, iklam, ahgross, rhalade
author | ccheung |
---|---|
date | Wed, 12 Dec 2018 11:57:22 -0800 |
parents | b94283cb226b |
children | 62771002a1cb |
files | src/hotspot/share/classfile/classFileParser.cpp test/hotspot/jtreg/runtime/appcds/OldClassTest.java |
diffstat | 2 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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);