@@ -204,21 +204,24 @@ void ShenandoahGeneration::log_status(const char *msg) const {
204204
205205 // Not under a lock here, so read each of these once to make sure
206206 // byte size in proper unit and proper unit for byte size are consistent.
207- size_t v_used = used ();
208- size_t v_used_regions = used_regions_size ();
209- size_t v_soft_max_capacity = soft_max_capacity ();
210- size_t v_max_capacity = max_capacity ();
211- size_t v_available = available ();
212- size_t v_humongous_waste = get_humongous_waste ();
213- LogGcInfo::print (" %s: %s generation used: " SIZE_FORMAT " %s, used regions: " SIZE_FORMAT " %s, "
214- " humongous waste: " SIZE_FORMAT " %s, soft capacity: " SIZE_FORMAT " %s, max capacity: " SIZE_FORMAT " %s, "
215- " available: " SIZE_FORMAT " %s" , msg, name (),
216- byte_size_in_proper_unit (v_used), proper_unit_for_byte_size (v_used),
217- byte_size_in_proper_unit (v_used_regions), proper_unit_for_byte_size (v_used_regions),
218- byte_size_in_proper_unit (v_humongous_waste), proper_unit_for_byte_size (v_humongous_waste),
219- byte_size_in_proper_unit (v_soft_max_capacity), proper_unit_for_byte_size (v_soft_max_capacity),
220- byte_size_in_proper_unit (v_max_capacity), proper_unit_for_byte_size (v_max_capacity),
221- byte_size_in_proper_unit (v_available), proper_unit_for_byte_size (v_available));
207+ const size_t v_used = used ();
208+ const size_t v_used_regions = used_regions_size ();
209+ const size_t v_soft_max_capacity = soft_max_capacity ();
210+ const size_t v_max_capacity = max_capacity ();
211+ const size_t v_available = available ();
212+ const size_t v_humongous_waste = get_humongous_waste ();
213+
214+ const LogGcInfo target;
215+ LogStream ls (target);
216+ ls.print (" %s: " , msg);
217+ if (_type != NON_GEN) {
218+ ls.print (" %s generation " , name ());
219+ }
220+
221+ ls.print_cr (" used: " PROPERFMT " , used regions: " PROPERFMT " , humongous waste: " PROPERFMT
222+ " , soft capacity: " PROPERFMT " , max capacity: " PROPERFMT " , available: " PROPERFMT,
223+ PROPERFMTARGS (v_used), PROPERFMTARGS (v_used_regions), PROPERFMTARGS (v_humongous_waste),
224+ PROPERFMTARGS (v_soft_max_capacity), PROPERFMTARGS (v_max_capacity), PROPERFMTARGS (v_available));
222225}
223226
224227void ShenandoahGeneration::reset_mark_bitmap () {
0 commit comments