JDK-8266183 : Provide an API to get statistics from metaspace in a consistent manner
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2021-04-28
  • Updated: 2021-04-29
  • Resolved: 2021-04-29
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
At various places in the VM we query basic metaspace statistics (usually reserved+committed+used) by querying the individual values one after the other; this is inherently racy. Therefore we see rare intermittent errors in code which afterwards tests consistency of these values (e.g. JDK-8151460, JDK-8237872). 

Provide an API which returns consistent values and use them in these places. Affected are:

- Metaspace Perf Counters (MetaspaceCounters::update_performance_counters())

- NMT reporting (MemSummaryReporter::report_metadata)

and potentially others (see also JDK-8251392).

Comments
Only issues with an associated changeset should be closed as "Fixed". It looks like this issue should be closed as a duplicate of another issue.
29-04-2021