adaptj.event
Class ObjectAllocEvent

java.lang.Object
  |
  +--adaptj.event.AdaptJEvent
        |
        +--adaptj.event.ObjectAllocEvent
All Implemented Interfaces:
AdaptJSpecConstants, ArenaEvent, ClassEvent, ObjectEvent

public class ObjectAllocEvent
extends AdaptJEvent
implements ArenaEvent, ClassEvent, ObjectEvent

An Event corresponding to the JVMPI_OBJECT_ALLOC event. This event is triggered when an object is allocated by the Java VM.

Author:
Bruno Dufour
See Also:
ObjectFreeEvent, ObjectMoveEvent, The Java Virtual Machine Profiler Interface (JVMPI)

Field Summary
static int BOOLEAN_ARRAY
          Indicates that the object is an array of booleans
static int BYTE_ARRAY
          Indicates that the object is an array of bytes
static int CHAR_ARRAY
          Indicates that the object is an array of chars
static int DOUBLE_ARRAY
          Indicates that the object is an array of doubles
static int FLOAT_ARRAY
          Indicates that the object is an array of floats
static int INT_ARRAY
          Indicates that the object is an array of ints
static int LONG_ARRAY
          Indicates that the object is an array of longs
static int NORMAL_OBJECT
          Indicates that the object is not an array
static int OBJECT_ARRAY
          Indicates that the object is an array of classes
static int SHORT_ARRAY
          Indicates that the object is an array of shorts
 
Fields inherited from class adaptj.event.AdaptJEvent
ADAPTJ_ARENA_DELETE, ADAPTJ_ARENA_NEW, ADAPTJ_CLASS_LOAD, ADAPTJ_CLASS_LOAD_HOOK, ADAPTJ_CLASS_UNLOAD, ADAPTJ_COMPILED_METHOD_LOAD, ADAPTJ_COMPILED_METHOD_UNLOAD, ADAPTJ_DATA_DUMP_REQUEST, ADAPTJ_DATA_RESET_REQUEST, ADAPTJ_EVENT_COUNT, ADAPTJ_GC_FINISH, ADAPTJ_GC_START, ADAPTJ_HEAP_DUMP, ADAPTJ_INSTRUCTION_START, ADAPTJ_JNI_GLOBALREF_ALLOC, ADAPTJ_JNI_GLOBALREF_FREE, ADAPTJ_JNI_WEAK_GLOBALREF_ALLOC, ADAPTJ_JNI_WEAK_GLOBALREF_FREE, ADAPTJ_JVM_INIT_DONE, ADAPTJ_JVM_SHUT_DOWN, ADAPTJ_METHOD_ENTRY, ADAPTJ_METHOD_ENTRY2, ADAPTJ_METHOD_EXIT, ADAPTJ_MONITOR_CONTENDED_ENTER, ADAPTJ_MONITOR_CONTENDED_ENTERED, ADAPTJ_MONITOR_CONTENDED_EXIT, ADAPTJ_MONITOR_DUMP, ADAPTJ_MONITOR_WAIT, ADAPTJ_MONITOR_WAITED, ADAPTJ_OBJECT_ALLOC, ADAPTJ_OBJECT_DUMP, ADAPTJ_OBJECT_FREE, ADAPTJ_OBJECT_MOVE, ADAPTJ_RAW_MONITOR_CONTENDED_ENTER, ADAPTJ_RAW_MONITOR_CONTENDED_ENTERED, ADAPTJ_RAW_MONITOR_CONTENDED_EXIT, ADAPTJ_REQUESTED_EVENT, ADAPTJ_THREAD_END, ADAPTJ_THREAD_START, ADAPTJ_THREAD_STATUS_CHANGE, ADAPTJ_UNKNOWN
 
Fields inherited from interface adaptj.spec.AdaptJSpecConstants
ADAPTJ_COMPACT_INSTRUCTION_START, ADAPTJ_FIELD_ARENA_ID, ADAPTJ_FIELD_ARENA_NAME, ADAPTJ_FIELD_CHOSEN_PAIR_INDEX, ADAPTJ_FIELD_CLASS_LOAD_CLASS_ID, ADAPTJ_FIELD_CLASS_NAME, ADAPTJ_FIELD_CLASS_UNLOAD_CLASS_ID, ADAPTJ_FIELD_CODE, ADAPTJ_FIELD_CODE_SIZE, ADAPTJ_FIELD_COUNTED, ADAPTJ_FIELD_DATA, ADAPTJ_FIELD_DATA_LEN, ADAPTJ_FIELD_ENV_ID, ADAPTJ_FIELD_GROUP_NAME, ADAPTJ_FIELD_HI, ADAPTJ_FIELD_ID, ADAPTJ_FIELD_INSTANCES, ADAPTJ_FIELD_IS_ARRAY, ADAPTJ_FIELD_IS_TRUE, ADAPTJ_FIELD_KEY, ADAPTJ_FIELD_LINENO_TABLE, ADAPTJ_FIELD_LINENO_TABLE_SIZE, ADAPTJ_FIELD_LOW, ADAPTJ_FIELD_METHOD_ID, ADAPTJ_FIELD_METHODS, ADAPTJ_FIELD_NAME, ADAPTJ_FIELD_NEW_ARENA_ID, ADAPTJ_FIELD_NEW_OBJ_ID, ADAPTJ_FIELD_NEW_STATUS, ADAPTJ_FIELD_NUM_INSTANCE_FIELDS, ADAPTJ_FIELD_NUM_INTERFACES, ADAPTJ_FIELD_NUM_METHODS, ADAPTJ_FIELD_NUM_STATIC_FIELDS, ADAPTJ_FIELD_NUM_TRACES, ADAPTJ_FIELD_OBJ_ID, ADAPTJ_FIELD_OBJECT, ADAPTJ_FIELD_OBJECT_ALLOC_CLASS_ID, ADAPTJ_FIELD_OFFSET, ADAPTJ_FIELD_PAIRS_TOTAL, ADAPTJ_FIELD_PARENT_NAME, ADAPTJ_FIELD_RECORDED, ADAPTJ_FIELD_REF_ID, ADAPTJ_FIELD_SIZE, ADAPTJ_FIELD_SOURCE_NAME, ADAPTJ_FIELD_STATICS, ADAPTJ_FIELD_THREAD_ENV_ID, ADAPTJ_FIELD_THREAD_ID, ADAPTJ_FIELD_THREAD_NAME, ADAPTJ_FIELD_TIMEOUT, ADAPTJ_FIELD_TOTAL_OBJECT_SPACE, ADAPTJ_FIELD_TRACES, ADAPTJ_FIELD_USED_OBJECT_SPACE, ADAPTJ_FIELD_USED_OBJECTS, ADAPTJ_FILESPLIT, ADAPTJ_ISPIPED, ADAPTJ_MAGIC, ADAPTJ_SPEC_MAGIC, VERSION_MASK
 
