RFR: 8278581: Improve reference processing statistics log output
Per Liden
pliden at openjdk.java.net
Wed Jan 12 08:53:27 UTC 2022
On Sat, 11 Dec 2021 15:04:43 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> The first commit renames `Cleared` to `Dropped` and added `Processed` in the log output.
>
> The second commit compressed the log output into one line per ref-type. The final log format looks like:
>
>
> [11.803s][debug][gc,phases,ref ] GC(0) SoftReference Discovered: 0, Dropped: 0, Processed: 0
> [11.803s][debug][gc,phases,ref ] GC(0) WeakReference Discovered: 1147, Dropped: 752, Processed: 395
> [11.803s][debug][gc,phases,ref ] GC(0) FinalReference Discovered: 0, Dropped: 0, Processed: 0
> [11.803s][debug][gc,phases,ref ] GC(0) PhantomReference Discovered: 242, Dropped: 2, Processed: 240
>
>
> Test: hotspot_gc
A bit late to the party, and maybe not directly related to your change, but I just thought I should mention that the output in ZGC looks like this:
[1.813s][info][gc,ref ] GC(0) Soft: 87 encountered, 0 discovered, 0 enqueued
[1.813s][info][gc,ref ] GC(0) Weak: 246 encountered, 83 discovered, 82 enqueued
[1.813s][info][gc,ref ] GC(0) Final: 2 encountered, 0 discovered, 0 enqueued
[1.813s][info][gc,ref ] GC(0) Phantom: 53 encountered, 48 discovered, 36 enqueued
IMHO, "enqueued" is a better name than "Processed" in this context (you could argue that all references goes through some level of processing, not just the ones that are eventually enqueued). Having "dropped" seems superfluous to me. Also, having "encountered" is useful to see how many there are in total.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6806
More information about the hotspot-gc-dev
mailing list