Trace object type in GC
Krystal Mok
rednaxelafx at gmail.com
Thu Sep 13 09:59:45 PDT 2012
That's great to hear!
Thanks,
Kris
On Fri, Sep 14, 2012 at 12:42 AM, Sam Pullara <spullara at twitter.com> wrote:
> Good news. The patch has been coerced to be in line with hotspot
> development practices and we are going to try and upstream it.
>
> Sam
>
>
> On Sat, Jun 30, 2012 at 12:46 PM, Sam Pullara <spullara at twitter.com>wrote:
>
>> I can post a patch here, but it is currently dependent on the STL. The
>> facilities for this within Hotspot's libraries are pretty poor. I attempted
>> a port to libadt but ran into a bunch of issues. It is a pretty small
>> amount of code if someone wants to volunteer to put it into shape for
>> upstreaming it.
>>
>> Sam
>>
>> On Jun 11, 2012, at 9:10 PM, Krystal Mok wrote:
>>
>> Hi San,
>>
>> Wow, that's nice.
>> Is there any plans to submit it to hotspot-gc-dev as a patch to OpenJDK?
>>
>> - Kris
>>
>> On Tue, Jun 12, 2012 at 12:06 PM, Sam Pullara <spullara at twitter.com>wrote:
>>
>>> What we would really like to have is a GC option that prints the top-N
>>> class histogram only for those that are being migrated from the oldest
>>> tenure age into the old generation. I have a prototype of it and it works,
>>> but it would be great if it was in the main code line.
>>>
>>> Sam
>>>
>>> On Jun 11, 2012, at 8:34 PM, Krystal Mok wrote:
>>>
>>> Hi Nicolas,
>>>
>>> If you're interested in the objects collected on a type-granularity,
>>> then the following VM arguments gets close:
>>>
>>> manageable(bool, PrintClassHistogramBeforeFullGC, false, \
>>> "Print a class histogram before any major stop-world GC") \
>>> \
>>> manageable(bool, PrintClassHistogramAfterFullGC, false, \
>>> "Print a class histogram after any major stop-world GC") \
>>>
>>> What they do is basically the same as running jmap -histo before or
>>> after a full GC, printing the histogram of objects grouped by class.
>>> Comparing the numbers before and after a full GC will give you the idea of
>>> what's collected in that full GC.
>>>
>>> You can turn these flags on by specifying them in the VM command line
>>> arguments, e.g. -XX:+PrintClassHistogramBeforeFullGC
>>> Or you could change their values while the VM is running, e.g. jinfo
>>> -flag +PrintClassHistogramBeforeFullGC <pid>
>>>
>>> (There's no equivalent flag for minor GCs in HotSpot.)
>>>
>>> If you're looking for information on a object-granularity, then it's
>>> something HotSpot VM doesn't support. GC implementations seldom track such
>>> information.
>>>
>>> Hope it helps,
>>> - Kris
>>>
>>> On Mon, Jun 11, 2012 at 11:36 PM, RICHARD Nicolas <
>>> nicolas.richard at atos.net> wrote:
>>>
>>>> Dear hotspot developper,
>>>> I currently develop applications in Java.
>>>>
>>>> I am looking for a way to trace objects freed by the Garbage Collector.
>>>> For the time being, I've only found options to get statistics about GC
>>>> (execution time, average amount of freed memory, etc) but no one about the
>>>> type of object handled by the GC.
>>>>
>>>> Is there any option that I could use or is it possible to develop a JVM
>>>> TI agent to get this information ?
>>>>
>>>> Best regards
>>>> Nicolas RICHARD
>>>>
>>>> ------------------------------
>>>>
>>>> Ce message et les pièces jointes sont confidentiels et réservés à
>>>> l'usage exclusif de ses destinataires. Il peut également être protégé par
>>>> le secret professionnel. Si vous recevez ce message par erreur, merci d'en
>>>> avertir immédiatement l'expéditeur et de le détruire. L'intégrité du
>>>> message ne pouvant être assurée sur Internet, la responsabilité du groupe
>>>> Atos ne pourra être engagée quant au contenu de ce message. Bien que les
>>>> meilleurs efforts soient faits pour maintenir cette transmission exempte de
>>>> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
>>>> responsabilité ne saurait être engagée pour tout dommage résultant d'un
>>>> virus transmis.
>>>>
>>>> This e-mail and the documents attached are confidential and intended
>>>> solely for the addressee; it may also be privileged. If you receive this
>>>> e-mail in error, please notify the sender immediately and destroy it. As
>>>> its integrity cannot be secured on the Internet, the Atos group liability
>>>> cannot be triggered for the message content. Although the sender endeavors
>>>> to maintain a computer virus-free network, the sender does not warrant that
>>>> this transmission is virus-free and will not be liable for any damages
>>>> resulting from any virus transmitted.
>>>>
>>>> _______________________________________________
>>>> hotspot-gc-use mailing list
>>>> hotspot-gc-use at openjdk.java.net
>>>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>>>
>>>>
>>> _______________________________________________
>>> hotspot-gc-use mailing list
>>> hotspot-gc-use at openjdk.java.net
>>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>>
>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20120914/30639a54/attachment.html
More information about the hotspot-gc-use
mailing list