Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » DTFJ queries
DTFJ queries [message #11179] Tue, 07 July 2009 09:09 Go to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 180
Registered: July 2009
Senior Member
It is possible to get access to the DTFJ Image and JavaRuntime handles
when writing MAT queries for dumps from IBM virtual machines.

This is done using the ISnapshot.getSnapshotAddons() call. This API takes
the class of the object required and returns an instance of that class.
The DTFJ adapter can return or objects.

You'll need to add the plug-in in the required plug-ins
list for your query plug-in so you get access to Image or JavaRuntime.

I haven't done much with this yet, so this information could be subject to
change if it doesn't work as we would like. Please let me know if this is

Image im = snapshot.getSnapshotAddons(Image.class);
JavaRuntime jr = snapshot.getSnapshotAddons(JavaRuntime.class);

* Get additional JVM information, if available.
* <p>
* @return SnapshotAddons - extended information, e.g. perm info, OoM
* trace info, JVM arguments, etc.
* @throws SnapshotException
public <A> A getSnapshotAddons(Class<A> addon) throws
Re: DTFJ queries [message #11183 is a reply to message #11179] Wed, 08 July 2009 12:00 Go to previous message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member

This code should also be possible:

public class SomeQuery implements IQuery {

public Image image;


If you do it this way, the query will only appear if the heap dump has an
'Image' available. This way it is possible to have queries only for DTFJ
based dumps - for example to print JVM startup parameters which are not
available in HPROF but maybe in DTFJ.

Previous Topic:update site zip
Next Topic:Setting up MAT with eclipse
Goto Forum:

Current Time: Tue Sep 28 14:53:47 GMT 2021

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

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

Back to the top