On 5/26/15 10:16 AM, Dmitry Samersoff wrote:
Hi Everybody,
http://cr.openjdk.java.net/~dsamersoff/JDK-8059036/webrev.09/
Please review updated webrev -
printFinalizationQueue now returns and array of Map.Entry<String, int[])
and all formatting is done on VM side.
-Dmitry
Hi Dmitry,
I looked at the jdk_webrev. Everything looks great except the spacing
looks off in line 124 of Finalizer.java.
My JNI is too rusty to provide a quick opinion on the hotspot_webrev
portion.
- Derek
On 2015-05-21 02:07, Mandy Chung wrote:
On May 19, 2015, at 11:51 PM, Dmitry Samersoff
<dmitry.samers...@oracle.com <mailto:dmitry.samers...@oracle.com>> wrote:
Other alternatives could be to do all hashing/sorting/printing on native
layer i.e. implement printFinalizationQueue inside VM.
Both options has pros and cons - Java based solution requires less JNI
calls and better readable but takes more memory.
It might be better to return an array of Map.Entry<String, int[]>
objects to VM rather than one huge string.
The output and formatting should be done by jcmd. What you really need
to get a peek on the finalizer queue and print the histogram. The VM
has the heap histogram implementation. Have you considered leveraging
that?
5: 1012 40480 java.lang.ref.Finalizer
You can find the registered Finalizer instances. The downside is that
icmd -finalizerinfo stops the world. I think it’s not unreasonable for
this diagnostic command to be expensive like -heap command.
Mandy