Class ExtendedHotSpotDiagnostic
java.lang.Object
com.sun.management.internal.ExtendedHotSpotDiagnostic
- All Implemented Interfaces:
 HotSpotDiagnosticMXBean, PlatformManagedObject
Runtime type for 
HotSpotDiagnosticMXBean.- 
Nested Class Summary
Nested classes/interfaces declared in interface HotSpotDiagnosticMXBean
HotSpotDiagnosticMXBean.ThreadDumpFormat - 
Method Summary
Modifier and TypeMethodDescriptionvoidDumps the heap to theoutputFilefile in the same format as the hprof heap dump.voiddumpThreads(String outputFile, HotSpotDiagnosticMXBean.ThreadDumpFormat format) Generate a thread dump to the given file in the given format.Returns a list ofVMOptionobjects for all diagnostic options.static HotSpotDiagnosticMXBeanSingleton accessor method.Returns anObjectNameinstance representing the object name of this platform managed object.getVMOption(String name) Returns aVMOptionobject for a VM option of the given name.voidsetVMOption(String name, String value) Sets a VM option of the given name to the specified value.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface HotSpotDiagnosticMXBean
dumpThreadsMethods declared in interface PlatformManagedObject
getObjectName 
- 
Method Details
- 
getInstance
Singleton accessor method.- Returns:
 - the 
HotSpotDiagnosticsingleton. 
 - 
dumpHeap
Dumps the heap to theoutputFilefile 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
outputFileon 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:
 dumpHeapin interfaceHotSpotDiagnosticMXBean- Parameters:
 outputFile- the system-dependent filenamelive- iftruedump only live objects i.e. objects that are reachable from others- Throws:
 IOException- if theoutputFilealready exists, cannot be created, opened, or written to.
 - 
getDiagnosticOptions
Returns a list ofVMOptionobjects for all diagnostic options. A diagnostic option is awriteableVM option that can be set dynamically mainly for troubleshooting and diagnosis.- Specified by:
 getDiagnosticOptionsin interfaceHotSpotDiagnosticMXBean- Returns:
 - a list of 
VMOptionobjects for all diagnostic options. 
 - 
getVMOption
Returns aVMOptionobject for a VM option of the given name.- Specified by:
 getVMOptionin interfaceHotSpotDiagnosticMXBean- Returns:
 - a 
VMOptionobject 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 newVMOptionobject returned by theHotSpotDiagnosticMXBean.getVMOption(String)method or theHotSpotDiagnosticMXBean.getDiagnosticOptions()method. This method does not change the value of thisVMOptionobject.- Specified by:
 setVMOptionin interfaceHotSpotDiagnosticMXBean- Parameters:
 name- Name of a VM optionvalue- New value of the VM option to be set
 - 
getObjectName
Description copied from interface:java.lang.management.PlatformManagedObjectReturns anObjectNameinstance representing the object name of this platform managed object.- Specified by:
 getObjectNamein interfacePlatformManagedObject- Returns:
 - an 
ObjectNameinstance representing the object name of this platform managed object. 
 - 
dumpThreads
public void dumpThreads(String outputFile, HotSpotDiagnosticMXBean.ThreadDumpFormat format) throws IOException Description copied from interface:com.sun.management.HotSpotDiagnosticMXBeanGenerate a thread dump to the given file in the given format. TheoutputFileparameter must be an absolute path to a file that does not exist.When the format is specified as
JSON, the thread dump is generated in JavaScript Object Notation. threadDump.schema.json describes the thread dump format in draft JSON Schema Language version 2.The thread dump will include output for all platform threads. It may include output for some or all virtual threads.
- Specified by:
 dumpThreadsin interfaceHotSpotDiagnosticMXBean- Parameters:
 outputFile- the path to the file to createformat- the format to use- Throws:
 IOException- if the file already exists or an I/O exception is thrown writing to the file
 
 -