< prev index next >

src/share/vm/gc/g1/g1ConcurrentMark.cpp

Print this page
rev 13279 : 8182169: ArrayAllocator should take MEMFLAGS as regular parameter
Reviewed-by: tschatzl, kbarrett
rev 13284 : imported patch 8184346-cleanup-g1cmbitmap
rev 13285 : imported patch 8184346-rkennke-review
rev 13286 : imported patch 8184346-erikd-mgerdin-review
rev 13287 : [mq]: 8184346-erikd-review


2699         // Even if this task aborted while scanning the humongous object
2700         // we can (and should) give up the current region.
2701         giveup_current_region();
2702         regular_clock_call();
2703       } else if (_nextMarkBitMap->iterate(&bitmap_closure, mr)) {
2704         giveup_current_region();
2705         regular_clock_call();
2706       } else {
2707         assert(has_aborted(), "currently the only way to do so");
2708         // The only way to abort the bitmap iteration is to return
2709         // false from the do_bit() method. However, inside the
2710         // do_bit() method we move the _finger to point to the
2711         // object currently being looked at. So, if we bail out, we
2712         // have definitely set _finger to something non-null.
2713         assert(_finger != NULL, "invariant");
2714 
2715         // Region iteration was actually aborted. So now _finger
2716         // points to the address of the object we last scanned. If we
2717         // leave it there, when we restart this task, we will rescan
2718         // the object. It is easy to avoid this. We move the finger by
2719         // enough to point to the next possible object header (the
2720         // bitmap knows by how much we need to move it as it knows its
2721         // granularity).
2722         assert(_finger < _region_limit, "invariant");
2723         HeapWord* new_finger = _nextMarkBitMap->addr_after_obj(_finger);
2724         // Check if bitmap iteration was aborted while scanning the last object
2725         if (new_finger >= _region_limit) {
2726           giveup_current_region();
2727         } else {
2728           move_finger_to(new_finger);
2729         }
2730       }
2731     }
2732     // At this point we have either completed iterating over the
2733     // region we were holding on to, or we have aborted.
2734 
2735     // We then partially drain the local queue and the global stack.
2736     // (Do we really need this?)
2737     drain_local_queue(true);
2738     drain_global_stack(true);
2739 
2740     // Read the note on the claim_region() method on why it might
2741     // return NULL with potentially more regions available for
2742     // claiming and why we have to check out_of_regions() to determine
2743     // whether we're done or not.




2699         // Even if this task aborted while scanning the humongous object
2700         // we can (and should) give up the current region.
2701         giveup_current_region();
2702         regular_clock_call();
2703       } else if (_nextMarkBitMap->iterate(&bitmap_closure, mr)) {
2704         giveup_current_region();
2705         regular_clock_call();
2706       } else {
2707         assert(has_aborted(), "currently the only way to do so");
2708         // The only way to abort the bitmap iteration is to return
2709         // false from the do_bit() method. However, inside the
2710         // do_bit() method we move the _finger to point to the
2711         // object currently being looked at. So, if we bail out, we
2712         // have definitely set _finger to something non-null.
2713         assert(_finger != NULL, "invariant");
2714 
2715         // Region iteration was actually aborted. So now _finger
2716         // points to the address of the object we last scanned. If we
2717         // leave it there, when we restart this task, we will rescan
2718         // the object. It is easy to avoid this. We move the finger by
2719         // enough to point to the next possible object header.


2720         assert(_finger < _region_limit, "invariant");
2721         HeapWord* const new_finger = _finger + ((oop)_finger)->size();
2722         // Check if bitmap iteration was aborted while scanning the last object
2723         if (new_finger >= _region_limit) {
2724           giveup_current_region();
2725         } else {
2726           move_finger_to(new_finger);
2727         }
2728       }
2729     }
2730     // At this point we have either completed iterating over the
2731     // region we were holding on to, or we have aborted.
2732 
2733     // We then partially drain the local queue and the global stack.
2734     // (Do we really need this?)
2735     drain_local_queue(true);
2736     drain_global_stack(true);
2737 
2738     // Read the note on the claim_region() method on why it might
2739     // return NULL with potentially more regions available for
2740     // claiming and why we have to check out_of_regions() to determine
2741     // whether we're done or not.


< prev index next >