Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mat-dev] RE: [technology-pmc] MAT contribution: DTFJ adpater

Hi Pravin,

first, yes, MAT is analyzing Java heap dumps. And no, it is not limited to HPROF but is also able to read system dumps from the IBM family of virtual machines (J9, Sovereign). So it is possible to support other heap dump formats. Basically, one has to implement a "heap dump reader".

As for the model, MAT assumes a Java model. That means for now there is no facility to support multiple inheritance. Also, we make some assumption about what objects are reachable, about Java collections etc. This might or might not be a problem.

Here are some hints for starters:

The HPROF reader is implemented in the org.eclipse.mat.hprof bundle.
First, you'd have to provide an extension:
   <extension
         id="hprof"
         name="HPROF Formatted Dumps"
         point="org.eclipse.mat.parser.parser">
      <parser name="HPROF binary heap dumps"
            fileExtension="hprof,bin"
            indexBuilder="org.eclipse.mat.hprof.HprofIndexBuilder"
            objectReader="org.eclipse.mat.hprof.HprofHeapObjectReader">
      </parser>
   </extension>

The next thing is to provide an indexBuilder (used to create initially some indices for efficient parsing) and an objectReader (used to read the object details when displaying in the inspector etc.).


> Is it possible if I generate hprof for my language and then view with MAT.
If you do this, we should not have problems reading the file. There are, however, some fields which we currently do not read (because in Sun's VM they are not used meaningfully). But here we can help you.

> If not then is it possible to customize the MAT to understand my hprof dumps?
> What all legalities that I will have check and follow?
MAT is offered under the Eclipse Public License (EPL): http://www.eclipse.org/legal/epl-v10.html
So you are allowed to changes yourself. Of course, we are always interested in letting those changes flowing back into the main code.



Feel free to contact us if you have questions! We are interested in working together.

Kind regards,

  Andreas.



-----Original Message-----
From: mat-dev-bounces@xxxxxxxxxxx [mailto:mat-dev-bounces@xxxxxxxxxxx] On Behalf Of Pravin Kalel
Sent: Montag, 20. April 2009 07:00
To: Memory Analyzer Dev list
Subject: RE: [mat-dev] RE: [technology-pmc] MAT contribution: DTFJ adpater

Hi Wayne,

My name is Pravin and I am working on Memory Analysis tool for proprietary language (Which is very similar to JAVA). Sometime back I came across MAT and after looking at its features, I really impressed.
Now, I have few questions. 
Does MAT supports only hprof files those were dumped from JAVA applications?
Is it possible if I generate hprof for my language and then view with MAT. (Assuming I follow hprof format)
If not then is it possible to customize the MAT to understand my hprof dumps? What all legalities that I will have check and follow?
I see only difference that JAVA does not support multiple inheritance where my language does. So how difficult it would be in MAT to customize such change? (Assuming you allow me to do so)

-Pravin








Andreas Buchen
Senior Software Developer
SAP AG
andreas dot buchen at sap dot com
www.sap.com

Registered Office: Walldorf, Germany | SAP Executive Board: Henning Kagermann (Sprecher/Co-CEO), Léo Apotheker (Sprecher/Co-CEO), Werner Brandt, Erwin Gunst, Claus Heinrich, Bill McDermott, Gerhard Oswald, John Schwarz, Jim Hagemann Snabe | Chairperson of the SAP Supervisory Board: Hasso Plattner | Commercial Register Mannheim No HRB 350269 





Back to the top