<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks for the response, Kim! Replies below.</div><div><br></div><div>> I think the problem here is the documented translation from the old -XX:+PrintReferenceGC to using UL.  Rather than -Xlog:ref*=debug, it should be -Xlog:gc+ref*=debug.<br></div><div>Thomas also agreed on fixing the documentation instead in the bug.</div><div>I'm not familiar with the process of changing documentation. Should we also change JDK9 and JDK10's documentation, or only JDK11's documentation?<br></div><div>Since this whole issue is about to UL and consistent behavior with old flag, should I also CC <a href="mailto:serviceability-dev@openjdk.java.net">serviceability-dev@openjdk.java.net</a> on this thread?<br></div><div><br></div><div>> OopStorage is used for a lot more than JNI handles; StringTable (weak) refs, class holder (weak) handles, JNI (weak and string) handles, possibly more coming.</div><div>Thanks for the correction. I wasn't looking into every detail of OopStorage. I should have put "oopStorage is unrelated to processing java.lang.ref.Reference" instead.</div><div><br></div><div>> Reducing the levels for the logging in OopStorage might be reasonable, but I think that’s a separate issue.</div><div>I can revert the uses of "oops" back to "ref" and ask JC to create another webrev.</div><div>Should we open a new RFE for that? I think <a href="https://bugs.openjdk.java.net/browse/JDK-8210562">JDK-8210562</a> might be OK for this purpose, as its title is about "Change the verbosity threshold" for logging.</div><div><br></div><div>-Man<br></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 12, 2018 at 6:00 AM Kim Barrett <<a href="mailto:kim.barrett@oracle.com" target="_blank">kim.barrett@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Sep 11, 2018, at 11:32 PM, Man Cao <<a href="mailto:manc@google.com" target="_blank">manc@google.com</a>> wrote:<br>
> <br>
> Hi all,<br>
> <br>
> I noticed that excessive logging messages appear in JDK11 with -Xlog:ref*=debug, which is the documented replacement for -XX:+PrintReferenceGC.<br>
> I have a fix for it. Could someone review it?<br>
> Webrev: <a href="http://cr.openjdk.java.net/~jcbeyler/8210562/webrev.00/" rel="noreferrer" target="_blank">http://cr.openjdk.java.net/~jcbeyler/8210562/webrev.00/</a><br>
> Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8210562" rel="noreferrer" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8210562</a><br>
> <br>
> 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.<br>
> The change uses debug level for messages about OopStorage::Block and unusual events, and trace level for the common alloc/release of individual oops.<br>
> <br>
> Below are some test results in terms of lines of logging messages:<br>
> With varying levels of verbosity for oopstorage*:<br>
> $ java -Xlog:oopstorage*=<level> -Xms500m -Xmx500m -jar dacapo-9.12-bach.jar tradesoap<br>
> info  debug   trace<br>
> without patch 107934  112990  112701<br>
> with patch    0       5425    112805<br>
> <br>
> For -Xlog:ref*=debug:<br>
> $ java -Xlog:ref*=debug -Xms500m -Xmx500m -jar dacapo-9.12-bach.jar tradesoap  <br>
> jdk10 1008<br>
> tip without patch     108394<br>
> tip with patch        1054<br>
> <br>
> <br>
> Alternative is to advise users to change PrintReferenceGC and -Xlog:ref*=debug to -Xlog:gc+ref*=debug, as Kim suggested in <a href="https://bugs.openjdk.java.net/browse/JDK-8210562" rel="noreferrer" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8210562</a>. However, that possibly involves changing the official flag mapping documentation in JDK9 and JDK10, 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.<br>
> <br>
> Thanks,<br>
> Man<br>
<br>
As I noted in the bug, I think the problem here is the documented translation from the old<br>
-XX:+PrintReferenceGC to using UL.  Rather than -Xlog:ref*=debug, it should be<br>
-Xlog:gc+ref*=debug.  And then the output is entirely reasonable.<br>
<br>
So I don’t think this change is needed.<br>
<br>
OopStorage is used for a lot more than JNI handles; StringTable (weak) refs, class<br>
holder (weak) handles, JNI (weak and string) handles, possibly more coming.<br>
“ref” seems like a reasonable tag there.  Having to choose an otherwise unused<br>
tag to avoid problems would, to me, indicate a serious design flaw in UL.  Fortunately,<br>
I don’t think it’s that bad, just that the documented usage is wrong.<br>
<br>
Reducing the levels for the logging in OopStorage might be reasonable, but I think<br>
that’s a separate issue.<br>
<br>
</blockquote></div>