Package org.openjdk.jmh.profile
Class GCProfiler.VMSupport
- java.lang.Object
-
- org.openjdk.jmh.profile.GCProfiler.VMSupport
-
- Enclosing class:
- GCProfiler
static class GCProfiler.VMSupport extends java.lang.ObjectThis class encapsulates any platform-specific functionality. It is supposed to gracefully fail if some functionality is not available. This class resolves most special classes via Reflection to enable building against a standard JDK.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanALLOC_AVAILABLEprivate static java.lang.management.ThreadMXBeanALLOC_MX_BEANprivate static java.lang.reflect.MethodALLOC_MX_BEAN_GETTERprivate static Multiset<java.lang.String>churnprivate static booleanCHURN_AVAILABLEprivate static javax.management.NotificationListenerlistener
-
Constructor Summary
Constructors Constructor Description VMSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfinishChurnProfile()private static long[]getAllocatedBytes(long[] threadIds)static Multiset<java.lang.String>getChurn()static GCProfiler.HotspotAllocationSnapshotgetSnapshot()private static javax.management.NotificationListenernewListener()static voidstartChurnProfile()private static booleantryInitAlloc()private static booleantryInitChurn()
-
-
-
Field Detail
-
ALLOC_AVAILABLE
private static final boolean ALLOC_AVAILABLE
-
ALLOC_MX_BEAN
private static java.lang.management.ThreadMXBean ALLOC_MX_BEAN
-
ALLOC_MX_BEAN_GETTER
private static java.lang.reflect.Method ALLOC_MX_BEAN_GETTER
-
CHURN_AVAILABLE
private static final boolean CHURN_AVAILABLE
-
listener
private static javax.management.NotificationListener listener
-
churn
private static Multiset<java.lang.String> churn
-
-
Method Detail
-
tryInitAlloc
private static boolean tryInitAlloc()
-
tryInitChurn
private static boolean tryInitChurn()
-
getAllocatedBytes
private static long[] getAllocatedBytes(long[] threadIds)
-
newListener
private static javax.management.NotificationListener newListener()
-
getSnapshot
public static GCProfiler.HotspotAllocationSnapshot getSnapshot()
-
startChurnProfile
public static void startChurnProfile()
-
finishChurnProfile
public static void finishChurnProfile()
-
getChurn
public static Multiset<java.lang.String> getChurn()
-
-