RFR (XS) 8243307: Shenandoah: remove ShCollectionSet::live_data

Roman Kennke rkennke at redhat.com
Tue Apr 21 19:39:52 UTC 2020


Ok.

Roman


> RFE:
>   https://bugs.openjdk.java.net/browse/JDK-8243307
> 
> ShCollectionSet::live_data is not used, yet computed on hot path during the pause. We should
> eliminate it.
> 
> Fix:
> 
> diff -r 53c60b2ed2d5 src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp       Tue Apr 21 21:20:19 2020 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp       Tue Apr 21 21:21:56 2020 +0200
> @@ -43,3 +43,2 @@
>    _garbage(0),
> -  _live_data(0),
>    _used(0),
> @@ -87,5 +86,4 @@
>    _cset_map[r->index()] = 1;
> -  _region_count ++;
> +  _region_count++;
>    _garbage += r->garbage();
> -  _live_data += r->get_live_data_bytes();
>    _used += r->used();
> @@ -107,3 +105,2 @@
>    _garbage = 0;
> -  _live_data = 0;
>    _used = 0;
> diff -r 53c60b2ed2d5 src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp       Tue Apr 21 21:20:19 2020 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.hpp       Tue Apr 21 21:21:56 2020 +0200
> @@ -45,3 +45,2 @@
>    size_t                _garbage;
> -  size_t                _live_data;
>    size_t                _used;
> @@ -80,3 +79,2 @@
>    size_t used()      const { return _used; }
> -  size_t live_data() const { return _live_data; }
>    size_t garbage()   const { return _garbage;   }
> 
> Testing: hotspot_gc_shenandoah
> 




More information about the hotspot-gc-dev mailing list