1089 // The number of regions that are not completely free. 1090 uint num_used_regions() const { return num_regions() - num_free_regions(); } 1091 1092 void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN; 1093 void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN; 1094 void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN; 1095 void verify_dirty_young_regions() PRODUCT_RETURN; 1096 1097 #ifndef PRODUCT 1098 // Make sure that the given bitmap has no marked objects in the 1099 // range [from,limit). If it does, print an error message and return 1100 // false. Otherwise, just return true. bitmap_name should be "prev" 1101 // or "next". 1102 bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap, 1103 HeapWord* from, HeapWord* limit); 1104 1105 // Verify that the prev / next bitmap range [tams,end) for the given 1106 // region has no marks. Return true if all is well, false if errors 1107 // are detected. 1108 bool verify_bitmaps(const char* caller, HeapRegion* hr); 1109 1110 // True if the heap_lock is held by the a non-gc thread invoking a gc 1111 // operation. 1112 bool _thread_holds_heap_lock_for_gc; 1113 // Returns true if the calling thread holds the heap lock, 1114 // or the calling thread is a par gc thread and the heap_lock is held 1115 // by the vm thread doing a gc operation. 1116 bool heap_lock_held_for_gc(); 1117 1118 void set_heap_lock_held_for_gc(bool value) { _thread_holds_heap_lock_for_gc = value; } 1119 1120 #endif // PRODUCT 1121 1122 // If G1VerifyBitmaps is set, verify that the marking bitmaps for 1123 // the given region do not have any spurious marks. If errors are 1124 // detected, print appropriate error messages and crash. 1125 void check_bitmaps(const char* caller, HeapRegion* hr) PRODUCT_RETURN; 1126 1127 // If G1VerifyBitmaps is set, verify that the marking bitmaps do not 1128 // have any spurious marks. If errors are detected, print 1129 // appropriate error messages and crash. 1130 void check_bitmaps(const char* caller) PRODUCT_RETURN; 1131 1132 // Do sanity check on the contents of the in-cset fast test table. 1133 bool check_cset_fast_test() PRODUCT_RETURN_( return true; ); 1134 1135 // verify_region_sets() performs verification over the region 1136 // lists. It will be compiled in the product code to be used when 1137 // necessary (i.e., during heap verification). 1138 void verify_region_sets(); 1139 | 1089 // The number of regions that are not completely free. 1090 uint num_used_regions() const { return num_regions() - num_free_regions(); } 1091 1092 void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN; 1093 void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN; 1094 void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN; 1095 void verify_dirty_young_regions() PRODUCT_RETURN; 1096 1097 #ifndef PRODUCT 1098 // Make sure that the given bitmap has no marked objects in the 1099 // range [from,limit). If it does, print an error message and return 1100 // false. Otherwise, just return true. bitmap_name should be "prev" 1101 // or "next". 1102 bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap, 1103 HeapWord* from, HeapWord* limit); 1104 1105 // Verify that the prev / next bitmap range [tams,end) for the given 1106 // region has no marks. Return true if all is well, false if errors 1107 // are detected. 1108 bool verify_bitmaps(const char* caller, HeapRegion* hr); 1109 #endif // PRODUCT 1110 1111 // If G1VerifyBitmaps is set, verify that the marking bitmaps for 1112 // the given region do not have any spurious marks. If errors are 1113 // detected, print appropriate error messages and crash. 1114 void check_bitmaps(const char* caller, HeapRegion* hr) PRODUCT_RETURN; 1115 1116 // If G1VerifyBitmaps is set, verify that the marking bitmaps do not 1117 // have any spurious marks. If errors are detected, print 1118 // appropriate error messages and crash. 1119 void check_bitmaps(const char* caller) PRODUCT_RETURN; 1120 1121 // Do sanity check on the contents of the in-cset fast test table. 1122 bool check_cset_fast_test() PRODUCT_RETURN_( return true; ); 1123 1124 // verify_region_sets() performs verification over the region 1125 // lists. It will be compiled in the product code to be used when 1126 // necessary (i.e., during heap verification). 1127 void verify_region_sets(); 1128 |