comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 6253:db823a892a55

7182260: G1: Fine grain RSet freeing bottleneck Summary: Chain the fine grain PerRegionTables in an individual RSet together and free them in bulk using a single operation. Reviewed-by: johnc, brutisso Contributed-by: Thomas Schatzl <thomas.schatzl@jku.at>
author johnc
date Tue, 17 Jul 2012 12:24:05 -0700
parents 24b9c7f4cae6
children 5c93c1f61226
comparison
equal deleted inserted replaced
6252:d42fe3c3001d 6253:db823a892a55
80 static jint _n_coarsenings; 80 static jint _n_coarsenings;
81 81
82 PerRegionTable** _fine_grain_regions; 82 PerRegionTable** _fine_grain_regions;
83 size_t _n_fine_entries; 83 size_t _n_fine_entries;
84 84
85 // The fine grain remembered sets are doubly linked together using
86 // their 'next' and 'prev' fields.
87 // This allows fast bulk freeing of all the fine grain remembered
88 // set entries, and fast finding of all of them without iterating
89 // over the _fine_grain_regions table.
90 PerRegionTable * _first_all_fine_prts;
91 PerRegionTable * _last_all_fine_prts;
92
85 // Used to sample a subset of the fine grain PRTs to determine which 93 // Used to sample a subset of the fine grain PRTs to determine which
86 // PRT to evict and coarsen. 94 // PRT to evict and coarsen.
87 size_t _fine_eviction_start; 95 size_t _fine_eviction_start;
88 static size_t _fine_eviction_stride; 96 static size_t _fine_eviction_stride;
89 static size_t _fine_eviction_sample_size; 97 static size_t _fine_eviction_sample_size;
111 119
112 // Indexed by thread X heap region, to minimize thread contention. 120 // Indexed by thread X heap region, to minimize thread contention.
113 static int** _from_card_cache; 121 static int** _from_card_cache;
114 static size_t _from_card_cache_max_regions; 122 static size_t _from_card_cache_max_regions;
115 static size_t _from_card_cache_mem_size; 123 static size_t _from_card_cache_mem_size;
124
125 // link/add the given fine grain remembered set into the "all" list
126 void link_to_all(PerRegionTable * prt);
127 // unlink/remove the given fine grain remembered set into the "all" list
128 void unlink_from_all(PerRegionTable * prt);
116 129
117 public: 130 public:
118 OtherRegionsTable(HeapRegion* hr); 131 OtherRegionsTable(HeapRegion* hr);
119 132
120 HeapRegion* hr() const { return _hr; } 133 HeapRegion* hr() const { return _hr; }