1 Star 0 Fork 82

starlet_dx/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
0040-Print-the-Exception-event-in-more-detail.patch 2.34 KB
一键复制 编辑 原始数据 按行查看 历史
Date: Fri, 9 Jun 2023 10:11:07 +0800
Subject: Print the Exception event in more detail
---
hotspot/src/share/vm/runtime/sharedRuntime.cpp | 6 +++---
hotspot/src/share/vm/runtime/sharedRuntime.hpp | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
index 5eabd3df0..58c302da7 100644
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
@@ -599,19 +599,19 @@ oop SharedRuntime::retrieve_receiver( Symbol* sig, frame caller ) {
}
-void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
+void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception, const char *message) {
if (JvmtiExport::can_post_on_exceptions()) {
vframeStream vfst(thread, true);
methodHandle method = methodHandle(thread, vfst.method());
address bcp = method()->bcp_from(vfst.bci());
JvmtiExport::post_exception_throw(thread, method(), bcp, h_exception());
}
- Exceptions::_throw(thread, __FILE__, __LINE__, h_exception);
+ Exceptions::_throw(thread, __FILE__, __LINE__, h_exception, message);
}
void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message) {
Handle h_exception = Exceptions::new_exception(thread, name, message);
- throw_and_post_jvmti_exception(thread, h_exception);
+ throw_and_post_jvmti_exception(thread, h_exception, message);
}
// The interpreter code to call this tracing function is only
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.hpp b/hotspot/src/share/vm/runtime/sharedRuntime.hpp
index c6a96a858..acab7ffc4 100644
--- a/hotspot/src/share/vm/runtime/sharedRuntime.hpp
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.hpp
@@ -246,7 +246,7 @@ class SharedRuntime: AllStatic {
#endif // PRODUCT
// Helper routine for full-speed JVMTI exception throwing support
- static void throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception);
+ static void throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception, const char *message = NULL);
static void throw_and_post_jvmti_exception(JavaThread *thread, Symbol* name, const char *message = NULL);
// RedefineClasses() tracing support for obsolete method entry
--
2.22.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/starlet-dx/openjdk-1.8.0.git
git@gitee.com:starlet-dx/openjdk-1.8.0.git
starlet-dx
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助