RFR (XS) 8222843: Print Shenandoah cset map addresses in hs_err

Roman Kennke rkennke at redhat.com
Wed Apr 24 09:02:57 UTC 2019


Yes, looks good, thanks!

Roman


> RFE:
>    https://bugs.openjdk.java.net/browse/JDK-8222843
> 
> Fix:
> 
> diff -r 8eae2646fed8 src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp       Tue Apr 23 10:58:24 2019 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp       Tue Apr 23 11:13:05 2019 +0200
> @@ -89,4 +89,7 @@
> 
>   private:
> +  jbyte* map_address() const {
> +    return _cset_map;
> +  }
>     jbyte* biased_map_address() const {
>       return _biased_cset_map;
> diff -r 8eae2646fed8 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp        Tue Apr 23 10:58:24 2019 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp        Tue Apr 23 11:13:05 2019 +0200
> @@ -538,4 +538,13 @@
>                  p2i(reserved_region().end()));
> 
> +  ShenandoahCollectionSet* cset = collection_set();
> +  st->print_cr("Collection set:");
> +  if (cset != NULL) {
> +    st->print_cr(" - map (vanilla): " PTR_FORMAT, p2i(cset->map_address()));
> +    st->print_cr(" - map (biased):  " PTR_FORMAT, p2i(cset->biased_map_address()));
> +  } else {
> +    st->print_cr(" (NULL)");
> +  }
> +
>     st->cr();
>     MetaspaceUtils::print_on(st);
> 
> 
> Testing: eyeballing hs_errs
> 



More information about the hotspot-gc-dev mailing list