4735 *prev_live_bytes = get_hum_bytes(&_hum_prev_live_bytes); |
4735 *prev_live_bytes = get_hum_bytes(&_hum_prev_live_bytes); |
4736 *next_live_bytes = get_hum_bytes(&_hum_next_live_bytes); |
4736 *next_live_bytes = get_hum_bytes(&_hum_next_live_bytes); |
4737 } |
4737 } |
4738 |
4738 |
4739 bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) { |
4739 bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) { |
4740 const char* type = ""; |
4740 const char* type = r->get_type_str(); |
4741 HeapWord* bottom = r->bottom(); |
4741 HeapWord* bottom = r->bottom(); |
4742 HeapWord* end = r->end(); |
4742 HeapWord* end = r->end(); |
4743 size_t capacity_bytes = r->capacity(); |
4743 size_t capacity_bytes = r->capacity(); |
4744 size_t used_bytes = r->used(); |
4744 size_t used_bytes = r->used(); |
4745 size_t prev_live_bytes = r->live_bytes(); |
4745 size_t prev_live_bytes = r->live_bytes(); |
4746 size_t next_live_bytes = r->next_live_bytes(); |
4746 size_t next_live_bytes = r->next_live_bytes(); |
4747 double gc_eff = r->gc_efficiency(); |
4747 double gc_eff = r->gc_efficiency(); |
4748 size_t remset_bytes = r->rem_set()->mem_size(); |
4748 size_t remset_bytes = r->rem_set()->mem_size(); |
4749 size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size(); |
4749 size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size(); |
4750 |
4750 |
4751 if (r->used() == 0) { |
4751 if (r->startsHumongous()) { |
4752 type = "FREE"; |
|
4753 } else if (r->is_survivor()) { |
|
4754 type = "SURV"; |
|
4755 } else if (r->is_young()) { |
|
4756 type = "EDEN"; |
|
4757 } else if (r->startsHumongous()) { |
|
4758 type = "HUMS"; |
|
4759 |
|
4760 assert(_hum_used_bytes == 0 && _hum_capacity_bytes == 0 && |
4752 assert(_hum_used_bytes == 0 && _hum_capacity_bytes == 0 && |
4761 _hum_prev_live_bytes == 0 && _hum_next_live_bytes == 0, |
4753 _hum_prev_live_bytes == 0 && _hum_next_live_bytes == 0, |
4762 "they should have been zeroed after the last time we used them"); |
4754 "they should have been zeroed after the last time we used them"); |
4763 // Set up the _hum_* fields. |
4755 // Set up the _hum_* fields. |
4764 _hum_capacity_bytes = capacity_bytes; |
4756 _hum_capacity_bytes = capacity_bytes; |
4767 _hum_next_live_bytes = next_live_bytes; |
4759 _hum_next_live_bytes = next_live_bytes; |
4768 get_hum_bytes(&used_bytes, &capacity_bytes, |
4760 get_hum_bytes(&used_bytes, &capacity_bytes, |
4769 &prev_live_bytes, &next_live_bytes); |
4761 &prev_live_bytes, &next_live_bytes); |
4770 end = bottom + HeapRegion::GrainWords; |
4762 end = bottom + HeapRegion::GrainWords; |
4771 } else if (r->continuesHumongous()) { |
4763 } else if (r->continuesHumongous()) { |
4772 type = "HUMC"; |
|
4773 get_hum_bytes(&used_bytes, &capacity_bytes, |
4764 get_hum_bytes(&used_bytes, &capacity_bytes, |
4774 &prev_live_bytes, &next_live_bytes); |
4765 &prev_live_bytes, &next_live_bytes); |
4775 assert(end == bottom + HeapRegion::GrainWords, "invariant"); |
4766 assert(end == bottom + HeapRegion::GrainWords, "invariant"); |
4776 } else { |
|
4777 type = "OLD"; |
|
4778 } |
4767 } |
4779 |
4768 |
4780 _total_used_bytes += used_bytes; |
4769 _total_used_bytes += used_bytes; |
4781 _total_capacity_bytes += capacity_bytes; |
4770 _total_capacity_bytes += capacity_bytes; |
4782 _total_prev_live_bytes += prev_live_bytes; |
4771 _total_prev_live_bytes += prev_live_bytes; |