< prev index next >

src/hotspot/share/gc/g1/heapRegionRemSet.hpp

Print this page




 162   friend class HeapRegionRemSetIterator;
 163 
 164 private:
 165   G1BlockOffsetTable* _bot;
 166 
 167   // A set of code blobs (nmethods) whose code contains pointers into
 168   // the region that owns this RSet.
 169   G1CodeRootSet _code_roots;
 170 
 171   Mutex _m;
 172 
 173   OtherRegionsTable _other_regions;
 174 
 175   HeapRegion* _hr;
 176 
 177   void clear_fcc();
 178 
 179 public:
 180   HeapRegionRemSet(G1BlockOffsetTable* bot, HeapRegion* hr);
 181 
 182   // Setup sparse and fine-grain tables sizes.
 183   static void setup_remset_size();
 184 
 185   bool cardset_is_empty() const {
 186     return _other_regions.is_empty();
 187   }
 188 
 189   bool is_empty() const {
 190     return (strong_code_roots_list_length() == 0) && cardset_is_empty();
 191   }
 192 
 193   bool occupancy_less_or_equal_than(size_t occ) const {
 194     return (strong_code_roots_list_length() == 0) && _other_regions.occupancy_less_or_equal_than(occ);
 195   }
 196 
 197   size_t occupied() {
 198     MutexLocker x(&_m, Mutex::_no_safepoint_check_flag);
 199     return occupied_locked();
 200   }
 201   size_t occupied_locked() {
 202     return _other_regions.occupied();




 162   friend class HeapRegionRemSetIterator;
 163 
 164 private:
 165   G1BlockOffsetTable* _bot;
 166 
 167   // A set of code blobs (nmethods) whose code contains pointers into
 168   // the region that owns this RSet.
 169   G1CodeRootSet _code_roots;
 170 
 171   Mutex _m;
 172 
 173   OtherRegionsTable _other_regions;
 174 
 175   HeapRegion* _hr;
 176 
 177   void clear_fcc();
 178 
 179 public:
 180   HeapRegionRemSet(G1BlockOffsetTable* bot, HeapRegion* hr);
 181 

 182   static void setup_remset_size();
 183 
 184   bool cardset_is_empty() const {
 185     return _other_regions.is_empty();
 186   }
 187 
 188   bool is_empty() const {
 189     return (strong_code_roots_list_length() == 0) && cardset_is_empty();
 190   }
 191 
 192   bool occupancy_less_or_equal_than(size_t occ) const {
 193     return (strong_code_roots_list_length() == 0) && _other_regions.occupancy_less_or_equal_than(occ);
 194   }
 195 
 196   size_t occupied() {
 197     MutexLocker x(&_m, Mutex::_no_safepoint_check_flag);
 198     return occupied_locked();
 199   }
 200   size_t occupied_locked() {
 201     return _other_regions.occupied();


< prev index next >