# HG changeset patch # User asaha # Date 1419269249 28800 # Node ID eff80b90c3ad6bdc673396d3fe2d0a0350db4446 # Parent 02e2c04a3289ea70d8a041dcc7f46003f2a92541# Parent 6bed0ca7a09a857e62387e35553c254c0c356e42 Merge diff -r 6bed0ca7a09a -r eff80b90c3ad .hgtags --- a/.hgtags Wed Dec 17 12:48:26 2014 -0800 +++ b/.hgtags Mon Dec 22 09:27:29 2014 -0800 @@ -579,3 +579,5 @@ 31d3306aad29e39929418ed43f28212a5f5306a3 jdk8u40-b18 f8fc5cbe082ce0fb0c6c1dcd39493a16ed916353 hs25.40-b23 d9349fa8822336e0244da0a8448f3e6b2d62741d jdk8u40-b19 +b95f13f05f553309cd74d6ccf8fcedb259c6716c jdk8u45-b00 +41c3c456e326185053f0654be838f4b0bfb38078 jdk8u45-b01 diff -r 6bed0ca7a09a -r eff80b90c3ad make/hotspot_version --- a/make/hotspot_version Wed Dec 17 12:48:26 2014 -0800 +++ b/make/hotspot_version Mon Dec 22 09:27:29 2014 -0800 @@ -34,8 +34,8 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2015 HS_MAJOR_VER=25 -HS_MINOR_VER=40 -HS_BUILD_NUMBER=23 +HS_MINOR_VER=45 +HS_BUILD_NUMBER=01 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 diff -r 6bed0ca7a09a -r eff80b90c3ad src/os/bsd/vm/perfMemory_bsd.cpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/os/linux/vm/perfMemory_linux.cpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/os/solaris/vm/perfMemory_solaris.cpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/classfile/defaultMethods.cpp --- a/src/share/vm/classfile/defaultMethods.cpp Wed Dec 17 12:48:26 2014 -0800 +++ b/src/share/vm/classfile/defaultMethods.cpp Mon Dec 22 09:27:29 2014 -0800 @@ -731,10 +731,12 @@ Method* m = iklass->find_method(_method_name, _method_signature); // private interface methods are not candidates for default methods // invokespecial to private interface methods doesn't use default method logic + // private class methods are not candidates for default methods, + // private methods do not override default methods, so need to perform + // default method inheritance without including private methods // The overpasses are your supertypes' errors, we do not include them // future: take access controls into account for superclass methods - if (m != NULL && !m->is_static() && !m->is_overpass() && - (!iklass->is_interface() || m->is_public())) { + if (m != NULL && !m->is_static() && !m->is_overpass() && !m->is_private()) { if (_family == NULL) { _family = new StatefulMethodFamily(); } @@ -745,6 +747,9 @@ } else { // This is the rule that methods in classes "win" (bad word) over // methods in interfaces. This works because of single inheritance + // private methods in classes do not "win", they will be found + // first on searching, but overriding for invokevirtual needs + // to find default method candidates for the same signature _family->set_target_if_empty(m); } } diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/code/dependencies.cpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/code/dependencies.hpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/oops/instanceKlass.cpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/oops/instanceKlass.hpp diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/oops/klassVtable.cpp --- a/src/share/vm/oops/klassVtable.cpp Wed Dec 17 12:48:26 2014 -0800 +++ b/src/share/vm/oops/klassVtable.cpp Mon Dec 22 09:27:29 2014 -0800 @@ -401,13 +401,15 @@ // get super_klass for method_holder for the found method InstanceKlass* super_klass = super_method->method_holder(); - if (is_default + // private methods are also never overridden + if (!super_method->is_private() && + (is_default || ((super_klass->is_override(super_method, target_loader, target_classname, THREAD)) || ((klass->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION) && ((super_klass = find_transitive_override(super_klass, target_method, i, target_loader, target_classname, THREAD)) - != (InstanceKlass*)NULL)))) + != (InstanceKlass*)NULL))))) { // Package private methods always need a new entry to root their own // overriding. They may also override other methods. @@ -689,9 +691,15 @@ // check if a method is a miranda method, given a class's methods table, // its default_method table and its super // Miranda methods are calculated twice: -// first: before vtable size calculation: including abstract and default +// first: before vtable size calculation: including abstract and superinterface default +// We include potential default methods to give them space in the vtable. +// During the first run, the default_methods list is empty // This is seen by default method creation -// Second: recalculated during vtable initialization: only abstract +// Second: recalculated during vtable initialization: only include abstract methods. +// During the second run, default_methods is set up, so concrete methods from +// superinterfaces with matching names/signatures to default_methods are already +// in the default_methods list and do not need to be appended to the vtable +// as mirandas // This is seen by link resolution and selection. // "miranda" means not static, not defined by this class. // private methods in interfaces do not belong in the miranda list. @@ -706,8 +714,9 @@ } Symbol* name = m->name(); Symbol* signature = m->signature(); + Method* mo; - if (InstanceKlass::find_instance_method(class_methods, name, signature) == NULL) { + if ((mo = InstanceKlass::find_instance_method(class_methods, name, signature)) == NULL) { // did not find it in the method table of the current class if ((default_methods == NULL) || InstanceKlass::find_method(default_methods, name, signature) == NULL) { @@ -716,7 +725,7 @@ return true; } - Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature); + mo = InstanceKlass::cast(super)->lookup_method(name, signature); while (mo != NULL && mo->access_flags().is_static() && mo->method_holder() != NULL && mo->method_holder()->super() != NULL) @@ -728,6 +737,18 @@ return true; } } + } else { + // if the local class has a private method, the miranda will not + // override it, so a vtable slot is needed + if (mo->access_flags().is_private()) { + + // Second round, weed out any superinterface methods that turned + // into default methods, i.e. were concrete not abstract in the end + if ((default_methods == NULL) || + InstanceKlass::find_method(default_methods, name, signature) == NULL) { + return true; + } + } } return false; diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Wed Dec 17 12:48:26 2014 -0800 +++ b/src/share/vm/runtime/arguments.cpp Mon Dec 22 09:27:29 2014 -0800 @@ -2310,7 +2310,7 @@ "G1ConcMarkStepDurationMillis"); status = status && verify_interval(G1ConcRSHotCardLimit, 0, max_jubyte, "G1ConcRSHotCardLimit"); - status = status && verify_interval(G1ConcRSLogCacheSize, 0, 31, + status = status && verify_interval(G1ConcRSLogCacheSize, 0, 27, "G1ConcRSLogCacheSize"); status = status && verify_interval(StringDeduplicationAgeThreshold, 1, markOopDesc::max_age, "StringDeduplicationAgeThreshold"); diff -r 6bed0ca7a09a -r eff80b90c3ad src/share/vm/utilities/vmError.cpp