From e0907c9d9def7419686250463ca08f58462d3c3f Mon Sep 17 00:00:00 2001 From: Denghui Dong Date: Thu, 10 Sep 2020 16:05:15 +0800 Subject: [PATCH] [Backport] 8239886: Minimal VM build fails after JDK-8237499 Summary: Test Plan: jdk/test/jdk/jfr Reviewed-by: zhengxiaolinX, yuleil Issue: https://github.com/alibaba/dragonwell8/issues/127 --- src/share/vm/prims/jni.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/share/vm/prims/jni.cpp b/src/share/vm/prims/jni.cpp index 221fe4a4c..0d6c21080 100644 --- a/src/share/vm/prims/jni.cpp +++ b/src/share/vm/prims/jni.cpp @@ -5026,11 +5026,14 @@ static void post_thread_start_event(const JavaThread* jt) { if (event.should_commit()) { event.set_thread(JFR_THREAD_ID(jt)); event.set_parentThread((traceid)0); +#if INCLUDE_JFR if (EventThreadStart::is_stacktrace_enabled()) { jt->jfr_thread_local()->set_cached_stack_trace_id((traceid)0); event.commit(); jt->jfr_thread_local()->clear_cached_stack_trace(); - } else { + } else +#endif + { event.commit(); } } -- GitLab