Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mat-dev] processing of HPROF_GC_CLASS_DUMP

You analysis sounds reasonable. The DTFJ parser which processes dumps from 
IBM VMs does look into the constant pool, so the HPROF parser could do 
something similar. 
The DTFJ parser generates field names (with the less-than/greater-than) 
like this
<constant pool[1]> 
class java.lang.System @ 0x7ff7e6a3b68

I've just noticed the trouble with those names is that they can't be used 
in OQL - but autogenerated field names shouldn't clash with any real field 
name.

Andrew Johnson



From:   Dacong Yan <tonywinslow1986@xxxxxxxxx>
To:     Memory Analyzer Dev list <mat-dev@xxxxxxxxxxx>
Date:   14/11/2014 22:43
Subject:        Re: [mat-dev] processing of HPROF_GC_CLASS_DUMP
Sent by:        mat-dev-bounces@xxxxxxxxxxx



Does MAT read and parse the constant pool info in a Class object,
supposing the heap dump file has that? The OpenJDK heap dumper
(
http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/57552dca1708/src/share/vm/services/heapDumper.cpp#l931
)
seems to ignore constant pools because HAT does not parse that info.

Context:

It occurs to me that annotation decorating a class is referenced by
constant pool "resident" (hidden field of class?)
RuntimeVisibleAnnotations of that class. The annotation objects are
kept alive as long as the classes are alive, thus keeping classloaders
of annotation objects alive. Correct me if I have wrong assumptions
somewhere.

Thanks!


On Tue, Nov 11, 2014 at 12:47 AM, Andrew Johnson
<andrew_johnson@xxxxxxxxxx> wrote:
>> From: Dacong Yan <tonywinslow1986@xxxxxxxxx>
>>
>> Hi,
>>
>> Where can I find the source code in MAT that processes
>> HPROF_GC_CLASS_DUMP? I am trying to modify openjdk and dump additional
>> info from perm gen, so I want to make sure MAT can read the extra
>> info.
>>
>> Looking at the vm source code
>> (http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/57552dca1708/src/
>> share/vm/services/heapDumper.cpp#l215),
>> I can see two reserved fields in HPROF_GC_CLASS_DUMP and the plan is
>> to make use of them for extra info.
>>
>> Thanks,
>> Tony
> The source code is at
> 
http://dev.eclipse.org/viewsvn/viewvc.cgi/trunk/plugins/org.eclipse.mat.hprof/src/org/eclipse/mat/hprof/?root=TOOLS_MAT

> See also here for Javadoc:
> 
http://help.eclipse.org/luna/topic/org.eclipse.mat.ui.help/doc/org/eclipse/mat/hprof/package-summary.html

> The general way that heap dump parsers work is explained here:
> 
http://wiki.eclipse.org/MemoryAnalyzer/Adding_a_new_heap_dump_format_to_the_Memory_Analyzer

>
> OpenJDK is GPL, which isn't compatible with the Eclipse Public License, 
so
> we aren't able to include any OpenJDK source code into the MAT codebase,
> but we can and do inter-operate with the HPROF dump format.
>
> Andrew Johnson
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 
3AU
>
> _______________________________________________
> mat-dev mailing list
> mat-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe 
from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mat-dev
_______________________________________________
mat-dev mailing list
mat-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe 
from this list, visit
https://dev.eclipse.org/mailman/listinfo/mat-dev



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Back to the top