Heap Dump Provider

org.eclipse.mat.api.heapDumpProvider

1.0

The Acquire Heap Dump menu option allows the user to request a heap dump on a local running Java process. This extension point allows the retrieval of a list of running VMs of a particular type, and the triggering of a dump on one of those processes.

<!ELEMENT extension (provider)*>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT provider EMPTY>

<!ATTLIST provider

impl CDATA #REQUIRED>


The following is an example of a heap dump provider declaration;
   

<extension name=

"IBM Virtual Machines"

point=

"org.eclipse.mat.api.heapDumpProvider"

>

<provider impl=

"org.eclipse.mat.ibmvm.acquire.DumpFactory"

>

</provider>

</extension>

The dump provider must implement org.eclipse.mat.snapshot.acquire.IHeapDumpProvider. Argument annotations can be used to specify arguments to be filled in by the user.
@Name("My Dump type")
public class MyDumpProvider implements org.eclipse.mat.snapshot.acquire.IHeapDumpProvider
{
 @Argument
 File dumpingProgram;
 
Argument annotations can also be used on VmInfo types.
public class MyVmInfo extends VmInfo
{
    public enum DumpType
    {
        DUMP1("dump1"), //$NON-NLS-1$
        Dump2("dump2"); //$NON-NLS-1$
        String type;
        private DumpType(String s) {
            type = s;
        }
    }
    @Argument
    public DumpType type = DumpType.DUMP1;

The value of the impl attribute must represent an implementor of org.eclipse.mat.snapshot.acquire.IHeapDumpProvider.

The standard supplied heap dump providers are for Oracle/Sun JVMs and for IBM Virtual Machines for Java. They are org.eclipse.mat.hprof.acquire.JMapHeapDumpProvider and org.eclipse.mat.ibmvm.acquire.DumpFactory (actually an IExecutableExtensionFactory).