30 #include "gc/g1/heapRegionType.hpp" 31 #include "gc/g1/survRateGroup.hpp" 32 #include "gc/shared/ageTable.hpp" 33 #include "gc/shared/spaceDecorator.hpp" 34 #include "utilities/macros.hpp" 35 36 // A HeapRegion is the smallest piece of a G1CollectedHeap that 37 // can be collected independently. 38 39 // NOTE: Although a HeapRegion is a Space, its 40 // Space::initDirtyCardClosure method must not be called. 41 // The problem is that the existence of this method breaks 42 // the independence of barrier sets from remembered sets. 43 // The solution is to remove this method from the definition 44 // of a Space. 45 46 // Each heap region is self contained. top() and end() can never 47 // be set beyond the end of the region. For humongous objects, 48 // the first region is a StartsHumongous region. If the humongous 49 // object is larger than a heap region, the following regions will 50 // be of type ContinuesHumongous. In this case the top() and end() 51 // of the StartHumongous region will point to the end of that region. 52 // The same will be true for all ContinuesHumongous regions except 53 // the last, which will have its' top() at the objects' top. 54 55 class G1CollectedHeap; 56 class HeapRegionRemSet; 57 class HeapRegionRemSetIterator; 58 class HeapRegion; 59 class HeapRegionSetBase; 60 class nmethod; 61 62 #define HR_FORMAT "%u:(%s)[" PTR_FORMAT "," PTR_FORMAT "," PTR_FORMAT "]" 63 #define HR_FORMAT_PARAMS(_hr_) \ 64 (_hr_)->hrm_index(), \ 65 (_hr_)->get_short_type_str(), \ 66 p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end()) 67 68 // sentinel value for hrm_index 69 #define G1_NO_HRM_INDEX ((uint) -1) 70 71 // A dirty card to oop closure for heap regions. It 72 // knows how to get the G1 heap and how to use the bitmap 73 // in the concurrent marker used by G1 to filter remembered | 30 #include "gc/g1/heapRegionType.hpp" 31 #include "gc/g1/survRateGroup.hpp" 32 #include "gc/shared/ageTable.hpp" 33 #include "gc/shared/spaceDecorator.hpp" 34 #include "utilities/macros.hpp" 35 36 // A HeapRegion is the smallest piece of a G1CollectedHeap that 37 // can be collected independently. 38 39 // NOTE: Although a HeapRegion is a Space, its 40 // Space::initDirtyCardClosure method must not be called. 41 // The problem is that the existence of this method breaks 42 // the independence of barrier sets from remembered sets. 43 // The solution is to remove this method from the definition 44 // of a Space. 45 46 // Each heap region is self contained. top() and end() can never 47 // be set beyond the end of the region. For humongous objects, 48 // the first region is a StartsHumongous region. If the humongous 49 // object is larger than a heap region, the following regions will 50 // be of type ContinuesHumongous. In this case the top() of the 51 // StartHumongous region and all ContinuesHumongous regions except 52 // the last will point to their own end. For the last ContinuesHumongous 53 // region, top() will equal the object's top. 54 55 class G1CollectedHeap; 56 class HeapRegionRemSet; 57 class HeapRegionRemSetIterator; 58 class HeapRegion; 59 class HeapRegionSetBase; 60 class nmethod; 61 62 #define HR_FORMAT "%u:(%s)[" PTR_FORMAT "," PTR_FORMAT "," PTR_FORMAT "]" 63 #define HR_FORMAT_PARAMS(_hr_) \ 64 (_hr_)->hrm_index(), \ 65 (_hr_)->get_short_type_str(), \ 66 p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end()) 67 68 // sentinel value for hrm_index 69 #define G1_NO_HRM_INDEX ((uint) -1) 70 71 // A dirty card to oop closure for heap regions. It 72 // knows how to get the G1 heap and how to use the bitmap 73 // in the concurrent marker used by G1 to filter remembered |