src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

Print this page
rev 7970 : 8061715: gc/g1/TestShrinkAuxiliaryData15.java fails
Summary: added WhiteBox methods to count regions and exact aux data sizes
Reviewed-by:


1101 
1102   // These virtual functions do the actual allocation.
1103   // Some heaps may offer a contiguous region for shared non-blocking
1104   // allocation, via inlined code (by exporting the address of the top and
1105   // end fields defining the extent of the contiguous allocation region.)
1106   // But G1CollectedHeap doesn't yet support this.
1107 
1108   virtual bool is_maximal_no_gc() const {
1109     return _hrm.available() == 0;
1110   }
1111 
1112   // The current number of regions in the heap.
1113   uint num_regions() const { return _hrm.length(); }
1114 
1115   // The max number of regions in the heap.
1116   uint max_regions() const { return _hrm.max_length(); }
1117 
1118   // The number of regions that are completely free.
1119   uint num_free_regions() const { return _hrm.num_free_regions(); }
1120 




1121   // The number of regions that are not completely free.
1122   uint num_used_regions() const { return num_regions() - num_free_regions(); }
1123 
1124   void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1125   void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1126   void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN;
1127   void verify_dirty_young_regions() PRODUCT_RETURN;
1128 
1129 #ifndef PRODUCT
1130   // Make sure that the given bitmap has no marked objects in the
1131   // range [from,limit). If it does, print an error message and return
1132   // false. Otherwise, just return true. bitmap_name should be "prev"
1133   // or "next".
1134   bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
1135                                 HeapWord* from, HeapWord* limit);
1136 
1137   // Verify that the prev / next bitmap range [tams,end) for the given
1138   // region has no marks. Return true if all is well, false if errors
1139   // are detected.
1140   bool verify_bitmaps(const char* caller, HeapRegion* hr);




1101 
1102   // These virtual functions do the actual allocation.
1103   // Some heaps may offer a contiguous region for shared non-blocking
1104   // allocation, via inlined code (by exporting the address of the top and
1105   // end fields defining the extent of the contiguous allocation region.)
1106   // But G1CollectedHeap doesn't yet support this.
1107 
1108   virtual bool is_maximal_no_gc() const {
1109     return _hrm.available() == 0;
1110   }
1111 
1112   // The current number of regions in the heap.
1113   uint num_regions() const { return _hrm.length(); }
1114 
1115   // The max number of regions in the heap.
1116   uint max_regions() const { return _hrm.max_length(); }
1117 
1118   // The number of regions that are completely free.
1119   uint num_free_regions() const { return _hrm.num_free_regions(); }
1120 
1121   MemoryUsage get_auxiliary_data_memory_usage() const {
1122     return _hrm.get_auxiliary_data_memory_usage();
1123   }
1124 
1125   // The number of regions that are not completely free.
1126   uint num_used_regions() const { return num_regions() - num_free_regions(); }
1127 
1128   void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1129   void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1130   void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN;
1131   void verify_dirty_young_regions() PRODUCT_RETURN;
1132 
1133 #ifndef PRODUCT
1134   // Make sure that the given bitmap has no marked objects in the
1135   // range [from,limit). If it does, print an error message and return
1136   // false. Otherwise, just return true. bitmap_name should be "prev"
1137   // or "next".
1138   bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
1139                                 HeapWord* from, HeapWord* limit);
1140 
1141   // Verify that the prev / next bitmap range [tams,end) for the given
1142   // region has no marks. Return true if all is well, false if errors
1143   // are detected.
1144   bool verify_bitmaps(const char* caller, HeapRegion* hr);