7153375 "jmap -histo" should output a unique identifier with each line
Krystal Mok
rednaxelafx at gmail.com
Thu Mar 22 01:51:10 PDT 2012
Oops, missed the link in the last mail:
[1]:
http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/file/a142c661f6b1/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
On Thu, Mar 22, 2012 at 4:50 PM, Krystal Mok <rednaxelafx at gmail.com> wrote:
> Hi Shinji,
>
> This patch should work better after the work on Permanent Generation
> removal is integrated into mainstream. For now, though, it's not guaranteed
> to work: Klasses are subject to GC, which could move around from time to
> time.
>
> You're using hashCode() from the Klass, whichi ultimately boils down to
> the value of an address in the current implementation of SA. See [1] for
> example. It may change from run to run if the object is moving.
>
> It might have been better to use the identity hash code of the Java mirror
> (the java.lang.Class instance) as the "identifier". Too bad, that doesn't
> work with SA either; if the Java mirror was never hash'd, SA won't be able
> to calculate its identity hash code -- which is the case most of the time.
>
> - Kris
>
> On Thu, Mar 22, 2012 at 3:50 PM, Takao, Shinji <takao.shinji at oss.ntt.co.jp
> > wrote:
>
>> Dear all,
>>
>> As a trouble shooter of java programs, I have been examinig
>> heap object histograms for tracking down memory leaks, and
>> found an inconvenience in the histograms output by jmap (-F) -histo.
>> Please see the CR 7153375 for details.
>>
>> And, I would like to show a quick fix for that.
>> Please see the attached file (for openjdk8b27 hospot).
>> I am not sure if it is the most appropriate way to fix that,
>> however, I am glad if it will be a meaningful starting point.
>>
>> I am quite new to this ML, so I appreciate your assistance.
>>
>> Regards,
>> Shinji
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20120322/94738f3f/attachment-0001.html
More information about the serviceability-dev
mailing list