public class SynchronizedRecorder extends Recorder
| Modifier and Type | Class and Description |
|---|---|
private static class |
SynchronizedRecorder.Unallocation
Stores the information for a particular unallocation.
|
private class |
SynchronizedRecorder.UnallocationThread
Implements a thread which sends the gathered data to the specified
server.
|
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
unallocationLock
The internal lock for the message producer-consumer.
|
private LinkedList<SynchronizedRecorder.Unallocation> |
unallocations
Stores the unallocation information (preventing deadlocks).
|
CALIBRATE_RECORDER, COLLECTION_ENTRY_SIZE, isRecording, MAP_ENTRY_SIZE, programThreadIdinstance| Modifier | Constructor and Description |
|---|---|
private |
SynchronizedRecorder()
Prevents this class from being instantiated from outside.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeValueContext(java.lang.String id,
boolean push)
Notifies the recorder about changing the value context.
|
void |
configurationChange(java.lang.String ids)
Notify the recorder that a new variability configuration might have
been entered.
|
void |
enter(java.lang.String caller,
java.lang.String recId,
boolean exclude,
boolean directId,
long instanceId)
Notifies the recorder about a method being called.
|
void |
exit(java.lang.String caller,
java.lang.String recId,
boolean exclude,
boolean directId,
long instanceId)
Notifies the recorder about a method being exited.
|
static void |
initialize()
Cause loading this class.
|
void |
memoryAllocated(long tag,
long size)
Notifies the recorder about an object allocated to memory.
|
void |
memoryAllocated(java.lang.Object allocated)
Notifies the recorder about an object allocated to memory.
|
void |
memoryFreed(long tag,
long size)
Notifies the recorder about an object freed from memory.
|
void |
memoryFreed(java.lang.Object freed)
Notifies the recorder about an object freed from memory.
|
private void |
memoryFreedImpl(long tag,
long size)
Handles the unallocation (by calling the overridden superclass method).
|
void |
notifyProgramEnd()
Notifies about end of monitoring (this might occur at different point
of time than
Recorder.endSystem() and at multiple times). |
void |
notifyProgramStart()
Notifies about start of monitoring.
|
void |
notifyTimer(java.lang.String id,
TimerState state,
boolean considerThreads)
Notifies about a timer event.
|
void |
notifyValueChange(java.lang.String recId,
boolean newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
byte newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
char newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
double newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
float newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
int newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
long newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
java.lang.Object newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
short newValue)
Notifies the recorder about a changing value.
|
void |
notifyValueChange(java.lang.String recId,
java.lang.String newValue)
Notifies the recorder about a changing value.
|
void |
printStatistics()
Emits the values collected so far.
|
int |
readIo(java.lang.String recId,
java.lang.String caller,
int bytes,
StreamType type)
Notifies the recorder about an amount of bytes read from some I/O
channel.
|
int |
writeIo(java.lang.String recId,
java.lang.String caller,
int bytes,
StreamType type)
Notifies the recorder about an amount of bytes written to some I/O
channel.
|
assignAllTo, clearTemporaryData, doUnallocationRecording, enableVariabilityDetection, endSystem, getId, isRecording, memoryAllocated, memoryFreed, notifyThreadEnd, notifyThreadEnd, notifyThreadStart, notifyThreadStart, printCurrentState, registerAsOverheadStream, registerAsOverheadStream, registerForRecording, registerThisThread, unallocatedprivate java.lang.Object unallocationLock
private LinkedList<SynchronizedRecorder.Unallocation> unallocations
private SynchronizedRecorder()
public static void initialize()
public final void notifyProgramStart()
notifyProgramStart in class Recorderpublic final void notifyProgramEnd()
Recorder.endSystem() and at multiple times). [Java call,
native call]notifyProgramEnd in class Recorderpublic void enter(java.lang.String caller,
java.lang.String recId,
boolean exclude,
boolean directId,
long instanceId)
enter in class Recordercaller - the type of the callerrecId - the recorder id (may be null)exclude - is this an exclusion from monitoringdirectId - is recId direct, e.g. in case of an
annotated methodinstanceId - the optional instance identifier, 0 means
disabledpublic final void exit(java.lang.String caller,
java.lang.String recId,
boolean exclude,
boolean directId,
long instanceId)
exit in class Recordercaller - the type of the callerrecId - the recorder id (may be null)exclude - is this an exclusion from monitoringdirectId - is recId direct, e.g. in case of an
annotated methodinstanceId - the optional instance identifier, 0 means
disabledpublic final void configurationChange(java.lang.String ids)
configurationChange in class Recorderids - an optional list of group identificationspublic final void memoryAllocated(java.lang.Object allocated)
memoryAllocated in class Recorderallocated - the allocatedpublic final void memoryAllocated(long tag,
long size)
memoryAllocated in class Recordertag - the identification of the memory object, e.g. its memory
addresssize - the allocated memory sizepublic final void memoryFreed(java.lang.Object freed)
Object cannot be instrumented, garbage collector not called
when JVM is running, etc.). [Java call]memoryFreed in class Recorderfreed - the freed objectpublic final void memoryFreed(long tag,
long size)
Object cannot be instrumented, garbage collector not called
when JVM is running, etc.). [Java call, native call]memoryFreed in class Recordertag - the identification of the object to be freed, e.g. its memory
addresssize - the size of the freed objectprivate final void memoryFreedImpl(long tag,
long size)
tag - the identification of the object to be freed, e.g. its memory
addresssize - the size of the freed objectpublic final int readIo(java.lang.String recId,
java.lang.String caller,
int bytes,
StreamType type)
public final int writeIo(java.lang.String recId,
java.lang.String caller,
int bytes,
StreamType type)
public final void changeValueContext(java.lang.String id,
boolean push)
changeValueContext in class Recorderid - the value identification representing the contextpush - if true push the context to the context stack,
false elsepublic final void notifyValueChange(java.lang.String recId,
java.lang.Object newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
int newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
byte newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
char newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
short newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
long newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
double newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
float newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
boolean newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void notifyValueChange(java.lang.String recId,
java.lang.String newValue)
notifyValueChange in class RecorderrecId - the recorder id (optional, may be null)newValue - the value after the value changepublic final void printStatistics()
printStatistics in class Recorderpublic void notifyTimer(java.lang.String id,
TimerState state,
boolean considerThreads)
notifyTimer in class Recorderid - the timer identification (may overlap with recorder ids)state - the new timer stateconsiderThreads - false if the id is
thread save and threads must not be considered explicitly,
false else