< prev index next >

src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp

Print this page
rev 8068 : 6407976: GC worker number should be unsigned
Reviewed-by: jwilhelm


 193 inline void
 194 G1CollectedHeap::dirty_young_block(HeapWord* start, size_t word_size) {
 195   assert_heap_not_locked();
 196 
 197   // Assign the containing region to containing_hr so that we don't
 198   // have to keep calling heap_region_containing_raw() in the
 199   // asserts below.
 200   DEBUG_ONLY(HeapRegion* containing_hr = heap_region_containing_raw(start);)
 201   assert(word_size > 0, "pre-condition");
 202   assert(containing_hr->is_in(start), "it should contain start");
 203   assert(containing_hr->is_young(), "it should be young");
 204   assert(!containing_hr->is_humongous(), "it should not be humongous");
 205 
 206   HeapWord* end = start + word_size;
 207   assert(containing_hr->is_in(end - 1), "it should also contain end - 1");
 208 
 209   MemRegion mr(start, end);
 210   g1_barrier_set()->g1_mark_as_young(mr);
 211 }
 212 
 213 inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const {
 214   return _task_queues->queue(i);
 215 }
 216 
 217 inline bool G1CollectedHeap::isMarkedPrev(oop obj) const {
 218   return _cm->prevMarkBitMap()->isMarked((HeapWord *)obj);
 219 }
 220 
 221 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
 222   return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
 223 }
 224 
 225 // This is a fast test on whether a reference points into the
 226 // collection set or not. Assume that the reference
 227 // points into the heap.
 228 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 229   bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
 230   // let's make sure the result is consistent with what the slower
 231   // test returns
 232   assert( ret || !obj_in_cs(obj), "sanity");
 233   assert(!ret ||  obj_in_cs(obj), "sanity");




 193 inline void
 194 G1CollectedHeap::dirty_young_block(HeapWord* start, size_t word_size) {
 195   assert_heap_not_locked();
 196 
 197   // Assign the containing region to containing_hr so that we don't
 198   // have to keep calling heap_region_containing_raw() in the
 199   // asserts below.
 200   DEBUG_ONLY(HeapRegion* containing_hr = heap_region_containing_raw(start);)
 201   assert(word_size > 0, "pre-condition");
 202   assert(containing_hr->is_in(start), "it should contain start");
 203   assert(containing_hr->is_young(), "it should be young");
 204   assert(!containing_hr->is_humongous(), "it should not be humongous");
 205 
 206   HeapWord* end = start + word_size;
 207   assert(containing_hr->is_in(end - 1), "it should also contain end - 1");
 208 
 209   MemRegion mr(start, end);
 210   g1_barrier_set()->g1_mark_as_young(mr);
 211 }
 212 
 213 inline RefToScanQueue* G1CollectedHeap::task_queue(uint i) const {
 214   return _task_queues->queue(i);
 215 }
 216 
 217 inline bool G1CollectedHeap::isMarkedPrev(oop obj) const {
 218   return _cm->prevMarkBitMap()->isMarked((HeapWord *)obj);
 219 }
 220 
 221 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
 222   return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
 223 }
 224 
 225 // This is a fast test on whether a reference points into the
 226 // collection set or not. Assume that the reference
 227 // points into the heap.
 228 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 229   bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
 230   // let's make sure the result is consistent with what the slower
 231   // test returns
 232   assert( ret || !obj_in_cs(obj), "sanity");
 233   assert(!ret ||  obj_in_cs(obj), "sanity");


< prev index next >