< prev index next > src/hotspot/share/gc/shenandoah/shenandoahAsserts.hpp
Print this page
static void assert_locked_or_shenandoah_safepoint(Mutex* lock, const char* file, int line);
static void assert_heaplocked(const char* file, int line);
static void assert_not_heaplocked(const char* file, int line);
static void assert_heaplocked_or_safepoint(const char* file, int line);
+ static void assert_heaplocked_or_fullgc_safepoint(const char* file, int line);
#ifdef ASSERT
#define shenandoah_assert_in_heap(interior_loc, obj) \
ShenandoahAsserts::assert_in_heap(interior_loc, obj, __FILE__, __LINE__)
#define shenandoah_assert_in_heap_or_null(interior_loc, obj) \
#define shenandoah_assert_not_heaplocked() \
ShenandoahAsserts::assert_not_heaplocked(__FILE__, __LINE__)
#define shenandoah_assert_heaplocked_or_safepoint() \
ShenandoahAsserts::assert_heaplocked_or_safepoint(__FILE__, __LINE__)
+
+ #define shenandoah_assert_heaplocked_or_fullgc_safepoint() \
+ ShenandoahAsserts::assert_heaplocked_or_fullgc_safepoint(__FILE__, __LINE__)
+ #define shenandoah_assert_control_or_vm_thread() \
+ assert(Thread::current()->is_VM_thread() || Thread::current() == ShenandoahHeap::heap()->control_thread(), "Expected control thread or vm thread")
+
+ #define shenandoah_assert_generational() \
+ assert(ShenandoahHeap::heap()->mode()->is_generational(), "Must be in generational mode here.")
#else
#define shenandoah_assert_in_heap(interior_loc, obj)
#define shenandoah_assert_in_heap_or_null(interior_loc, obj)
#define shenandoah_assert_in_correct_region(interior_loc, obj)
#define shenandoah_assert_locked_or_safepoint(lock)
#define shenandoah_assert_heaplocked()
#define shenandoah_assert_not_heaplocked()
#define shenandoah_assert_heaplocked_or_safepoint()
+ #define shenandoah_assert_heaplocked_or_fullgc_safepoint()
+ #define shenandoah_assert_control_or_vm_thread()
+ #define shenandoah_assert_generational()
#endif
#define shenandoah_not_implemented \
{ fatal("Deliberately not implemented."); }
< prev index next >