< prev index next >

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

Print this page
rev 7696 : 8030646: track collection set membership in one place


 639 
 640   // Returns whether the given region (which must be a humongous (start) region)
 641   // is to be considered conservatively live regardless of any other conditions.
 642   bool humongous_region_is_always_live(uint index);
 643   // Returns whether the given region (which must be a humongous (start) region)
 644   // is considered a candidate for eager reclamation.
 645   bool humongous_region_is_candidate(uint index);
 646   // Register the given region to be part of the collection set.
 647   inline void register_humongous_region_with_in_cset_fast_test(uint index);
 648   // Register regions with humongous objects (actually on the start region) in
 649   // the in_cset_fast_test table.
 650   void register_humongous_regions_with_in_cset_fast_test();
 651   // We register a region with the fast "in collection set" test. We
 652   // simply set to true the array slot corresponding to this region.
 653   void register_young_region_with_in_cset_fast_test(HeapRegion* r) {
 654     _in_cset_fast_test.set_in_young(r->hrm_index());
 655   }
 656   void register_old_region_with_in_cset_fast_test(HeapRegion* r) {
 657     _in_cset_fast_test.set_in_old(r->hrm_index());
 658   }



 659 
 660   // This is a fast test on whether a reference points into the
 661   // collection set or not. Assume that the reference
 662   // points into the heap.
 663   inline bool in_cset_fast_test(oop obj);
 664 
 665   void clear_cset_fast_test() {
 666     _in_cset_fast_test.clear();
 667   }
 668 
 669   // This is called at the start of either a concurrent cycle or a Full
 670   // GC to update the number of old marking cycles started.
 671   void increment_old_marking_cycles_started();
 672 
 673   // This is called at the end of either a concurrent cycle or a Full
 674   // GC to update the number of old marking cycles completed. Those two
 675   // can happen in a nested fashion, i.e., we start a concurrent
 676   // cycle, a Full GC happens half-way through it which ends first,
 677   // and then the cycle notices that a Full GC happened and ends
 678   // too. The concurrent parameter is a boolean to help us do a bit


1228 
1229   // True iff an evacuation has failed in the most-recent collection.
1230   bool evacuation_failed() { return _evacuation_failed; }
1231 
1232   void remove_from_old_sets(const HeapRegionSetCount& old_regions_removed, const HeapRegionSetCount& humongous_regions_removed);
1233   void prepend_to_freelist(FreeRegionList* list);
1234   void decrement_summary_bytes(size_t bytes);
1235 
1236   // Returns "TRUE" iff "p" points into the committed areas of the heap.
1237   virtual bool is_in(const void* p) const;
1238 #ifdef ASSERT
1239   // Returns whether p is in one of the available areas of the heap. Slow but
1240   // extensive version.
1241   bool is_in_exact(const void* p) const;
1242 #endif
1243 
1244   // Return "TRUE" iff the given object address is within the collection
1245   // set. Slow implementation.
1246   inline bool obj_in_cs(oop obj);
1247 

1248   inline bool is_in_cset(oop obj);
1249 
1250   inline bool is_in_cset_or_humongous(const oop obj);
1251 
1252  private:
1253   // This array is used for a quick test on whether a reference points into
1254   // the collection set or not. Each of the array's elements denotes whether the
1255   // corresponding region is in the collection set or not.
1256   G1InCSetStateFastTestBiasedMappedArray _in_cset_fast_test;
1257 
1258  public:
1259 
1260   inline InCSetState in_cset_state(const oop obj);
1261 
1262   // Return "TRUE" iff the given object address is in the reserved
1263   // region of g1.
1264   bool is_in_g1_reserved(const void* p) const {
1265     return _hrm.reserved().contains(p);
1266   }
1267 




 639 
 640   // Returns whether the given region (which must be a humongous (start) region)
 641   // is to be considered conservatively live regardless of any other conditions.
 642   bool humongous_region_is_always_live(uint index);
 643   // Returns whether the given region (which must be a humongous (start) region)
 644   // is considered a candidate for eager reclamation.
 645   bool humongous_region_is_candidate(uint index);
 646   // Register the given region to be part of the collection set.
 647   inline void register_humongous_region_with_in_cset_fast_test(uint index);
 648   // Register regions with humongous objects (actually on the start region) in
 649   // the in_cset_fast_test table.
 650   void register_humongous_regions_with_in_cset_fast_test();
 651   // We register a region with the fast "in collection set" test. We
 652   // simply set to true the array slot corresponding to this region.
 653   void register_young_region_with_in_cset_fast_test(HeapRegion* r) {
 654     _in_cset_fast_test.set_in_young(r->hrm_index());
 655   }
 656   void register_old_region_with_in_cset_fast_test(HeapRegion* r) {
 657     _in_cset_fast_test.set_in_old(r->hrm_index());
 658   }
 659   void clear_in_cset_fast_test(const HeapRegion* hr) {
 660     _in_cset_fast_test.clear(hr);
 661   }
 662 
 663   // This is a fast test on whether a reference points into the
 664   // collection set or not. Assume that the reference
 665   // points into the heap.
 666   inline bool in_cset_fast_test(oop obj);
 667 
 668   void clear_cset_fast_test() {
 669     _in_cset_fast_test.clear();
 670   }
 671 
 672   // This is called at the start of either a concurrent cycle or a Full
 673   // GC to update the number of old marking cycles started.
 674   void increment_old_marking_cycles_started();
 675 
 676   // This is called at the end of either a concurrent cycle or a Full
 677   // GC to update the number of old marking cycles completed. Those two
 678   // can happen in a nested fashion, i.e., we start a concurrent
 679   // cycle, a Full GC happens half-way through it which ends first,
 680   // and then the cycle notices that a Full GC happened and ends
 681   // too. The concurrent parameter is a boolean to help us do a bit


1231 
1232   // True iff an evacuation has failed in the most-recent collection.
1233   bool evacuation_failed() { return _evacuation_failed; }
1234 
1235   void remove_from_old_sets(const HeapRegionSetCount& old_regions_removed, const HeapRegionSetCount& humongous_regions_removed);
1236   void prepend_to_freelist(FreeRegionList* list);
1237   void decrement_summary_bytes(size_t bytes);
1238 
1239   // Returns "TRUE" iff "p" points into the committed areas of the heap.
1240   virtual bool is_in(const void* p) const;
1241 #ifdef ASSERT
1242   // Returns whether p is in one of the available areas of the heap. Slow but
1243   // extensive version.
1244   bool is_in_exact(const void* p) const;
1245 #endif
1246 
1247   // Return "TRUE" iff the given object address is within the collection
1248   // set. Slow implementation.
1249   inline bool obj_in_cs(oop obj);
1250 
1251   inline bool is_in_cset(const HeapRegion *hr);
1252   inline bool is_in_cset(oop obj);
1253 
1254   inline bool is_in_cset_or_humongous(const oop obj);
1255 
1256  private:
1257   // This array is used for a quick test on whether a reference points into
1258   // the collection set or not. Each of the array's elements denotes whether the
1259   // corresponding region is in the collection set or not.
1260   G1InCSetStateFastTestBiasedMappedArray _in_cset_fast_test;
1261 
1262  public:
1263 
1264   inline InCSetState in_cset_state(const oop obj);
1265 
1266   // Return "TRUE" iff the given object address is in the reserved
1267   // region of g1.
1268   bool is_in_g1_reserved(const void* p) const {
1269     return _hrm.reserved().contains(p);
1270   }
1271 


< prev index next >