< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahAsserts.hpp

Print this page
@@ -78,10 +78,12 @@
    static void assert_not_heaplocked(const char* file, int line);
    static void assert_heaplocked_or_safepoint(const char* file, int line);
    static void assert_control_or_vm_thread_at_safepoint(bool at_safepoint, const char* file, int line);
    static void assert_generational(const char* file, int line);
  
+   static void assert_in_young(void* interior_loc, oop obj, const char* file, int line);
+ 
    // Given a possibly invalid oop, extract narrowKlass (if UCCP) and Klass*
    // from it safely.
    // Note: For -UCCP, returned nk is always 0.
    static bool extract_klass_safely(oop obj, narrowKlass& nk, const Klass*& k);
  

@@ -157,10 +159,17 @@
  #define shenandoah_assert_not_in_cset_loc_except(interior_loc, exception) \
    if (!(exception)) ShenandoahAsserts::assert_not_in_cset_loc(interior_loc, __FILE__, __LINE__)
  #define shenandoah_assert_not_in_cset_loc(interior_loc) \
                      ShenandoahAsserts::assert_not_in_cset_loc(interior_loc, __FILE__, __LINE__)
  
+ #define shenandoah_assert_in_young_if(interior_loc, obj, condition) \
+   if (condition)    ShenandoahAsserts::assert_in_young(interior_loc, obj, __FILE__, __LINE__)
+ #define shenandoah_assert_in_young_except(interior_loc, obj, exception) \
+   if (!(exception)) ShenandoahAsserts::assert_in_young(interior_loc, obj, __FILE__, __LINE__)
+ #define shenandoah_assert_in_young(interior_loc, obj) \
+                     ShenandoahAsserts::assert_in_young(interior_loc, obj, __FILE__, __LINE__)
+ 
  #define shenandoah_assert_rp_isalive_installed() \
                      ShenandoahAsserts::assert_rp_isalive_installed(__FILE__, __LINE__)
  #define shenandoah_assert_rp_isalive_not_installed() \
                      ShenandoahAsserts::assert_rp_isalive_not_installed(__FILE__, __LINE__)
  

@@ -243,10 +252,14 @@
  #define shenandoah_assert_heaplocked_or_safepoint()
  #define shenandoah_assert_control_or_vm_thread()
  #define shenandoah_assert_control_or_vm_thread_at_safepoint()
  #define shenandoah_assert_generational()
  
+ #define shenandoah_assert_in_young_if(interior_loc, obj, condition)
+ #define shenandoah_assert_in_young_except(interior_loc, obj, exception)
+ #define shenandoah_assert_in_young(interior_loc, obj)
+ 
  #endif
  
  #define shenandoah_not_implemented \
                      { fatal("Deliberately not implemented."); }
  #define shenandoah_not_implemented_return(v) \
< prev index next >