Module openj9.dtfj

Interface JavaRuntime

    • Method Detail

      • getJavaClassLoaders

        Iterator getJavaClassLoaders()
        Get the set of class loaders active in this VM
        Returns:
        an iterator of all of the class loaders within this JavaVM
        See Also:
        JavaClassLoader, CorruptData
      • getThreads

        Iterator getThreads()
        Get the set of Java threads known by the VM
        Returns:
        an iterator of the JavaThreads in the runtime
        See Also:
        JavaThread, CorruptData
      • getCompiledMethods

        Iterator getCompiledMethods()
        This is short cut method. The same result can be found by iterating over all methods in all class loaders in all classes.
        Returns:
        an iterator over all of the JavaMethods in the JavaRuntime which have been compiled
        See Also:
        JavaMethod, CorruptData
      • getMonitors

        Iterator getMonitors()
        Provides access to the collection of monitors used in the JavaVM. This collection includes both monitors associated with managed objects (e.g. object monitors) and monitors associated with internal control structures (e.g. raw monitors)
        Returns:
        an iterator over the collection of monitors
        See Also:
        JavaMonitor, CorruptData
      • getHeaps

        Iterator getHeaps()
        Get the set of heaps known by the VM
        Returns:
        an iterator for all of the Java heaps within this runtime. Heaps may be specific to this JavaVM instance, or may be shared between multiple JavaVM instances
        See Also:
        JavaHeap, CorruptData
      • getHeapRoots

        Iterator getHeapRoots()
        Get the set of object and class roots known to the VM. Stack frame roots are not included in the set, they can be retrieved using JavaStackFrame.getHeapRoots().
        Returns:
        an iterator over the collection of JavaReferences representing the known global heap roots within this runtime.
        See Also:
        JavaReference, JavaStackFrame, CorruptData
      • getTraceBuffer

        Object getTraceBuffer​(String bufferName,
                              boolean formatted)
                       throws CorruptDataException
        Fetches implementation specific trace buffers, like the verbose GC buffer or the Universal Trace Engine (UTE) buffer
        Parameters:
        bufferName - a String naming the buffer to be fetched
        formatted - true if formatting should be performed on the buffer, or false if the raw buffer contents should be returned
        Returns:
        an implementation specific result, depending on the parameters
        Throws:
        CorruptDataException
      • getMemoryCategories

        Iterator getMemoryCategories()
                              throws DataUnavailable
        Returns iterator of the top-level memory categories used by this Java runtime.
        Returns:
        Iterator of memory categories
        Throws:
        DataUnavailable
        Since:
        1.5
        See Also:
        CorruptData
      • getMemorySections

        Iterator getMemorySections​(boolean includeFreed)
                            throws DataUnavailable
        Returns an iterator of JavaRuntimeMemorySection objects corresponding to the blocks of memory allocated by the JavaRuntime.
        Parameters:
        includeFreed - If true, iterator will iterate over blocks of memory that have been freed, but haven't been re-used yet.
        Returns:
        Iterator of memory sections.
        Throws:
        DataUnavailable
        Since:
        1.5
        See Also:
        CorruptData
      • equals

        boolean equals​(Object obj)
        Description copied from class: java.lang.Object
        Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. The implementation in Object answers true only if the argument is the exact same object as the receiver (==).
        Overrides:
        equals in class Object
        Parameters:
        obj -
        Returns:
        True if the given object refers to the same Java Runtime in the image
        See Also:
        Object.hashCode()
      • hashCode

        int hashCode()
        Description copied from class: java.lang.Object
        Answers an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.
        Overrides:
        hashCode in class Object
        Returns:
        the receiver's hash.
        See Also:
        Object.equals(java.lang.Object)
      • getStartTimeNanos

        long getStartTimeNanos()
                        throws DataUnavailable,
                               CorruptDataException
        Get the value of the JVM's high-resolution timer when the JVM was started.
        Returns:
        the value of the high-resolution timer when the JVM was started, in nanoseconds
        Throws:
        DataUnavailable - if the JVM start time is not available
        CorruptDataException - if the JVM start time is corrupted
        Since:
        1.12