Skip to content
Permalink
Browse files

8241983: Shenandoah: simplify FreeSet logging

Reviewed-by: rkennke
  • Loading branch information
shipilev committed Apr 1, 2020
1 parent 961c1d6 commit 25b2118bb4741a102c42163a61013e21c04b287f
Showing with 5 additions and 7 deletions.
  1. +5 −7 src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp
@@ -510,29 +510,28 @@ void ShenandoahFreeSet::log_status() {
size_t max_humongous = max_contig * ShenandoahHeapRegion::region_size_bytes();
size_t free = capacity() - used();

ls.print("Free: " SIZE_FORMAT "%s (" SIZE_FORMAT " regions), Max regular: " SIZE_FORMAT "%s, Max humongous: " SIZE_FORMAT "%s, ",
ls.print("Free: " SIZE_FORMAT "%s, Max: " SIZE_FORMAT "%s regular, " SIZE_FORMAT "%s humongous, ",
byte_size_in_proper_unit(total_free), proper_unit_for_byte_size(total_free),
mutator_count(),
byte_size_in_proper_unit(max), proper_unit_for_byte_size(max),
byte_size_in_proper_unit(max_humongous), proper_unit_for_byte_size(max_humongous)
);

ls.print("Frag: ");
size_t frag_ext;
if (total_free_ext > 0) {
frag_ext = 100 - (100 * max_humongous / total_free_ext);
} else {
frag_ext = 0;
}
ls.print("External frag: " SIZE_FORMAT "%%, ", frag_ext);
ls.print(SIZE_FORMAT "%% external, ", frag_ext);

size_t frag_int;
if (mutator_count() > 0) {
frag_int = (100 * (total_used / mutator_count()) / ShenandoahHeapRegion::region_size_bytes());
} else {
frag_int = 0;
}
ls.print("Internal frag: " SIZE_FORMAT "%%", frag_int);
ls.cr();
ls.print(SIZE_FORMAT "%% internal; ", frag_int);
}

{
@@ -548,9 +547,8 @@ void ShenandoahFreeSet::log_status() {
}
}

ls.print_cr("Evacuation Reserve: " SIZE_FORMAT "%s (" SIZE_FORMAT " regions), Max regular: " SIZE_FORMAT "%s",
ls.print_cr("Reserve: " SIZE_FORMAT "%s, Max: " SIZE_FORMAT "%s",
byte_size_in_proper_unit(total_free), proper_unit_for_byte_size(total_free),
collector_count(),
byte_size_in_proper_unit(max), proper_unit_for_byte_size(max));
}
}

0 comments on commit 25b2118

Please sign in to comment.