changeset 54562:1af5c0e68381

8218147: make_walkable asserts on multiple calls Reviewed-by: dholmes, dcubed
author rehn
date Wed, 17 Apr 2019 09:25:27 +0200
parents 6c4d8b7128d5
children ba8ab3f67aec
files src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp src/hotspot/share/runtime/thread.hpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp	Wed Apr 17 12:43:41 2019 +0530
+++ b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp	Wed Apr 17 09:25:27 2019 +0200
@@ -359,7 +359,7 @@
   }
 
   bool ret = false;
-  thread->set_trace_flag();
+  thread->set_trace_flag();  // Provides StoreLoad, needed to keep read of thread state from floating up.
   if (JAVA_SAMPLE == type) {
     if (thread_state_in_java(thread)) {
       ret = sample_thread_in_java(thread, frames, max_frames);
--- a/src/hotspot/share/runtime/thread.hpp	Wed Apr 17 12:43:41 2019 +0530
+++ b/src/hotspot/share/runtime/thread.hpp	Wed Apr 17 09:25:27 2019 +0200
@@ -1415,7 +1415,7 @@
   // Whenever a thread transitions from native to vm/java it must suspend
   // if external|deopt suspend is present.
   bool is_suspend_after_native() const {
-    return (_suspend_flags & (_external_suspend | _deopt_suspend)) != 0;
+    return (_suspend_flags & (_external_suspend | _deopt_suspend JFR_ONLY(| _trace_flag))) != 0;
   }
 
   // external suspend request is completed