Package com.yourkit.probes
Class JVM
java.lang.Object
com.yourkit.probes.JVM
Provides native methods needed in some built-in probes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
getPersistentObjectId
(Object object) Obtain the persistent ID for the specified object.static boolean
Check whether the JVM is in its live phase.static boolean
isProfilerAgentThread
(String threadName) Check whether thread name belongs to a profiler thread.
-
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
Check whether thread name belongs to a profiler thread. -
getPersistentObjectId
Obtain the persistent ID for the specified object.- Parameters:
object
- may not beNULL
- 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.
-