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 com.ibm.dtfj.image.Image or
You'll need to add the com.ibm.dtfj.api 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.
* @return SnapshotAddons - extended information, e.g. perm info, OoM
* trace info, JVM arguments, etc.
* @throws SnapshotException
public <A> A getSnapshotAddons(Class<A> addon) throws
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.