RFR (S) 8210562: Change the verbosity threshold of logging for [oopstorage, ref]

Man Cao manc at google.com
Wed Sep 12 03:32:57 UTC 2018

Hi all,

I noticed that excessive logging messages appear in JDK11 with
-Xlog:ref*=debug, which is the documented replacement for
I have a fix for it. Could someone review it?
Webrev: http://cr.openjdk.java.net/~jcbeyler/8210562/webrev.00/
Bug: https://bugs.openjdk.java.net/browse/JDK-8210562

It changed the log tag "ref" to "oops" in oopStorage.cpp, and improved and
increased verbosity level. I find that "ref" is mainly used for logging
about processing java.lang.ref.Reference, but oopStorage is for JNI
handles. Currently "oops" tag seems unused in HotSpot.
The change uses debug level for messages about OopStorage::Block and
unusual events, and trace level for the common alloc/release of individual

Below are some test results in terms of lines of logging messages:
With varying levels of verbosity for oopstorage*:
$ java -Xlog:oopstorage*=<level> -Xms500m -Xmx500m -jar
dacapo-9.12-bach.jar tradesoap
info debug trace
without patch 107934 112990 112701
with patch 0 5425 112805

For -Xlog:ref*=debug:
$ java -Xlog:ref*=debug -Xms500m -Xmx500m -jar dacapo-9.12-bach.jar
jdk10 1008
tip without patch 108394
tip with patch 1054

Alternative is to advise users to change PrintReferenceGC and
-Xlog:ref*=debug to -Xlog:gc+ref*=debug, as Kim suggested in
https://bugs.openjdk.java.net/browse/JDK-8210562. However, that possibly
involves changing the official flag mapping documentation in JDK9
and imposes extra work on users who have migrated old print flags to new UL
flags from JDK8 to JDK9/JDK10 according to the official doc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180911/657699bb/attachment.htm>

More information about the hotspot-gc-dev mailing list