2192 void do_object(oop o) { |
2192 void do_object(oop o) { |
2193 VerifyLivenessOopClosure isLive(_g1h); |
2193 VerifyLivenessOopClosure isLive(_g1h); |
2194 assert(o != NULL, "Huh?"); |
2194 assert(o != NULL, "Huh?"); |
2195 if (!_g1h->is_obj_dead_cond(o, _use_prev_marking)) { |
2195 if (!_g1h->is_obj_dead_cond(o, _use_prev_marking)) { |
2196 o->oop_iterate(&isLive); |
2196 o->oop_iterate(&isLive); |
2197 if (!_hr->obj_allocated_since_prev_marking(o)) |
2197 if (!_hr->obj_allocated_since_prev_marking(o)) { |
2198 _live_bytes += (o->size() * HeapWordSize); |
2198 size_t obj_size = o->size(); // Make sure we don't overflow |
|
2199 _live_bytes += (obj_size * HeapWordSize); |
|
2200 } |
2199 } |
2201 } |
2200 } |
2202 } |
2201 size_t live_bytes() { return _live_bytes; } |
2203 size_t live_bytes() { return _live_bytes; } |
2202 }; |
2204 }; |
2203 |
2205 |