Browse Source

more and better tau instrumenting

David Rose 19 years ago
parent
commit
a2dc081676

+ 6 - 6
dtool/src/dtoolbase/mutexPosixImpl.I

@@ -52,7 +52,7 @@ INLINE MutexPosixImpl::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexPosixImpl::
 INLINE void MutexPosixImpl::
 lock() {
 lock() {
-  TAU_PROFILE("MutexPosixImpl::lock", " ", TAU_USER);
+  TAU_PROFILE("void MutexPosixImpl::lock", " ", TAU_USER);
   int result = pthread_mutex_lock(&_lock);
   int result = pthread_mutex_lock(&_lock);
   assert(result == 0);
   assert(result == 0);
 }
 }
@@ -64,7 +64,7 @@ lock() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE bool MutexPosixImpl::
 INLINE bool MutexPosixImpl::
 try_lock() {
 try_lock() {
-  TAU_PROFILE("MutexPosixImpl::try_lock", " ", TAU_USER);
+  TAU_PROFILE("bool MutexPosixImpl::try_lock", " ", TAU_USER);
   int result = pthread_mutex_trylock(&_lock);
   int result = pthread_mutex_trylock(&_lock);
   assert(result == 0 || result == EBUSY);
   assert(result == 0 || result == EBUSY);
   return (result == 0);
   return (result == 0);
@@ -77,7 +77,7 @@ try_lock() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexPosixImpl::
 INLINE void MutexPosixImpl::
 release() {
 release() {
-  TAU_PROFILE("MutexPosixImpl::release", " ", TAU_USER);
+  TAU_PROFILE("void MutexPosixImpl::release", " ", TAU_USER);
   int result = pthread_mutex_unlock(&_lock);
   int result = pthread_mutex_unlock(&_lock);
   assert(result == 0);
   assert(result == 0);
 }
 }
@@ -117,7 +117,7 @@ INLINE ReMutexPosixImpl::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void ReMutexPosixImpl::
 INLINE void ReMutexPosixImpl::
 lock() {
 lock() {
-  TAU_PROFILE("ReMutexPosixImpl::lock", " ", TAU_USER);
+  TAU_PROFILE("void ReMutexPosixImpl::lock", " ", TAU_USER);
   int result = pthread_mutex_lock(&_lock);
   int result = pthread_mutex_lock(&_lock);
   assert(result == 0);
   assert(result == 0);
 }
 }
@@ -129,7 +129,7 @@ lock() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE bool ReMutexPosixImpl::
 INLINE bool ReMutexPosixImpl::
 try_lock() {
 try_lock() {
-  TAU_PROFILE("ReMutexPosixImpl::try_lock", " ", TAU_USER);
+  TAU_PROFILE("bool ReMutexPosixImpl::try_lock", " ", TAU_USER);
   int result = pthread_mutex_trylock(&_lock);
   int result = pthread_mutex_trylock(&_lock);
   assert(result == 0 || result == EBUSY);
   assert(result == 0 || result == EBUSY);
   return (result == 0);
   return (result == 0);
@@ -142,7 +142,7 @@ try_lock() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void ReMutexPosixImpl::
 INLINE void ReMutexPosixImpl::
 release() {
 release() {
-  TAU_PROFILE("ReMutexPosixImpl::release", " ", TAU_USER);
+  TAU_PROFILE("void ReMutexPosixImpl::release", " ", TAU_USER);
   int result = pthread_mutex_unlock(&_lock);
   int result = pthread_mutex_unlock(&_lock);
   assert(result == 0);
   assert(result == 0);
 }
 }

+ 3 - 3
panda/src/pipeline/mutexDebug.I

@@ -54,7 +54,7 @@ operator = (const MutexDebug &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexDebug::
 INLINE void MutexDebug::
 lock() const {
 lock() const {
-  TAU_PROFILE("MutexDebug::lock()", " ", TAU_USER);
+  TAU_PROFILE("void MutexDebug::lock()", " ", TAU_USER);
   _global_mutex.lock();
   _global_mutex.lock();
   ((MutexDebug *)this)->do_lock();
   ((MutexDebug *)this)->do_lock();
   _global_mutex.release();
   _global_mutex.release();
@@ -72,7 +72,7 @@ lock() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexDebug::
 INLINE void MutexDebug::
 release() const {
 release() const {
-  TAU_PROFILE("MutexDebug::release()", " ", TAU_USER);
+  TAU_PROFILE("void MutexDebug::release()", " ", TAU_USER);
   _global_mutex.lock();
   _global_mutex.lock();
   ((MutexDebug *)this)->do_release();
   ((MutexDebug *)this)->do_release();
   _global_mutex.release();
   _global_mutex.release();
@@ -90,7 +90,7 @@ release() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE bool MutexDebug::
 INLINE bool MutexDebug::
 debug_is_locked() const {
 debug_is_locked() const {
-  TAU_PROFILE("MutexDebug::debug_is_locked()", " ", TAU_USER);
+  TAU_PROFILE("bool MutexDebug::debug_is_locked()", " ", TAU_USER);
   _global_mutex.lock();
   _global_mutex.lock();
   bool is_locked = do_debug_is_locked();
   bool is_locked = do_debug_is_locked();
   _global_mutex.release();
   _global_mutex.release();

+ 2 - 2
panda/src/pipeline/mutexDirect.I

@@ -72,7 +72,7 @@ operator = (const MutexDirect &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexDirect::
 INLINE void MutexDirect::
 lock() const {
 lock() const {
-  TAU_PROFILE("MutexDirect::lock()", " ", TAU_USER);
+  TAU_PROFILE("void MutexDirect::lock()", " ", TAU_USER);
   ((MutexDirect *)this)->_impl.lock();
   ((MutexDirect *)this)->_impl.lock();
 }
 }
 
 
@@ -88,7 +88,7 @@ lock() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void MutexDirect::
 INLINE void MutexDirect::
 release() const {
 release() const {
-  TAU_PROFILE("MutexDirect::release()", " ", TAU_USER);
+  TAU_PROFILE("void MutexDirect::release()", " ", TAU_USER);
   ((MutexDirect *)this)->_impl.release();
   ((MutexDirect *)this)->_impl.release();
 }
 }
 
 

+ 16 - 0
panda/src/pipeline/pipelineCyclerDummyImpl.I

@@ -81,6 +81,7 @@ INLINE PipelineCyclerDummyImpl::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 lock() {
 lock() {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::lock()", " ", TAU_USER);
   nassertv(!_locked);
   nassertv(!_locked);
   _locked = true;
   _locked = true;
 }
 }
@@ -93,6 +94,7 @@ lock() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 release() {
 release() {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::release()", " ", TAU_USER);
   nassertv(_locked);
   nassertv(_locked);
   _locked = false;
   _locked = false;
 }
 }
@@ -110,6 +112,7 @@ release() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE const CycleData *PipelineCyclerDummyImpl::
 INLINE const CycleData *PipelineCyclerDummyImpl::
 read() const {
 read() const {
+  TAU_PROFILE("const CycleData *PipelineCyclerDummyImpl::read()", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   ((PipelineCyclerDummyImpl *)this)->_read_count++;
   ((PipelineCyclerDummyImpl *)this)->_read_count++;
@@ -128,6 +131,7 @@ read() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 increment_read(const CycleData *pointer) const {
 increment_read(const CycleData *pointer) const {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::increment_read(const CycleData *)", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   nassertv(pointer == _data);
   nassertv(pointer == _data);
@@ -143,6 +147,7 @@ increment_read(const CycleData *pointer) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 release_read(const CycleData *pointer) const {
 release_read(const CycleData *pointer) const {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::release_read(const CycleData *)", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   nassertv(pointer == _data);
   nassertv(pointer == _data);
@@ -168,6 +173,7 @@ release_read(const CycleData *pointer) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE CycleData *PipelineCyclerDummyImpl::
 INLINE CycleData *PipelineCyclerDummyImpl::
 write() {
 write() {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::write()", " ", TAU_USER);
   _write_count++;
   _write_count++;
 
 
   // It's an error to grab a write pointer while someone else holds a
   // It's an error to grab a write pointer while someone else holds a
@@ -191,6 +197,7 @@ write() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE CycleData *PipelineCyclerDummyImpl::
 INLINE CycleData *PipelineCyclerDummyImpl::
 elevate_read(const CycleData *pointer) {
 elevate_read(const CycleData *pointer) {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read(const CycleData *)", " ", TAU_USER);
   release_read(pointer);
   release_read(pointer);
   return write();
   return write();
 }
 }
@@ -205,6 +212,7 @@ elevate_read(const CycleData *pointer) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE CycleData *PipelineCyclerDummyImpl::
 INLINE CycleData *PipelineCyclerDummyImpl::
 elevate_read_upstream(const CycleData *pointer, bool force_to_0) {
 elevate_read_upstream(const CycleData *pointer, bool force_to_0) {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read_upstream(const CycleData *, bool)", " ", TAU_USER);
   release_read(pointer);
   release_read(pointer);
   return write_upstream(force_to_0);
   return write_upstream(force_to_0);
 }
 }
@@ -218,6 +226,7 @@ elevate_read_upstream(const CycleData *pointer, bool force_to_0) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 increment_write(CycleData *pointer) const {
 increment_write(CycleData *pointer) const {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::increment_write(CycleData *)", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   nassertv(pointer == _data);
   nassertv(pointer == _data);
@@ -233,6 +242,7 @@ increment_write(CycleData *pointer) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 release_write(CycleData *pointer) {
 release_write(CycleData *pointer) {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::release_write(CycleData *)", " ", TAU_USER);
   nassertv(pointer == _data);
   nassertv(pointer == _data);
   nassertv(_write_count > 0);
   nassertv(_write_count > 0);
   _write_count--;
   _write_count--;
@@ -261,6 +271,7 @@ get_num_stages() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE const CycleData *PipelineCyclerDummyImpl::
 INLINE const CycleData *PipelineCyclerDummyImpl::
 read_stage(int n) const {
 read_stage(int n) const {
+  TAU_PROFILE("const CycleData *PipelineCyclerDummyImpl::read_stage(int)", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   nassertr(n == 0, NULL);
   nassertr(n == 0, NULL);
@@ -279,6 +290,7 @@ read_stage(int n) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 release_read_stage(int n, const CycleData *pointer) const {
 release_read_stage(int n, const CycleData *pointer) const {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::release_read_stage(int, const CycleData *)", " ", TAU_USER);
   // This function isn't truly const, but it doesn't change the data
   // This function isn't truly const, but it doesn't change the data
   // in any meaningful way, so we pretend it is.
   // in any meaningful way, so we pretend it is.
   nassertv(n == 0);
   nassertv(n == 0);
@@ -318,6 +330,7 @@ release_read_stage(int n, const CycleData *pointer) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CycleData *PipelineCyclerDummyImpl::
 CycleData *PipelineCyclerDummyImpl::
 write_upstream(bool) {
 write_upstream(bool) {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::write_upstream(bool)", " ", TAU_USER);
   _write_count++;
   _write_count++;
   return _data;
   return _data;
 }
 }
@@ -334,6 +347,7 @@ write_upstream(bool) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE CycleData *PipelineCyclerDummyImpl::
 INLINE CycleData *PipelineCyclerDummyImpl::
 write_stage(int n) {
 write_stage(int n) {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::write_stage(int)", " ", TAU_USER);
   nassertr(n == 0, (CycleData *)NULL);
   nassertr(n == 0, (CycleData *)NULL);
   _write_count++;
   _write_count++;
   return _data;
   return _data;
@@ -350,6 +364,7 @@ write_stage(int n) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE CycleData *PipelineCyclerDummyImpl::
 INLINE CycleData *PipelineCyclerDummyImpl::
 elevate_read_stage(int n, const CycleData *pointer) {
 elevate_read_stage(int n, const CycleData *pointer) {
+  TAU_PROFILE("CycleData *PipelineCyclerDummyImpl::elevate_read_stage(int, CycleData *)", " ", TAU_USER);
   nassertr(n == 0, NULL);
   nassertr(n == 0, NULL);
   release_read(pointer);
   release_read(pointer);
   return write();
   return write();
@@ -363,6 +378,7 @@ elevate_read_stage(int n, const CycleData *pointer) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void PipelineCyclerDummyImpl::
 INLINE void PipelineCyclerDummyImpl::
 release_write_stage(int n, CycleData *pointer) {
 release_write_stage(int n, CycleData *pointer) {
+  TAU_PROFILE("void PipelineCyclerDummyImpl::release_write_stage(int, CycleData *)", " ", TAU_USER);
   nassertv(n == 0 && pointer == _data);
   nassertv(n == 0 && pointer == _data);
   nassertv(_write_count > 0);
   nassertv(_write_count > 0);
   _write_count--;
   _write_count--;

+ 1 - 1
panda/src/pipeline/pipelineCyclerTrueImpl.I

@@ -55,7 +55,7 @@ release() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE const CycleData *PipelineCyclerTrueImpl::
 INLINE const CycleData *PipelineCyclerTrueImpl::
 read() const {
 read() const {
-  TAU_PROFILE("const CycleData PipelineCyclerTrueImpl::read()", " ", TAU_USER);
+  TAU_PROFILE("const CycleData *PipelineCyclerTrueImpl::read()", " ", TAU_USER);
   int pipeline_stage = Thread::get_current_pipeline_stage();
   int pipeline_stage = Thread::get_current_pipeline_stage();
   nassertr(pipeline_stage >= 0 && pipeline_stage < _num_stages, NULL);
   nassertr(pipeline_stage >= 0 && pipeline_stage < _num_stages, NULL);
   _lock.lock();
   _lock.lock();

+ 2 - 0
panda/src/pipeline/reMutexDirect.I

@@ -84,6 +84,7 @@ operator = (const ReMutexDirect &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void ReMutexDirect::
 INLINE void ReMutexDirect::
 lock() const {
 lock() const {
+  TAU_PROFILE("void ReMutexDirect::lock()", " ", TAU_USER);
 #ifdef HAVE_REMUTEXIMPL
 #ifdef HAVE_REMUTEXIMPL
   ((ReMutexDirect *)this)->_impl.lock();
   ((ReMutexDirect *)this)->_impl.lock();
 #else
 #else
@@ -103,6 +104,7 @@ lock() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void ReMutexDirect::
 INLINE void ReMutexDirect::
 release() const {
 release() const {
+  TAU_PROFILE("void ReMutexDirect::release()", " ", TAU_USER);
 #ifdef HAVE_REMUTEXIMPL
 #ifdef HAVE_REMUTEXIMPL
   ((ReMutexDirect *)this)->_impl.release();
   ((ReMutexDirect *)this)->_impl.release();
 #else
 #else