Constructor Summary
ObjectAllocEvent()
           
ObjectAllocEvent(int arena_id, int class_id, int is_array, int size, int obj_id)
           
 
Method Summary
 int getArenaID()
          Get arena_id.
 int getClassID()
          Get class_id.
 int getIsArray()
          Get is_array.
 int getObjID()
          Get obj_id.
 int getSize()
          Get size.
 void readFromStream(java.io.DataInput in, short info)
           
 void setArenaID(int arena_id)
          Set arena_id.
 void setClassID(int class_id)
          Set class_id.
 void setIsArray(int is_array)
          Set is_array.
 void setObjID(int obj_id)
          Set obj_id.
 void setSize(int size)
          Set size.
 java.lang.String toString()
           
 
Methods inherited from class adaptj.event.AdaptJEvent
getEnvID, getTypeID, isRequested, setEnvID, setRequested, setTypeID, setTypeID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL_OBJECT

public static final int NORMAL_OBJECT
Indicates that the object is not an array

See Also:
Constant Field Values

OBJECT_ARRAY

public static final int OBJECT_ARRAY
Indicates that the object is an array of classes

See Also:
Constant Field Values

BOOLEAN_ARRAY

public static final int BOOLEAN_ARRAY
Indicates that the object is an array of booleans

See Also:
Constant Field Values

CHAR_ARRAY

public static final int CHAR_ARRAY
Indicates that the object is an array of chars

See Also:
Constant Field Values

FLOAT_ARRAY

public static final int FLOAT_ARRAY
Indicates that the object is an array of floats

See Also:
Constant Field Values

DOUBLE_ARRAY

public static final int DOUBLE_ARRAY
Indicates that the object is an array of doubles

See Also:
Constant Field Values

BYTE_ARRAY

public static final int BYTE_ARRAY
Indicates that the object is an array of bytes

See Also:
Constant Field Values

SHORT_ARRAY

public static final int SHORT_ARRAY
Indicates that the object is an array of shorts

See Also:
Constant Field Values

INT_ARRAY

public static final int INT_ARRAY
Indicates that the object is an array of ints

See Also:
Constant Field Values

LONG_ARRAY

public static final int LONG_ARRAY
Indicates that the object is an array of longs

See Also:
Constant Field Values
Constructor Detail

ObjectAllocEvent

public ObjectAllocEvent()

ObjectAllocEvent

public ObjectAllocEvent(int arena_id,
                        int class_id,
                        int is_array,
                        int size,
                        int obj_id)
Method Detail

getArenaID

public int getArenaID()
Get arena_id.

Specified by:
getArenaID in interface ArenaEvent
Returns:
arena_id as int.

setArenaID

public void setArenaID(int arena_id)
Set arena_id.

Specified by:
setArenaID in interface ArenaEvent
Parameters:
arena_id - the value to set.

getClassID

public int getClassID()
Get class_id.

Specified by:
getClassID in interface ClassEvent
Returns:
class_id as int.

setClassID

public void setClassID(int class_id)
Set class_id.

Specified by:
setClassID in interface ClassEvent
Parameters:
class_id - the value to set.

getIsArray

public int getIsArray()
Get is_array.

Returns:
is_array as int.

setIsArray

public void setIsArray(int is_array)
Set is_array.

Parameters:
is_array - the value to set.

getSize

public int getSize()
Get size.

Returns:
size as int.

setSize

public void setSize(int size)
Set size.

Parameters:
size - the value to set.

getObjID

public int getObjID()
Get obj_id.

Specified by:
getObjID in interface ObjectEvent
Returns:
obj_id as int.

setObjID

public void setObjID(int obj_id)
Set obj_id.

Specified by:
setObjID in interface ObjectEvent
Parameters:
obj_id - the value to set.

readFromStream

public void readFromStream(java.io.DataInput in,
                           short info)
                    throws java.io.IOException
Overrides:
readFromStream in class AdaptJEvent
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object