equal
deleted
inserted
replaced
115 |
115 |
116 inline bool HeapRegion::is_obj_dead_with_size(const oop obj, const G1CMBitMap* const prev_bitmap, size_t* size) const { |
116 inline bool HeapRegion::is_obj_dead_with_size(const oop obj, const G1CMBitMap* const prev_bitmap, size_t* size) const { |
117 HeapWord* addr = (HeapWord*) obj; |
117 HeapWord* addr = (HeapWord*) obj; |
118 |
118 |
119 assert(addr < top(), "must be"); |
119 assert(addr < top(), "must be"); |
120 assert(!is_archive(), "Archive regions should not have references into interesting regions."); |
120 assert(!is_closed_archive(), |
|
121 "Closed archive regions should not have references into other regions"); |
121 assert(!is_humongous(), "Humongous objects not handled here"); |
122 assert(!is_humongous(), "Humongous objects not handled here"); |
122 bool obj_is_dead = is_obj_dead(obj, prev_bitmap); |
123 bool obj_is_dead = is_obj_dead(obj, prev_bitmap); |
123 |
124 |
124 if (ClassUnloadingWithConcurrentMark && obj_is_dead) { |
125 if (ClassUnloadingWithConcurrentMark && obj_is_dead) { |
125 assert(!block_is_obj(addr), "must be"); |
126 assert(!block_is_obj(addr), "must be"); |
160 return pointer_delta(next, addr); |
161 return pointer_delta(next, addr); |
161 } |
162 } |
162 |
163 |
163 inline bool HeapRegion::is_obj_dead(const oop obj, const G1CMBitMap* const prev_bitmap) const { |
164 inline bool HeapRegion::is_obj_dead(const oop obj, const G1CMBitMap* const prev_bitmap) const { |
164 assert(is_in_reserved(obj), "Object " PTR_FORMAT " must be in region", p2i(obj)); |
165 assert(is_in_reserved(obj), "Object " PTR_FORMAT " must be in region", p2i(obj)); |
165 return !obj_allocated_since_prev_marking(obj) && !prev_bitmap->is_marked((HeapWord*)obj); |
166 return !obj_allocated_since_prev_marking(obj) && |
|
167 !prev_bitmap->is_marked((HeapWord*)obj) && |
|
168 !is_open_archive(); |
166 } |
169 } |
167 |
170 |
168 inline size_t HeapRegion::block_size(const HeapWord *addr) const { |
171 inline size_t HeapRegion::block_size(const HeapWord *addr) const { |
169 if (addr == top()) { |
172 if (addr == top()) { |
170 return pointer_delta(end(), addr); |
173 return pointer_delta(end(), addr); |