[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR(M, v7): JDK-8059036 : Implement Diagnostic Commands for heap and
From:       Mandy Chung <mandy.chung () oracle ! com>
Date:       2015-05-20 23:07:21
Message-ID: 3941B430-FE6C-4AF0-A875-76D24411C654 () oracle ! com
[Download RAW message or body]

> On May 19, 2015, at 11:51 PM, Dmitry Samersoff <dmitry.samersoff@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


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote \
type="cite" class=""><div class="">On May 19, 2015, at 11:51 PM, Dmitry Samersoff \
&lt;<a href="mailto:dmitry.samersoff@oracle.com" \
class="">dmitry.samersoff@oracle.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline \
!important;" class="">Other alternatives could be to do all hashing/sorting/printing \
on native</span><br style="font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline \
!important;" class="">layer i.e. implement printFinalizationQueue inside \
VM.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: \
0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline \
!important;" class="">Both options has pros and cons - Java based solution requires \
less JNI</span><br style="font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline \
!important;" class="">calls and better readable but takes more memory.</span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: \
normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: \
auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: \
normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: \
auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span \
style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: \
normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: \
auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">It might be better to return an array of \
Map.Entry&lt;String, int[]&gt;</span><br style="font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: \
normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline \
!important;" class="">objects to VM rather than one huge \
string.</span></div></blockquote></div><br class=""><div class=""><div>The output and \
formatting should be done by jcmd. &nbsp;What you really need to get a peek on the \
finalizer queue and print the histogram. &nbsp; The VM has the heap histogram \
implementation. &nbsp;Have you considered leveraging that?&nbsp;</div></div><div><br \
class=""></div><div><font face="Lucida Sans Typewriter" class="">&nbsp; \
&nbsp;5:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;1012&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;&nbsp;40480&nbsp;&nbsp;java.lang.ref.Finalizer<br \
class=""></font></div><div><font face="Lucida Sans Typewriter" class=""><br \
class=""></font></div><div>You can find the registered Finalizer instances. &nbsp;The \
downside is that icmd -finalizerinfo stops the world. &nbsp;I think it's not \
unreasonable for this diagnostic command to be expensive like -heap \
command.</div><div><br class=""></div><div>Mandy</div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic