add ZGC-reuse-entries-of-ResolvedMethodTable.patch address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
This commit is contained in:
parent
a973d371e0
commit
78c4d2eca4
58
ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
Normal file
58
ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From e8bf6d9c5a02b3ffaf223dd1109bc15c664cca28 Mon Sep 17 00:00:00 2001
|
||||
Date: Mon, 24 Feb 2020 18:51:09 +0800
|
||||
Subject: [PATCH] ZGC: aarch64: fix not using load/store Pre-indexed
|
||||
addressing to modify sp
|
||||
|
||||
Summary: <gc>: <instruction load/store Pre-indexed addressing offset range is not enough>
|
||||
LLT: JFUZZ
|
||||
Bug url:
|
||||
---
|
||||
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 16 +++++-----------
|
||||
1 file changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
index a65a605d0..6db979b57 100644
|
||||
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
|
||||
@@ -2114,12 +2114,11 @@ int MacroAssembler::push_fp(unsigned int bitset, Register stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ add(stack, stack, -count * wordSize * 2);
|
||||
+
|
||||
if (count & 1) {
|
||||
- strq(as_FloatRegister(regs[0]), Address(pre(stack, -count * wordSize * 2)));
|
||||
+ strq(as_FloatRegister(regs[0]), Address(stack));
|
||||
i += 1;
|
||||
- } else {
|
||||
- stpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(pre(stack, -count * wordSize * 2)));
|
||||
- i += 2;
|
||||
}
|
||||
|
||||
for (; i < count; i += 2) {
|
||||
@@ -2145,20 +2144,15 @@ int MacroAssembler::pop_fp(unsigned int bitset, Register stack) {
|
||||
}
|
||||
|
||||
if (count & 1) {
|
||||
+ ldrq(as_FloatRegister(regs[0]), Address(stack));
|
||||
i += 1;
|
||||
- } else {
|
||||
- i += 2;
|
||||
}
|
||||
|
||||
for (; i < count; i += 2) {
|
||||
ldpq(as_FloatRegister(regs[i]), as_FloatRegister(regs[i+1]), Address(stack, i * wordSize * 2));
|
||||
}
|
||||
|
||||
- if ((count & 1) == 0) {
|
||||
- ldpq(as_FloatRegister(regs[0]), as_FloatRegister(regs[1]), Address(post(stack, count * wordSize * 2)));
|
||||
- } else {
|
||||
- ldrq(as_FloatRegister(regs[0]), Address(post(stack, count * wordSize * 2)));
|
||||
- }
|
||||
+ add(stack, stack, count * wordSize * 2);
|
||||
|
||||
return count;
|
||||
}
|
||||
--
|
||||
2.12.3
|
||||
|
||||
72
ZGC-reuse-entries-of-ResolvedMethodTable.patch
Normal file
72
ZGC-reuse-entries-of-ResolvedMethodTable.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From 9f63ba9b77f9f5391b2f79d2a4c3a444268a54ca Mon Sep 17 00:00:00 2001
|
||||
Date: Tue, 21 Apr 2020 17:00:15 +0000
|
||||
Subject: [PATCH] ZGC: reuse entries of ResolvedMethodTable
|
||||
|
||||
Summary: <gc>: <zgc need remove unused entries of ResolvedMethodTable in mark end>
|
||||
LLT: test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java
|
||||
Bug url: NA
|
||||
---
|
||||
src/hotspot/share/gc/z/zHeap.cpp | 5 +++++
|
||||
.../hotspot/jtreg/runtime/MemberName/MemberNameLeak.java | 16 +++++++++++++---
|
||||
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/z/zHeap.cpp b/src/hotspot/share/gc/z/zHeap.cpp
|
||||
index 62f97d2..e950acf 100644
|
||||
--- a/src/hotspot/share/gc/z/zHeap.cpp
|
||||
+++ b/src/hotspot/share/gc/z/zHeap.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "runtime/thread.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
+#include "prims/resolvedMethodTable.hpp"
|
||||
|
||||
static const ZStatSampler ZSamplerHeapUsedBeforeMark("Memory", "Heap Used Before Mark", ZStatUnitBytes);
|
||||
static const ZStatSampler ZSamplerHeapUsedAfterMark("Memory", "Heap Used After Mark", ZStatUnitBytes);
|
||||
@@ -334,6 +335,10 @@ bool ZHeap::mark_end() {
|
||||
Universe::verify();
|
||||
}
|
||||
|
||||
+ // Free unsed entries of ResolvedMethodTable and weakhandles
|
||||
+ // avoid ResolvedMethodTable inflation and native memory leak
|
||||
+ ResolvedMethodTable::unlink();
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java b/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java
|
||||
index 357f27f..930a542 100644
|
||||
--- a/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java
|
||||
+++ b/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java
|
||||
@@ -59,9 +59,18 @@ public class MemberNameLeak {
|
||||
|
||||
public static void test(String gc) throws Throwable {
|
||||
// Run this Leak class with logging
|
||||
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
- "-Xlog:membername+table=trace",
|
||||
- gc, Leak.class.getName());
|
||||
+ ProcessBuilder pb;
|
||||
+ if (gc.contains("UseZGC")) {
|
||||
+ pb = ProcessTools.createJavaProcessBuilder(
|
||||
+ "-Xlog:membername+table=trace",
|
||||
+ "-XX:+UnlockExperimentalVMOptions",
|
||||
+ gc, Leak.class.getName());
|
||||
+
|
||||
+ } else {
|
||||
+ pb = ProcessTools.createJavaProcessBuilder(
|
||||
+ "-Xlog:membername+table=trace",
|
||||
+ gc, Leak.class.getName());
|
||||
+ }
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("ResolvedMethod entry added for MemberNameLeak$Leak.callMe()V");
|
||||
output.shouldContain("ResolvedMethod entry found for MemberNameLeak$Leak.callMe()V");
|
||||
@@ -73,6 +82,7 @@ public class MemberNameLeak {
|
||||
test("-XX:+UseG1GC");
|
||||
test("-XX:+UseParallelGC");
|
||||
test("-XX:+UseSerialGC");
|
||||
+ test("-XX:+UseZGC");
|
||||
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
|
||||
test("-XX:+UseConcMarkSweepGC");
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
31
address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch
Normal file
31
address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From c98fac94c7ce8826dec848d38723eebb192600f1 Mon Sep 17 00:00:00 2001
|
||||
Date: Tue, 21 Apr 2020 15:54:35 +0800
|
||||
Subject: [PATCH] address's offset may exceed the limit of ldrw instruction in
|
||||
stack2reg
|
||||
|
||||
Summary: <c1>: <for 32-bit variant ldr, imm12 field is from 0 to 16380>
|
||||
LLT: test/hotspot/jtreg/runtime/handshake/HandshakeWalkSuspendExitTest.java
|
||||
Bug url: NA
|
||||
d31f3a48
|
||||
---
|
||||
src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
|
||||
index cf3ce0a..82abda9 100644
|
||||
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
|
||||
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
|
||||
@@ -864,7 +864,9 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
} else if (type == T_METADATA || type == T_ADDRESS) {
|
||||
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
|
||||
} else {
|
||||
- __ ldrw(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
|
||||
+ Address src_addr = frame_map()->address_for_slot(src->single_stack_ix());
|
||||
+ Address data_addr = __ form_address(rscratch1, sp, src_addr.offset(), 2);
|
||||
+ __ ldrw(dest->as_register(), data_addr);
|
||||
}
|
||||
|
||||
} else if (dest->is_double_cpu()) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -730,7 +730,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
|
||||
|
||||
Name: java-%{javaver}-%{origin}
|
||||
Version: %{fulljavaver}.%{buildver}
|
||||
Release: 0
|
||||
Release: 1
|
||||
# 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
|
||||
@ -807,6 +807,10 @@ Patch20: 8209894-ZGC-Cap-number-of-GC-workers-based-on-heap-s.patch
|
||||
Patch22: 8233506-ZGC-the-load-for-Reference.get-can-be-conver.patch
|
||||
Patch23: add-missing-inline.patch
|
||||
Patch26: ZGC-aarch64-fix-system-call-number-of-memfd_create.patch
|
||||
Patch27: ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
|
||||
Patch28: address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch
|
||||
Patch29: ZGC-reuse-entries-of-ResolvedMethodTable.patch
|
||||
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: alsa-lib-devel
|
||||
@ -1052,6 +1056,9 @@ pushd %{top_level_dir_name}
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
popd # openjdk
|
||||
|
||||
%patch1000
|
||||
@ -1554,6 +1561,11 @@ require "copy_jdk_configs.lua"
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 20 2020 noah <hedongbo@huawei.com> - 1:11.0.8.10-1
|
||||
- add ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
|
||||
- add address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch
|
||||
- add ZGC-reuse-entries-of-ResolvedMethodTable.patch
|
||||
|
||||
* Sat Jul 18 2020 jvmboy <hedongbo@huawei.com> - 1:11.0.8.10-0
|
||||
- Update to 11.0.8+10 (GA)
|
||||
|
||||
@ -1563,7 +1575,7 @@ require "copy_jdk_configs.lua"
|
||||
- 8228407: JVM crashes with shared archive file mismatch
|
||||
- Remove javadoc-slowdebug
|
||||
|
||||
* Thu May 25 2020 Noah <hedongbo@huawei.com> - 1:11.0.7.10-4
|
||||
* Thu May 25 2020 noah <hedongbo@huawei.com> - 1:11.0.7.10-4
|
||||
- Support nss, systemtap and desktop
|
||||
|
||||
* Thu May 21 2020 jdkboy <guoge1@huawei.com> - 1:11.0.7.10-3
|
||||
@ -1572,5 +1584,5 @@ require "copy_jdk_configs.lua"
|
||||
* Tue Apr 28 2020 jdkboy <guoge1@huawei.com> - 1:11.0.6.10-2
|
||||
- Adjust some patches
|
||||
|
||||
* Sun Apr 26 2020 Noah <hedongbo@huawei.com> - 1:11.0.6.10-1
|
||||
* Sun Apr 26 2020 noah <hedongbo@huawei.com> - 1:11.0.6.10-1
|
||||
- Initial build from OpenJDK 11.0.6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user