Class JVM

java.lang.Object
com.yourkit.probes.JVM

public final class JVM extends Object
Provides native methods needed in some built-in probes.
  • Method Details

    • isLivePhase

      public static boolean isLivePhase()
      Check whether the JVM is in its live phase. The live phase begins as soon as the JVM has completed its initialization, and ends when the JVM starts its the shut down activities. Some probe activities should be undertaken in the live phase only.
    • isProfilerAgentThread

      public static boolean isProfilerAgentThread(@Nullable String threadName)
      Check whether thread name belongs to a profiler thread.
    • getPersistentObjectId

      public static long getPersistentObjectId(@NotNull Object object)
      Obtain the persistent ID for the specified object.
      Parameters:
      object - may not be NULL
      Returns:

      If the object already has the persistent ID assigned, it will be returned. Otherwise a new unique ID is assigned to the object and returned.

      The valid ID is never 0. However, it may happen that in some early (VM initialization) or late (VM shutdown) stages of the JVM life cycle the ID cannot be assigned to the object, in which case the method returns 0.