< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1CONCURRENTMARK_INLINE_HPP
  26 #define SHARE_VM_GC_G1_G1CONCURRENTMARK_INLINE_HPP
  27 
  28 #include "gc/common/suspendibleThreadSet.hpp"
  29 #include "gc/g1/g1CollectedHeap.inline.hpp"
  30 #include "gc/g1/g1ConcurrentMark.hpp"
  31 #include "gc/g1/g1ConcurrentMarkBitMap.inline.hpp"
  32 #include "gc/g1/g1ConcurrentMarkObjArrayProcessor.inline.hpp"

  33 #include "gc/shared/taskqueue.inline.hpp"
  34 #include "utilities/bitMap.inline.hpp"
  35 
  36 inline bool G1ConcurrentMark::mark_in_next_bitmap(oop const obj) {
  37   HeapRegion* const hr = _g1h->heap_region_containing(obj);
  38   return mark_in_next_bitmap(hr, obj);
  39 }
  40 
  41 inline bool G1ConcurrentMark::mark_in_next_bitmap(HeapRegion* const hr, oop const obj) {
  42   assert(hr != NULL, "just checking");
  43   assert(hr->is_in_reserved(obj), "Attempting to mark object at " PTR_FORMAT " that is not contained in the given region %u", p2i(obj), hr->hrm_index());
  44 
  45   if (hr->obj_allocated_since_next_marking(obj)) {
  46     return false;
  47   }
  48 
  49   // Some callers may have stale objects to mark above nTAMS after humongous reclaim.
  50   // Can't assert that this is a valid object at this point, since it might be in the process of being copied by another thread.
  51   assert(!hr->is_continues_humongous(), "Should not try to mark object " PTR_FORMAT " in Humongous continues region %u above nTAMS " PTR_FORMAT, p2i(obj), hr->hrm_index(), p2i(hr->next_top_at_mark_start()));
  52 




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1CONCURRENTMARK_INLINE_HPP
  26 #define SHARE_VM_GC_G1_G1CONCURRENTMARK_INLINE_HPP
  27 

  28 #include "gc/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc/g1/g1ConcurrentMark.hpp"
  30 #include "gc/g1/g1ConcurrentMarkBitMap.inline.hpp"
  31 #include "gc/g1/g1ConcurrentMarkObjArrayProcessor.inline.hpp"
  32 #include "gc/shared/suspendibleThreadSet.hpp"
  33 #include "gc/shared/taskqueue.inline.hpp"
  34 #include "utilities/bitMap.inline.hpp"
  35 
  36 inline bool G1ConcurrentMark::mark_in_next_bitmap(oop const obj) {
  37   HeapRegion* const hr = _g1h->heap_region_containing(obj);
  38   return mark_in_next_bitmap(hr, obj);
  39 }
  40 
  41 inline bool G1ConcurrentMark::mark_in_next_bitmap(HeapRegion* const hr, oop const obj) {
  42   assert(hr != NULL, "just checking");
  43   assert(hr->is_in_reserved(obj), "Attempting to mark object at " PTR_FORMAT " that is not contained in the given region %u", p2i(obj), hr->hrm_index());
  44 
  45   if (hr->obj_allocated_since_next_marking(obj)) {
  46     return false;
  47   }
  48 
  49   // Some callers may have stale objects to mark above nTAMS after humongous reclaim.
  50   // Can't assert that this is a valid object at this point, since it might be in the process of being copied by another thread.
  51   assert(!hr->is_continues_humongous(), "Should not try to mark object " PTR_FORMAT " in Humongous continues region %u above nTAMS " PTR_FORMAT, p2i(obj), hr->hrm_index(), p2i(hr->next_top_at_mark_start()));
  52 


< prev index next >