File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/hotspot/share/gc/shenandoah Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,17 @@ class ShenandoahGCPauseMark : public StackObj {
141141
142142class ShenandoahSafepoint : public AllStatic {
143143public:
144- // check if Shenandoah GC safepoint is in progress
144+ // Check if Shenandoah GC safepoint is in progress. This is nominally
145+ // equivalent to calling SafepointSynchronize::is_at_safepoint(), but
146+ // it also checks the Shenandoah specifics, when it can.
145147 static inline bool is_at_shenandoah_safepoint () {
146148 if (!SafepointSynchronize::is_at_safepoint ()) return false ;
147149
150+ // This is not VM thread, cannot see what VM thread is doing,
151+ // so pretend this is a proper Shenandoah safepoint
152+ if (!Thread::current ()->is_VM_thread ()) return true ;
153+
154+ // Otherwise check we are at proper operation type
148155 VM_Operation* vm_op = VMThread::vm_operation ();
149156 if (vm_op == NULL ) return false ;
150157
You can’t perform that action at this time.
0 commit comments