#include <iprof.h>
Inheritance diagram for IProf::
Public Types | |
typedef jint | objectID |
unique object ID. | |
enum | eFunction { F_SHUTDOWN = 0, F_IS_SHUTDOWNED = 1, F_SUSPEND_VM = 2, F_RESUME_VM = 3, F_EXIT_VM = 4, F_GET_INFO = 5, F_GET_DATA = 6, F_GET_ALL = 7, F_GET_CHANGED = 8, F_ENABLE_GC = 9, F_DISABLE_GC = 10, F_RUN_GC = 11 } |
indexes of methods. More... | |
Public Methods | |
IProf (const Setup &setup, JVMPI_Interface *jvmpi) | |
Constructor. More... | |
virtual | ~IProf () |
Destructor. More... | |
int | run () |
Main server loop. More... | |
virtual void | shutdown ()=0 |
Shutdown JVM. More... | |
virtual jint | isShutdowned ()=0 |
JVM shutdowned. More... | |
virtual void | suspendVM ()=0 |
Suspend JVM. More... | |
virtual void | resumeVM ()=0 |
Resume JVM. More... | |
virtual void | exitVM ()=0 |
Exit JVM. More... | |
virtual jint | getInfo (objectID infoId, eInfoType type, InfoBinaryFormat *&info)=0 |
Get information. More... | |
virtual jint | getData (objectID objId, eDataType type, sData &data)=0 |
Get statistic data. More... | |
virtual jint | getAll (objectID objId, eSeqType what, jint includeInfo, jint optionalArg, seqID &seq)=0 |
Get all objects with all statistic data. More... | |
virtual jint | getChanged (objectID objId, eSeqType what, jint includeInfo, jint optionalArg, seqID &seq)=0 |
Get all objects with changed statistic data. More... | |
virtual void | enableGC ()=0 |
Enable Java garbage collector. More... | |
virtual void | disableGC ()=0 |
Disable Java garbage collector. More... | |
virtual void | runGC ()=0 |
Run Java garbage collector explicitly. More... | |
Protected Types | |
typedef List< sID, LI1 > | seqID |
unbounded sequence of statistic data. | |
enum | eErrorCode { RC_OK = 0, RC_BAD_INFO_ID = -1, RC_BAD_INFO_TYPE = -2, RC_BAD_OBJ_ID = -3, RC_BAD_DATA_TYPE = -4, RC_BAD_COMMAND = -5 } |
error codes. More... | |
enum | eInfoType { CLASS_INFO = 0, CLASS_FIELD_INFO = 1, METHOD_INFO = 2, TRACE_INFO = 3, OBJECT_INFO = 4, ARENA_INFO = 5, THREAD_INFO = 6, THREAD_GROUP_INFO = 7, GC_INFO = 8 } |
type of information. More... | |
enum | eDataType { ALLOC_DATA = 0, CPU_DATA = 1, MON_DATA = 2 } |
type of statistic data. More... | |
enum | eSeqType { CLASSES = 0, METHODS = 1, ALLOC_TRACES = 2, CPU_TRACES = 3, OBJECT_TYPES = 4, THREADS = 5, GROUPS_OF_THREADS = 6, ARENAS = 7, GCS = 8, GROUP_THREADS = 9, CLASS_FIELDS_STATICS = 10, CLASS_FIELDS_INSTANCES = 11, CLASS_METHODS = 12, ALLOC_METHOD_TRACES = 13, ALLOC_METHOD_OBJECTS = 14, ALLOC_TRACE_OBJECTS = 15, ALLOC_OBJECT_METHODS = 16, ALLOC_OBJECT_METHOD_TRACES = 17, ALLOC_OBJECT_THREADS = 18, ALLOC_OBJECT_METHOD_THREADS = 19, ALLOC_OBJECT_METHOD_TRACE_THREADS = 20, ALLOC_THREAD_OBJECTS = 21, ALLOC_THREAD_OBJECT_METHODS = 22, ALLOC_THREAD_OBJECT_METHOD_TRACES = 23, ALLOC_THREAD_METHODS = 24, ALLOC_THREAD_METHOD_TRACES = 25, ALLOC_THREAD_METHOD_OBJECTS = 26, ALLOC_THREAD_METHOD_TRACE_OBJECTS = 27, CPU_METHOD_TRACES = 28, CPU_METHOD_THREADS = 29, CPU_METHOD_TRACE_THREADS = 30, CPU_THREAD_METHODS = 31, CPU_THREAD_METHOD_TRACES = 32, MON_METHOD_TRACES = 33, MON_METHOD_THREADS = 34, MON_METHOD_TRACE_THREADS = 35, MON_THREAD_METHODS = 36, MON_THREAD_METHOD_TRACES = 37, MON_TRACES = 38, ALLOC_METHOD_THREADS = 40, ALLOC_METHOD_TRACE_THREADS = 41 } |
Type of sequence. More... | |
Protected Methods | |
int | isConnectionEstablished () |
Connection established or not. More... | |
Protected Attributes | |
Lock | communLock |
mutex for communication. | |
Private Types | |
typedef void(IProf::* | Func )(Buffer &) |
relative pointer to class method. | |
enum | e { FUNC_COUNT = 12 } |
constants. More... | |
Private Methods | |
void | _shutdown (Buffer &b) |
Shutdown JVM. More... | |
void | _isShutdowned (Buffer &b) |
JVM shutdowned. More... | |
void | _suspendVM (Buffer &b) |
Suspend JVM. More... | |
void | _resumeVM (Buffer &b) |
Resume JVM. More... | |
void | _exitVM (Buffer &b) |
Exit JVM. More... | |
void | _getInfo (Buffer &b) |
Get information. More... | |
void | _getData (Buffer &b) |
Get statistic data. More... | |
void | _getAll (Buffer &b) |
Get all objects with all statistic data. More... | |
void | _getChanged (Buffer &b) |
Get all objects with changed statistic data. More... | |
void | _enableGC (Buffer &b) |
Enable Java garbage collector. More... | |
void | _disableGC (Buffer &b) |
Disable Java garbage collector. More... | |
void | _runGC (Buffer &b) |
Run Java garbage collector explicitly. More... | |
Static Private Methods | |
int | sToBin (sID *s, void **inout) |
Convert sequence item to binary. More... | |
Private Attributes | |
Func | _func [FUNC_COUNT] |
an array of relative pointers to methods. | |
Commun * | _commun |
communication object. | |
int | conEstabl |
connection established or not. |
This class implements the whole communication interface between this profiler dynamic library and java. On the Java-side there is similar class as this one. Main profiler class (Prof) is a descendant of this class, so it has all features of this interface.
Definition at line 60 of file iprof.h.
|
constants.
Reimplemented in Prof. |
|
type of statistic data.
|
|
error codes.
|
|
indexes of methods.
|
|
|
Type of sequence. Type of objects in the sequence
|
|
Constructor. It initializes communication. In this moment, socket (TCP) communication and shared memory communication are supported.
|
|
Destructor. It stops communication and closes communication channel. |
|
Disable Java garbage collector. This method processes in/out buffer, gains arguments and calls disableGC() method. When finished, in 'b' there is binary output of called method.
|
|
Enable Java garbage collector. This method processes in/out buffer, gains arguments and calls enableGC() method. When finished, in 'b' there is binary output of called method.
|
|
Exit JVM. This method processes in/out buffer, gains arguments and calls exitVM() method. When finished, in 'b' there is binary output of called method.
|
|
Get all objects with all statistic data. This method processes in/out buffer, gains arguments and calls getAll() method. When finished, in 'b' there is binary output of called method.
|
|
Get all objects with changed statistic data. This method processes in/out buffer, gains arguments and calls getChanged() method. When finished, in 'b' there is binary output of called method.
|
|
Get statistic data. This method processes in/out buffer, gains arguments and calls getData() method. When finished, in 'b' there is binary output of called method.
|
|
Get information. This method processes in/out buffer, gains arguments and calls getInfo() method. When finished, in 'b' there is binary output of called method.
|
|
JVM shutdowned. This method processes in/out buffer, gains arguments and calls isShutdowned() method. When finished, in 'b' there is binary output of called method.
|
|
Resume JVM. This method processes in/out buffer, gains arguments and calls resumeVM() method. When finished, in 'b' there is binary output of called method.
|
|
Run Java garbage collector explicitly. This method processes in/out buffer, gains arguments and calls runGC() method. When finished, in 'b' there is binary output of called method.
|
|
Shutdown JVM. This method processes in/out buffer, gains arguments and calls shutdown() method. When finished, in 'b' there is binary output of called method.
|
|
Suspend JVM. This method processes in/out buffer, gains arguments and calls suspendVM() method. When finished, in 'b' there is binary output of called method.
|
|
Disable Java garbage collector. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _disableGC().
|
|
Enable Java garbage collector. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _enableGC().
|
|
Exit JVM. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _exitVM().
|
|
Get all objects with all statistic data. An abstract method implemented by Prof class.
Reimplemented in Prof. |
|
Get all objects with changed statistic data. An abstract method implemented by Prof class.
Reimplemented in Prof. |
|
Get statistic data. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _getData().
|
|
Get information. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _getInfo().
|
|
Connection established or not.
Definition at line 720 of file iprof.h. Referenced by Prof::event_jvmShutDown().
|
|
JVM shutdowned. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _isShutdowned().
|
|
Resume JVM. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _resumeVM().
|
|
Main server loop. This method starts the server and stays in main server (client) loop. To exit the loop client must disconnect itself from the server (must close connection). When connect_mode is set to 'client', it starts the client.
Definition at line 78 of file iprof.cpp. Referenced by Prof::communThreadRoutine().
|
|
Run Java garbage collector explicitly. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _runGC().
|
|
Convert sequence item to binary. This method is called indirectly thru forEach() method. It converts sequence item data to binary format and appends it to the end of 'inout' buffer.
|
|
Shutdown JVM. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _shutdown().
|
|
Suspend JVM. An abstract method implemented by Prof class.
Reimplemented in Prof. Referenced by _suspendVM().
|