src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp
changeset 52875 bb051ca06e9e
parent 51494 1906adbef2dc
child 53244 9807daeb47c4
equal deleted inserted replaced
52874:c45a5b46461b 52875:bb051ca06e9e
    53   }
    53   }
    54   assert(_g1h->is_in_reserved(obj), "Trying to discover obj " PTR_FORMAT " not in heap", p2i(obj));
    54   assert(_g1h->is_in_reserved(obj), "Trying to discover obj " PTR_FORMAT " not in heap", p2i(obj));
    55   return _g1h->heap_region_containing(obj)->is_old_or_humongous_or_archive();
    55   return _g1h->heap_region_containing(obj)->is_old_or_humongous_or_archive();
    56 }
    56 }
    57 
    57 
    58 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, oop const obj, size_t const obj_size) {
    58 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, oop const obj) {
    59   HeapRegion* const hr = _g1h->heap_region_containing(obj);
    59   HeapRegion* const hr = _g1h->heap_region_containing(obj);
    60   return mark_in_next_bitmap(worker_id, hr, obj, obj_size);
    60   return mark_in_next_bitmap(worker_id, hr, obj);
    61 }
    61 }
    62 
    62 
    63 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, HeapRegion* const hr, oop const obj, size_t const obj_size) {
    63 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, HeapRegion* const hr, oop const obj) {
    64   assert(hr != NULL, "just checking");
    64   assert(hr != NULL, "just checking");
    65   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());
    65   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());
    66 
    66 
    67   if (hr->obj_allocated_since_next_marking(obj)) {
    67   if (hr->obj_allocated_since_next_marking(obj)) {
    68     return false;
    68     return false;
    74 
    74 
    75   HeapWord* const obj_addr = (HeapWord*)obj;
    75   HeapWord* const obj_addr = (HeapWord*)obj;
    76 
    76 
    77   bool success = _next_mark_bitmap->par_mark(obj_addr);
    77   bool success = _next_mark_bitmap->par_mark(obj_addr);
    78   if (success) {
    78   if (success) {
    79     add_to_liveness(worker_id, obj, obj_size == 0 ? obj->size() : obj_size);
    79     add_to_liveness(worker_id, obj, obj->size());
    80   }
    80   }
    81   return success;
    81   return success;
    82 }
    82 }
    83 
    83 
    84 #ifndef PRODUCT
    84 #ifndef PRODUCT