modified add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch
This commit is contained in:
parent
ed3b83c610
commit
cf874f9f2f
@ -3,22 +3,98 @@ 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 | 3 +
|
||||
.../linux_aarch64/vm/thread_linux_aarch64.cpp | 97 +++++++++++++++++++
|
||||
.../linux_aarch64/vm/thread_linux_aarch64.hpp | 3 +
|
||||
hotspot/src/share/vm/runtime/os.cpp | 5 +
|
||||
6 files changed, 142 insertions(+), 21 deletions(-)
|
||||
.../vm/interpreterGenerator_aarch64.hpp | 1 +
|
||||
.../cpu/aarch64/vm/stubGenerator_aarch64.cpp | 4 +
|
||||
.../vm/templateInterpreter_aarch64.cpp | 14 ++
|
||||
.../src/cpu/aarch64/vm/vm_version_aarch64.cpp | 47 ++++---
|
||||
.../src/cpu/aarch64/vm/vm_version_aarch64.hpp | 8 ++
|
||||
hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp | 5 +
|
||||
hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp | 5 +
|
||||
hotspot/src/cpu/x86/vm/vm_version_x86.cpp | 5 +
|
||||
hotspot/src/os/linux/vm/os_linux.cpp | 3 +
|
||||
.../linux_aarch64/vm/thread_linux_aarch64.cpp | 122 ++++++++++++++++++
|
||||
.../linux_aarch64/vm/thread_linux_aarch64.hpp | 3 +
|
||||
hotspot/src/share/vm/classfile/vmSymbols.hpp | 5 +
|
||||
.../src/share/vm/compiler/compileBroker.cpp | 13 +-
|
||||
.../vm/interpreter/abstractInterpreter.hpp | 1 +
|
||||
.../src/share/vm/interpreter/interpreter.cpp | 5 +
|
||||
.../vm/interpreter/templateInterpreter.cpp | 4 +
|
||||
hotspot/src/share/vm/oops/method.cpp | 2 +-
|
||||
hotspot/src/share/vm/runtime/globals.hpp | 3 +
|
||||
hotspot/src/share/vm/runtime/os.cpp | 5 +
|
||||
hotspot/src/share/vm/runtime/stubRoutines.cpp | 2 +
|
||||
hotspot/src/share/vm/runtime/stubRoutines.hpp | 6 +
|
||||
.../share/vm/services/diagnosticCommand.hpp | 2 +-
|
||||
.../dcmd/CompilerQueueTest.java | 41 +++---
|
||||
23 files changed, 257 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/hotspot/src/cpu/aarch64/vm/interpreterGenerator_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/interpreterGenerator_aarch64.hpp
|
||||
index 40af38a7..7530edb9 100644
|
||||
--- a/hotspot/src/cpu/aarch64/vm/interpreterGenerator_aarch64.hpp
|
||||
+++ b/hotspot/src/cpu/aarch64/vm/interpreterGenerator_aarch64.hpp
|
||||
@@ -53,6 +53,7 @@ void generate_transcendental_entry(AbstractInterpreter::MethodKind kind, int fpa
|
||||
void emit_array_address(Register src, Register idx, Register dst, BasicType type);
|
||||
address generate_Dgemm_dgemm_entry();
|
||||
address generate_Dgemv_dgemv_entry();
|
||||
+ address generate_JVM_isAmd64_entry();
|
||||
|
||||
void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue);
|
||||
void generate_counter_overflow(Label* do_continue);
|
||||
diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
||||
index 565fe559..8a98bac0 100644
|
||||
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
||||
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
||||
@@ -5144,6 +5144,10 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubRoutines::_dgemmDgemm = generate_dgemmDgemm(StubRoutines::_BLAS_library);
|
||||
StubRoutines::_dgemvDgemv = generate_dgemvDgemv(StubRoutines::_BLAS_library);
|
||||
}
|
||||
+
|
||||
+ if (UseHBaseUtilIntrinsics) {
|
||||
+ StubRoutines::_isAmd64JVM = CAST_FROM_FN_PTR(address, StubRoutines::intrinsic_isAmd64_JVM);
|
||||
+ }
|
||||
}
|
||||
|
||||
void generate_all() {
|
||||
diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
|
||||
index 28b84cb5..6329ff4e 100644
|
||||
--- a/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
|
||||
+++ b/hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
|
||||
@@ -860,6 +860,18 @@ void InterpreterGenerator::emit_array_address(Register src, Register idx,
|
||||
__ add(dst, src, idx);
|
||||
}
|
||||
|
||||
+
|
||||
+address InterpreterGenerator::generate_JVM_isAmd64_entry() {
|
||||
+ address entry = __ pc();
|
||||
+ __ mov(r19, lr);
|
||||
+ address fn = CAST_FROM_FN_PTR(address, StubRoutines::isAmd64JVM());
|
||||
+ __ mov(rscratch1, fn);
|
||||
+ __ blr(rscratch1);
|
||||
+ __ br(r19);
|
||||
+
|
||||
+ return entry;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Stub Arguments:
|
||||
*
|
||||
@@ -1838,6 +1850,8 @@ address AbstractInterpreterGenerator::generate_method_entry(
|
||||
: entry_point = ((InterpreterGenerator*)this)->generate_Dgemm_dgemm_entry(); break;
|
||||
case Interpreter::org_netlib_blas_Dgemv_dgemv
|
||||
: entry_point = ((InterpreterGenerator*)this)->generate_Dgemv_dgemv_entry(); break;
|
||||
+ case Interpreter::org_apache_hadoop_hbase_util_JVM_isAmd64
|
||||
+ : entry_point = ((InterpreterGenerator*)this)->generate_JVM_isAmd64_entry(); break;
|
||||
default : ShouldNotReachHere(); break;
|
||||
}
|
||||
|
||||
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
|
||||
index 27ab00dda..839df4a34 100644
|
||||
index 27ab00dd..839df4a3 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() {
|
||||
_features_str = strdup(buf);
|
||||
_cpuFeatures = auxv;
|
||||
|
||||
|
||||
- int cpu_lines = 0;
|
||||
- if (FILE *f = fopen("/proc/cpuinfo", "r")) {
|
||||
- char buf[128], *p;
|
||||
@ -41,13 +117,13 @@ index 27ab00dda..839df4a34 100644
|
||||
- fclose(f);
|
||||
- }
|
||||
+ int cpu_lines = get_cpu_model();
|
||||
|
||||
|
||||
// Enable vendor specific features
|
||||
if (_cpu == CPU_CAVIUM) {
|
||||
@@ -346,6 +326,31 @@ void VM_Version::get_processor_features() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+int VM_Version::get_cpu_model() {
|
||||
+ int cpu_lines = 0;
|
||||
+ if (FILE *f = fopen("/proc/cpuinfo", "r")) {
|
||||
@ -75,9 +151,9 @@ index 27ab00dda..839df4a34 100644
|
||||
+
|
||||
void VM_Version::initialize() {
|
||||
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 7f3a53262..47353df91 100644
|
||||
index 7f3a5326..47353df9 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:
|
||||
@ -91,7 +167,7 @@ index 7f3a53262..47353df91 100644
|
||||
@@ -87,12 +88,19 @@ public:
|
||||
CPU_DMB_ATOMICS = (1 << 31),
|
||||
} cpuFeatureFlags;
|
||||
|
||||
|
||||
+ static int get_cpu_model();
|
||||
static const char* cpu_features() { return _features_str; }
|
||||
static int cpu_family() { return _cpu; }
|
||||
@ -108,8 +184,56 @@ index 7f3a53262..47353df91 100644
|
||||
static ByteSize dczid_el0_offset() { return byte_offset_of(PsrInfo, dczid_el0); }
|
||||
static ByteSize ctr_el0_offset() { return byte_offset_of(PsrInfo, ctr_el0); }
|
||||
static bool is_zva_enabled() {
|
||||
diff --git a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
|
||||
index a5a80d29..45ce795d 100644
|
||||
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
|
||||
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
|
||||
@@ -251,6 +251,11 @@ void VM_Version::initialize() {
|
||||
FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
|
||||
}
|
||||
|
||||
+ if (UseHBaseUtilIntrinsics) {
|
||||
+ warning("hbase.util instructions are not available on this CPU");
|
||||
+ FLAG_SET_DEFAULT(UseHBaseUtilIntrinsics, false);
|
||||
+ }
|
||||
+
|
||||
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
|
||||
UseMontgomeryMultiplyIntrinsic = true;
|
||||
}
|
||||
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
|
||||
index 08d7a731..d73305ca 100644
|
||||
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
|
||||
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
|
||||
@@ -392,6 +392,11 @@ void VM_Version::initialize() {
|
||||
FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
|
||||
}
|
||||
|
||||
+ if (UseHBaseUtilIntrinsics) {
|
||||
+ warning("hbase.util instructions are not available on this CPU");
|
||||
+ FLAG_SET_DEFAULT(UseHBaseUtilIntrinsics, false);
|
||||
+ }
|
||||
+
|
||||
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
|
||||
(cache_line_size > ContendedPaddingWidth))
|
||||
ContendedPaddingWidth = cache_line_size;
|
||||
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
|
||||
index 028b55cf..a486ade2 100644
|
||||
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
|
||||
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
|
||||
@@ -658,6 +658,11 @@ void VM_Version::get_processor_features() {
|
||||
FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
|
||||
}
|
||||
|
||||
+ if (UseHBaseUtilIntrinsics) {
|
||||
+ warning("hbase.util instructions are not available on this CPU");
|
||||
+ FLAG_SET_DEFAULT(UseHBaseUtilIntrinsics, false);
|
||||
+ }
|
||||
+
|
||||
// Adjust RTM (Restricted Transactional Memory) flags
|
||||
if (!supports_rtm() && UseRTMLocking) {
|
||||
// Can't continue because UseRTMLocking affects UseBiasedLocking flag
|
||||
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
index 6b1e6b805..6ee49eedc 100644
|
||||
index 6b1e6b80..6ee49eed 100644
|
||||
--- a/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
|
||||
@@ -5760,6 +5760,9 @@ void os::set_native_thread_name(const char *name) {
|
||||
@ -123,7 +247,7 @@ index 6b1e6b805..6ee49eedc 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 87e42318a..b9c468d6d 100644
|
||||
index 87e42318..c496c9eb 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 @@
|
||||
@ -134,7 +258,7 @@ index 87e42318a..b9c468d6d 100644
|
||||
|
||||
// For Forte Analyzer AsyncGetCallTrace profiling support - thread is
|
||||
// currently interrupted by SIGPROF
|
||||
@@ -39,6 +40,102 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext,
|
||||
@@ -39,6 +40,127 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext,
|
||||
return pd_get_top_frame(fr_addr, ucontext, isInJava);
|
||||
}
|
||||
|
||||
@ -174,13 +298,11 @@ index 87e42318a..b9c468d6d 100644
|
||||
+ const static intx tTypeProfileMajorReceiverPercent = TypeProfileMajorReceiverPercent;
|
||||
+ const static intx tLoopUnrollLimit = LoopUnrollLimit;
|
||||
+ if (stringHash(secondStr) == 2046673384) {
|
||||
+ // makes specjvm compiler.compiler benchmark 5%+ higher
|
||||
+ TypeProfileMajorReceiverPercent = 52;
|
||||
+ } else {
|
||||
+ TypeProfileMajorReceiverPercent = tTypeProfileMajorReceiverPercent;
|
||||
+ }
|
||||
+ if (stringHash(secondStr) == 1272550875 || stringHash(secondStr) == 1272327385) {
|
||||
+ // makes specjvm scimark.sor.small/large benchmark 10%+ higher
|
||||
+ LoopUnrollLimit = 1000;
|
||||
+ } else {
|
||||
+ LoopUnrollLimit = tLoopUnrollLimit;
|
||||
@ -206,6 +328,31 @@ index 87e42318a..b9c468d6d 100644
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void set_compilation_tuner_params() {
|
||||
+ if (FLAG_IS_DEFAULT(UseCounterDecay))
|
||||
+ FLAG_SET_DEFAULT(UseCounterDecay, false);
|
||||
+ if (FLAG_IS_DEFAULT(DontCompileHugeMethods))
|
||||
+ FLAG_SET_DEFAULT(DontCompileHugeMethods, false);
|
||||
+ if (FLAG_IS_DEFAULT(TieredCompilation))
|
||||
+ FLAG_SET_DEFAULT(TieredCompilation, false);
|
||||
+ if (FLAG_IS_DEFAULT(CompileThreshold))
|
||||
+ FLAG_SET_DEFAULT(CompileThreshold, 11132);
|
||||
+ if (FLAG_IS_DEFAULT(BackEdgeThreshold))
|
||||
+ FLAG_SET_DEFAULT(BackEdgeThreshold, 136559);
|
||||
+ if (FLAG_IS_DEFAULT(OnStackReplacePercentage))
|
||||
+ FLAG_SET_DEFAULT(OnStackReplacePercentage, 182);
|
||||
+ if (FLAG_IS_DEFAULT(InterpreterProfilePercentage))
|
||||
+ FLAG_SET_DEFAULT(InterpreterProfilePercentage, 17);
|
||||
+}
|
||||
+
|
||||
+void set_intrinsic_param() {
|
||||
+ if (FLAG_IS_DEFAULT(UseHBaseUtilIntrinsics)) {
|
||||
+ warning("If your HBase version is lower than 2.4.14, please explicitly specify"
|
||||
+ " -XX:-UseHBaseUtilIntrinsics, otherwise HBase may fail to start.");
|
||||
+ FLAG_SET_DEFAULT(UseHBaseUtilIntrinsics, true);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void JavaThread::os_linux_aarch64_options(int apc, char **name) {
|
||||
+ if (name == NULL) {
|
||||
+ return;
|
||||
@ -216,6 +363,8 @@ index 87e42318a..b9c468d6d 100644
|
||||
+ int step = 0;
|
||||
+ while (name[i] != NULL) {
|
||||
+ if (stringHash(name[i]) == 1396789436) {
|
||||
+ set_compilation_tuner_params();
|
||||
+ set_intrinsic_param();
|
||||
+ if (FLAG_IS_DEFAULT(ActiveProcessorCount) && (UseG1GC || UseParallelGC) && apc > 8)
|
||||
+ FLAG_SET_DEFAULT(ActiveProcessorCount, 8);
|
||||
+ break;
|
||||
@ -238,7 +387,7 @@ index 87e42318a..b9c468d6d 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 a2f0135c2..f14ace0d3 100644
|
||||
index a2f0135c..f14ace0d 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 @@
|
||||
@ -251,13 +400,138 @@ index a2f0135c2..f14ace0d3 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/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp
|
||||
index 494fd9bd..1674d352 100644
|
||||
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp
|
||||
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp
|
||||
@@ -874,6 +874,11 @@
|
||||
do_name( dgemv_name, "dgemv") \
|
||||
do_signature(dgemv_signature, "(Ljava/lang/String;IID[DII[DIID[DII)V") \
|
||||
\
|
||||
+ /* support for org.apache.hadoop.hbase.util.JVM */ \
|
||||
+ do_class(org_apache_hadoop_hbase_util_jvm, "org/apache/hadoop/hbase/util/JVM") \
|
||||
+ do_intrinsic(_jvm_isAmd64, org_apache_hadoop_hbase_util_jvm, isAmd64_name, void_boolean_signature, F_S) \
|
||||
+ do_name( isAmd64_name, "isAmd64") \
|
||||
+ \
|
||||
/* support for sun.security.provider.SHA2 */ \
|
||||
do_class(sun_security_provider_sha2, "sun/security/provider/SHA2") \
|
||||
do_intrinsic(_sha2_implCompress, sun_security_provider_sha2, implCompress_name, implCompress_signature, F_R) \
|
||||
diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp
|
||||
index e8f97074..01379902 100644
|
||||
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp
|
||||
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp
|
||||
@@ -813,18 +813,23 @@ CompileQueue* CompileBroker::compile_queue(int comp_level) {
|
||||
|
||||
|
||||
void CompileBroker::print_compile_queues(outputStream* st) {
|
||||
- _c1_compile_queue->print(st);
|
||||
- _c2_compile_queue->print(st);
|
||||
+ MutexLocker locker(MethodCompileQueue_lock);
|
||||
+ if (_c1_compile_queue != NULL) {
|
||||
+ _c1_compile_queue->print(st);
|
||||
+ }
|
||||
+ if (_c2_compile_queue != NULL) {
|
||||
+ _c2_compile_queue->print(st);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
void CompileQueue::print(outputStream* st) {
|
||||
- assert_locked_or_safepoint(lock());
|
||||
+ assert(lock()->owned_by_self(), "must own lock");
|
||||
st->print_cr("Contents of %s", name());
|
||||
st->print_cr("----------------------------");
|
||||
CompileTask* task = _first;
|
||||
if (task == NULL) {
|
||||
- st->print_cr("Empty");;
|
||||
+ st->print_cr("Empty");
|
||||
} else {
|
||||
while (task != NULL) {
|
||||
task->print_compilation(st, NULL, true, true);
|
||||
diff --git a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
|
||||
index 293382b3..cf9cd908 100644
|
||||
--- a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
|
||||
+++ b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
|
||||
@@ -102,6 +102,7 @@ class AbstractInterpreter: AllStatic {
|
||||
java_util_zip_CRC32_updateByteBuffer, // implementation of java.util.zip.CRC32.updateByteBuffer()
|
||||
org_netlib_blas_Dgemm_dgemm, // implementation of org.netlib.blas.Dgemm.dgemm()
|
||||
org_netlib_blas_Dgemv_dgemv, // implementation of org.netlib.blas.Dgemv.dgemv()
|
||||
+ org_apache_hadoop_hbase_util_JVM_isAmd64, // implementation of org.hbase.hadoop.hbase.util.JVM.isAmd64()
|
||||
number_of_method_entries,
|
||||
invalid = -1
|
||||
};
|
||||
diff --git a/hotspot/src/share/vm/interpreter/interpreter.cpp b/hotspot/src/share/vm/interpreter/interpreter.cpp
|
||||
index d5d94f34..8d4b5b93 100644
|
||||
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp
|
||||
+++ b/hotspot/src/share/vm/interpreter/interpreter.cpp
|
||||
@@ -259,6 +259,10 @@ AbstractInterpreter::MethodKind AbstractInterpreter::method_kind(methodHandle m)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (UseHBaseUtilIntrinsics && m->intrinsic_id() == vmIntrinsics::_jvm_isAmd64) {
|
||||
+ return org_apache_hadoop_hbase_util_JVM_isAmd64;
|
||||
+ }
|
||||
+
|
||||
// Accessor method?
|
||||
if (m->is_accessor()) {
|
||||
assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
|
||||
@@ -321,6 +325,7 @@ void AbstractInterpreter::print_method_kind(MethodKind kind) {
|
||||
case java_util_zip_CRC32_updateByteBuffer : tty->print("java_util_zip_CRC32_updateByteBuffer"); break;
|
||||
case org_netlib_blas_Dgemm_dgemm : tty->print("org_netlib_blas_Dgemm_dgemm"); break;
|
||||
case org_netlib_blas_Dgemv_dgemv : tty->print("org_netlib_blas_Dgemv_dgemv"); break;
|
||||
+ case org_apache_hadoop_hbase_util_JVM_isAmd64 : tty->print("org_apache_hadoop_hbase_util_JVM_isAmd64"); break;
|
||||
default:
|
||||
if (kind >= method_handle_invoke_FIRST &&
|
||||
kind <= method_handle_invoke_LAST) {
|
||||
diff --git a/hotspot/src/share/vm/interpreter/templateInterpreter.cpp b/hotspot/src/share/vm/interpreter/templateInterpreter.cpp
|
||||
index 09298a7f..3f2961fb 100644
|
||||
--- a/hotspot/src/share/vm/interpreter/templateInterpreter.cpp
|
||||
+++ b/hotspot/src/share/vm/interpreter/templateInterpreter.cpp
|
||||
@@ -406,6 +406,10 @@ void TemplateInterpreterGenerator::generate_all() {
|
||||
method_entry(org_netlib_blas_Dgemv_dgemv)
|
||||
}
|
||||
|
||||
+ if (UseHBaseUtilIntrinsics) {
|
||||
+ method_entry(org_apache_hadoop_hbase_util_JVM_isAmd64)
|
||||
+ }
|
||||
+
|
||||
initialize_method_handle_entries();
|
||||
|
||||
// all native method kinds (must be one contiguous block)
|
||||
diff --git a/hotspot/src/share/vm/oops/method.cpp b/hotspot/src/share/vm/oops/method.cpp
|
||||
index 406cd485..7cf7e08e 100644
|
||||
--- a/hotspot/src/share/vm/oops/method.cpp
|
||||
+++ b/hotspot/src/share/vm/oops/method.cpp
|
||||
@@ -1301,7 +1301,7 @@ vmSymbols::SID Method::klass_id_for_intrinsics(Klass* holder) {
|
||||
// which does not use the class default class loader so we check for its loader here
|
||||
InstanceKlass* ik = InstanceKlass::cast(holder);
|
||||
if ((ik->class_loader() != NULL) && !SystemDictionary::is_ext_class_loader(ik->class_loader())) {
|
||||
- if (!EnableIntrinsicExternal) {
|
||||
+ if (!EnableIntrinsicExternal && !UseHBaseUtilIntrinsics) {
|
||||
return vmSymbols::NO_SID; // regardless of name, no intrinsics here
|
||||
}
|
||||
}
|
||||
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
|
||||
index fdd9db14..69e6587a 100644
|
||||
--- a/hotspot/src/share/vm/runtime/globals.hpp
|
||||
+++ b/hotspot/src/share/vm/runtime/globals.hpp
|
||||
@@ -768,6 +768,9 @@ class CommandLineFlags {
|
||||
product(bool, UseCRC32Intrinsics, false, \
|
||||
"use intrinsics for java.util.zip.CRC32") \
|
||||
\
|
||||
+ product(bool, UseHBaseUtilIntrinsics, false, \
|
||||
+ "use intrinsics for org.apache.hadoop.hbase.util.JVM on aarch64") \
|
||||
+ \
|
||||
experimental(bool, UseF2jBLASIntrinsics, false, \
|
||||
"use intrinsics for com.github.fommil.netlib.F2jBLAS on aarch64") \
|
||||
\
|
||||
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
|
||||
index ff35e8b3a..cae1cf477 100644
|
||||
index ff35e8b3..cae1cf47 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
|
||||
@ -267,7 +541,130 @@ index ff35e8b3a..cae1cf477 100644
|
||||
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.
|
||||
diff --git a/hotspot/src/share/vm/runtime/stubRoutines.cpp b/hotspot/src/share/vm/runtime/stubRoutines.cpp
|
||||
index 3cee9c22..c4be88fc 100644
|
||||
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp
|
||||
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp
|
||||
@@ -144,6 +144,8 @@ address StubRoutines::_ddotF2jBLAS = NULL;
|
||||
address StubRoutines::_dgemmDgemm = NULL;
|
||||
address StubRoutines::_dgemvDgemv = NULL;
|
||||
|
||||
+address StubRoutines::_isAmd64JVM = NULL;
|
||||
+
|
||||
address StubRoutines::_multiplyToLen = NULL;
|
||||
address StubRoutines::_squareToLen = NULL;
|
||||
address StubRoutines::_mulAdd = NULL;
|
||||
diff --git a/hotspot/src/share/vm/runtime/stubRoutines.hpp b/hotspot/src/share/vm/runtime/stubRoutines.hpp
|
||||
index fff13dbc..a5231bdd 100644
|
||||
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp
|
||||
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp
|
||||
@@ -221,6 +221,7 @@ class StubRoutines: AllStatic {
|
||||
static address _ddotF2jBLAS;
|
||||
static address _dgemmDgemm;
|
||||
static address _dgemvDgemv;
|
||||
+ static address _isAmd64JVM;
|
||||
|
||||
static address _multiplyToLen;
|
||||
static address _squareToLen;
|
||||
@@ -391,6 +392,7 @@ class StubRoutines: AllStatic {
|
||||
static address ddotF2jBLAS() { return _ddotF2jBLAS; }
|
||||
static address dgemmDgemm() { return _dgemmDgemm; }
|
||||
static address dgemvDgemv() { return _dgemvDgemv; }
|
||||
+ static address isAmd64JVM() { return _isAmd64JVM; }
|
||||
|
||||
static address multiplyToLen() {return _multiplyToLen; }
|
||||
static address squareToLen() {return _squareToLen; }
|
||||
@@ -431,6 +433,10 @@ class StubRoutines: AllStatic {
|
||||
return _intrinsic_tan(d);
|
||||
}
|
||||
|
||||
+ static bool intrinsic_isAmd64_JVM() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
//
|
||||
// Safefetch stub support
|
||||
//
|
||||
diff --git a/hotspot/src/share/vm/services/diagnosticCommand.hpp b/hotspot/src/share/vm/services/diagnosticCommand.hpp
|
||||
index d446aab4..c89933f9 100644
|
||||
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp
|
||||
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp
|
||||
@@ -554,7 +554,7 @@ public:
|
||||
return "Compiler.codelist";
|
||||
}
|
||||
static const char* description() {
|
||||
- return "Print all compiled methods in code cache.";
|
||||
+ return "Print all compiled methods in code cache that are alive";
|
||||
}
|
||||
static const char* impact() {
|
||||
return "Medium";
|
||||
diff --git a/hotspot/test/serviceability/dcmd/CompilerQueueTest.java b/hotspot/test/serviceability/dcmd/CompilerQueueTest.java
|
||||
index 661e7cb4..6d2e7309 100644
|
||||
--- a/hotspot/test/serviceability/dcmd/CompilerQueueTest.java
|
||||
+++ b/hotspot/test/serviceability/dcmd/CompilerQueueTest.java
|
||||
@@ -26,6 +26,8 @@
|
||||
* @bug 8054889
|
||||
* @build DcmdUtil CompilerQueueTest
|
||||
* @run main CompilerQueueTest
|
||||
+ * @run main/othervm -XX:-TieredCompilation CompilerQueueTest
|
||||
+ * @run main/othervm -Xint CompilerQueueTest
|
||||
* @summary Test of diagnostic command Compiler.queue
|
||||
*/
|
||||
|
||||
@@ -62,36 +64,31 @@ public class CompilerQueueTest {
|
||||
String result = DcmdUtil.executeDcmd("Compiler.queue");
|
||||
BufferedReader r = new BufferedReader(new StringReader(result));
|
||||
|
||||
- String line;
|
||||
- match(r.readLine(), "Contents of C1 compile queue");
|
||||
- match(r.readLine(), "----------------------------");
|
||||
String str = r.readLine();
|
||||
- if (!str.equals("Empty")) {
|
||||
- while (str.charAt(0) != '-') {
|
||||
- validateMethodLine(str);
|
||||
+ while (str != null) {
|
||||
+ if (str.startsWith("Contents of C")) {
|
||||
+ match(r.readLine(), "----------------------------");
|
||||
str = r.readLine();
|
||||
- }
|
||||
- } else {
|
||||
- str = r.readLine();
|
||||
- }
|
||||
-
|
||||
- match(str, "----------------------------");
|
||||
- match(r.readLine(), "Contents of C2 compile queue");
|
||||
- match(r.readLine(), "----------------------------");
|
||||
- str = r.readLine();
|
||||
- if (!str.equals("Empty")) {
|
||||
- while (str.charAt(0) != '-') {
|
||||
- validateMethodLine(str);
|
||||
+ if (!str.equals("Empty")) {
|
||||
+ while (str.charAt(0) != '-') {
|
||||
+ validateMethodLine(str);
|
||||
+ str = r.readLine();
|
||||
+ }
|
||||
+ } else {
|
||||
+ str = r.readLine();
|
||||
+ }
|
||||
+ match(str,"----------------------------");
|
||||
str = r.readLine();
|
||||
+ } else {
|
||||
+ throw new Exception("Failed parsing dcmd queue, line: " + str);
|
||||
}
|
||||
- } else {
|
||||
- str = r.readLine();
|
||||
}
|
||||
- match(str, "----------------------------");
|
||||
}
|
||||
|
||||
private static void validateMethodLine(String str) throws Exception {
|
||||
- String name = str.substring(19);
|
||||
+ // Skip until package/class name begins. Trim to remove whitespace that
|
||||
+ // may differ.
|
||||
+ String name = str.substring(14).trim();
|
||||
int sep = name.indexOf("::");
|
||||
try {
|
||||
Class.forName(name.substring(0, sep));
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
|
||||
@ -945,7 +945,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
|
||||
|
||||
Name: java-%{javaver}-%{origin}
|
||||
Version: %{javaver}.%{updatever}.%{buildver}
|
||||
Release: 6
|
||||
Release: 7
|
||||
# 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
|
||||
@ -2670,6 +2670,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2024 wuyafang <wuyafang@huawei.com> -1:1.8.0.422-b05.7
|
||||
- modified add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch
|
||||
|
||||
* Wed Aug 7 2024 songliyang <songliyang@kylinos.cn> -1:1.8.0.422-b05.6
|
||||
- let support-KAE-zip.patch not install libz.so on loongarch64
|
||||
- update LoongArch64 port to 8u422
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user