OpenJDK / aarch32-port / jdk8u / hotspot
changeset 8304:555d9f642590 jdk8u151-b12-aarch32-171102
Merge
author | snazarki |
---|---|
date | Thu, 02 Nov 2017 15:43:57 +0300 |
parents | c9010b50b4e3 856e341587d5 |
children | 8160b421b311 |
files | .hgtags |
diffstat | 7 files changed, 156 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Wed Aug 09 13:28:44 2017 +0300 +++ b/.hgtags Thu Nov 02 15:43:57 2017 +0300 @@ -984,3 +984,16 @@ 23f1790147d838ddb1133cc79dc08e7c9ba5ab44 jdk8u141-b15 eea89df81a8e414813d921eeeeef9b6795f56698 jdk8u144-b00 7b008fa0fb6dd26f26a091496d9e763f554b666e jdk8u144-b01-aarch32-170809 +db36f4d498b1bde975700a800b5ce732941c04b7 jdk8u144-b01 +2d5100bddeb80cf767485b787fc3051311e3d7b9 jdk8u151-b00 +596b584c68b73ec635347807571463580deb955f jdk8u151-b01 +1f6f436360d5cd375b806aec1c78abb8fcb4e5f6 jdk8u151-b02 +0aaeb48ae39e4fc558caf1b0c7ee504a49fec441 jdk8u151-b03 +e48302d521d59c2fe62f874f1f5d34bc46517da7 jdk8u151-b04 +507af6ef977a5d0306a8723dec66e34befc1ae81 jdk8u151-b05 +e1dc36cddcbc36b78e3d0558f87bbf459191e479 jdk8u151-b06 +e2a930243efa63b0a789e85a523e69574d53ac92 jdk8u151-b07 +158904fa31b28f1e027dc5b5a833ee673e89a84b jdk8u151-b08 +8b0169692abbf8fb7972920cd79cee7dcab959c3 jdk8u151-b09 +e352e54382928eb8d5ec70455ef251973c332ccb jdk8u151-b10 +0f06584f52ffc8627b78f4d461a3eba2b703a8f7 jdk8u151-b11
--- a/THIRD_PARTY_README Wed Aug 09 13:28:44 2017 +0300 +++ b/THIRD_PARTY_README Thu Nov 02 15:43:57 2017 +0300 @@ -2808,12 +2808,12 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to zlib v1.2.8, which may be included +%% This notice is provided with respect to zlib v1.2.11, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- - version 1.2.8, April 28th, 2013 + version 1.2.11, January 15th, 2017 Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
--- a/src/share/vm/interpreter/linkResolver.cpp Wed Aug 09 13:28:44 2017 +0300 +++ b/src/share/vm/interpreter/linkResolver.cpp Thu Nov 02 15:43:57 2017 +0300 @@ -538,6 +538,42 @@ } } +void LinkResolver::check_method_loader_constraints(methodHandle& resolved_method, + KlassHandle resolved_klass, + Symbol* method_name, + Symbol* method_signature, + KlassHandle current_klass, + const char* method_type, TRAPS) { + Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader()); + Handle class_loader (THREAD, resolved_method->method_holder()->class_loader()); + { + ResourceMark rm(THREAD); + Symbol* failed_type_symbol = + SystemDictionary::check_signature_loaders(method_signature, loader, + class_loader, true, CHECK); + if (failed_type_symbol != NULL) { + const char* msg = "loader constraint violation: when resolving %s" + " \"%s\" the class loader (instance of %s) of the current class, %s," + " and the class loader (instance of %s) for the method's defining class, %s, have" + " different Class objects for the type %s used in the signature"; + char* sig = Method::name_and_sig_as_C_string(resolved_klass(), method_name, method_signature); + const char* loader1 = SystemDictionary::loader_name(loader()); + char* current = InstanceKlass::cast(current_klass())->name()->as_C_string(); + const char* loader2 = SystemDictionary::loader_name(class_loader()); + char* target = InstanceKlass::cast(resolved_method->method_holder()) + ->name()->as_C_string(); + char* failed_type_name = failed_type_symbol->as_C_string(); + size_t buflen = strlen(msg) + strlen(sig) + strlen(loader1) + + strlen(current) + strlen(loader2) + strlen(target) + + strlen(failed_type_name) + strlen(method_type) + 1; + char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); + jio_snprintf(buf, buflen, msg, method_type, sig, loader1, current, loader2, + target, failed_type_name); + THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); + } + } +} + void LinkResolver::resolve_method(methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, @@ -594,34 +630,8 @@ CHECK); // check loader constraints - Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader()); - Handle class_loader (THREAD, resolved_method->method_holder()->class_loader()); - { - ResourceMark rm(THREAD); - Symbol* failed_type_symbol = - SystemDictionary::check_signature_loaders(method_signature, loader, - class_loader, true, CHECK); - if (failed_type_symbol != NULL) { - const char* msg = "loader constraint violation: when resolving method" - " \"%s\" the class loader (instance of %s) of the current class, %s," - " and the class loader (instance of %s) for the method's defining class, %s, have" - " different Class objects for the type %s used in the signature"; - char* sig = Method::name_and_sig_as_C_string(resolved_klass(),method_name,method_signature); - const char* loader1 = SystemDictionary::loader_name(loader()); - char* current = InstanceKlass::cast(current_klass())->name()->as_C_string(); - const char* loader2 = SystemDictionary::loader_name(class_loader()); - char* target = InstanceKlass::cast(resolved_method->method_holder()) - ->name()->as_C_string(); - char* failed_type_name = failed_type_symbol->as_C_string(); - size_t buflen = strlen(msg) + strlen(sig) + strlen(loader1) + - strlen(current) + strlen(loader2) + strlen(target) + - strlen(failed_type_name) + 1; - char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); - jio_snprintf(buf, buflen, msg, sig, loader1, current, loader2, - target, failed_type_name); - THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); - } - } + check_method_loader_constraints(resolved_method, resolved_klass, method_name, + method_signature, current_klass, "method", CHECK); } } @@ -670,36 +680,8 @@ resolved_method, CHECK); - HandleMark hm(THREAD); - Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader()); - Handle class_loader (THREAD, resolved_method->method_holder()->class_loader()); - { - ResourceMark rm(THREAD); - Symbol* failed_type_symbol = - SystemDictionary::check_signature_loaders(method_signature, loader, - class_loader, true, CHECK); - if (failed_type_symbol != NULL) { - const char* msg = "loader constraint violation: when resolving " - "interface method \"%s\" the class loader (instance of %s) of the " - "current class, %s, and the class loader (instance of %s) for " - "the method's defining class, %s, have different Class objects for the type %s " - "used in the signature"; - char* sig = Method::name_and_sig_as_C_string(resolved_klass(),method_name,method_signature); - const char* loader1 = SystemDictionary::loader_name(loader()); - char* current = InstanceKlass::cast(current_klass())->name()->as_C_string(); - const char* loader2 = SystemDictionary::loader_name(class_loader()); - char* target = InstanceKlass::cast(resolved_method->method_holder()) - ->name()->as_C_string(); - char* failed_type_name = failed_type_symbol->as_C_string(); - size_t buflen = strlen(msg) + strlen(sig) + strlen(loader1) + - strlen(current) + strlen(loader2) + strlen(target) + - strlen(failed_type_name) + 1; - char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); - jio_snprintf(buf, buflen, msg, sig, loader1, current, loader2, - target, failed_type_name); - THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); - } - } + check_method_loader_constraints(resolved_method, resolved_klass, method_name, + method_signature, current_klass, "interface method", CHECK); } if (nostatics && resolved_method->is_static()) { @@ -1049,6 +1031,10 @@ Method::name_and_sig_as_C_string(resolved_klass(), resolved_method->name(), resolved_method->signature())); + } else if (sel_method() != resolved_method()) { + check_method_loader_constraints(sel_method, resolved_klass, + sel_method->name(), sel_method->signature(), + current_klass, "method", CHECK); } }
--- a/src/share/vm/interpreter/linkResolver.hpp Wed Aug 09 13:28:44 2017 +0300 +++ b/src/share/vm/interpreter/linkResolver.hpp Thu Nov 02 15:43:57 2017 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -135,6 +135,9 @@ static void resolve_pool (KlassHandle& resolved_klass, Symbol*& method_name, Symbol*& method_signature, KlassHandle& current_klass, constantPoolHandle pool, int index, TRAPS); static void resolve_interface_method(methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, bool nostatics, TRAPS); + static void check_method_loader_constraints(methodHandle& resolved_method, KlassHandle resolved_klass, + Symbol* method_name, Symbol* method_signature, + KlassHandle current_klass, const char* method_type, TRAPS); static void resolve_method (methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, bool require_methodref, TRAPS); static void linktime_resolve_static_method (methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, TRAPS);
--- a/src/share/vm/runtime/arguments.cpp Wed Aug 09 13:28:44 2017 +0300 +++ b/src/share/vm/runtime/arguments.cpp Thu Nov 02 15:43:57 2017 +0300 @@ -3193,8 +3193,6 @@ // Enable parallel GC and adaptive generation sizing FLAG_SET_CMDLINE(bool, UseParallelGC, true); - FLAG_SET_DEFAULT(ParallelGCThreads, - Abstract_VM_Version::parallel_worker_threads()); // Encourage steady state memory management FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100);
--- a/test/TEST.groups Wed Aug 09 13:28:44 2017 +0300 +++ b/test/TEST.groups Thu Nov 02 15:43:57 2017 +0300 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2014, 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 @@ -164,6 +164,7 @@ gc/TestGCLogRotationViaJcmd.java \ gc/g1/TestHumongousAllocInitialMark.java \ gc/g1/TestHumongousShrinkHeap.java \ + gc/arguments/TestAggressiveHeap.java \ gc/arguments/TestG1HeapRegionSize.java \ gc/metaspace/TestMetaspaceMemoryPool.java \ gc/arguments/TestDynMinHeapFreeRatio.java \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/gc/arguments/TestAggressiveHeap.java Thu Nov 02 15:43:57 2017 +0300 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test TestAggressiveHeap + * @key gc + * @bug 8179084 + * @summary Test argument processing for -XX:+AggressiveHeap. + * @library /testlibrary + * @run driver TestAggressiveHeap + */ + +import java.lang.management.ManagementFactory; +import javax.management.MBeanServer; +import javax.management.ObjectName; + +import com.oracle.java.testlibrary.OutputAnalyzer; +import com.oracle.java.testlibrary.ProcessTools; + +public class TestAggressiveHeap { + + public static void main(String args[]) throws Exception { + if (canUseAggressiveHeapOption()) { + testFlag(); + } + } + + // Note: Not a normal boolean flag; -XX:-AggressiveHeap is invalid. + private static final String option = "-XX:+AggressiveHeap"; + + // Option requires at least 256M, else error during option processing. + private static final long minMemory = 256 * 1024 * 1024; + + // bool UseParallelGC := true {product} + private static final String parallelGCPattern = + " *bool +UseParallelGC *:= *true +\\{product\\}"; + + private static void testFlag() throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + option, "-XX:+PrintFlagsFinal", "-version"); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + + output.shouldHaveExitValue(0); + + String value = output.firstMatch(parallelGCPattern); + if (value == null) { + throw new RuntimeException( + option + " didn't set UseParallelGC"); + } + } + + private static boolean haveRequiredMemory() throws Exception { + MBeanServer server = ManagementFactory.getPlatformMBeanServer(); + ObjectName os = new ObjectName("java.lang", "type", "OperatingSystem"); + Object attr = server.getAttribute(os, "TotalPhysicalMemorySize"); + String value = attr.toString(); + long memory = Long.parseLong(value); + return memory >= minMemory; + } + + private static boolean canUseAggressiveHeapOption() throws Exception { + if (!haveRequiredMemory()) { + System.out.println( + "Skipping test of " + option + " : insufficient memory"); + return false; + } + return true; + } +} +