JDK-8278581 : Improve reference processing statistics log output
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-12-11
  • Updated: 2022-10-29
  • Resolved: 2022-01-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b05Fixed
Related Reports
Relates :  
Description
Using `gc+phases+refs=debug`, one will get logs like:

```
   SoftReference:
     Discovered: 998420
     Cleared: 998420
   WeakReference:
     Discovered: 147
     Cleared: 147
   FinalReference:
     Discovered: 0
     Cleared: 0
   PhantomReference:
     Discovered: 2
     Cleared: 2
```

The word "Cleared" can be interpreted as `ref.referent = null`, but what this metric actually tracks is #refs dropped (referent == null or reachable) from the discovered list (DL).

Improve the wording to make it more accurate and make the output more compact.

Comments
Changeset: 4f0b6502 Author: Albert Mingkun Yang <ayang@openjdk.org> Date: 2022-01-12 08:28:51 +0000 URL: https://git.openjdk.java.net/jdk/commit/4f0b65023f8f37ba59a6397d8caf6b4b86ab18b7
12-01-2022