diff src/share/vm/gc_implementation/g1/vmStructs_g1.hpp @ 12305:a19bea467577

7163191: G1: introduce a "heap spanning table" abstraction Summary: Add G1BiasedArray<T> that is an array where each element represents a fixed-sized subdivision of the heap. Use this abstraction to refactor the HeapRegionSeq class. Reviewed-by: brutisso
author tschatzl
date Wed, 25 Sep 2013 13:25:24 +0200
parents 69f26e8e09f9
children 6b8e10e585df de6a9e811145
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vmStructs_g1.hpp	Tue Sep 24 10:14:02 2013 +0200
+++ b/src/share/vm/gc_implementation/g1/vmStructs_g1.hpp	Wed Sep 25 13:25:24 2013 +0200
@@ -34,8 +34,14 @@
   static_field(HeapRegion, GrainBytes,        size_t)                         \
   static_field(HeapRegion, LogOfHRGrainBytes, int)                            \
                                                                               \
-  nonstatic_field(HeapRegionSeq,   _regions, HeapRegion**)                    \
-  nonstatic_field(HeapRegionSeq,   _length,  uint)                            \
+  nonstatic_field(G1HeapRegionTable, _base,             address)              \
+  nonstatic_field(G1HeapRegionTable, _length,           size_t)               \
+  nonstatic_field(G1HeapRegionTable, _biased_base,      address)              \
+  nonstatic_field(G1HeapRegionTable, _bias,             size_t)               \
+  nonstatic_field(G1HeapRegionTable, _shift_by,         uint)                 \
+                                                                              \
+  nonstatic_field(HeapRegionSeq,   _regions,            G1HeapRegionTable)    \
+  nonstatic_field(HeapRegionSeq,   _committed_length,   uint)                 \
                                                                               \
   nonstatic_field(G1CollectedHeap, _hrs,                HeapRegionSeq)        \
   nonstatic_field(G1CollectedHeap, _g1_committed,       MemRegion)            \
@@ -58,6 +64,8 @@
 
 #define VM_TYPES_G1(declare_type, declare_toplevel_type)                      \
                                                                               \
+  declare_toplevel_type(G1HeapRegionTable)                                    \
+                                                                              \
   declare_type(G1CollectedHeap, SharedHeap)                                   \
                                                                               \
   declare_type(HeapRegion, ContiguousSpace)                                   \