hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
changeset 41081 286019ba662d
parent 40922 d9f1eaf18f9a
child 41176 ff9f64534cff
equal deleted inserted replaced
41080:5502eb75f1ad 41081:286019ba662d
  1902   // yield points.
  1902   // yield points.
  1903   while (finger < _heap_end) {
  1903   while (finger < _heap_end) {
  1904     assert(_g1h->is_in_g1_reserved(finger), "invariant");
  1904     assert(_g1h->is_in_g1_reserved(finger), "invariant");
  1905 
  1905 
  1906     HeapRegion* curr_region = _g1h->heap_region_containing(finger);
  1906     HeapRegion* curr_region = _g1h->heap_region_containing(finger);
  1907 
  1907     // Make sure that the reads below do not float before loading curr_region.
       
  1908     OrderAccess::loadload();
  1908     // Above heap_region_containing may return NULL as we always scan claim
  1909     // Above heap_region_containing may return NULL as we always scan claim
  1909     // until the end of the heap. In this case, just jump to the next region.
  1910     // until the end of the heap. In this case, just jump to the next region.
  1910     HeapWord* end = curr_region != NULL ? curr_region->end() : finger + HeapRegion::GrainWords;
  1911     HeapWord* end = curr_region != NULL ? curr_region->end() : finger + HeapRegion::GrainWords;
  1911 
  1912 
  1912     // Is the gap between reading the finger and doing the CAS too long?
  1913     // Is the gap between reading the finger and doing the CAS too long?