# HG changeset patch # User asaha # Date 1421699301 28800 # Node ID 9f5afbcc45ce06e15af0ac26a1ace5b8bb3470b1 # Parent b79c4b34d157b3376aa4d52cf0cc78d318078c71# Parent 6ac667bd4eb139c7ff8a3a2d0886ff98bcc63648 Merge diff -r 6ac667bd4eb1 -r 9f5afbcc45ce .hgtags --- a/.hgtags Thu Jan 15 11:19:46 2015 -0800 +++ b/.hgtags Mon Jan 19 12:28:21 2015 -0800 @@ -547,6 +547,8 @@ 28b50d07f6f8c5a567b6a25e95a423948114a004 jdk8u25-b17 639abc668bfe995dba811dd35411b9ea8a9041cd jdk8u25-b18 c3528699fb33fe3eb1d117504184ae7ab2507aa1 jdk8u25-b31 +631f0c7b49c091c6865d79d248d6551a270ac22f jdk8u25-b32 +4e1f52384f9ffa803838acad545cd63de48a7b35 jdk8u25-b33 5bb683bbe2c74876d585b5c3232fc3aab7b23e97 jdk8u31-b00 5bb686ae3b89f8aa1c74331b2d24e2a5ebd43448 jdk8u31-b01 087678da96603c9705b38b6cc4a6569ac7b4420a jdk8u31-b02 @@ -561,6 +563,7 @@ 9906d432d6dbd2cda242e3f3cfde7cf6c90245bf jdk8u31-b11 e13839545238d1ecf17f0489bb6fb765de46719a jdk8u31-b12 4206e725d584be942c25ff46ff23d8e299ca4a4c jdk8u31-b13 +b517d3a9aebf0fee64808f9a7c0ef8e0b82d5ed3 jdk8u31-b31 1b3abbeee961dee49780c0e4af5337feb918c555 jdk8u40-b10 f10fe402dfb1543723b4b117a7cba3ea3d4159f1 hs25.40-b15 99372b2fee0eb8b3452f47230e84aa6e97003184 jdk8u40-b11 @@ -583,3 +586,7 @@ c3933f52eeb33f70ee562464edddfe9f01d944fd jdk8u40-b20 d2e9a6bec4f2eec8506eed16f7324992a85d8480 hs25.40-b24 25ec4a67433744bbe3406e5069e7fd1876ebbf2f jdk8u40-b21 +b95f13f05f553309cd74d6ccf8fcedb259c6716c jdk8u45-b00 +41c3c456e326185053f0654be838f4b0bfb38078 jdk8u45-b01 +626fd8c2eec63e2a2dff3839bfe12c0431bf00a4 jdk8u45-b02 +f41aa01b0a043611ee0abcb81a40f7d80085ec27 jdk8u45-b03 diff -r 6ac667bd4eb1 -r 9f5afbcc45ce make/hotspot_version --- a/make/hotspot_version Thu Jan 15 11:19:46 2015 -0800 +++ b/make/hotspot_version Mon Jan 19 12:28:21 2015 -0800 @@ -34,8 +34,8 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2015 HS_MAJOR_VER=25 -HS_MINOR_VER=40 -HS_BUILD_NUMBER=24 +HS_MINOR_VER=45 +HS_BUILD_NUMBER=01 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/os/bsd/vm/perfMemory_bsd.cpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/os/linux/vm/perfMemory_linux.cpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/os/solaris/vm/perfMemory_solaris.cpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/classfile/defaultMethods.cpp --- a/src/share/vm/classfile/defaultMethods.cpp Thu Jan 15 11:19:46 2015 -0800 +++ b/src/share/vm/classfile/defaultMethods.cpp Mon Jan 19 12:28:21 2015 -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 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/code/dependencies.cpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/code/dependencies.hpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/oops/instanceKlass.cpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/oops/instanceKlass.hpp diff -r 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/oops/klassVtable.cpp --- a/src/share/vm/oops/klassVtable.cpp Thu Jan 15 11:19:46 2015 -0800 +++ b/src/share/vm/oops/klassVtable.cpp Mon Jan 19 12:28:21 2015 -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 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Thu Jan 15 11:19:46 2015 -0800 +++ b/src/share/vm/runtime/arguments.cpp Mon Jan 19 12:28:21 2015 -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 6ac667bd4eb1 -r 9f5afbcc45ce src/share/vm/utilities/vmError.cpp