#I70RN1: upgrade to jdk17.0.7-ga

This commit is contained in:
crash888 2023-05-06 14:47:38 +08:00
parent 3a8bfab889
commit f3e42fa8ec
7 changed files with 139 additions and 61 deletions

View File

@ -12,13 +12,13 @@ Subject: 8253495: CDS generates non-deterministic output
src/hotspot/share/gc/shared/collectedHeap.cpp | 18 ++++-
src/hotspot/share/gc/shared/collectedHeap.hpp | 1 +
src/hotspot/share/prims/jvm.cpp | 20 +++++
src/hotspot/share/runtime/os.cpp | 19 ++++-
src/hotspot/share/runtime/os.cpp | 11 ++-
test/hotspot/jtreg/ProblemList.txt | 1 -
.../jtreg/runtime/cds/DeterministicDump.java | 10 ++-
.../cds/appcds/javaldr/LockDuringDump.java | 4 +-
.../appcds/javaldr/LockDuringDumpAgent.java | 16 +++-
test/lib/jdk/test/lib/cds/CDSOptions.java | 33 ++++++--
15 files changed, 202 insertions(+), 32 deletions(-)
15 files changed, 191 insertions(+), 35 deletions(-)
create mode 100644 make/jdk/src/classes/build/tools/classlist/SortClasslist.java
diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
@ -130,7 +130,7 @@ index 000000000..cf9e55a7b
+ }
+}
diff --git a/make/scripts/compare.sh b/make/scripts/compare.sh
index 42886573f..3075f9a82 100644
index b33c80c78..324529d70 100644
--- a/make/scripts/compare.sh
+++ b/make/scripts/compare.sh
@@ -1,6 +1,6 @@
@ -141,7 +141,7 @@ index 42886573f..3075f9a82 100644
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -324,7 +324,7 @@ compare_general_files() {
@@ -325,7 +325,7 @@ compare_general_files() {
! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
! -name "*.lib" ! -name "*.jmod" ! -name "*.exe" \
! -name "*.obj" ! -name "*.o" ! -name "jspawnhelper" ! -name "*.a" \
@ -150,7 +150,7 @@ index 42886573f..3075f9a82 100644
! -name "*.map" \
| $GREP -v "./bin/" | $SORT | $FILTER)
@@ -356,8 +356,8 @@ compare_general_files() {
@@ -357,8 +357,8 @@ compare_general_files() {
"
$CAT $OTHER_DIR/$f | eval "$SVG_FILTER" > $OTHER_FILE
$CAT $THIS_DIR/$f | eval "$SVG_FILTER" > $THIS_FILE
@ -292,10 +292,10 @@ index 96b3eb946..5a2cb0e51 100644
void
diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp b/src/hotspot/share/gc/shared/collectedHeap.hpp
index 10baf8749..8d1087ed3 100644
index e4d444b8c..b65a490cb 100644
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp
@@ -143,6 +143,7 @@ class CollectedHeap : public CHeapObj<mtInternal> {
@@ -143,6 +143,7 @@ class CollectedHeap : public CHeapObj<mtGC> {
static inline size_t filler_array_hdr_size();
static inline size_t filler_array_min_size();
@ -335,47 +335,33 @@ index 8baba8c38..9057cc072 100644
// We cannot hold the Threads_lock when we throw an exception,
diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp
index bb6cea80e..bd5ab658c 100644
index ef43c3170..2fab965bd 100644
--- a/src/hotspot/share/runtime/os.cpp
+++ b/src/hotspot/share/runtime/os.cpp
@@ -674,6 +674,15 @@ static bool has_reached_max_malloc_test_peak(size_t alloc_size) {
return false;
}
@@ -701,11 +710,14 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
return NULL;
}
+#ifdef ASSERT
+static void break_if_ptr_caught(void* ptr) {
+ if (p2i(ptr) == (intptr_t)MallocCatchPtr) {
+ log_warning(malloc, free)("ptr caught: " PTR_FORMAT, p2i(ptr));
+ breakpoint();
+ }
+}
+#endif // ASSERT
+
void* os::malloc(size_t size, MEMFLAGS flags) {
return os::malloc(size, flags, CALLER_PC);
}
@@ -746,7 +755,15 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {
#endif
// we do not track guard memory
- return MemTracker::record_malloc((address)ptr, size, memflags, stack, level);
+ void* const inner_ptr = MemTracker::record_malloc((address)ptr, size, memflags, stack, level);
- void* inner_ptr = MemTracker::record_malloc((address)outer_ptr, size, memflags, stack, level);
-
- DEBUG_ONLY(::memset(inner_ptr, uninitBlockPad, size);)
+ void* const inner_ptr = MemTracker::record_malloc((address)outer_ptr, size, memflags, stack, level);
+ if (DumpSharedSpaces) {
+ // Need to deterministically fill all the alignment gaps in C++ structures.
+ ::memset(inner_ptr, 0, size);
+ } else {
+ DEBUG_ONLY(::memset(inner_ptr, uninitBlockPad, size);)
+ }
+ DEBUG_ONLY(break_if_ptr_caught(inner_ptr);)
+ return inner_ptr;
DEBUG_ONLY(break_if_ptr_caught(inner_ptr);)
-
return inner_ptr;
}
void* os::realloc(void *memblock, size_t size, MEMFLAGS flags) {
diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt
index 5d43b504f..ebc29f736 100644
index 8d5ea5105..11bbb5545 100644
--- a/test/hotspot/jtreg/ProblemList.txt
+++ b/test/hotspot/jtreg/ProblemList.txt
@@ -86,7 +86,6 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293 macosx-x64
@@ -89,7 +89,6 @@ applications/jcstress/acqrel.java 8277434 linux-aarch64
# :hotspot_runtime
runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP_JFR.java 8253437 windows-x64

View File

@ -0,0 +1,71 @@
From dcae455d23cd5a5f3c16b8a00547d85d170ebe4b Mon Sep 17 00:00:00 2001
Date: Mon, 6 Feb 2023 17:17:56 +0800
Subject: [PATCH] 8275509: ModuleDescriptor.hashCode isn't reproducible across
builds
---
.../java/lang/module/ModuleDescriptor.java | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java
index 93ac73656..39f68ac95 100644
--- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java
+++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java
@@ -327,7 +327,7 @@ public class ModuleDescriptor
*/
@Override
public int hashCode() {
- int hash = name.hashCode() * 43 + mods.hashCode();
+ int hash = name.hashCode() * 43 + modsHashCode(mods);
if (compiledVersion != null)
hash = hash * 43 + compiledVersion.hashCode();
if (rawCompiledVersion != null)
@@ -505,7 +505,7 @@ public class ModuleDescriptor
*/
@Override
public int hashCode() {
- int hash = mods.hashCode();
+ int hash = modsHashCode(mods);
hash = hash * 43 + source.hashCode();
return hash * 43 + targets.hashCode();
}
@@ -708,7 +708,7 @@ public class ModuleDescriptor
*/
@Override
public int hashCode() {
- int hash = mods.hashCode();
+ int hash = modsHashCode(mods);
hash = hash * 43 + source.hashCode();
return hash * 43 + targets.hashCode();
}
@@ -2261,7 +2261,7 @@ public class ModuleDescriptor
int hc = hash;
if (hc == 0) {
hc = name.hashCode();
- hc = hc * 43 + Objects.hashCode(modifiers);
+ hc = hc * 43 + modsHashCode(modifiers);
hc = hc * 43 + requires.hashCode();
hc = hc * 43 + Objects.hashCode(packages);
hc = hc * 43 + exports.hashCode();
@@ -2546,6 +2546,18 @@ public class ModuleDescriptor
.collect(Collectors.joining(" "));
}
+ /**
+ * Generates and returns a hashcode for the enum instances. The returned hashcode
+ * is a value based on the {@link Enum#name() name} of each enum instance.
+ */
+ private static int modsHashCode(Iterable<? extends Enum<?>> enums) {
+ int h = 0;
+ for (Enum<?> e : enums) {
+ h = h * 43 + Objects.hashCode(e.name());
+ }
+ return h;
+ }
+
private static <T extends Object & Comparable<? super T>>
int compare(T obj1, T obj2) {
if (obj1 != null) {
--
2.23.0

View File

@ -50,7 +50,7 @@ Subject: Apply TBI to ZGC of JDK17
44 files changed, 685 insertions(+), 69 deletions(-)
diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad
index a030555c9..7cc2e797a 100644
index 91ea50c00..b3d89863e 100644
--- a/src/hotspot/cpu/aarch64/aarch64.ad
+++ b/src/hotspot/cpu/aarch64/aarch64.ad
@@ -1750,7 +1750,11 @@ int MachCallStaticJavaNode::ret_addr_offset()
@ -81,7 +81,7 @@ index a030555c9..7cc2e797a 100644
}
diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
index f488e863a..cfe8e85a1 100644
index 5ce3ecf9e..c69f8aaf1 100644
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
@@ -94,6 +94,11 @@ static void select_different_registers(Register preserve,
@ -498,7 +498,7 @@ index 3c779bb11..4a2af011f 100644
+
#endif // CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/globals_aarch64.hpp b/src/hotspot/cpu/aarch64/globals_aarch64.hpp
index 3ccf7630b..98c87b201 100644
index fefc2e5c3..cae9fb60c 100644
--- a/src/hotspot/cpu/aarch64/globals_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/globals_aarch64.hpp
@@ -119,7 +119,10 @@ define_pd_global(intx, InlineSmallCode, 1000);
@ -541,10 +541,10 @@ index 17b978012..b52b3f2b3 100644
}
#endif // ASSERT
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index 85ce4c44b..6294636c2 100644
index 676a548d0..d89d655af 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -174,9 +174,10 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
@@ -176,9 +176,10 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
unsigned insn = *(unsigned*)insn_addr;
assert(nativeInstruction_at(insn_addr+4)->is_movk(), "wrong insns in patch");
@ -556,7 +556,7 @@ index 85ce4c44b..6294636c2 100644
if (Instruction_aarch64::extract(insn, 31, 21) == 0b11010010101) {
// Move narrow OOP
uint32_t n = CompressedOops::narrow_oop_value(cast_to_oop(o));
@@ -191,6 +192,12 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
@@ -193,6 +194,12 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
Instruction_aarch64::patch(insn_addr+4, 20, 5, (dest >>= 16) & 0xffff);
Instruction_aarch64::patch(insn_addr+8, 20, 5, (dest >>= 16) & 0xffff);
instructions = 3;
@ -569,7 +569,7 @@ index 85ce4c44b..6294636c2 100644
}
return instructions * NativeInstruction::instruction_size;
}
@@ -277,12 +284,18 @@ address MacroAssembler::target_addr_for_insn(address insn_addr, unsigned insn) {
@@ -279,12 +286,18 @@ address MacroAssembler::target_addr_for_insn(address insn_addr, unsigned insn) {
}
} else if (Instruction_aarch64::extract(insn, 31, 23) == 0b110100101) {
uint32_t *insns = (uint32_t *)insn_addr;
@ -593,7 +593,7 @@ index 85ce4c44b..6294636c2 100644
} else if (Instruction_aarch64::extract(insn, 31, 22) == 0b1011100101 &&
Instruction_aarch64::extract(insn, 4, 0) == 0b11111) {
return 0;
@@ -1473,10 +1486,9 @@ void MacroAssembler::mov(Register r, Address dest) {
@@ -1505,10 +1518,9 @@ void MacroAssembler::mov(Register r, Address dest) {
movptr(r, imm64);
}
@ -607,7 +607,7 @@ index 85ce4c44b..6294636c2 100644
void MacroAssembler::movptr(Register r, uintptr_t imm64) {
#ifndef PRODUCT
{
@@ -1485,12 +1497,18 @@ void MacroAssembler::movptr(Register r, uintptr_t imm64) {
@@ -1517,12 +1529,18 @@ void MacroAssembler::movptr(Register r, uintptr_t imm64) {
block_comment(buffer);
}
#endif
@ -729,7 +729,7 @@ index 75f2797c3..2460c02a1 100644
void set_jump_destination(address dest);
diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
index f9de88613..0fa922ec9 100644
index 31dfb7727..bcd064cfe 100644
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
@@ -31,6 +31,10 @@
@ -760,7 +760,7 @@ index f9de88613..0fa922ec9 100644
void VM_Version::initialize() {
_supports_cx8 = true;
_supports_atomic_getset4 = true;
@@ -406,6 +420,20 @@ void VM_Version::initialize() {
@@ -415,6 +429,20 @@ void VM_Version::initialize() {
UsePopCountInstruction = true;
}
@ -1418,7 +1418,7 @@ index 7afd60105..1013855c9 100644
#endif // SHARE_GC_Z_ZNMETHODDATA_HPP
diff --git a/src/hotspot/share/gc/z/zPhysicalMemory.cpp b/src/hotspot/share/gc/z/zPhysicalMemory.cpp
index f2b80b02e..9df44677a 100644
index ad8b762bd..38422d37c 100644
--- a/src/hotspot/share/gc/z/zPhysicalMemory.cpp
+++ b/src/hotspot/share/gc/z/zPhysicalMemory.cpp
@@ -277,13 +277,21 @@ void ZPhysicalMemoryManager::try_enable_uncommit(size_t min_capacity, size_t max
@ -1434,7 +1434,7 @@ index f2b80b02e..9df44677a 100644
}
void ZPhysicalMemoryManager::nmt_uncommit(uintptr_t offset, size_t size) const {
if (MemTracker::tracking_level() > NMT_minimal) {
if (MemTracker::enabled()) {
+#ifdef AARCH64
+ const uintptr_t addr = UseTBI ? ZAddress::base(offset) : ZAddress::marked0(offset);
+#else // AARCH64

View File

@ -1,8 +1,17 @@
From 81e5f144710e946f70db91329a79b9ebcd76c2f3 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Wed, 15 Dec 2021 17:04:17 +0800
From 6ae9bfbc94701aa91941169aff53863fe004db49 Mon Sep 17 00:00:00 2001
Date: Mon, 24 Apr 2023 19:10:50 +0800
Subject: [PATCH] Delete expired certificate
---
make/data/cacerts/geotrustglobalca | 27 ------------
make/data/cacerts/luxtrustglobalrootca | 28 -------------
make/data/cacerts/quovadisrootca | 41 -------------------
.../security/lib/cacerts/VerifyCACerts.java | 16 +-------
4 files changed, 2 insertions(+), 110 deletions(-)
delete mode 100644 make/data/cacerts/geotrustglobalca
delete mode 100644 make/data/cacerts/luxtrustglobalrootca
delete mode 100644 make/data/cacerts/quovadisrootca
diff --git a/make/data/cacerts/geotrustglobalca b/make/data/cacerts/geotrustglobalca
deleted file mode 100644
index 7f8bf9a66..000000000
@ -118,21 +127,21 @@ index 0c195ff51..000000000
-SnQ2+Q==
------END CERTIFICATE-----
diff --git a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
index f39dca74a..768b6572c 100644
index c67aa91dd..9079299fb 100644
--- a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
+++ b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
@@ -54,12 +54,12 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
- private static final int COUNT = 89;
+ private static final int COUNT = 86;
- private static final int COUNT = 90;
+ private static final int COUNT = 87;
// SHA-256 of cacerts, can be generated with
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
private static final String CHECKSUM
- = "CC:AD:BB:49:70:97:3F:42:AD:73:91:A0:A2:C4:B8:AA:D1:95:59:F3:B3:22:09:2A:1F:2C:AB:04:47:08:EF:AA";
+ = "89:78:5A:96:F4:B2:68:4C:91:C0:32:2C:ED:2D:6B:3B:26:B8:37:C3:07:DD:9E:50:87:53:53:7A:24:98:97:E0";
- = "21:8C:35:29:4C:E2:49:D2:83:30:DF:8B:5E:39:F8:8C:D6:C5:2B:59:05:32:74:E5:79:A5:91:9F:3C:57:B9:E3";
+ = "D5:5B:7A:BD:8F:4A:DA:19:75:90:28:61:E7:40:6D:A2:54:F5:64:C0:F0:30:29:16:FB:46:9B:57:D5:F7:04:D7";
// Hex formatter to upper case with ":" delimiter
private static final HexFormat HEX = HexFormat.ofDelimiter(":").withUpperCase();
@ -156,7 +165,7 @@ index f39dca74a..768b6572c 100644
put("quovadisrootca1g3 [jdk]",
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
put("quovadisrootca2 [jdk]",
@@ -260,12 +254,6 @@ public class VerifyCACerts {
@@ -262,12 +256,6 @@ public class VerifyCACerts {
add("addtrustexternalca [jdk]");
// Valid until: Sat May 30 10:44:50 GMT 2020
add("addtrustqualifiedca [jdk]");

View File

@ -1,6 +1,6 @@
From c03172e8b0e4ccca42fdf6a3accdb8b7a4422a8e Mon Sep 17 00:00:00 2001
Date: Mon, 8 Nov 2021 17:32:55 +0800
Subject: [PATCH] [Huawei] add .gitignore and version.txt
Subject: [PATCH] add .gitignore and version.txt
---
version.txt | 1 +
@ -13,7 +13,7 @@ index 000000000..b717bafbe
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+17.0.6.0.13
+17.0.7.0.13
--
2.19.0

Binary file not shown.

View File

@ -155,7 +155,7 @@
# Used via new version scheme. JDK 17 was
# GA'ed in March 2021 => 21.9
%global vendor_version_string 21.9
%global securityver 6
%global securityver 7
# buildjdkver is usually same as %%{majorver},
# but in time of bootstrap of next jdk, it is majorver-1,
# and this it is better to change it here, on single place
@ -175,7 +175,7 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 9
%global buildver 7
# priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
%if %is_system_jdk
%global priority %( printf '%02d%02d%02d%02d' %{majorver} %{minorver} %{securityver} %{buildver} )
@ -885,7 +885,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 2
Release: 0
# 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
@ -977,6 +977,9 @@ Patch19: 8253495-CDS-generates-non-deterministic-outpu.patch
Patch22: Fast-Serializer.patch
Patch23: Apply-TBI-barrier-patch-to-C1.patch
# 17.0.6
Patch24: 8275509-ModuleDescriptor.hashCode-isn-t-reproducible.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: alsa-lib-devel
@ -1214,6 +1217,7 @@ pushd %{top_level_dir_name}
%patch19 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
popd # openjdk
# Extract systemtap tapsets
@ -1763,6 +1767,14 @@ cjc.mainProgram(arg)
%changelog
* Thu May 4 2023 Autistic_boyya <wangzhongyi7@huawei.com> - 1:17.0.7.7-0.rolling
- add 8275509-ModuleDescriptor.hashCode-isn-t-reproducible.patch
- modified add-version-txt.patch
- modified 8253495-CDS-generates-non-deterministic-outpu.patch
- modified Delete-expired-certificate.patch
- modified Apply-TBI-to-ZGC-of-JDK17.patch
- add jdk17.0.7-ga
* Thu Mar 27 2023 crash888 <wangmengqi13@huawei.com> - 1:17.0.6.9-0.2
- add libstdc++-static and del --with-static++lib=dynamic