代码拉取完成,页面将自动刷新
From d84a998248d3403e093ec14abf2daf3e1bd8dd25 Mon Sep 17 00:00:00 2001
Subject: fix potential build fail in jbolt
---
make/hotspot/lib/JvmFeatures.gmk | 2 ++
src/hotspot/os/linux/os_linux.cpp | 5 +++++
src/hotspot/share/ci/ciEnv.cpp | 2 ++
src/hotspot/share/jbolt/jBoltDcmds.cpp | 9 +++++++--
src/hotspot/share/jfr/periodic/jfrPeriodic.cpp | 2 ++
src/hotspot/share/runtime/sweeper.cpp | 2 +-
src/hotspot/share/utilities/macros.hpp | 3 +++
7 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk
index 7b86f83cc..55bd4ebd1 100644
--- a/make/hotspot/lib/JvmFeatures.gmk
+++ b/make/hotspot/lib/JvmFeatures.gmk
@@ -174,6 +174,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
endif
################################################################################
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 0acc6a57f..52f65baba 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -5703,6 +5703,11 @@ void os::Linux::load_plugin_library() {
}
#endif // INCLUDE_JBOLT
}
+
+ JBOLT_ONLY(log_debug(jbolt)("Plugin library for JBolt: %s %s %s %s", BOOL_TO_STR(_jboltHeap_init != NULL),
+ BOOL_TO_STR(_jboltLog_precalc != NULL),
+ BOOL_TO_STR(_jboltLog_do != NULL),
+ BOOL_TO_STR(_jboltMerge_judge != NULL));)
}
// 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 f66926600..5a71a567e 100644
--- a/src/hotspot/share/ci/ciEnv.cpp
+++ b/src/hotspot/share/ci/ciEnv.cpp
@@ -1048,7 +1048,9 @@ void ciEnv::register_method(ciMethod* target,
frame_words, oop_map_set,
handler_table, inc_table,
compiler, task()->comp_level(),
+#if INCLUDE_JVMCI
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 249a98001..d57eea39b 100644
--- a/src/hotspot/share/jbolt/jBoltDcmds.cpp
+++ b/src/hotspot/share/jbolt/jBoltDcmds.cpp
@@ -24,7 +24,8 @@
#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;
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JBoltStartDCmd>(full_export, true, false));
@@ -199,8 +200,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 d9580e57e..a010df8d0 100644
--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
@@ -557,8 +557,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/runtime/sweeper.cpp b/src/hotspot/share/runtime/sweeper.cpp
index 82f25c50b..fd174d720 100644
--- a/src/hotspot/share/runtime/sweeper.cpp
+++ b/src/hotspot/share/runtime/sweeper.cpp
@@ -378,7 +378,7 @@ void NMethodSweeper::possibly_sweep() {
// allocations go to the non-profiled heap and we must be make sure that there is
// enough space.
double free_percent = 1 / CodeCache::reverse_free_ratio(CodeBlobType::MethodNonProfiled) * 100;
- if (free_percent <= StartAggressiveSweepingAt || (UseJBolt && JBoltManager::force_sweep())) {
+ if (free_percent <= StartAggressiveSweepingAt JBOLT_ONLY( || (UseJBolt && JBoltManager::force_sweep()) )) {
do_stack_scanning();
}
diff --git a/src/hotspot/share/utilities/macros.hpp b/src/hotspot/share/utilities/macros.hpp
index 6dd187652..638d73e6b 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。