public enum JvmInformation extends java.lang.Enum<JvmInformation>
Enum Constant and Description |
---|
HOTSPOT_32_BIT
Represents HotSpot 32-bit
|
HOTSPOT_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP
Represents 32-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC
|
HOTSPOT_64_BIT
Represents 64-Bit HotSpot JVM
|
HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS
Represents 64-Bit HotSpot JVM with Compressed OOPs
|
HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP
Represents 64-Bit HotSpot JVM with Compressed OOPs and Concurrent Mark-and-Sweep GC
|
HOTSPOT_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP
Represents 64-Bit HotSpot JVM with Concurrent Mark-and-Sweep GC
|
IBM_32_BIT
Represents IBM 32-bit
|
IBM_64_BIT
Represents 64-Bit IBM JVM (with no reference compression)
|
IBM_64_BIT_WITH_COMPRESSED_REFS
Represents 64-Bit IBM JVM (with reference compression)
|
JROCKIT_32_BIT
Represents 32-Bit JRockit JVM"
|
JROCKIT_64_BIT
Represents 64-Bit JRockit JVM (with no reference compression)
|
JROCKIT_64_BIT_WITH_32GB_COMPRESSED_REFS
Represents 64-Bit JRockit JVM with 32GB Compressed References
|
JROCKIT_64_BIT_WITH_4GB_COMPRESSED_REFS
Represents 64-Bit JRockit JVM with 4GB Compressed References
|
JROCKIT_64_BIT_WITH_64GB_COMPRESSED_REFS
Represents 64-Bit JRockit JVM with 64GB Compressed References
|
UNKNOWN_32_BIT
Represents Generic 32-bit
|
UNKNOWN_64_BIT
Represents 64-Bit Generic JVM
|
Modifier and Type | Field and Description |
---|---|
static JvmInformation |
CURRENT_JVM_INFORMATION
The JvmInformation instance representing the current JVM
|
private static long |
FIFTY_SEVEN_GB |
private static org.slf4j.Logger |
LOGGER |
private static long |
THREE_GB |
private static long |
TWENTY_FIVE_GB |
Modifier and Type | Method and Description |
---|---|
private static JvmInformation |
detectHotSpot() |
private static JvmInformation |
detectIBM() |
private static JvmInformation |
detectJRockit() |
int |
getAgentSizeOfAdjustment()
The size of the jvm-specific agent result adjustment in bytes.
|
int |
getFieldOffsetAdjustment()
The size of the jvm-specific field offset adjustment in bytes.
|
private static java.lang.String |
getHotSpotVmOptionValue(java.lang.String name) |
abstract int |
getJavaPointerSize()
Size of a java pointer in bytes on this runtime (that differs when compressedOops are being used)
|
private static java.lang.String |
getJRockitVmArgs() |
abstract java.lang.String |
getJvmDescription()
A human-readable description of the JVM and its relevant enabled options.Os
|
private static JvmInformation |
getJvmInformation()
Determine the JvmInformation for the current JVM.
|
int |
getMinimumObjectSize()
Minimal size an object will occupy on the heap in bytes.
|
int |
getObjectAlignment()
Object alignment / padding in bytes
|
int |
getObjectHeaderSize()
The size of an object header in bytes.
|
private static java.lang.String |
getPlatformMBeanAttribute(java.lang.String beanName,
java.lang.String attrName) |
abstract int |
getPointerSize()
Size of a pointer in bytes on this runtime
|
private static boolean |
is64Bit() |
static boolean |
isHotspot()
Returns true if VM vendor is Hotspot
|
private static boolean |
isHotspotCompressedOops() |
private static boolean |
isHotspotConcurrentMarkSweepGC() |
static boolean |
isIBM()
Returns true if VM vendor is IBM
|
private static boolean |
isIBMCompressedRefs() |
static boolean |
isJRockit()
Returns true if VM is JRockit
|
private static boolean |
isJRockit32GBCompression() |
private static boolean |
isJRockit4GBCompression() |
private static boolean |
isJRockit64GBCompression() |
static boolean |
isOSX()
Return true if the VM's vendor is Apple
|
boolean |
supportsAgentSizeOf()
Whether the jvm can support AgentSizeOf implementation.
|
boolean |
supportsReflectionSizeOf()
Whether the jvm can support ReflectionSizeOf implementation.
|
boolean |
supportsUnsafeSizeOf()
Whether the jvm can support UnsafeSizeOf implementation.
|
static JvmInformation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JvmInformation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JvmInformation HOTSPOT_32_BIT
public static final JvmInformation HOTSPOT_32_BIT_WITH_CONCURRENT_MARK_AND_SWEEP
public static final JvmInformation HOTSPOT_64_BIT
public static final JvmInformation HOTSPOT_64_BIT_WITH_CONCURRENT_MARK_AND_SWEEP
public static final JvmInformation HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS
public static final JvmInformation HOTSPOT_64_BIT_WITH_COMPRESSED_OOPS_AND_CONCURRENT_MARK_AND_SWEEP
public static final JvmInformation JROCKIT_32_BIT
public static final JvmInformation JROCKIT_64_BIT
public static final JvmInformation JROCKIT_64_BIT_WITH_4GB_COMPRESSED_REFS
public static final JvmInformation JROCKIT_64_BIT_WITH_32GB_COMPRESSED_REFS
public static final JvmInformation JROCKIT_64_BIT_WITH_64GB_COMPRESSED_REFS
public static final JvmInformation IBM_64_BIT_WITH_COMPRESSED_REFS
public static final JvmInformation IBM_64_BIT
public static final JvmInformation IBM_32_BIT
public static final JvmInformation UNKNOWN_32_BIT
public static final JvmInformation UNKNOWN_64_BIT
public static final JvmInformation CURRENT_JVM_INFORMATION
private static final org.slf4j.Logger LOGGER
private static final long THREE_GB
private static final long TWENTY_FIVE_GB
private static final long FIFTY_SEVEN_GB
public static JvmInformation[] values()
for (JvmInformation c : JvmInformation.values()) System.out.println(c);
public static JvmInformation valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract int getPointerSize()
public abstract int getJavaPointerSize()
public int getMinimumObjectSize()
public int getObjectAlignment()
public int getObjectHeaderSize()
public int getFieldOffsetAdjustment()
public int getAgentSizeOfAdjustment()
public boolean supportsAgentSizeOf()
public boolean supportsUnsafeSizeOf()
public boolean supportsReflectionSizeOf()
public abstract java.lang.String getJvmDescription()
private static JvmInformation getJvmInformation()
private static JvmInformation detectHotSpot()
private static JvmInformation detectJRockit()
private static JvmInformation detectIBM()
private static boolean isJRockit32GBCompression()
private static boolean isJRockit64GBCompression()
private static boolean isJRockit4GBCompression()
public static boolean isJRockit()
public static boolean isOSX()
public static boolean isHotspot()
public static boolean isIBM()
private static boolean isIBMCompressedRefs()
private static boolean isHotspotCompressedOops()
private static java.lang.String getHotSpotVmOptionValue(java.lang.String name)
private static java.lang.String getPlatformMBeanAttribute(java.lang.String beanName, java.lang.String attrName)
private static java.lang.String getJRockitVmArgs()
private static boolean isHotspotConcurrentMarkSweepGC()
private static boolean is64Bit()