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

Print this page
rev 6540 : 8054819: Rename HeapRegionSeq to HeapRegionManager
Reviewed-by: jwilhelm, jmasa

@@ -20,12 +20,12 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  *
  */
 
-#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSEQ_HPP
-#define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSEQ_HPP
+#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP
+#define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP
 
 #include "gc_implementation/g1/g1BiasedArray.hpp"
 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
 #include "gc_implementation/g1/heapRegionSet.hpp"
 

@@ -62,11 +62,11 @@
 // * _allocated_heapregions_length (not exposed outside this class) is the
 //   number of regions+1 for which we have HeapRegions.
 // * max_length() returns the maximum number of regions the heap can have.
 //
 
-class HeapRegionSeq: public CHeapObj<mtGC> {
+class HeapRegionManager: public CHeapObj<mtGC> {
   friend class VMStructs;
 
   G1HeapRegionTable _regions;
 
   G1RegionToSpaceMapper* _heap_mapper;

@@ -102,11 +102,11 @@
   // Calculate the starting region for each worker during parallel iteration so
   // that they do not all start from the same region.
   uint start_region_for_worker(uint worker_i, uint num_workers, uint num_regions) const;
 
   // Find a contiguous set of empty or uncommitted regions of length num and return
-  // the index of the first region or G1_NO_HRS_INDEX if the search was unsuccessful.
+  // the index of the first region or G1_NO_HRM_INDEX if the search was unsuccessful.
   // If only_empty is true, only empty regions are considered.
   // Searches from bottom to top of the heap, doing a first-fit.
   uint find_contiguous(size_t num, bool only_empty);
   // Finds the next sequence of unavailable regions starting from start_idx. Returns the
   // length of the sequence found. If this result is zero, no such sequence could be found,

@@ -115,21 +115,21 @@
   // Finds the next sequence of empty regions starting from start_idx, going backwards in
   // the heap. Returns the length of the sequence found. If this value is zero, no
   // sequence could be found, otherwise res_idx contains the start index of this range.
   uint find_empty_from_idx_reverse(uint start_idx, uint* res_idx) const;
   // Allocate a new HeapRegion for the given index.
-  HeapRegion* new_heap_region(uint hrs_index);
+  HeapRegion* new_heap_region(uint hrm_index);
 #ifdef ASSERT
 public:
   bool is_free(HeapRegion* hr) const;
 #endif
   // Returns whether the given region is available for allocation.
   bool is_available(uint region) const;
 
   public:
    // Empty constructor, we'll initialize it with the initialize() method.
-  HeapRegionSeq() : _regions(), _heap_mapper(NULL), _num_committed(0),
+  HeapRegionManager() : _regions(), _heap_mapper(NULL), _num_committed(0),
                     _next_bitmap_mapper(NULL), _prev_bitmap_mapper(NULL), _bot_mapper(NULL),
                     _allocated_heapregions_length(0), _available_map(),
                     _free_list("Free list", new MasterFreeRegionListMtSafeChecker())
   { }
 

@@ -165,11 +165,11 @@
   HeapRegion* allocate_free_region(bool is_old) {
     HeapRegion* hr = _free_list.remove_region(is_old);
 
     if (hr != NULL) {
       assert(hr->next() == NULL, "Single region should not have next");
-      assert(is_available(hr->hrs_index()), "Must be committed");
+      assert(is_available(hr->hrm_index()), "Must be committed");
     }
     return hr;
   }
 
   inline void allocate_free_regions_starting_at(uint first, uint num_regions);

@@ -209,14 +209,14 @@
   // for allocation. Returns the number of regions that were committed to achieve
   // this.
   uint expand_at(uint start, uint num_regions);
 
   // Find a contiguous set of empty regions of length num. Returns the start index of
-  // that set, or G1_NO_HRS_INDEX.
+  // that set, or G1_NO_HRM_INDEX.
   uint find_contiguous_only_empty(size_t num) { return find_contiguous(num, true); }
   // Find a contiguous set of empty or unavailable regions of length num. Returns the
-  // start index of that set, or G1_NO_HRS_INDEX.
+  // start index of that set, or G1_NO_HRM_INDEX.
   uint find_contiguous_empty_or_unavailable(size_t num) { return find_contiguous(num, false); }
 
   HeapRegion* next_region_in_heap(const HeapRegion* r) const;
 
   // Apply blk->doHeapRegion() on all committed regions in address order,

@@ -233,6 +233,6 @@
 
   // Do some sanity checking.
   void verify_optional() PRODUCT_RETURN;
 };
 
-#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSEQ_HPP
+#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONMANAGER_HPP