From 8772e141c6899cc275dd6d55098516ff96c95c2e Mon Sep 17 00:00:00 2001 From: aijiaming Date: Fri, 19 Mar 2021 10:35:23 +0800 Subject: [PATCH] I3BRQ7: add 8254078-8217918.patch --- ...8-C2-XX-AggressiveUnboxing-is-broken.patch | 263 ++++++++++++++++++ ...utStream-is-very-slow-post-disabling.patch | 218 +++++++++++++++ ...-symbol-issue-during-JDK11-x64-build.patch | 23 ++ ...rade-the-symver-of-log2f-posix-spawn.patch | 46 +++ java-11-openjdk.spec | 16 +- 5 files changed, 565 insertions(+), 1 deletion(-) create mode 100755 8217918-C2-XX-AggressiveUnboxing-is-broken.patch create mode 100755 8254078-DataOutputStream-is-very-slow-post-disabling.patch create mode 100755 Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch create mode 100755 downgrade-the-symver-of-log2f-posix-spawn.patch diff --git a/8217918-C2-XX-AggressiveUnboxing-is-broken.patch b/8217918-C2-XX-AggressiveUnboxing-is-broken.patch new file mode 100755 index 0000000..03a94c2 --- /dev/null +++ b/8217918-C2-XX-AggressiveUnboxing-is-broken.patch @@ -0,0 +1,263 @@ +From 8da2787209da1906e3a92fff95dc46abe793b433 Mon Sep 17 00:00:00 2001 +Date: Thu, 18 Mar 2021 12:36:13 +0000 +Subject: [PATCH 3/4] 8217918: C2 -XX:+AggressiveUnboxing is broken + +--- + src/hotspot/share/opto/cfgnode.hpp | 4 +- + src/hotspot/share/opto/phaseX.cpp | 96 ++++++++++++++++++++++++------ + src/hotspot/share/opto/phaseX.hpp | 10 ++++ + src/hotspot/share/opto/type.cpp | 16 +++++ + src/hotspot/share/opto/type.hpp | 4 ++ + 5 files changed, 111 insertions(+), 19 deletions(-) + +diff --git a/src/hotspot/share/opto/cfgnode.hpp b/src/hotspot/share/opto/cfgnode.hpp +index 0d8c9b33b..04029ca91 100644 +--- a/src/hotspot/share/opto/cfgnode.hpp ++++ b/src/hotspot/share/opto/cfgnode.hpp +@@ -118,11 +118,13 @@ class JProjNode : public ProjNode { + // can turn PhiNodes into copys in-place by NULL'ing out their RegionNode + // input in slot 0. + class PhiNode : public TypeNode { ++ friend class PhaseRenumberLive; ++ + const TypePtr* const _adr_type; // non-null only for Type::MEMORY nodes. + // The following fields are only used for data PhiNodes to indicate + // that the PhiNode represents the value of a known instance field. + int _inst_mem_id; // Instance memory id (node index of the memory Phi) +- const int _inst_id; // Instance id of the memory slice. ++ int _inst_id; // Instance id of the memory slice. + const int _inst_index; // Alias index of the instance memory slice. + // Array elements references have the same alias_idx but different offset. + const int _inst_offset; // Offset of the instance memory slice. +diff --git a/src/hotspot/share/opto/phaseX.cpp b/src/hotspot/share/opto/phaseX.cpp +index 9d5d4deed..f4a38cd28 100644 +--- a/src/hotspot/share/opto/phaseX.cpp ++++ b/src/hotspot/share/opto/phaseX.cpp +@@ -463,55 +463,115 @@ PhaseRemoveUseless::PhaseRemoveUseless(PhaseGVN *gvn, Unique_Node_List *worklist + PhaseRenumberLive::PhaseRenumberLive(PhaseGVN* gvn, + Unique_Node_List* worklist, Unique_Node_List* new_worklist, + PhaseNumber phase_num) : +- PhaseRemoveUseless(gvn, worklist, Remove_Useless_And_Renumber_Live) { +- ++ PhaseRemoveUseless(gvn, worklist, Remove_Useless_And_Renumber_Live), ++ _new_type_array(C->comp_arena()), ++ _old2new_map(C->unique(), C->unique(), -1), ++ _delayed(Thread::current()->resource_area()), ++ _is_pass_finished(false), ++ _live_node_count(C->live_nodes()) ++{ + assert(RenumberLiveNodes, "RenumberLiveNodes must be set to true for node renumbering to take place"); + assert(C->live_nodes() == _useful.size(), "the number of live nodes must match the number of useful nodes"); + assert(gvn->nodes_size() == 0, "GVN must not contain any nodes at this point"); ++ assert(_delayed.size() == 0, "should be empty"); + +- uint old_unique_count = C->unique(); +- uint live_node_count = C->live_nodes(); + uint worklist_size = worklist->size(); + +- // Storage for the updated type information. +- Type_Array new_type_array(C->comp_arena()); +- + // Iterate over the set of live nodes. +- uint current_idx = 0; // The current new node ID. Incremented after every assignment. +- for (uint i = 0; i < _useful.size(); i++) { +- Node* n = _useful.at(i); +- // Sanity check that fails if we ever decide to execute this phase after EA +- assert(!n->is_Phi() || n->as_Phi()->inst_mem_id() == -1, "should not be linked to data Phi"); +- const Type* type = gvn->type_or_null(n); +- new_type_array.map(current_idx, type); ++ for (uint current_idx = 0; current_idx < _useful.size(); current_idx++) { ++ Node* n = _useful.at(current_idx); + + bool in_worklist = false; + if (worklist->member(n)) { + in_worklist = true; + } + ++ const Type* type = gvn->type_or_null(n); ++ _new_type_array.map(current_idx, type); ++ ++ assert(_old2new_map.at(n->_idx) == -1, "already seen"); ++ _old2new_map.at_put(n->_idx, current_idx); ++ + n->set_idx(current_idx); // Update node ID. + + if (in_worklist) { + new_worklist->push(n); + } + +- current_idx++; ++ if (update_embedded_ids(n) < 0) { ++ _delayed.push(n); // has embedded IDs; handle later ++ } + } + + assert(worklist_size == new_worklist->size(), "the new worklist must have the same size as the original worklist"); +- assert(live_node_count == current_idx, "all live nodes must be processed"); ++ assert(_live_node_count == _useful.size(), "all live nodes must be processed"); ++ ++ _is_pass_finished = true; // pass finished; safe to process delayed updates ++ ++ while (_delayed.size() > 0) { ++ Node* n = _delayed.pop(); ++ int no_of_updates = update_embedded_ids(n); ++ assert(no_of_updates > 0, "should be updated"); ++ } + + // Replace the compiler's type information with the updated type information. +- gvn->replace_types(new_type_array); ++ gvn->replace_types(_new_type_array); + + // Update the unique node count of the compilation to the number of currently live nodes. +- C->set_unique(live_node_count); ++ C->set_unique(_live_node_count); + + // Set the dead node count to 0 and reset dead node list. + C->reset_dead_node_list(); + } + ++int PhaseRenumberLive::new_index(int old_idx) { ++ assert(_is_pass_finished, "not finished"); ++ if (_old2new_map.at(old_idx) == -1) { // absent ++ // Allocate a placeholder to preserve uniqueness ++ _old2new_map.at_put(old_idx, _live_node_count); ++ _live_node_count++; ++ } ++ return _old2new_map.at(old_idx); ++} ++ ++int PhaseRenumberLive::update_embedded_ids(Node* n) { ++ int no_of_updates = 0; ++ if (n->is_Phi()) { ++ PhiNode* phi = n->as_Phi(); ++ if (phi->_inst_id != -1) { ++ if (!_is_pass_finished) { ++ return -1; // delay ++ } ++ int new_idx = new_index(phi->_inst_id); ++ assert(new_idx != -1, ""); ++ phi->_inst_id = new_idx; ++ no_of_updates++; ++ } ++ if (phi->_inst_mem_id != -1) { ++ if (!_is_pass_finished) { ++ return -1; // delay ++ } ++ int new_idx = new_index(phi->_inst_mem_id); ++ assert(new_idx != -1, ""); ++ phi->_inst_mem_id = new_idx; ++ no_of_updates++; ++ } ++ } ++ ++ const Type* type = _new_type_array.fast_lookup(n->_idx); ++ if (type != NULL && type->isa_oopptr() && type->is_oopptr()->is_known_instance()) { ++ if (!_is_pass_finished) { ++ return -1; // delay ++ } ++ int old_idx = type->is_oopptr()->instance_id(); ++ int new_idx = new_index(old_idx); ++ const Type* new_type = type->is_oopptr()->with_instance_id(new_idx); ++ _new_type_array.map(n->_idx, new_type); ++ no_of_updates++; ++ } ++ ++ return no_of_updates; ++} + + //============================================================================= + //------------------------------PhaseTransform--------------------------------- +diff --git a/src/hotspot/share/opto/phaseX.hpp b/src/hotspot/share/opto/phaseX.hpp +index 3b33a8cb2..ef5eb488e 100644 +--- a/src/hotspot/share/opto/phaseX.hpp ++++ b/src/hotspot/share/opto/phaseX.hpp +@@ -157,6 +157,16 @@ public: + // Phase that first performs a PhaseRemoveUseless, then it renumbers compiler + // structures accordingly. + class PhaseRenumberLive : public PhaseRemoveUseless { ++protected: ++ Type_Array _new_type_array; // Storage for the updated type information. ++ GrowableArray _old2new_map; ++ Node_List _delayed; ++ bool _is_pass_finished; ++ uint _live_node_count; ++ ++ int update_embedded_ids(Node* n); ++ int new_index(int old_idx); ++ + public: + PhaseRenumberLive(PhaseGVN* gvn, + Unique_Node_List* worklist, Unique_Node_List* new_worklist, +diff --git a/src/hotspot/share/opto/type.cpp b/src/hotspot/share/opto/type.cpp +index 0078b8773..964f9d247 100644 +--- a/src/hotspot/share/opto/type.cpp ++++ b/src/hotspot/share/opto/type.cpp +@@ -3456,6 +3456,12 @@ const TypePtr* TypeOopPtr::with_inline_depth(int depth) const { + return make(_ptr, _offset, _instance_id, _speculative, depth); + } + ++//------------------------------with_instance_id-------------------------------- ++const TypePtr* TypeOopPtr::with_instance_id(int instance_id) const { ++ assert(_instance_id != -1, "should be known"); ++ return make(_ptr, _offset, instance_id, _speculative, _inline_depth); ++} ++ + //------------------------------meet_instance_id-------------------------------- + int TypeOopPtr::meet_instance_id( int instance_id ) const { + // Either is 'TOP' instance? Return the other instance! +@@ -4059,6 +4065,11 @@ const TypePtr *TypeInstPtr::with_inline_depth(int depth) const { + return make(_ptr, klass(), klass_is_exact(), const_oop(), _offset, _instance_id, _speculative, depth); + } + ++const TypePtr *TypeInstPtr::with_instance_id(int instance_id) const { ++ assert(is_known_instance(), "should be known"); ++ return make(_ptr, klass(), klass_is_exact(), const_oop(), _offset, instance_id, _speculative, _inline_depth); ++} ++ + //============================================================================= + // Convenience common pre-built types. + const TypeAryPtr *TypeAryPtr::RANGE; +@@ -4529,6 +4540,11 @@ const TypePtr *TypeAryPtr::with_inline_depth(int depth) const { + return make(_ptr, _const_oop, _ary->remove_speculative()->is_ary(), _klass, _klass_is_exact, _offset, _instance_id, _speculative, depth); + } + ++const TypePtr *TypeAryPtr::with_instance_id(int instance_id) const { ++ assert(is_known_instance(), "should be known"); ++ return make(_ptr, _const_oop, _ary->remove_speculative()->is_ary(), _klass, _klass_is_exact, _offset, instance_id, _speculative, _inline_depth); ++} ++ + //============================================================================= + + //------------------------------hash------------------------------------------- +diff --git a/src/hotspot/share/opto/type.hpp b/src/hotspot/share/opto/type.hpp +index ca92fe3ab..e9ed7ce40 100644 +--- a/src/hotspot/share/opto/type.hpp ++++ b/src/hotspot/share/opto/type.hpp +@@ -1048,6 +1048,8 @@ public: + virtual bool would_improve_type(ciKlass* exact_kls, int inline_depth) const; + virtual const TypePtr* with_inline_depth(int depth) const; + ++ virtual const TypePtr* with_instance_id(int instance_id) const; ++ + virtual const Type *xdual() const; // Compute dual right now. + // the core of the computation of the meet for TypeOopPtr and for its subclasses + virtual const Type *xmeet_helper(const Type *t) const; +@@ -1124,6 +1126,7 @@ class TypeInstPtr : public TypeOopPtr { + // Speculative type helper methods. + virtual const Type* remove_speculative() const; + virtual const TypePtr* with_inline_depth(int depth) const; ++ virtual const TypePtr* with_instance_id(int instance_id) const; + + // the core of the computation of the meet of 2 types + virtual const Type *xmeet_helper(const Type *t) const; +@@ -1211,6 +1214,7 @@ public: + // Speculative type helper methods. + virtual const Type* remove_speculative() const; + virtual const TypePtr* with_inline_depth(int depth) const; ++ virtual const TypePtr* with_instance_id(int instance_id) const; + + // the core of the computation of the meet of 2 types + virtual const Type *xmeet_helper(const Type *t) const; +-- +2.19.0 + diff --git a/8254078-DataOutputStream-is-very-slow-post-disabling.patch b/8254078-DataOutputStream-is-very-slow-post-disabling.patch new file mode 100755 index 0000000..5f7b52a --- /dev/null +++ b/8254078-DataOutputStream-is-very-slow-post-disabling.patch @@ -0,0 +1,218 @@ +From 0f9ef0bc57aa0e7d8457b645374be74d510ea7ae Mon Sep 17 00:00:00 2001 +Date: Thu, 18 Mar 2021 12:35:14 +0000 +Subject: [PATCH 2/4] 8254078: DataOutputStream is very slow post disabling + +--- + .../classes/java/io/DataInputStream.java | 7 +- + .../classes/java/io/DataOutputStream.java | 24 ++-- + .../bench/java/io/DataOutputStreamTest.java | 124 ++++++++++++++++++ + 3 files changed, 144 insertions(+), 11 deletions(-) + create mode 100644 test/micro/org/openjdk/bench/java/io/DataOutputStreamTest.java + +diff --git a/src/java.base/share/classes/java/io/DataInputStream.java b/src/java.base/share/classes/java/io/DataInputStream.java +index f92c4f91b..114857691 100644 +--- a/src/java.base/share/classes/java/io/DataInputStream.java ++++ b/src/java.base/share/classes/java/io/DataInputStream.java +@@ -31,9 +31,10 @@ package java.io; + * way. An application uses a data output stream to write data that + * can later be read by a data input stream. + *

+- * DataInputStream is not necessarily safe for multithreaded access. +- * Thread safety is optional and is the responsibility of users of +- * methods in this class. ++ * A DataInputStream is not safe for use by multiple concurrent ++ * threads. If a DataInputStream is to be used by more than one ++ * thread then access to the data input stream should be controlled ++ * by appropriate synchronization. + * + * @author Arthur van Hoff + * @see java.io.DataOutputStream +diff --git a/src/java.base/share/classes/java/io/DataOutputStream.java b/src/java.base/share/classes/java/io/DataOutputStream.java +index 392abba92..7c0962442 100644 +--- a/src/java.base/share/classes/java/io/DataOutputStream.java ++++ b/src/java.base/share/classes/java/io/DataOutputStream.java +@@ -29,6 +29,11 @@ package java.io; + * A data output stream lets an application write primitive Java data + * types to an output stream in a portable way. An application can + * then use a data input stream to read the data back in. ++ *

++ * A DataOutputStream is not safe for use by multiple concurrent ++ * threads. If a DataOutputStream is to be used by more than one ++ * thread then access to the data output stream should be controlled ++ * by appropriate synchronization. + * + * @author unascribed + * @see java.io.DataInputStream +@@ -164,8 +169,9 @@ class DataOutputStream extends FilterOutputStream implements DataOutput { + * @see java.io.FilterOutputStream#out + */ + public final void writeShort(int v) throws IOException { +- out.write((v >>> 8) & 0xFF); +- out.write((v >>> 0) & 0xFF); ++ writeBuffer[0] = (byte)(v >>> 8); ++ writeBuffer[1] = (byte)(v >>> 0); ++ out.write(writeBuffer, 0, 2); + incCount(2); + } + +@@ -179,8 +185,9 @@ class DataOutputStream extends FilterOutputStream implements DataOutput { + * @see java.io.FilterOutputStream#out + */ + public final void writeChar(int v) throws IOException { +- out.write((v >>> 8) & 0xFF); +- out.write((v >>> 0) & 0xFF); ++ writeBuffer[0] = (byte)(v >>> 8); ++ writeBuffer[1] = (byte)(v >>> 0); ++ out.write(writeBuffer, 0, 2); + incCount(2); + } + +@@ -194,10 +201,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput { + * @see java.io.FilterOutputStream#out + */ + public final void writeInt(int v) throws IOException { +- out.write((v >>> 24) & 0xFF); +- out.write((v >>> 16) & 0xFF); +- out.write((v >>> 8) & 0xFF); +- out.write((v >>> 0) & 0xFF); ++ writeBuffer[0] = (byte)(v >>> 24); ++ writeBuffer[1] = (byte)(v >>> 16); ++ writeBuffer[2] = (byte)(v >>> 8); ++ writeBuffer[3] = (byte)(v >>> 0); ++ out.write(writeBuffer, 0, 4); + incCount(4); + } + +diff --git a/test/micro/org/openjdk/bench/java/io/DataOutputStreamTest.java b/test/micro/org/openjdk/bench/java/io/DataOutputStreamTest.java +new file mode 100644 +index 000000000..2f573e6dd +--- /dev/null ++++ b/test/micro/org/openjdk/bench/java/io/DataOutputStreamTest.java +@@ -0,0 +1,124 @@ ++/* ++ * Copyright (c) 2020, Red Hat Inc. 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. ++ */ ++ ++package org.openjdk.bench.java.io; ++ ++import org.openjdk.jmh.annotations.*; ++ ++import java.io.*; ++import java.util.concurrent.TimeUnit; ++ ++@BenchmarkMode(Mode.AverageTime) ++@OutputTimeUnit(TimeUnit.MICROSECONDS) ++@Fork(value = 1, warmups = 0) ++@Measurement(iterations = 6, time = 1) ++@Warmup(iterations=2, time = 2) ++@State(Scope.Benchmark) ++public class DataOutputStreamTest { ++ ++ public enum BasicType {CHAR, SHORT, INT, STRING} ++ @Param({"CHAR", "SHORT", "INT", /* "STRING"*/}) BasicType basicType; ++ ++ @Param({"4096"}) int size; ++ ++ final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(size); ++ File f; ++ String outputString; ++ FileOutputStream fileOutputStream; ++ DataOutput bufferedFileStream, rawFileStream, byteArrayStream; ++ ++ @Setup(Level.Trial) ++ public void setup() throws Exception { ++ f = File.createTempFile("DataOutputStreamTest","out"); ++ fileOutputStream = new FileOutputStream(f); ++ byteArrayStream = new DataOutputStream(byteArrayOutputStream); ++ rawFileStream = new DataOutputStream(fileOutputStream); ++ bufferedFileStream = new DataOutputStream(new BufferedOutputStream(fileOutputStream)); ++ outputString = new String(new byte[size]); ++ } ++ ++ public void writeChars(DataOutput dataOutput) ++ throws Exception { ++ for (int i = 0; i < size; i += 2) { ++ dataOutput.writeChar(i); ++ } ++ } ++ ++ public void writeShorts(DataOutput dataOutput) ++ throws Exception { ++ for (int i = 0; i < size; i += 2) { ++ dataOutput.writeShort(i); ++ } ++ } ++ ++ public void writeInts(DataOutput dataOutput) ++ throws Exception { ++ for (int i = 0; i < size; i += 4) { ++ dataOutput.writeInt(i); ++ } ++ } ++ ++ public void writeString(DataOutput dataOutput) ++ throws Exception { ++ dataOutput.writeChars(outputString); ++ } ++ ++ public void write(DataOutput dataOutput) ++ throws Exception { ++ switch (basicType) { ++ case CHAR: ++ writeChars(dataOutput); ++ break; ++ case SHORT: ++ writeShorts(dataOutput); ++ break; ++ case INT: ++ writeInts(dataOutput); ++ break; ++ case STRING: ++ writeString(dataOutput); ++ break; ++ } ++ } ++ ++ @Benchmark ++ public void dataOutputStreamOverByteArray() throws Exception { ++ byteArrayOutputStream.reset(); ++ write(byteArrayStream); ++ byteArrayOutputStream.flush(); ++ } ++ ++ @Benchmark ++ public void dataOutputStreamOverRawFileStream() throws Exception { ++ fileOutputStream.getChannel().position(0); ++ write(rawFileStream); ++ fileOutputStream.flush(); ++ } ++ ++ @Benchmark ++ public void dataOutputStreamOverBufferedFileStream() throws Exception{ ++ fileOutputStream.getChannel().position(0); ++ write(bufferedFileStream); ++ fileOutputStream.flush(); ++ } ++} +-- +2.19.0 + diff --git a/Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch b/Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch new file mode 100755 index 0000000..b6ac2b6 --- /dev/null +++ b/Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch @@ -0,0 +1,23 @@ +From ae703c0e86c278359f1bddcf35ccba87b556d901 Mon Sep 17 00:00:00 2001 +Date: Thu, 18 Mar 2021 12:37:11 +0000 +Subject: [PATCH 4/4] Fix the memcpy symbol issue during JDK11 x64 build + +--- + make/lib/Awt2dLibraries.gmk | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk +index 207a459ae..7b0441507 100644 +--- a/make/lib/Awt2dLibraries.gmk ++++ b/make/lib/Awt2dLibraries.gmk +@@ -597,6 +597,7 @@ else + $(eval $(call SetupJdkLibrary, BUILD_LIBHARFBUZZ, \ + NAME := harfbuzz, \ + EXCLUDE_FILES := $(LIBHARFBUZZ_EXCLUDE_FILES), \ ++ EXTRA_FILES := $(LIBMEMCPY_FILES), \ + TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ + CFLAGS := $(CFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \ + CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \ +-- +2.19.0 + diff --git a/downgrade-the-symver-of-log2f-posix-spawn.patch b/downgrade-the-symver-of-log2f-posix-spawn.patch new file mode 100755 index 0000000..70d410b --- /dev/null +++ b/downgrade-the-symver-of-log2f-posix-spawn.patch @@ -0,0 +1,46 @@ +From f9a030a58fcae2352e1b4a629901b6047c2f6610 Mon Sep 17 00:00:00 2001 +Date: Thu, 18 Mar 2021 12:34:06 +0000 +Subject: [PATCH 1/4] downgrade the symver of log2f posix spawn + +--- + src/hotspot/share/opto/parse2.cpp | 8 ++++++++ + src/java.base/unix/native/libjava/ProcessImpl_md.c | 4 ++++ + 2 files changed, 12 insertions(+) + +diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp +index 4cbc57eb8..2b21881bc 100644 +--- a/src/hotspot/share/opto/parse2.cpp ++++ b/src/hotspot/share/opto/parse2.cpp +@@ -45,6 +45,14 @@ + #include "runtime/deoptimization.hpp" + #include "runtime/sharedRuntime.hpp" + ++#ifdef AARCH64 ++ __asm__(".symver log2f,log2f@GLIBC_2.17"); ++#endif ++ ++#ifdef AMD64 ++ __asm__(".symver log2f,log2f@GLIBC_2.2.5"); ++#endif ++ + #ifndef PRODUCT + extern int explicit_null_checks_inserted, + explicit_null_checks_elided; +diff --git a/src/java.base/unix/native/libjava/ProcessImpl_md.c b/src/java.base/unix/native/libjava/ProcessImpl_md.c +index d0c2543ce..09d71b874 100644 +--- a/src/java.base/unix/native/libjava/ProcessImpl_md.c ++++ b/src/java.base/unix/native/libjava/ProcessImpl_md.c +@@ -48,6 +48,10 @@ + + #include "childproc.h" + ++#if defined(amd64) ++ __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5"); ++#endif ++ + /* + * There are 4 possible strategies we might use to "fork": + * +-- +2.19.0 + diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 06d216d..b87da2b 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -740,7 +740,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{newjavaver}.%{buildver} -Release: 2 +Release: 3 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -847,6 +847,10 @@ Patch59: add-SVE-backend-feature.patch #11.0.10 Patch60: 8240353.patch +Patch61: downgrade-the-symver-of-log2f-posix-spawn.patch +Patch62: 8254078-DataOutputStream-is-very-slow-post-disabling.patch +Patch63: 8217918-C2-XX-AggressiveUnboxing-is-broken.patch +Patch64: Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch BuildRequires: autoconf BuildRequires: alsa-lib-devel @@ -1117,6 +1121,10 @@ pushd %{top_level_dir_name} %patch58 -p1 %patch59 -p1 %patch60 -p1 +%patch61 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 popd # openjdk %patch1000 @@ -1620,6 +1628,12 @@ require "copy_jdk_configs.lua" %changelog +* Fri Mar 19 2021 aijm - 1:11.0.10.9-3 +- add downgrade-the-symver-of-log2f-posix-spawn.patch +- add 8254078-DataOutputStream-is-very-slow-post-disabling.patch +- add 8217918-C2-XX-AggressiveUnboxing-is-broken.patch +- add Fix-the-memcpy-symbol-issue-during-JDK11-x64-build.patch + * Sun Feb 7 2021 jdkboy - 1:11.0.10.9-2 - remove redundant file info -- Gitee