From: Marek P. <ma...@us...> - 2001-11-21 22:32:17
|
Update of /cvsroot/javaprofiler/library/src/mon In directory usw-pr-cvs1:/tmp/cvs-serv12170/src/mon Modified Files: Makefile.rules dir.info monStatData.cpp monStatData.h monThreadMethod.cpp monThreadMethod.h monThreadTrace.cpp monThreadTrace.h monTrace.cpp monTrace.h Added Files: monThreadMethodKey.h monThreadTraceKey.h Log Message: some parts completely rewritten; changes in communication interface to make it faster; ported to linux --- NEW FILE: monThreadMethodKey.h --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ #ifndef _MON_THREAD_METHOD_KEY_H_ #define _MON_THREAD_METHOD_KEY_H_ #include "../main/includes.h" /** Key for MonThreadMethod class. ** Used for searching in hash tables. ** ** @author Petr Luner */ struct MonThreadMethodKey { /// thread ID JNIEnv* envId; /// method ID jmethodID methodId; }; #endif // _MON_THREAD_METHOD_KEY_H_ --- NEW FILE: monThreadTraceKey.h --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ #ifndef _MON_THREAD_TRACE_KEY_H_ #define _MON_THREAD_TRACE_KEY_H_ #include "../main/includes.h" #include "../shared/traceKey.h" /** Key for MonThreadTrace class. ** Used for searching in hash tables. ** ** @author Petr Luner */ struct MonThreadTraceKey { /// thread ID JNIEnv* envId; /// trace key TraceKey traceKey; }; #endif // _MON_THREAD_TRACE_KEY_H_ Index: Makefile.rules =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/Makefile.rules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.rules 2001/08/24 17:54:04 1.1 --- Makefile.rules 2001/11/21 22:31:44 1.2 *************** *** 1,15 **** monStatData.o \ ! monStatData.obj: monStatData.cpp ../main/includes.h $(CCC) $(CPPFLAGS) monStatData.cpp monTrace.o \ ! monTrace.obj: monTrace.cpp ../main/includes.h $(CCC) $(CPPFLAGS) monTrace.cpp monThreadMethod.o \ ! monThreadMethod.obj: monThreadMethod.cpp ../main/includes.h $(CCC) $(CPPFLAGS) monThreadMethod.cpp monThreadTrace.o \ ! monThreadTrace.obj: monThreadTrace.cpp ../main/includes.h $(CCC) $(CPPFLAGS) monThreadTrace.cpp --- 1,15 ---- monStatData.o \ ! monStatData.obj: monStatData.cpp $(CCC) $(CPPFLAGS) monStatData.cpp monTrace.o \ ! monTrace.obj: monTrace.cpp $(CCC) $(CPPFLAGS) monTrace.cpp monThreadMethod.o \ ! monThreadMethod.obj: monThreadMethod.cpp $(CCC) $(CPPFLAGS) monThreadMethod.cpp monThreadTrace.o \ ! monThreadTrace.obj: monThreadTrace.cpp $(CCC) $(CPPFLAGS) monThreadTrace.cpp Index: dir.info =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/dir.info,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dir.info 2001/08/24 17:54:04 1.1 --- dir.info 2001/11/21 22:31:44 1.2 *************** *** 1,3 **** FILES = monStatData monThreadMethod monThreadTrace monTrace - CLEAN_FILES = *.pdb *.obj *.o --- 1,2 ---- Index: monStatData.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monStatData.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** monStatData.cpp 2001/09/02 20:14:22 1.3 --- monStatData.cpp 2001/11/21 22:31:44 1.4 *************** *** 33,37 **** */ ! #include "../main/includes.h" void MonStatData::addMonStat(jlong addHits, jlong addTime) { --- 33,37 ---- */ ! #include "../mon/monStatData.h" void MonStatData::addMonStat(jlong addHits, jlong addTime) { Index: monStatData.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monStatData.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** monStatData.h 2001/09/23 16:50:15 1.3 --- monStatData.h 2001/11/21 22:31:44 1.4 *************** *** 36,39 **** --- 36,44 ---- #define _MON_STAT_DATA_H_ + #include "../main/includes.h" + #include "../commun/binaryFormat.h" + #include "../commun/statDataModification.h" + #include "../commun/buffer.h" + /** Statistics data for monitor profiling. ** This class is used as a base class for other classes *************** *** 47,51 **** class MonStatData: public DataBinaryFormat, public StatDataModification { - public: --- 52,55 ---- *************** *** 59,91 **** ** Indicates whether blocking occures in wait() method. ** It is neccessary to count hits correctly. */ ! char wait; public: ! /** Constructor. ** Performs statistics initialization. */ ! MonStatData() { ! time = (jlong)0; ! hits = (jlong)0; ! wait = 0; ! }; /** Updates statistics. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat(jlong addHits, jlong addTime); /** Converts statistics data to a binary format used ** for communication with client. ** ! ** @param b buffer where to append data ** ** @return reference to same Buffer object as argument 'b' */ ! virtual Buffer& dataToBin(Buffer& b); public: --- 63,100 ---- ** Indicates whether blocking occures in wait() method. ** It is neccessary to count hits correctly. */ ! ! int wait; public: ! /** Default constructor. ** Performs statistics initialization. */ ! MonStatData() : ! time( 0), ! hits( 0), ! wait( 0) + {} + + /// Destructor. + virtual ~MonStatData() {} + /** Updates statistics. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat( jlong addHits, jlong addTime); /** Converts statistics data to a binary format used ** for communication with client. ** ! ** @param b buffer where to append data ** ** @return reference to same Buffer object as argument 'b' */ ! virtual Buffer& dataToBin( Buffer& b); public: *************** *** 97,99 **** #endif // _MON_STAT_DATA_H_ - --- 106,107 ---- Index: monThreadMethod.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monThreadMethod.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** monThreadMethod.cpp 2001/09/18 22:19:28 1.3 --- monThreadMethod.cpp 2001/11/21 22:31:44 1.4 *************** *** 33,40 **** */ ! #include "../main/includes.h" - Allocator MonThreadMethod::_allocator( sizeof( MonThreadMethod)); - void MonThreadMethod::addMonStat(jlong addHits, jlong addTime) { --- 33,45 ---- */ ! #include "../mon/monThreadMethod.h" ! #include "../shared/method.h" ! #include "../prof/prof.h" ! #include "../mon/monThreadTrace.h" ! ! #ifdef USE_ALLOCATOR ! Allocator MonThreadMethod::_allocator; ! #endif void MonThreadMethod::addMonStat(jlong addHits, jlong addTime) { *************** *** 52,54 **** --- 57,88 ---- tt = threadTraces.next(tt); } + } + + const MonThreadMethodKey& MonThreadMethod::getKey( MonThreadMethodKey& key) { + + thread->getKey( key.envId); + method->getKey( key.methodId); + + return key; + } + + int MonThreadMethod::operator==( const MonThreadMethodKey& key) { + + return (*thread == key.envId) && (*method == key.methodId); + } + + int MonThreadMethod::hashKey( const MonThreadMethodKey& key) { + + return Thread::hashKey( key.envId) ^ Method::hashKey( key.methodId); + } + + int MonThreadMethod::isActive() { + + return (method->isActive() && thread->isActive()); + } + + void MonThreadMethod::setUnchanged() { + + IdObject::setUnchanged(); + clearDataChanged(); } Index: monThreadMethod.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monThreadMethod.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** monThreadMethod.h 2001/09/02 20:14:22 1.2 --- monThreadMethod.h 2001/11/21 22:31:44 1.3 *************** *** 36,53 **** #define _MON_THREAD_METHOD_H_ ! /** Key for MonThreadMethod class. ! ** Used for searching in hash tables. ! ** ! ** @author Petr Luner */ ! ! struct MonThreadMethodKey { - /// thread ID - JNIEnv* envId; - - /// method ID - jmethodID methodId; - }; - /** Crossroad of threads and methods for monitor profiling. ** This class consists of statistic information about --- 36,48 ---- #define _MON_THREAD_METHOD_H_ ! #include "../main/includes.h" ! #include "../list/listItem.h" ! #include "../commun2/idObject.h" ! #include "../mon/monStatData.h" ! #include "../list/list.h" ! #include "../mon/monThreadTrace.h" ! #include "../mon/monThreadMethodKey.h" ! #include "../allocator/allocator.h" /** Crossroad of threads and methods for monitor profiling. ** This class consists of statistic information about *************** *** 58,66 **** ** @author Petr Luner */ ! class MonThreadMethod: public IdObject, ! public LI1, ! public LI2, ! public LI3, ! public MonStatData { public: --- 53,61 ---- ** @author Petr Luner */ ! class MonThreadMethod: public LI1, ! public LI2, ! public LI3, ! public IdObject, ! public MonStatData { public: *************** *** 81,112 **** method( NULL), thread( NULL) ! {}; /** Updates monitor statistics. ** Also updates monitor statistics of corresponding method. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat(jlong addHits, jlong addTime); /** Retrieves object's key. ** ! ** @param key where to store the key ! ** @return key ** ** @see Hash */ ! const MonThreadMethodKey& getKey(MonThreadMethodKey& key) { ! ! thread->getKey(key.envId); ! method->getKey(key.methodId); ! return key; ! } /** Compares object with given key. ** ** @param key key ** @return 1 (true); ** 0 (false) --- 76,107 ---- method( NULL), thread( NULL) + + {} ! /// Destructor. ! virtual ~MonThreadMethod() {} /** Updates monitor statistics. ** Also updates monitor statistics of corresponding method. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat( jlong addHits, jlong addTime); /** Retrieves object's key. ** ! ** @param key where to store the key ** + ** @return key + ** ** @see Hash */ ! const MonThreadMethodKey& getKey(MonThreadMethodKey& key); /** Compares object with given key. ** ** @param key key + ** ** @return 1 (true); ** 0 (false) *************** *** 114,131 **** ** @see Hash */ ! int operator==(const MonThreadMethodKey& key) { ! ! return (*thread == key.envId) && (*method == key.methodId); ! } /** Hash function. ** ! ** @param reference to a key ** @return hash value */ - - static int hashKey(const MonThreadMethodKey& key) { ! return Thread::hashKey(key.envId) ^ Method::hashKey(key.methodId); ! } /** Performs deactivation. */ --- 109,121 ---- ** @see Hash */ ! int operator==( const MonThreadMethodKey& key); /** Hash function. ** ! ** @param key reference to a key ! ** ** @return hash value */ ! static int hashKey( const MonThreadMethodKey& key); /** Performs deactivation. */ *************** *** 133,136 **** --- 123,127 ---- void deactivate(); + #ifdef USE_ALLOCATOR private: *************** *** 142,150 **** /** Overloaded new() operator. */ ! void* operator new( size_t) { return _allocator.get();} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} public: --- 133,142 ---- /** Overloaded new() operator. */ ! void* operator new( size_t sz) { return _allocator.get( sz);} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} + #endif public: *************** *** 152,156 **** /** Class identification. ** ! ** @return unique class type identified */ virtual eClassIdent getClassIdent() { return MON_THREAD_METHOD;} --- 144,148 ---- /** Class identification. ** ! ** @return unique class type identifier */ virtual eClassIdent getClassIdent() { return MON_THREAD_METHOD;} *************** *** 162,166 **** ** 1 (active) */ ! virtual int isActive() { return (method->isActive() && thread->isActive());} /** Indication that object has changed its data. --- 154,158 ---- ** 1 (active) */ ! virtual int isActive(); /** Indication that object has changed its data. *************** *** 173,181 **** /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged() { ! ! IdObject::setUnchanged(); ! clearDataChanged(); ! } }; --- 165,169 ---- /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged(); }; Index: monThreadTrace.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monThreadTrace.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** monThreadTrace.cpp 2001/09/18 22:19:28 1.3 --- monThreadTrace.cpp 2001/11/21 22:31:44 1.4 *************** *** 33,39 **** */ ! #include "../main/includes.h" ! Allocator MonThreadTrace::_allocator( sizeof( MonThreadTrace)); void MonThreadTrace::addMonStat(jlong addHits, jlong addTime) { --- 33,45 ---- */ ! #include "../mon/monThreadTrace.h" ! #include "../mon/monThreadMethod.h" ! #include "../shared/thread.h" ! #include "../mon/monTrace.h" ! #include "../prof/prof.h" ! #ifdef USE_ALLOCATOR ! Allocator MonThreadTrace::_allocator; ! #endif void MonThreadTrace::addMonStat(jlong addHits, jlong addTime) { *************** *** 46,49 **** void MonThreadTrace::deactivate() { ! Prof::prof().activeMonThreadTraces.removeNoRehash(this); } --- 52,84 ---- void MonThreadTrace::deactivate() { ! Prof::prof().activeMonThreadTraces.removeNoRehash(this); ! } ! ! const MonThreadTraceKey& MonThreadTrace::getKey( MonThreadTraceKey& key) { ! ! threadMethod->thread->getKey(key.envId); ! trace->getKey(key.traceKey); ! ! return key; ! } ! ! int MonThreadTrace::operator==( const MonThreadTraceKey& key) { ! ! return (*threadMethod->thread == key.envId) && (*trace == key.traceKey); ! } ! ! int MonThreadTrace::hashKey( const MonThreadTraceKey& key) { ! ! return Thread::hashKey(key.envId) ^ Trace::hashKey(key.traceKey); ! } ! ! int MonThreadTrace::isActive() { ! ! return (trace->isActive() && threadMethod->isActive()); ! } ! ! void MonThreadTrace::setUnchanged() { ! ! IdObject::setUnchanged(); ! clearDataChanged(); } Index: monThreadTrace.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monThreadTrace.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** monThreadTrace.h 2001/09/02 20:14:22 1.2 --- monThreadTrace.h 2001/11/21 22:31:44 1.3 *************** *** 36,53 **** #define _MON_THREAD_TRACE_H_ ! /** Key for MonThreadTrace class. ! ** Used for searching in hash tables. ! ** ! ** @author Petr Luner */ ! ! struct MonThreadTraceKey { - /// thread ID - JNIEnv* envId; - - /// trace key - TraceKey traceKey; - }; - /** Crossroad of threads and traces for monitor profiling. ** This class consists of statistic information about --- 36,46 ---- #define _MON_THREAD_TRACE_H_ ! #include "../main/includes.h" ! #include "../list/listItem.h" ! #include "../commun2/idObject.h" ! #include "../mon/monStatData.h" ! #include "../mon/monThreadTraceKey.h" ! #include "../allocator/allocator.h" /** Crossroad of threads and traces for monitor profiling. ** This class consists of statistic information about *************** *** 58,66 **** ** @author Petr Luner */ ! class MonThreadTrace: public IdObject, ! public LI1, ! public LI2, ! public LI3, ! public MonStatData { public: --- 51,59 ---- ** @author Petr Luner */ ! class MonThreadTrace: public LI1, ! public LI2, ! public LI3, ! public IdObject, ! public MonStatData { public: *************** *** 78,83 **** threadMethod( NULL), trace( NULL) ! {}; /** Updates monitor statistics. --- 71,79 ---- threadMethod( NULL), trace( NULL) + + {} ! /// Destructor. ! virtual ~MonThreadTrace() {} /** Updates monitor statistics. *************** *** 85,110 **** ** and MonThreadMethod. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat(jlong addHits, jlong addTime); /** Retrieves object's key. ** ! ** @param key where to store the key ** @return key ** ** @see Hash */ ! const MonThreadTraceKey& getKey(MonThreadTraceKey& key) { ! ! threadMethod->thread->getKey(key.envId); ! trace->getKey(key.traceKey); ! return key; ! } /** Compares object with given key. ** ** @param key key ** @return 1 (true); ** 0 (false) --- 81,103 ---- ** and MonThreadMethod. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat( jlong addHits, jlong addTime); /** Retrieves object's key. ** ! ** @param key where to store the key ! ** ** @return key ** ** @see Hash */ ! const MonThreadTraceKey& getKey( MonThreadTraceKey& key); /** Compares object with given key. ** ** @param key key + ** ** @return 1 (true); ** 0 (false) *************** *** 112,129 **** ** @see Hash */ ! int operator==(const MonThreadTraceKey& key) { ! ! return (*threadMethod->thread == key.envId) && (*trace == key.traceKey); ! } /** Hash function. ** ! ** @param reference to a key ** @return hash value */ - - static int hashKey(const MonThreadTraceKey& key) { ! return Thread::hashKey(key.envId) ^ Trace::hashKey(key.traceKey); ! } /** Performs deactivation. */ --- 105,117 ---- ** @see Hash */ ! int operator==( const MonThreadTraceKey& key); /** Hash function. ** ! ** @param key reference to a key ! ** ** @return hash value */ ! static int hashKey( const MonThreadTraceKey& key); /** Performs deactivation. */ *************** *** 131,134 **** --- 119,123 ---- void deactivate(); + #ifdef USE_ALLOCATOR private: *************** *** 140,148 **** /** Overloaded new() operator. */ ! void* operator new( size_t) { return _allocator.get();} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} public: --- 129,138 ---- /** Overloaded new() operator. */ ! void* operator new( size_t sz) { return _allocator.get( sz);} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} + #endif public: *************** *** 150,154 **** /** Class identification. ** ! ** @return unique class type identified */ virtual eClassIdent getClassIdent() { return MON_THREAD_TRACE;} --- 140,144 ---- /** Class identification. ** ! ** @return unique class type identifier */ virtual eClassIdent getClassIdent() { return MON_THREAD_TRACE;} *************** *** 160,164 **** ** 1 (active) */ ! virtual int isActive() { return (trace->isActive() && threadMethod->isActive());} /** Indication that object has changed its data. --- 150,154 ---- ** 1 (active) */ ! virtual int isActive(); /** Indication that object has changed its data. *************** *** 171,179 **** /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged() { ! ! IdObject::setUnchanged(); ! clearDataChanged(); ! } }; --- 161,165 ---- /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged(); }; Index: monTrace.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monTrace.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** monTrace.cpp 2001/09/18 22:19:28 1.3 --- monTrace.cpp 2001/11/21 22:31:44 1.4 *************** *** 33,39 **** */ ! #include "../main/includes.h" ! Allocator MonTrace::_allocator( sizeof( MonTrace)); void MonTrace::addMonStat(jlong addHits, jlong addTime) { --- 33,43 ---- */ ! #include "../mon/monTrace.h" ! #include "../shared/method.h" ! #include "../prof/prof.h" ! #ifdef USE_ALLOCATOR ! Allocator MonTrace::_allocator; ! #endif void MonTrace::addMonStat(jlong addHits, jlong addTime) { *************** *** 46,48 **** --- 50,63 ---- Prof::prof().activeMonTraces.removeNoRehash(this); + } + + int MonTrace::isActive() { + + return method->isActive(); + } + + void MonTrace::setUnchanged() { + + IdObject::setUnchanged(); + clearDataChanged(); } Index: monTrace.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monTrace.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** monTrace.h 2001/09/02 20:14:22 1.2 --- monTrace.h 2001/11/21 22:31:44 1.3 *************** *** 36,39 **** --- 36,48 ---- #define _MON_TRACE_H_ + #include "../main/includes.h" + #include "../list/listItem.h" + #include "../commun2/idObject.h" + #include "../shared/trace.h" + #include "../mon/monStatData.h" + #include "../list/list.h" + #include "../mon/monThreadTrace.h" + #include "../allocator/allocator.h" + /** Trace for monitor profiling. ** We decided to use different traces *************** *** 44,52 **** ** @author Petr Luner */ ! class MonTrace: public IdObject, ! public LI1, ! public LI2, public Trace, ! public MonStatData { public: --- 53,61 ---- ** @author Petr Luner */ ! class MonTrace: public LI1, ! public LI2, ! public IdObject, public Trace, ! public MonStatData { public: *************** *** 63,76 **** method( NULL) ! {}; /** Updates monitor statistics. ** Also updates monitor statistics of corresponding method. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat(jlong addHits, jlong addTime); /** Performs deactivation. */ --- 72,88 ---- method( NULL) + + {} ! /// Destructor. ! virtual ~MonTrace() {} /** Updates monitor statistics. ** Also updates monitor statistics of corresponding method. ** ! ** @param addHits number of hits to be added ! ** @param addTime wait time to be added */ ! virtual void addMonStat( jlong addHits, jlong addTime); /** Performs deactivation. */ *************** *** 78,81 **** --- 90,94 ---- void deactivate(); + #ifdef USE_ALLOCATOR private: *************** *** 87,95 **** /** Overloaded new() operator. */ ! void* operator new( size_t) { return _allocator.get();} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} public: --- 100,109 ---- /** Overloaded new() operator. */ ! void* operator new( size_t sz) { return _allocator.get( sz);} /** Overloaded delete() operator. */ void operator delete( void* unit) { _allocator.put( unit);} + #endif public: *************** *** 97,101 **** /** Class identification. ** ! ** @return unique class type identified */ virtual eClassIdent getClassIdent() { return MON_TRACE;} --- 111,115 ---- /** Class identification. ** ! ** @return unique class type identifier */ virtual eClassIdent getClassIdent() { return MON_TRACE;} *************** *** 107,111 **** ** 1 (active) */ ! virtual int isActive() { return method->isActive();} /** Indication that object has changed its data. --- 121,125 ---- ** 1 (active) */ ! virtual int isActive(); /** Indication that object has changed its data. *************** *** 118,126 **** /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged() { ! ! IdObject::setUnchanged(); ! clearDataChanged(); ! } }; --- 132,136 ---- /** Set the structure is unchanged although it may not be. */ ! virtual void setUnchanged(); }; |