Ai
18 Star 3 Fork 40

src-openEuler/openjdk-17
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Huawei-fix-potential-build-fail-in-jbolt.patch 4.28 KB
一键复制 编辑 原始数据 按行查看 历史
Benshuai5D 提交于 2025-10-17 22:17 +08:00 . update to 17.0.17
---
make/hotspot/lib/JvmFeatures.gmk | 2 ++
src/hotspot/os/linux/os_linux.cpp | 4 ++++
src/hotspot/share/ci/ciEnv.cpp | 2 ++
src/hotspot/share/jbolt/jBoltDcmds.cpp | 7 ++++++-
src/hotspot/share/jfr/periodic/jfrPeriodic.cpp | 2 ++
src/hotspot/share/utilities/macros.hpp | 3 +++
6 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk
index ff5b243ae..7d53f1b77 100644
--- a/make/hotspot/lib/JvmFeatures.gmk
+++ b/make/hotspot/lib/JvmFeatures.gmk
@@ -170,6 +170,8 @@ endif
ifneq ($(call check-jvm-feature, jfr), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_JFR=0
JVM_EXCLUDE_PATTERNS += jfr
+ JVM_CFLAGS_FEATURES += -DINCLUDE_JBOLT=0
+ JVM_EXCLUDE_PATTERNS += jbolt
JVM_EXCLUDE_FILES += compilerEvent.cpp
endif
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index a4688f0b8..90f766f25 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -4686,6 +4686,10 @@ void os::Linux::load_plugin_library() {
}
#endif // INCLUDE_JBOLT
}
+
+ JBOLT_ONLY(log_debug(jbolt)("Plugin library for JBolt: %s %s %s", BOOL_TO_STR(_jboltLog_precalc != nullptr),
+ BOOL_TO_STR(_jboltLog_do != nullptr),
+ BOOL_TO_STR(_jboltMerge_judge != nullptr));)
}
// this is called _after_ the global arguments have been parsed
diff --git a/src/hotspot/share/ci/ciEnv.cpp b/src/hotspot/share/ci/ciEnv.cpp
index 5fa006d96..97ce6eb94 100644
--- a/src/hotspot/share/ci/ciEnv.cpp
+++ b/src/hotspot/share/ci/ciEnv.cpp
@@ -1040,7 +1040,9 @@ void ciEnv::register_method(ciMethod* target,
handler_table, inc_table,
compiler, task()->comp_level(),
native_invokers,
+#if INCLUDE_JVMCI
NULL, 0, -1, NULL, NULL,
+#endif
code_blob_type);
} else
#endif // INCLUDE_JBOLT
diff --git a/src/hotspot/share/jbolt/jBoltDcmds.cpp b/src/hotspot/share/jbolt/jBoltDcmds.cpp
index 0cf1c75b4..b8ecb2b4e 100644
--- a/src/hotspot/share/jbolt/jBoltDcmds.cpp
+++ b/src/hotspot/share/jbolt/jBoltDcmds.cpp
@@ -24,6 +24,7 @@
#include "jbolt/jBoltDcmds.hpp"
#include "jbolt/jBoltControlThread.hpp"
#include "jbolt/jBoltManager.hpp"
+#include "runtime/os.hpp"
bool register_jbolt_dcmds() {
uint32_t full_export = DCmd_Source_Internal | DCmd_Source_AttachAPI | DCmd_Source_MBean;
@@ -198,8 +199,12 @@ void JBoltDumpDCmd::execute(DCmdSource source, TRAPS) {
output()->print_cr("Failed: File open error or NULL: %s", path);
break;
case JBoltOK:
- rp = realpath(path, buffer);
+#ifdef __linux__
+ rp = os::Posix::realpath(path, buffer, sizeof(buffer));
output()->print_cr("Successful: Dump to %s", buffer);
+#else
+ output()->print_cr("Successful: Dump to %s", path);
+#endif
break;
default:
ShouldNotReachHere();
diff --git a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
index 51b06efd8..ba30adc9e 100644
--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
@@ -613,8 +613,10 @@ TRACE_REQUEST_FUNC(CodeCacheConfiguration) {
event.set_nonNMethodSize(NonNMethodCodeHeapSize);
event.set_profiledSize(ProfiledCodeHeapSize);
event.set_nonProfiledSize(NonProfiledCodeHeapSize);
+#if INCLUDE_JBOLT
event.set_jboltHotSize(JBoltCodeHeapSize);
event.set_jboltTmpSize(JBoltCodeHeapSize);
+#endif
event.set_expansionSize(CodeCacheExpansionSize);
event.set_minBlockLength(CodeCacheMinBlockLength);
event.set_startAddress((u8)CodeCache::low_bound());
diff --git a/src/hotspot/share/utilities/macros.hpp b/src/hotspot/share/utilities/macros.hpp
index 729dec122..67e1a00b7 100644
--- a/src/hotspot/share/utilities/macros.hpp
+++ b/src/hotspot/share/utilities/macros.hpp
@@ -297,6 +297,9 @@
#define JFR_ONLY(code)
#define NOT_JFR_RETURN() {}
#define NOT_JFR_RETURN_(code) { return code; }
+#if INCLUDE_JBOLT
+#define INCLUDE_JBOLT 0 // INCLUDE_JBOLT depends on INCLUDE_JFR
+#endif
#endif
#ifndef INCLUDE_JVMCI
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/openjdk-17.git
git@gitee.com:src-openeuler/openjdk-17.git
src-openeuler
openjdk-17
openjdk-17
master

搜索帮助