Class ExtendedHotSpotDiagnostic
java.lang.Object
com.sun.management.internal.HotSpotDiagnostic
com.sun.management.internal.ExtendedHotSpotDiagnostic
- All Implemented Interfaces:
HotSpotDiagnosticMXBean
,PlatformManagedObject
public class ExtendedHotSpotDiagnostic
extends com.sun.management.internal.HotSpotDiagnostic
implements HotSpotDiagnosticMXBean
Runtime type for
HotSpotDiagnosticMXBean
.-
Nested Class Summary
Nested classes/interfaces declared in interface com.sun.management.HotSpotDiagnosticMXBean
HotSpotDiagnosticMXBean.ThreadDumpFormat
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Dumps the heap to theoutputFile
file in the same format as the hprof heap dump.Returns a list ofVMOption
objects for all diagnostic options.static HotSpotDiagnosticMXBean
Singleton accessor method.getVMOption
(String name) Returns aVMOption
object for a VM option of the given name.void
setVMOption
(String name, String value) Sets a VM option of the given name to the specified value.Methods declared in class com.sun.management.internal.HotSpotDiagnostic
dumpHeap, dumpThreads, getDiagnosticOptions, getObjectName, getVMOption, setVMOption
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface com.sun.management.HotSpotDiagnosticMXBean
dumpThreads
Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
Method Details
-
getInstance
Singleton accessor method.- Returns:
- the
HotSpotDiagnostic
singleton.
-
dumpHeap
Dumps the heap to theoutputFile
file in the same format as the hprof heap dump.If this method is called remotely from another process, the heap dump output is written to a file named
outputFile
on the machine where the target VM is running. If outputFile is a relative path, it is relative to the working directory where the target VM was started.- Specified by:
dumpHeap
in interfaceHotSpotDiagnosticMXBean
- Overrides:
dumpHeap
in classcom.sun.management.internal.HotSpotDiagnostic
- Parameters:
outputFile
- the system-dependent filenamelive
- iftrue
dump only live objects i.e. objects that are reachable from others- Throws:
IOException
- if theoutputFile
already exists, cannot be created, opened, or written to.
-
getDiagnosticOptions
Returns a list ofVMOption
objects for all diagnostic options. A diagnostic option is awriteable
VM option that can be set dynamically mainly for troubleshooting and diagnosis.- Specified by:
getDiagnosticOptions
in interfaceHotSpotDiagnosticMXBean
- Overrides:
getDiagnosticOptions
in classcom.sun.management.internal.HotSpotDiagnostic
- Returns:
- a list of
VMOption
objects for all diagnostic options.
-
getVMOption
Returns aVMOption
object for a VM option of the given name.- Specified by:
getVMOption
in interfaceHotSpotDiagnosticMXBean
- Overrides:
getVMOption
in classcom.sun.management.internal.HotSpotDiagnostic
- Returns:
- a
VMOption
object for a VM option of the given name.
-
setVMOption
Sets a VM option of the given name to the specified value. The new value will be reflected in a newVMOption
object returned by theHotSpotDiagnosticMXBean.getVMOption(java.lang.String)
method or theHotSpotDiagnosticMXBean.getDiagnosticOptions()
method. This method does not change the value of thisVMOption
object.- Specified by:
setVMOption
in interfaceHotSpotDiagnosticMXBean
- Overrides:
setVMOption
in classcom.sun.management.internal.HotSpotDiagnostic
- Parameters:
name
- Name of a VM optionvalue
- New value of the VM option to be set
-