Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Thread Class Reference

Thread. More...

#include <thread.h>

Inheritance diagram for Thread::

InfoBinaryFormat IdObject AllocStatData LI5 LI4 LI3 LI2 LI1 List of all members.

Public Methods

 Thread ()
 Default constructor.

virtual ~Thread ()
 Destructor.

JNIEnv *const & getKey (JNIEnv *&key)
 Retrieves object's key. More...

int operator== (JNIEnv *const &key)
 Compares object with given key. More...

virtual BufferinfoToBin (Buffer &b)
 Convert info to binary. More...

void deactivate ()
 Performs deactivation.

void * operator new (size_t sz)
 Overloaded new() operator.

void operator delete (void *unit)
 Overloaded delete() operator.

virtual eClassIdent getClassIdent ()
 Class identification. More...

virtual int isActive ()
 State of object. More...

virtual int isChanged ()
 Indication that object has changed its data. More...

virtual void setUnchanged ()
 Set the structure is unchanged although it may not be.


Static Public Methods

int hashKey (JNIEnv *const &key)
 Hash function. More...


Public Attributes

String threadName
 name of thread.

GroupThreadgroup
 group of thread.

Thread * parent
 parent of thread.

List< Thread, LI3children
 children of thread.

jobjectID threadId
 thread object ID.

JNIEnv * threadEnvId
 JVMPI ID of the thread.

int active
 active or not.

List< AllocThreadObject, LI1allocThreadObjects
 associated AllocThreadObjects.

List< AllocThreadMethod, LI1allocThreadMethods
 associated AllocThreadMethods.

List< CpuThreadMethod, LI2cpuThreadMethods
 associated CpuThreadMethods.

List< MonThreadMethod, LI2monThreadMethods
 associated MonThreadMethods.

CpuStack stack
 CPU stack.

JVMPI_CallTrace callTrace
 Call trace for general temporary usage. More...

Thread * nextSuspended
 for CPU sampling purposes.

int hasRun
 for CPU sampling purposes.

int monitorEnter
 For monitor profiling purposes. More...

jobjectID monitorEnterObject
 For monitor profiling purposes. More...

unsigned long monitorEnterTime
 For monitor profiling purposes. More...


Static Private Attributes

Allocator _allocator
 allocator.


Detailed Description

Thread.

This class consists of data gained by receiving the JVMPI_EVENT_THREAD_START event. When the thread stops (JVMPI_EVENT_THREAD_END event received), data in this structure is no longer valid, so 'active' field will equal zero.

See also:
GroupThread
Author:
Marek Przeczek, Petr Luner

Definition at line 65 of file thread.h.


Member Function Documentation

virtual eClassIdent Thread::getClassIdent   [inline, virtual]
 

Class identification.

Returns:
unique class type identifier

Reimplemented from IdObject.

Definition at line 232 of file thread.h.

JNIEnv* const& Thread::getKey JNIEnv *&    key [inline]
 

Retrieves object's key.

Parameters:
key  where to store the key
Returns:
key
See also:
Hash

Definition at line 174 of file thread.h.

Referenced by MonThreadMethod::getKey(), CpuThreadMethod::getKey(), AllocThreadObject::getKey(), and AllocThreadMethod::getKey().

int Thread::hashKey JNIEnv *const &    key [inline, static]
 

Hash function.

Parameters:
key  reference to a key
Returns:
hash value

Definition at line 193 of file thread.h.

Referenced by MonThreadTrace::hashKey(), MonThreadMethod::hashKey(), CpuThreadTrace::hashKey(), CpuThreadMethod::hashKey(), AllocThreadTrace::hashKey(), AllocThreadObjectTrace::hashKey(), AllocThreadObjectMethod::hashKey(), AllocThreadObject::hashKey(), and AllocThreadMethod::hashKey().

Buffer & Thread::infoToBin Buffer   b [virtual]
 

Convert info to binary.

This method converts information data to binary format in which it is sent thru communication interface to client.

Parameters:
b  buffer where to append data
Returns:
reference to same Buffer object as argument 'b'

Reimplemented from InfoBinaryFormat.

Definition at line 47 of file thread.cpp.

virtual int Thread::isActive   [inline, virtual]
 

State of object.

Once an object is unactive, it remains unactive forever.

Returns:
0 (not active); 1 (active)

Reimplemented from IdObject.

Definition at line 240 of file thread.h.

Referenced by MonThreadMethod::isActive(), CpuThreadMethod::isActive(), AllocThreadObject::isActive(), and AllocThreadMethod::isActive().

virtual int Thread::isChanged   [inline, virtual]
 

Indication that object has changed its data.

Returns:
0 (no change); 1 (data changed)

Reimplemented from IdObject.

Definition at line 247 of file thread.h.

int Thread::operator== JNIEnv *const &    key [inline]
 

Compares object with given key.

Parameters:
key  key
Returns:
1 (true); 0 (false)
See also:
Hash

Definition at line 185 of file thread.h.


Member Data Documentation

JVMPI_CallTrace Thread::callTrace
 

Call trace for general temporary usage.

There are MAX_TRACE frames.

Definition at line 114 of file thread.h.

Referenced by Sampling::doOneSample().

int Thread::monitorEnter
 

For monitor profiling purposes.

Indicates whether JVMPI_EVENT_MONITOR_CONTENDED_ENTER event occured for this thread. The flag is cleared in JVMPI_EVENT_MONITOR_CONTENDED_ENTERED event.

Definition at line 127 of file thread.h.

Referenced by Prof::event_monitorContendedEnter(), and Prof::event_monitorContendedEntered().

jobjectID Thread::monitorEnterObject
 

For monitor profiling purposes.

Holds the object id of the last JVMPI_EVENT_MONITOR_CONTENDED_ENTER event.

Definition at line 133 of file thread.h.

Referenced by Prof::event_monitorContendedEnter(), and Prof::event_monitorContendedEntered().

unsigned long Thread::monitorEnterTime
 

For monitor profiling purposes.

Holds the time of the last JVMPI_EVENT_MONITOR_CONTENDED_ENTER event.

Definition at line 139 of file thread.h.

Referenced by Prof::event_monitorContendedEnter(), and Prof::event_monitorContendedEntered().


The documentation for this class was generated from the following files:
Generated on Mon Jan 28 14:53:30 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001