RFR: 8278891: G1: Call reset in G1RegionMarkStatsCache constructor

Thomas Schatzl tschatzl at openjdk.java.net
Thu Dec 16 13:02:55 UTC 2021


On Thu, 16 Dec 2021 10:08:20 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Currently, G1RegionMarkStatsCache constructor does not call G1RegionMarkStatsCache::reset(), it depends on user to call it explicitly to make sure it works well and without crash in G1RegionMarkStatsCache::evict(uint idx).
> 
> In fact G1RegionMarkStatsCache constructor should call G1RegionMarkStatsCache::reset() to ensure its valid initial state.
> 
> ( I met this issue when I tried to reuse this class to implement some parallel cache when improve the parallelism of evacuation failure. )

Lgtm.

-------------

Marked as reviewed by tschatzl (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6861



More information about the hotspot-gc-dev mailing list