Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp @ 20337:1f1d373cd044
8038423: G1: Decommit memory within heap
Summary: Allow G1 to decommit memory of arbitrary regions within the heap and their associated auxiliary data structures card table, BOT, hot card cache, and mark bitmaps.
Reviewed-by: mgerdin, brutisso, jwilhelm
author | tschatzl |
---|---|
date | Thu, 21 Aug 2014 11:47:10 +0200 |
parents | 78bbf4d43a14 |
children | a8ea2f110d87 |
comparison
equal
deleted
inserted
replaced
20336:6701abbc4441 | 20337:1f1d373cd044 |
---|---|
266 inline bool CMBitMapRO::iterate(BitMapClosure* cl) { | 266 inline bool CMBitMapRO::iterate(BitMapClosure* cl) { |
267 MemRegion mr(startWord(), sizeInWords()); | 267 MemRegion mr(startWord(), sizeInWords()); |
268 return iterate(cl, mr); | 268 return iterate(cl, mr); |
269 } | 269 } |
270 | 270 |
271 #define check_mark(addr) \ | |
272 assert(_bmStartWord <= (addr) && (addr) < (_bmStartWord + _bmWordSize), \ | |
273 "outside underlying space?"); \ | |
274 assert(G1CollectedHeap::heap()->is_in_exact(addr), \ | |
275 err_msg("Trying to access not available bitmap "PTR_FORMAT \ | |
276 " corresponding to "PTR_FORMAT" (%u)", \ | |
277 p2i(this), p2i(addr), G1CollectedHeap::heap()->addr_to_region(addr))); | |
278 | |
279 inline void CMBitMap::mark(HeapWord* addr) { | |
280 check_mark(addr); | |
281 _bm.set_bit(heapWordToOffset(addr)); | |
282 } | |
283 | |
284 inline void CMBitMap::clear(HeapWord* addr) { | |
285 check_mark(addr); | |
286 _bm.clear_bit(heapWordToOffset(addr)); | |
287 } | |
288 | |
289 inline bool CMBitMap::parMark(HeapWord* addr) { | |
290 check_mark(addr); | |
291 return _bm.par_set_bit(heapWordToOffset(addr)); | |
292 } | |
293 | |
294 inline bool CMBitMap::parClear(HeapWord* addr) { | |
295 check_mark(addr); | |
296 return _bm.par_clear_bit(heapWordToOffset(addr)); | |
297 } | |
298 | |
299 #undef check_mark | |
300 | |
271 inline void CMTask::push(oop obj) { | 301 inline void CMTask::push(oop obj) { |
272 HeapWord* objAddr = (HeapWord*) obj; | 302 HeapWord* objAddr = (HeapWord*) obj; |
273 assert(_g1h->is_in_g1_reserved(objAddr), "invariant"); | 303 assert(_g1h->is_in_g1_reserved(objAddr), "invariant"); |
274 assert(!_g1h->is_on_master_free_list( | 304 assert(!_g1h->is_on_master_free_list( |
275 _g1h->heap_region_containing((HeapWord*) objAddr)), "invariant"); | 305 _g1h->heap_region_containing((HeapWord*) objAddr)), "invariant"); |