Integrated: 8308643: Incorrect value of 'used' jvmstat counter

Kim Barrett kbarrett at openjdk.org
Thu Jun 15 22:26:10 UTC 2023


On Sun, 28 May 2023 02:08:59 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change that fixes the space-used performance counters
> provided by ParallelGC and SerialGC.
> 
> The prior fix for a problem in this area (JDK-8268265) wasn't correct.  It
> used a static "last value" variable, for use when sampling is blocked by an
> in-progress GC.  But there are multiple counters, so having one static "last
> value" variable doesn't work.  (Not sure what I and my reviewers were thinking
> at the time. Maybe we overlooked that there are multiple counters.)  The
> solution is to associate a "last value" with each of the counters.
> 
> Also added a test of basic functionality (just accessibility) of the space
> counters.  No regression test of the problem being fixed here, as its hard to
> reliably set up.
> 
> Note: SpaceCounters and CSpaceCounters are very nearly identical.  It's likely
> possible to refactor for more code sharing, which could be done as a followup.
> 
> Testing:
> mach5 tier1

This pull request has now been integrated.

Changeset: 92167505
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/92167505b217c0e6074f58f8479be97bc4c776b3
Stats:     150 lines in 5 files changed: 107 ins; 4 del; 39 mod

8308643: Incorrect value of 'used' jvmstat counter

Reviewed-by: tschatzl, ayang

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

PR: https://git.openjdk.org/jdk/pull/14195


More information about the hotspot-gc-dev mailing list