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.Object
This 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 boolean
ALLOC_AVAILABLE
private static java.lang.management.ThreadMXBean
ALLOC_MX_BEAN
private static java.lang.reflect.Method
ALLOC_MX_BEAN_GETTER
private static Multiset<java.lang.String>
churn
private static boolean
CHURN_AVAILABLE
private static javax.management.NotificationListener
listener
-
Constructor Summary
Constructors Constructor Description VMSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
finishChurnProfile()
private static long[]
getAllocatedBytes(long[] threadIds)
static Multiset<java.lang.String>
getChurn()
static GCProfiler.HotspotAllocationSnapshot
getSnapshot()
private static javax.management.NotificationListener
newListener()
static void
startChurnProfile()
private static boolean
tryInitAlloc()
private static boolean
tryInitChurn()
-
-
-
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()
-
-