Tue, 11 Mar 2014 14:02:23 -0700
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Tue Mar 04 15:46:33 2014 -0500 1.2 +++ b/.hgtags Tue Mar 11 14:02:23 2014 -0700 1.3 @@ -418,6 +418,10 @@ 1.4 35038da7bb9ddd367a0a6bf926dfb281aee1d554 jdk8-b127 1.5 874c0b4a946c362bbf20d37c2a564b39093152e6 jdk8-b128 1.6 cb39165c4a65bbff8db356df411e762f9e5423b8 jdk8-b129 1.7 +1dbaf664a611e5d9cab6d1be42537b67d0d05f94 jdk8-b130 1.8 +b5e7ebfe185cb4c2eeb8a919025fc6a26be2fcef jdk8-b131 1.9 +9f9179e8f0cfe74c08f3716cf3c38e21e1de4c4a hs25-b70 1.10 +0c94c41dcd70e9a9b4d96e31275afd5a73daa72d jdk8-b132 1.11 4a35ef38e2a7bc64df20c7700ba69b37e3ddb8b5 jdk8u5-b01 1.12 e5561d89fe8bfc79cd6c8fcc36d270cc6a49ec6e jdk8u5-b02 1.13 2f9eb9fcab6c42c8c84ddb44170ea33235116d84 jdk8u5-b03 1.14 @@ -429,3 +433,5 @@ 1.15 21c1dfbed277791071947eed1c93806ccf48a7d8 jdk8u5-b08 1.16 6af9ce1c56a6545ec6c992a5f61b2eec924be040 jdk8u5-b09 1.17 629267e4f0b5155608edcd71922983be98786bd7 jdk8u5-b10 1.18 +17a75e692af397532e2b296b24f6b9b6c239c633 jdk8u5-b11 1.19 +9b289963cb9a14636fbe8faaa2dd6d3678464a7b jdk8u5-b12
2.1 --- a/make/hotspot_version Tue Mar 04 15:46:33 2014 -0500 2.2 +++ b/make/hotspot_version Tue Mar 11 14:02:23 2014 -0700 2.3 @@ -35,7 +35,7 @@ 2.4 2.5 HS_MAJOR_VER=25 2.6 HS_MINOR_VER=5 2.7 -HS_BUILD_NUMBER=01 2.8 +HS_BUILD_NUMBER=02 2.9 2.10 JDK_MAJOR_VER=1 2.11 JDK_MINOR_VER=8
3.1 --- a/src/share/vm/ci/ciMethod.cpp Tue Mar 04 15:46:33 2014 -0500 3.2 +++ b/src/share/vm/ci/ciMethod.cpp Tue Mar 11 14:02:23 2014 -0700 3.3 @@ -724,6 +724,11 @@ 3.4 3.5 VM_ENTRY_MARK; 3.6 3.7 + // Disable CHA for default methods for now 3.8 + if (root_m->get_Method()->is_default_method()) { 3.9 + return NULL; 3.10 + } 3.11 + 3.12 methodHandle target; 3.13 { 3.14 MutexLocker locker(Compile_lock);
4.1 --- a/src/share/vm/opto/output.cpp Tue Mar 04 15:46:33 2014 -0500 4.2 +++ b/src/share/vm/opto/output.cpp Tue Mar 11 14:02:23 2014 -0700 4.3 @@ -344,6 +344,11 @@ 4.4 uint* jmp_offset = NEW_RESOURCE_ARRAY(uint,nblocks); 4.5 uint* jmp_size = NEW_RESOURCE_ARRAY(uint,nblocks); 4.6 int* jmp_nidx = NEW_RESOURCE_ARRAY(int ,nblocks); 4.7 + 4.8 + // Collect worst case block paddings 4.9 + int* block_worst_case_pad = NEW_RESOURCE_ARRAY(int, nblocks); 4.10 + memset(block_worst_case_pad, 0, nblocks * sizeof(int)); 4.11 + 4.12 DEBUG_ONLY( uint *jmp_target = NEW_RESOURCE_ARRAY(uint,nblocks); ) 4.13 DEBUG_ONLY( uint *jmp_rule = NEW_RESOURCE_ARRAY(uint,nblocks); ) 4.14 4.15 @@ -460,6 +465,7 @@ 4.16 last_avoid_back_to_back_adr += max_loop_pad; 4.17 } 4.18 blk_size += max_loop_pad; 4.19 + block_worst_case_pad[i + 1] = max_loop_pad; 4.20 } 4.21 } 4.22 4.23 @@ -499,9 +505,16 @@ 4.24 if (bnum > i) { // adjust following block's offset 4.25 offset -= adjust_block_start; 4.26 } 4.27 + 4.28 + // This block can be a loop header, account for the padding 4.29 + // in the previous block. 4.30 + int block_padding = block_worst_case_pad[i]; 4.31 + assert(i == 0 || block_padding == 0 || br_offs >= block_padding, "Should have at least a padding on top"); 4.32 // In the following code a nop could be inserted before 4.33 // the branch which will increase the backward distance. 4.34 - bool needs_padding = ((uint)br_offs == last_may_be_short_branch_adr); 4.35 + bool needs_padding = ((uint)(br_offs - block_padding) == last_may_be_short_branch_adr); 4.36 + assert(!needs_padding || jmp_offset[i] == 0, "padding only branches at the beginning of block"); 4.37 + 4.38 if (needs_padding && offset <= 0) 4.39 offset -= nop_size; 4.40
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/test/compiler/inlining/InlineDefaultMethod1.java Tue Mar 11 14:02:23 2014 -0700 5.3 @@ -0,0 +1,58 @@ 5.4 +/* 5.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 5.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.7 + * 5.8 + * This code is free software; you can redistribute it and/or modify it 5.9 + * under the terms of the GNU General Public License version 2 only, as 5.10 + * published by the Free Software Foundation. 5.11 + * 5.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 5.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5.15 + * version 2 for more details (a copy is included in the LICENSE file that 5.16 + * accompanied this code). 5.17 + * 5.18 + * You should have received a copy of the GNU General Public License version 5.19 + * 2 along with this work; if not, write to the Free Software Foundation, 5.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5.21 + * 5.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5.23 + * or visit www.oracle.com if you need additional information or have any 5.24 + * questions. 5.25 + */ 5.26 + 5.27 +/* 5.28 + * @test 5.29 + * @bug 8036100 5.30 + * @summary Default method returns true for a while, and then returns false 5.31 + * @run main/othervm -Xcomp -XX:CompileOnly=InlineDefaultMethod1::test 5.32 + * -XX:CompileOnly=I1::m -XX:CompileOnly=I2::m 5.33 + * InlineDefaultMethod1 5.34 + */ 5.35 +interface I1 { 5.36 + default public int m() { return 0; } 5.37 +} 5.38 + 5.39 +interface I2 extends I1 { 5.40 + default public int m() { return 1; } 5.41 +} 5.42 + 5.43 +abstract class A implements I1 { 5.44 +} 5.45 + 5.46 +class B extends A implements I2 { 5.47 +} 5.48 + 5.49 +public class InlineDefaultMethod1 { 5.50 + public static void test(A obj) { 5.51 + int id = obj.m(); 5.52 + if (id != 1) { 5.53 + throw new AssertionError("Called wrong method: 1 != "+id); 5.54 + } 5.55 + } 5.56 + 5.57 + public static void main(String[] args) throws InterruptedException { 5.58 + test(new B()); 5.59 + System.out.println("TEST PASSED"); 5.60 + } 5.61 +}