Tue, 03 Jun 2014 06:10:34 +0000
Merge
1.1 --- a/make/bsd/makefiles/universal.gmk Mon Apr 28 09:27:47 2014 +0200 1.2 +++ b/make/bsd/makefiles/universal.gmk Tue Jun 03 06:10:34 2014 +0000 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -74,19 +74,21 @@ 1.11 1.12 1.13 # Replace arch specific binaries with universal binaries 1.14 +# Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) 1.15 +# That symbolic link belongs to the 'jdk' build. 1.16 export_universal: 1.17 $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} 1.18 $(RM) -r $(JDK_IMAGE_DIR)/jre/lib/{i386,amd64} 1.19 - $(RM) $(JDK_IMAGE_DIR)/jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) 1.20 ($(CD) $(EXPORT_PATH) && \ 1.21 $(TAR) -cf - *) | \ 1.22 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xpf -) 1.23 1.24 1.25 # Overlay universal binaries 1.26 +# Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) 1.27 +# That symbolic link belongs to the 'jdk' build. 1.28 copy_universal: 1.29 $(RM) -r $(JDK_IMAGE_DIR)$(COPY_SUBDIR)/jre/lib/{i386,amd64} 1.30 - $(RM) $(JDK_IMAGE_DIR)$(COPY_SUBDIR)/jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) 1.31 ($(CD) $(EXPORT_PATH)$(COPY_SUBDIR) && \ 1.32 $(TAR) -cf - *) | \ 1.33 ($(CD) $(JDK_IMAGE_DIR)$(COPY_SUBDIR) && $(TAR) -xpf -)
2.1 --- a/src/cpu/sparc/vm/copy_sparc.hpp Mon Apr 28 09:27:47 2014 +0200 2.2 +++ b/src/cpu/sparc/vm/copy_sparc.hpp Tue Jun 03 06:10:34 2014 +0000 2.3 @@ -184,7 +184,7 @@ 2.4 assert(MinObjAlignmentInBytes >= BytesPerLong, "need alternate implementation"); 2.5 2.6 if (value == 0 && UseBlockZeroing && 2.7 - (count > (BlockZeroingLowLimit >> LogHeapWordSize))) { 2.8 + (count > (size_t)(BlockZeroingLowLimit >> LogHeapWordSize))) { 2.9 // Call it only when block zeroing is used 2.10 ((_zero_Fn)StubRoutines::zero_aligned_words())(tohw, count); 2.11 } else {
3.1 --- a/src/share/vm/ci/bcEscapeAnalyzer.cpp Mon Apr 28 09:27:47 2014 +0200 3.2 +++ b/src/share/vm/ci/bcEscapeAnalyzer.cpp Tue Jun 03 06:10:34 2014 +0000 3.3 @@ -158,6 +158,9 @@ 3.4 3.5 void BCEscapeAnalyzer::set_method_escape(ArgumentMap vars) { 3.6 clear_bits(vars, _arg_local); 3.7 + if (vars.contains_allocated()) { 3.8 + _allocated_escapes = true; 3.9 + } 3.10 } 3.11 3.12 void BCEscapeAnalyzer::set_global_escape(ArgumentMap vars, bool merge) {
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/test/compiler/EscapeAnalysis/TestAllocatedEscapesPtrComparison.java Tue Jun 03 06:10:34 2014 +0000 4.3 @@ -0,0 +1,107 @@ 4.4 +/* 4.5 + * Copyright 2014 Google, Inc. All Rights Reserved. 4.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.7 + * 4.8 + * This code is free software; you can redistribute it and/or modify it 4.9 + * under the terms of the GNU General Public License version 2 only, as 4.10 + * published by the Free Software Foundation. 4.11 + * 4.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 4.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4.15 + * version 2 for more details (a copy is included in the LICENSE file that 4.16 + * accompanied this code). 4.17 + * 4.18 + * You should have received a copy of the GNU General Public License version 4.19 + * 2 along with this work; if not, write to the Free Software Foundation, 4.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4.21 + * 4.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4.23 + * or visit www.oracle.com if you need additional information or have any 4.24 + * questions. 4.25 + */ 4.26 + 4.27 +/* 4.28 + * @test 4.29 + * @bug 8043354 4.30 + * @summary bcEscapeAnalyzer allocated_escapes not conservative enough 4.31 + * @run main/othervm -XX:CompileOnly=.visitAndPop TestAllocatedEscapesPtrComparison 4.32 + * @author Chuck Rasbold rasbold@google.com 4.33 + */ 4.34 + 4.35 +/* 4.36 + * Test always passes with -XX:-OptmimizePtrCompare 4.37 + */ 4.38 + 4.39 +import java.util.ArrayList; 4.40 +import java.util.List; 4.41 + 4.42 +public class TestAllocatedEscapesPtrComparison { 4.43 + 4.44 + static TestAllocatedEscapesPtrComparison dummy; 4.45 + 4.46 + class Marker { 4.47 + } 4.48 + 4.49 + List<Marker> markerList = new ArrayList<>(); 4.50 + 4.51 + // Suppress compilation of this method, it must be processed 4.52 + // by the bytecode escape analyzer. 4.53 + 4.54 + // Make a new marker and put it on the List 4.55 + Marker getMarker() { 4.56 + // result escapes through markerList 4.57 + final Marker result = new Marker(); 4.58 + markerList.add(result); 4.59 + return result; 4.60 + } 4.61 + 4.62 + void visit(int depth) { 4.63 + // Make a new marker 4.64 + getMarker(); 4.65 + 4.66 + // Call visitAndPop every once in a while 4.67 + // Cap the depth of our recursive visits 4.68 + if (depth % 10 == 2) { 4.69 + visitAndPop(depth + 1); 4.70 + } else if (depth < 15) { 4.71 + visit(depth + 1); 4.72 + } 4.73 + } 4.74 + 4.75 + void visitAndPop(int depth) { 4.76 + // Random dummy allocation to force EscapeAnalysis to process this method 4.77 + dummy = new TestAllocatedEscapesPtrComparison(); 4.78 + 4.79 + // Make a new marker 4.80 + Marker marker = getMarker(); 4.81 + 4.82 + visit(depth + 1); 4.83 + 4.84 + // Walk and pop the marker list up to the current marker 4.85 + boolean found = false; 4.86 + for (int i = markerList.size() - 1; i >= 0; i--) { 4.87 + Marker removed = markerList.remove(i); 4.88 + 4.89 + // In the failure, EA mistakenly converts this comparison to false 4.90 + if (removed == marker) { 4.91 + found = true; 4.92 + break; 4.93 + } 4.94 + } 4.95 + 4.96 + if (!found) { 4.97 + throw new RuntimeException("test fails"); 4.98 + } 4.99 + } 4.100 + 4.101 + 4.102 + public static void main(String args[]) { 4.103 + TestAllocatedEscapesPtrComparison tc = new TestAllocatedEscapesPtrComparison(); 4.104 + 4.105 + // Warmup and run enough times 4.106 + for (int i = 0; i < 20000; i++) { 4.107 + tc.visit(0); 4.108 + } 4.109 + } 4.110 +}