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.
  • Method Details

    • getInstance

      public static HotSpotDiagnosticMXBean getInstance()
      Singleton accessor method.
      Returns:
      the HotSpotDiagnostic singleton.
    • dumpHeap

      public void dumpHeap(String outputFile, boolean live) throws IOException
      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.

      Specified by:
      dumpHeap in interface HotSpotDiagnosticMXBean
      Overrides:
      dumpHeap in class com.sun.management.internal.HotSpotDiagnostic
      Parameters:
      outputFile - the system-dependent filename
      live - if true dump only live objects i.e. objects that are reachable from others
      Throws:
      IOException - if the outputFile already exists, cannot be created, opened, or written to.
    • getDiagnosticOptions

      public List<VMOption> 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.
      Specified by:
      getDiagnosticOptions in interface HotSpotDiagnosticMXBean
      Overrides:
      getDiagnosticOptions in class com.sun.management.internal.HotSpotDiagnostic
      Returns:
      a list of VMOption objects for all diagnostic options.
    • getVMOption

      public VMOption getVMOption(String name)
      Returns a VMOption object for a VM option of the given name.
      Specified by:
      getVMOption in interface HotSpotDiagnosticMXBean
      Overrides:
      getVMOption in class com.sun.management.internal.HotSpotDiagnostic
      Returns:
      a VMOption object for a VM option of the given name.
    • setVMOption

      public void setVMOption(String name, String value)
      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 HotSpotDiagnosticMXBean.getVMOption(java.lang.String) method or the HotSpotDiagnosticMXBean.getDiagnosticOptions() method. This method does not change the value of this VMOption object.
      Specified by:
      setVMOption in interface HotSpotDiagnosticMXBean
      Overrides:
      setVMOption in class com.sun.management.internal.HotSpotDiagnostic
      Parameters:
      name - Name of a VM option
      value - New value of the VM option to be set