modified add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch

This commit is contained in:
Benshuai5D 2024-08-06 18:59:46 +08:00
parent fbac255fd9
commit dcade9bc4c
3 changed files with 31 additions and 65 deletions

View File

@ -1,42 +0,0 @@
Subject: [PATCH][Huawei] Fix the ActiveProcessorCount function of the spark service
became invalid
---
hotspot/src/os/linux/vm/os_linux.cpp | 4 ----
hotspot/src/share/vm/runtime/os.cpp | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 222c81d64..6ee49eedc 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -5576,10 +5576,6 @@ jint os::init_2(void)
Linux::is_floating_stack() ? "floating stack" : "fixed stack");
}
-#ifdef AARCH64
- JavaThread::os_linux_aarch64_options(active_processor_count(), argv_for_execvp);
-#endif
-
if (UseNUMA) {
if (!Linux::libnuma_init()) {
UseNUMA = false;
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index ff35e8b3a..cae1cf477 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -366,6 +366,11 @@ static void signal_thread_entry(JavaThread* thread, TRAPS) {
}
void os::init_before_ergo() {
+#ifdef AARCH64
+ // global variables
+ extern char** argv_for_execvp;
+ JavaThread::os_linux_aarch64_options(active_processor_count(), argv_for_execvp);
+#endif
initialize_initial_active_processor_count();
// We need to initialize large page support here because ergonomics takes some
// decisions depending on large page support and the calculated large page size.
--
2.44.0

View File

@ -1,17 +1,18 @@
From c4fd69c76c41b7b6168f1071d50143566f7d269e
From a168b23b9b49998642adabda7edd76a0d45c07b8
Date: Fri, 22 Sep 2023 14:48:33 +0800
Subject: [PATCH] add Fix-aarch64-runtime-thread-signal-transfer-bug
---
.../src/cpu/aarch64/vm/vm_version_aarch64.cpp | 47 +++++----
.../src/cpu/aarch64/vm/vm_version_aarch64.hpp | 8 ++
hotspot/src/os/linux/vm/os_linux.cpp | 7 ++
hotspot/src/os/linux/vm/os_linux.cpp | 3 +
.../linux_aarch64/vm/thread_linux_aarch64.cpp | 97 +++++++++++++++++++
.../linux_aarch64/vm/thread_linux_aarch64.hpp | 3 +
5 files changed, 141 insertions(+), 21 deletions(-)
hotspot/src/share/vm/runtime/os.cpp | 5 +
6 files changed, 142 insertions(+), 21 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
index 27ab00dd..839df4a3 100644
index 27ab00dda..839df4a34 100644
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
@@ -169,27 +169,7 @@ void VM_Version::get_processor_features() {
@ -76,7 +77,7 @@ index 27ab00dd..839df4a3 100644
ResourceMark rm;
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
index 7f3a5326..47353df9 100644
index 7f3a53262..47353df91 100644
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
@@ -63,6 +63,7 @@ public:
@ -108,21 +109,10 @@ index 7f3a5326..47353df9 100644
static ByteSize ctr_el0_offset() { return byte_offset_of(PsrInfo, ctr_el0); }
static bool is_zva_enabled() {
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 2dde2587..647ef582 100644
index 6b1e6b805..6ee49eedc 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -5576,6 +5576,10 @@ jint os::init_2(void)
Linux::is_floating_stack() ? "floating stack" : "fixed stack");
}
+#ifdef AARCH64
+ JavaThread::os_linux_aarch64_options(active_processor_count(), argv_for_execvp);
+#endif
+
if (UseNUMA) {
if (!Linux::libnuma_init()) {
UseNUMA = false;
@@ -5760,6 +5764,9 @@ void os::set_native_thread_name(const char *name) {
@@ -5760,6 +5760,9 @@ void os::set_native_thread_name(const char *name) {
const int rc = Linux::_pthread_setname_np(pthread_self(), buf);
// ERANGE should not happen; all other errors should just be ignored.
assert(rc != ERANGE, "pthread_setname_np failed");
@ -133,7 +123,7 @@ index 2dde2587..647ef582 100644
}
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
index 87e42318..8b0e2c98 100644
index 87e42318a..b9c468d6d 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
@@ -25,6 +25,7 @@
@ -248,7 +238,7 @@ index 87e42318..8b0e2c98 100644
assert(this->is_Java_thread(), "must be JavaThread");
JavaThread* jt = (JavaThread *)this;
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
index a2f0135c..f14ace0d 100644
index a2f0135c2..f14ace0d3 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
@@ -66,6 +66,9 @@
@ -261,6 +251,23 @@ index a2f0135c..f14ace0d 100644
bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava);
private:
bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index ff35e8b3a..cae1cf477 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -366,6 +366,11 @@ static void signal_thread_entry(JavaThread* thread, TRAPS) {
}
void os::init_before_ergo() {
+#ifdef AARCH64
+ // global variables
+ extern char** argv_for_execvp;
+ JavaThread::os_linux_aarch64_options(active_processor_count(), argv_for_execvp);
+#endif
initialize_initial_active_processor_count();
// We need to initialize large page support here because ergonomics takes some
// decisions depending on large page support and the calculated large page size.
--
2.19.1

View File

@ -943,7 +943,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 4
Release: 5
# 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
@ -1343,7 +1343,6 @@ Patch441: Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch
#422
Patch442: Huawei-Keep-objects-when-remove-unshareable-info.patch
Patch443: The-fast-serialization-function-of-sun.rmi.transport.patch
Patch444: Fix-the-ActiveProcessorCount-function-of-the-spark-s.patch
Patch445: Extending-the-IV-Length-Supported-by-KAEProvider-AES.patch
Patch446: 8137165-Tests-fail-in-SR_Handler-because-thread-is-n.patch
#############################################
@ -2002,7 +2001,6 @@ pushd %{top_level_dir_name}
%patch441 -p1
%patch442 -p1
%patch443 -p1
%patch444 -p1
%patch445 -p1
%patch446 -p1
%endif
@ -2670,6 +2668,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
%endif
%changelog
* Tue Aug 6 2024 benshuai5D <zhangyunbo7@huawei.com> -1:1.8.0.422-b05.5
- modified add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch
* Sat Aug 3 2024 kuenking111 <wangkun49@huawei.com> -1:1.8.0.422-b05.4
- Add 8137165-Tests-fail-in-SR_Handler-because-thread-is-n.patch
- Extending-the-IV-Length-Supported-by-KAEProvider-AES.patch