APIdia Launch Partner
Top Description Constructors Methods
com.sun.management.internal

public Class HotSpotDiagnostic

extends Object
implements HotSpotDiagnosticMXBean
Class Inheritance
All Implemented Interfaces
com.sun.management.HotSpotDiagnosticMXBean, java.lang.management.PlatformManagedObject
Imports
java.io.IOException, .OutputStream, java.nio.file.Files, .Path, .StandardOpenOption, java.util.ArrayList, .List, javax.management.ObjectName, com.sun.management.HotSpotDiagnosticMXBean, .HotSpotDiagnosticMXBean.ThreadDumpFormat, .VMOption, jdk.internal.vm.ThreadDumper, sun.management.Util

Implementation of the diagnostic MBean for Hotspot VM.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dumpHeap(String outputFile, boolean live)

Implements com.sun.management.HotSpotDiagnosticMXBean.dumpHeap.

Dumps the heap to the outputFile file in the same format as the hprof heap dump.

private native void
dumpHeap0(String outputFile, boolean live)

public void
dumpThreads(String outputFile, HotSpotDiagnosticMXBean.ThreadDumpFormat format)

Overrides default com.sun.management.HotSpotDiagnosticMXBean.dumpThreads.

Generate a thread dump to the given file in the given format.

private void
public List<VMOption>
getDiagnosticOptions()

Implements com.sun.management.HotSpotDiagnosticMXBean.getDiagnosticOptions.

Returns a list of VMOption objects for all diagnostic options.

public ObjectName
getObjectName()

Implements java.lang.management.PlatformManagedObject.getObjectName.

Returns an ObjectName instance representing the object name of this platform managed object.

public VMOption
getVMOption(String name)

Implements com.sun.management.HotSpotDiagnosticMXBean.getVMOption.

Returns a VMOption object for a VM option of the given name.

public void
setVMOption(String name, String value)

Implements com.sun.management.HotSpotDiagnosticMXBean.setVMOption.

Sets a VM option of the given name to the specified value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HotSpotDiagnosticback to summary
public HotSpotDiagnostic()

Method Detail

dumpHeapback to summary
public void dumpHeap(String outputFile, boolean live) throws IOException

Implements com.sun.management.HotSpotDiagnosticMXBean.dumpHeap.

Doc from com.sun.management.HotSpotDiagnosticMXBean.dumpHeap.

Dumps the heap to the outputFile 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.

Annotations
@Override
Exceptions
IOException:
if the outputFile already exists, cannot be created, opened, or written to.
dumpHeap0back to summary
private native void dumpHeap0(String outputFile, boolean live) throws IOException
dumpThreadsback to summary
public void dumpThreads(String outputFile, HotSpotDiagnosticMXBean.ThreadDumpFormat format) throws IOException

Overrides default com.sun.management.HotSpotDiagnosticMXBean.dumpThreads.

Doc from com.sun.management.HotSpotDiagnosticMXBean.dumpThreads.

Generate a thread dump to the given file in the given format. The outputFile parameter must be an absolute path to a file that does not exist.

When the format is specified as JSON, the thread dump is generated as JSON text in the JSON Thread Dump Format.

The thread dump will include output for all platform threads. It may include output for some or all virtual threads.

Annotations
@Override
Exceptions
IOException:
if the file already exists or an I/O exception is thrown writing to the file
dumpThreadsback to summary
private void dumpThreads(OutputStream out, HotSpotDiagnosticMXBean.ThreadDumpFormat format) throws IOException
getDiagnosticOptionsback to summary
public List<VMOption> getDiagnosticOptions()

Implements com.sun.management.HotSpotDiagnosticMXBean.getDiagnosticOptions.

Doc from com.sun.management.HotSpotDiagnosticMXBean.getDiagnosticOptions.

Returns a list of VMOption objects for all diagnostic options. A diagnostic option is a writeable VM option that can be set dynamically mainly for troubleshooting and diagnosis.

Annotations
@Override
getObjectNameback to summary
public ObjectName getObjectName()

Implements java.lang.management.PlatformManagedObject.getObjectName.

Doc from java.lang.management.PlatformManagedObject.getObjectName.

Returns an ObjectName instance representing the object name of this platform managed object.

Annotations
@Override
getVMOptionback to summary
public VMOption getVMOption(String name)

Implements com.sun.management.HotSpotDiagnosticMXBean.getVMOption.

Doc from com.sun.management.HotSpotDiagnosticMXBean.getVMOption.

Returns a VMOption object for a VM option of the given name.

Annotations
@Override
setVMOptionback to summary
public void setVMOption(String name, String value)

Implements com.sun.management.HotSpotDiagnosticMXBean.setVMOption.

Doc from com.sun.management.HotSpotDiagnosticMXBean.setVMOption.

Sets a VM option of the given name to the specified value. The new value will be reflected in a new VMOption object returned by the getVMOption method or the getDiagnosticOptions method. This method does not change the value of this VMOption object.

Annotations
@Override