org.openjdk.jol.util
Class VMSupport

java.lang.Object
  extended by org.openjdk.jol.util.VMSupport

public class VMSupport
extends Object

VM support doorway. Contains all the special tricks and methods to poll VM about it's secrets.

Author:
Aleksey Shipilev

Nested Class Summary
static class VMSupport.SizeInfo
           
 
Field Summary
static int ADDRESS_SIZE
           
static int BOOLEAN_SIZE
           
static int BYTE_SIZE
           
static int CHAR_SIZE
           
static int COMPRESSED_REF_SHIFT
           
static int DOUBLE_SIZE
           
static int FLOAT_SIZE
           
static int INT_SIZE
           
static int LONG_SIZE
           
static int OBJ_ALIGNMENT
           
static int OBJ_HEADER_SIZE
           
static int REF_SIZE
           
static int SHORT_SIZE
           
static sun.misc.Unsafe U
           
static boolean USE_COMPRESSED_REFS
           
static String VM_NAME
           
 
Constructor Summary
VMSupport()
           
 
Method Summary
static long addressOf(Object o)
           
static long addressOf(Object o, int oopSize)
           
static int align(int addr)
           
static int align(int addr, int align)
           
static void premain(String agentArgs, Instrumentation inst)
           
static String safeToString(Object o)
          Produces the toString string, only calling toString() on known types, which do not mutate the instance.
static int sizeOf(Object o)
           
static long toNativeAddress(long address)
           
static VMSupport.SizeInfo tryExactObjectSize(Object o, ClassLayout layout)
           
static String vmDetails()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

U

public static final sun.misc.Unsafe U

VM_NAME

public static final String VM_NAME

ADDRESS_SIZE

public static final int ADDRESS_SIZE

OBJ_ALIGNMENT

public static final int OBJ_ALIGNMENT

OBJ_HEADER_SIZE

public static final int OBJ_HEADER_SIZE

USE_COMPRESSED_REFS

public static final boolean USE_COMPRESSED_REFS

COMPRESSED_REF_SHIFT

public static final int COMPRESSED_REF_SHIFT

REF_SIZE

public static final int REF_SIZE

BOOLEAN_SIZE

public static final int BOOLEAN_SIZE

BYTE_SIZE

public static final int BYTE_SIZE

CHAR_SIZE

public static final int CHAR_SIZE

DOUBLE_SIZE

public static final int DOUBLE_SIZE

FLOAT_SIZE

public static final int FLOAT_SIZE

INT_SIZE

public static final int INT_SIZE

LONG_SIZE

public static final int LONG_SIZE

SHORT_SIZE

public static final int SHORT_SIZE
Constructor Detail

VMSupport

public VMSupport()
Method Detail

toNativeAddress

public static long toNativeAddress(long address)

align

public static int align(int addr)

align

public static int align(int addr,
                        int align)

vmDetails

public static String vmDetails()

addressOf

public static long addressOf(Object o)

addressOf

public static long addressOf(Object o,
                             int oopSize)

premain

public static void premain(String agentArgs,
                           Instrumentation inst)

tryExactObjectSize

public static VMSupport.SizeInfo tryExactObjectSize(Object o,
                                                    ClassLayout layout)

sizeOf

public static int sizeOf(Object o)

safeToString

public static String safeToString(Object o)
Produces the toString string, only calling toString() on known types, which do not mutate the instance.

Parameters:
o - object to process
Returns:
toString


Copyright © 2013. All Rights Reserved.