Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » can MAT use PHD? (or only HPROF?)
can MAT use PHD? (or only HPROF?) [message #7112] Tue, 18 November 2008 19:18 Go to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Instructions do not list IBM JRE which we alas must use. (Not my code or
decision ...) Instructions seem to assume (without quite saying so) that
the heap-dump format must be HPROF: what formats are recognized other
than HPROF? In particular, it seems (from "Open heap Dump" -> navigate
to directory full of PHD's) that PHD is not recognized?

On the other hand, I have tried to get the IBM JVM to produce HPROF, so
far to no avail -- does anyone know how to do that?

thanks,
Paul
Re: can MAT use PHD? (or only HPROF?) [message #7136 is a reply to message #7112] Wed, 19 November 2008 00:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cgrinds.us.ibm.com

"Paul Th. Keyser" <rolarenfan@earthlink.net> wrote in
news:gfv4dg$h4v$1@build.eclipse.org:

> Instructions do not list IBM JRE which we alas must use. (Not my code or
> decision ...) Instructions seem to assume (without quite saying so) that
> the heap-dump format must be HPROF: what formats are recognized other
> than HPROF? In particular, it seems (from "Open heap Dump" -> navigate
> to directory full of PHD's) that PHD is not recognized?
>
> On the other hand, I have tried to get the IBM JVM to produce HPROF, so
> far to no avail -- does anyone know how to do that?
>
Hi Paul,
PHDs are missing a lot of information.
MAT can consume system core files produced by IBM's VM.

You can either programmatically ask for a system dump or setup signal
handler to generate a system dump when a SIG is received.

You can add an adaptor that allows MAT to read IBM core.*.dmp files.
"IBM DTFJ adapter for Eclipse Memory Analyzer Tool"
http://www.ibm.com/developerworks/java/jdk/tools/mat.html

HTH,
Chris
--
Chris Grindstaff
cgrinds@us.ibm.com
Re: can MAT use PHD? (or only HPROF?) [message #7237 is a reply to message #7136] Thu, 20 November 2008 00:37 Go to previous messageGo to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Chris Grindstaff wrote:
> You can either programmatically ask for a system dump or setup signal
using <code>com.ibm.jvm.Dump.HeapDump();</code>? that generates only PHD.

> handler to generate a system dump when a SIG is received.
using SendSignal from
http://www.latenighthacking.com/projects/2003/sendSignal/Sen dSignal.exe
? that also generates only PHD.

Per the thread "error in instructions: no way to get HPROF from Sun JVM
1.5", I cannot even get the *Sun* JVM to disgorge HPROF.

> You can add an adaptor that allows MAT to read IBM core.*.dmp files.
> "IBM DTFJ adapter for Eclipse Memory Analyzer Tool"
> http://www.ibm.com/developerworks/java/jdk/tools/mat.html
>
OK, I will try that.

thanks,
Paul
Re: can MAT use PHD? (or only HPROF?) [message #7261 is a reply to message #7136] Thu, 20 November 2008 01:40 Go to previous messageGo to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030802080004040404060801
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Chris Grindstaff wrote:
> You can add an adaptor that allows MAT to read IBM core.*.dmp files.
> "IBM DTFJ adapter for Eclipse Memory Analyzer Tool"
> http://www.ibm.com/developerworks/java/jdk/tools/mat.html
>
OK, that failed. I got the adaptor and created the ".dmp" files, and
when I navigate in MAT (File -> Open Heap Dump) to the directory where
they are, they are visible -- but MAT+DTFJ just immediately barfs; see
attached .log file.

Any other way to get this to work?

-Paul


--------------030802080004040404060801
Content-Type: text/plain;
name="MAT+DTFJ_Crash.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MAT+DTFJ_Crash.log"

!SESSION 2008-11-19 20:33:31.796 -----------------------------------------------
eclipse.buildId=I20070625-1500
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20070426 (JIT enabled)
J9VM - 20070420_12448_lHdSMR
JIT - 20070419_1806_r8
GC - 200704_19
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.mat.parser 4 0 2008-11-19 20:33:52.359
!MESSAGE Error opening heap dump
!SUBENTRY 1 org.eclipse.mat.parser 4 0 2008-11-19 20:33:52.359
!MESSAGE Unable to read dump in either IBM Java 6, IBM Java 5.0 or IBM Java 1.4.2 formats
!STACK 0
java.io.IOException: Unable to read dump in either IBM Java 6, IBM Java 5.0 or IBM Java 1.4.2 formats
at org.eclipse.mat.dtfj.DTFJIndexBuilder.getUncachedDump(DTFJIn dexBuilder.java:3871)
at org.eclipse.mat.dtfj.DTFJIndexBuilder.getDump(DTFJIndexBuild er.java:3752)
at org.eclipse.mat.dtfj.DTFJIndexBuilder.fill(DTFJIndexBuilder. java:284)
at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(Sn apshotFactoryImpl.java:183)
at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnap shot(SnapshotFactoryImpl.java:101)
at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(Snapsh otFactory.java:87)
at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDu mpJob.java:54)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Currently can only handle SDFF files, which _MUST have a suffix of ".sdff"_
or svcdumps
at com.ibm.dtfj.image.sov.ImageFactory.getImage(ImageFactory.ja va:99)
at com.ibm.dtfj.image.sov.ImageFactory.getImage(ImageFactory.ja va:169)
at org.eclipse.mat.dtfj.DTFJIndexBuilder.getUncachedDump(DTFJIn dexBuilder.java:3860)
... 7 more

!ENTRY org.eclipse.mat.ui 4 0 2008-11-19 20:33:52.375
!MESSAGE Error opening heap dump 'core.20081120.012103.1220.dmp'. Check log for details.
!STACK 0
org.eclipse.mat.SnapshotException: Error opening heap dump 'core.20081120.012103.1220.dmp'. Check log for details.
at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(Sn apshotFactoryImpl.java:217)
at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnap shot(SnapshotFactoryImpl.java:101)
at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(Snapsh otFactory.java:87)
at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDu mpJob.java:54)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

--------------030802080004040404060801--
Re: can MAT use PHD? (or only HPROF?) [message #7545 is a reply to message #7261] Thu, 20 November 2008 11:51 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 113
Registered: July 2009
Senior Member
Hi Paul,

unfortunately I don't know the details and Andrew is at the Eclipse Summit
Europe today.

I know that the DTFJ adapter requires the exact SR or the Java VM.
Currently, one has to at least have one of those:
IBM JDK 1.4.2 SR12, 5.0 SR8a and 6.0 SR2
(The java full version string in the log file indicates a older version).


The next thing to do is to run ~/jre/bin/jextract on the dump. The
jextract must be the one from the VM you got the heap dump from. From that
platform.

Then you can open the dump in MAT.


Hope this helps a bit.

Andreas.
Re: can MAT use PHD? (or only HPROF?) [message #7655 is a reply to message #7545] Thu, 20 November 2008 14:40 Go to previous message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Andreas Buchen wrote:
> I know that the DTFJ adapter requires the exact SR or the Java VM.
> Currently, one has to at least have one of those:
> IBM JDK 1.4.2 SR12, 5.0 SR8a and 6.0 SR2
> (The java full version string in the log file indicates a older version).
>
Hmm, interesting -- I thought I had gotten a more recent one, but now
that I think it through, the JVM in use was actually provided by another
team member ...

> The next thing to do is to run ~/jre/bin/jextract on the dump. The
> jextract must be the one from the VM you got the heap dump from. From
> that platform.
>
> Then you can open the dump in MAT.
>
Aha! That was the missing step; it is in the DTFJ instructions (now that
I know what to look for), but not clearly enough for me to get it on the
first read through.

Now MAT is happy and so am I (but the same team member who supplied the
out-of-date JVM will not be; just spotted what looks to be a
magnificently huge leak in his code ...)

thanks,
-Paul
Previous Topic:New inspectors
Next Topic:MAT+DTLJ crash on reading jextract'ed DMP
Goto Forum:
  


Current Time: Sun Nov 23 08:57:40 GMT 2014

Powered by FUDForum. Page generated in 0.02289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software