RFR: Report actual free size in non-verbose FreeSet status

Roman Kennke rkennke at redhat.com
Thu Jul 12 17:14:16 UTC 2018


Am 12.07.2018 um 18:33 schrieb Aleksey Shipilev:
> It misleadingly prints "Free:" for the entire capacity, which only makes sense when no allocations
> happened yet. Easy fix:
> 
> diff -r 55965025794c src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp     Thu Jul 12 12:04:55 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp     Thu Jul 12 12:19:26 2018 +0200
> @@ -456,7 +456,7 @@
> 
>  void ShenandoahFreeSet::log_status() {
>    log_info(gc, ergo)("Free: " SIZE_FORMAT "M, Regions: " SIZE_FORMAT " mutator, " SIZE_FORMAT "
> collector",
> -                     capacity() / M, mutator_count(), collector_count());
> +                     available() / M, mutator_count(), collector_count());
>  }
> 
>  void ShenandoahFreeSet::log_status_verbose() {
> 
> Testing: eyeballing logs
> 
> Thanks,
> -Aleksey
> 

Oops. Ok :-)

Roman



More information about the shenandoah-dev mailing list