src/hotspot/share/gc/g1/g1CollectedHeap.hpp
changeset 49333 489f1dd40582
parent 49327 8f63fb7788bb
child 49337 e4fdca451542
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Fri Mar 02 17:33:59 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Sat Mar 03 23:56:08 2018 -0500
@@ -364,17 +364,11 @@
                                    "should not be at a safepoint"));          \
   } while (0)
 
-#define assert_at_safepoint(_should_be_vm_thread_)                            \
+#define assert_at_safepoint_on_vm_thread()                                    \
   do {                                                                        \
-    assert(SafepointSynchronize::is_at_safepoint() &&                         \
-              ((_should_be_vm_thread_) == Thread::current()->is_VM_thread()), \
-           heap_locking_asserts_params("should be at a safepoint"));          \
-  } while (0)
-
-#define assert_not_at_safepoint()                                             \
-  do {                                                                        \
-    assert(!SafepointSynchronize::is_at_safepoint(),                          \
-           heap_locking_asserts_params("should not be at a safepoint"));      \
+    assert_at_safepoint();                                                    \
+    assert(Thread::current_or_null() != NULL, "no current thread");           \
+    assert(Thread::current()->is_VM_thread(), "current thread is not VM thread"); \
   } while (0)
 
 protected: