comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 845:df6caf649ff7

6700789: G1: Enable use of compressed oops with G1 heaps Summary: Modifications to G1 so as to allow the use of compressed oops. Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author ysr
date Tue, 14 Jul 2009 15:40:39 -0700
parents 315a5d70b295
children 0414c1049f15
comparison
equal deleted inserted replaced
839:bb18957ad21e 845:df6caf649ff7
114 114
115 HeapRegion* hr() const { return _hr; } 115 HeapRegion* hr() const { return _hr; }
116 116
117 // For now. Could "expand" some tables in the future, so that this made 117 // For now. Could "expand" some tables in the future, so that this made
118 // sense. 118 // sense.
119 void add_reference(oop* from, int tid); 119 void add_reference(OopOrNarrowOopStar from, int tid);
120 120
121 void add_reference(oop* from) { 121 void add_reference(OopOrNarrowOopStar from) {
122 return add_reference(from, 0); 122 return add_reference(from, 0);
123 } 123 }
124 124
125 // Removes any entries shown by the given bitmaps to contain only dead 125 // Removes any entries shown by the given bitmaps to contain only dead
126 // objects. 126 // objects.
138 // Not const because it takes a lock. 138 // Not const because it takes a lock.
139 size_t mem_size() const; 139 size_t mem_size() const;
140 static size_t static_mem_size(); 140 static size_t static_mem_size();
141 static size_t fl_mem_size(); 141 static size_t fl_mem_size();
142 142
143 bool contains_reference(oop* from) const; 143 bool contains_reference(OopOrNarrowOopStar from) const;
144 bool contains_reference_locked(oop* from) const; 144 bool contains_reference_locked(OopOrNarrowOopStar from) const;
145 145
146 void clear(); 146 void clear();
147 147
148 // Specifically clear the from_card_cache. 148 // Specifically clear the from_card_cache.
149 void clear_fcc(); 149 void clear_fcc();
190 ParIterState _iter_state; 190 ParIterState _iter_state;
191 191
192 // Unused unless G1RecordHRRSOops is true. 192 // Unused unless G1RecordHRRSOops is true.
193 193
194 static const int MaxRecorded = 1000000; 194 static const int MaxRecorded = 1000000;
195 static oop** _recorded_oops; 195 static OopOrNarrowOopStar* _recorded_oops;
196 static HeapWord** _recorded_cards; 196 static HeapWord** _recorded_cards;
197 static HeapRegion** _recorded_regions; 197 static HeapRegion** _recorded_regions;
198 static int _n_recorded; 198 static int _n_recorded;
199 199
200 static const int MaxRecordedEvents = 1000; 200 static const int MaxRecordedEvents = 1000;
201 static Event* _recorded_events; 201 static Event* _recorded_events;
202 static int* _recorded_event_index; 202 static int* _recorded_event_index;
203 static int _n_recorded_events; 203 static int _n_recorded_events;
229 229
230 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); } 230 static jint n_coarsenings() { return OtherRegionsTable::n_coarsenings(); }
231 231
232 /* Used in the sequential case. Returns "true" iff this addition causes 232 /* Used in the sequential case. Returns "true" iff this addition causes
233 the size limit to be reached. */ 233 the size limit to be reached. */
234 void add_reference(oop* from) { 234 void add_reference(OopOrNarrowOopStar from) {
235 _other_regions.add_reference(from); 235 _other_regions.add_reference(from);
236 } 236 }
237 237
238 /* Used in the parallel case. Returns "true" iff this addition causes 238 /* Used in the parallel case. Returns "true" iff this addition causes
239 the size limit to be reached. */ 239 the size limit to be reached. */
240 void add_reference(oop* from, int tid) { 240 void add_reference(OopOrNarrowOopStar from, int tid) {
241 _other_regions.add_reference(from, tid); 241 _other_regions.add_reference(from, tid);
242 } 242 }
243 243
244 // Records the fact that the current region contains an outgoing 244 // Records the fact that the current region contains an outgoing
245 // reference into "to_hr". 245 // reference into "to_hr".
299 // with remembered sets. 299 // with remembered sets.
300 static size_t fl_mem_size() { 300 static size_t fl_mem_size() {
301 return OtherRegionsTable::fl_mem_size(); 301 return OtherRegionsTable::fl_mem_size();
302 } 302 }
303 303
304 bool contains_reference(oop* from) const { 304 bool contains_reference(OopOrNarrowOopStar from) const {
305 return _other_regions.contains_reference(from); 305 return _other_regions.contains_reference(from);
306 } 306 }
307 void print() const; 307 void print() const;
308 308
309 // Called during a stop-world phase to perform any deferred cleanups. 309 // Called during a stop-world phase to perform any deferred cleanups.
327 static void print_from_card_cache() { 327 static void print_from_card_cache() {
328 OtherRegionsTable::print_from_card_cache(); 328 OtherRegionsTable::print_from_card_cache();
329 } 329 }
330 #endif 330 #endif
331 331
332 static void record(HeapRegion* hr, oop* f); 332 static void record(HeapRegion* hr, OopOrNarrowOopStar f);
333 static void print_recorded(); 333 static void print_recorded();
334 static void record_event(Event evnt); 334 static void record_event(Event evnt);
335 335
336 // Run unit tests. 336 // Run unit tests.
337 #ifndef PRODUCT 337 #ifndef PRODUCT