diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-01-13 12:55:53 -0800 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-01-13 12:55:53 -0800 |
commit | a8796a1054035fd5a83e451b9fe6363b181b7422 (patch) | |
tree | 403756b04c7f559aa98b626ac9a8f644a73f2b9b /indra/llcommon/llmutex.cpp | |
parent | bcc46f7df8fb783d87387474677d231dc43770a5 (diff) |
SL-16606: Add profiler category THREAD
Diffstat (limited to 'indra/llcommon/llmutex.cpp')
-rw-r--r-- | indra/llcommon/llmutex.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp index a49002b5dc..0273dd5970 100644 --- a/indra/llcommon/llmutex.cpp +++ b/indra/llcommon/llmutex.cpp @@ -44,7 +44,7 @@ LLMutex::~LLMutex() void LLMutex::lock() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(isSelfLocked()) { //redundant lock mCount++; @@ -66,7 +66,7 @@ void LLMutex::lock() void LLMutex::unlock() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if (mCount > 0) { //not the root unlock mCount--; @@ -87,7 +87,7 @@ void LLMutex::unlock() bool LLMutex::isLocked() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if (!mMutex.try_lock()) { return true; @@ -111,7 +111,7 @@ LLThread::id_t LLMutex::lockingThread() const bool LLMutex::trylock() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(isSelfLocked()) { //redundant lock mCount++; @@ -150,20 +150,20 @@ LLCondition::~LLCondition() void LLCondition::wait() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD std::unique_lock< std::mutex > lock(mMutex); mCond.wait(lock); } void LLCondition::signal() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mCond.notify_one(); } void LLCondition::broadcast() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mCond.notify_all(); } @@ -173,7 +173,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex) : mMutex(mutex), mLocked(false) { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if (mMutex) mLocked = mMutex->trylock(); } @@ -182,7 +182,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms) : mMutex(mutex), mLocked(false) { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if (!mMutex) return; @@ -197,7 +197,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms) LLMutexTrylock::~LLMutexTrylock() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if (mMutex && mLocked) mMutex->unlock(); } @@ -209,7 +209,7 @@ LLMutexTrylock::~LLMutexTrylock() // LLScopedLock::LLScopedLock(std::mutex* mutex) : mMutex(mutex) { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(mutex) { mutex->lock(); @@ -228,7 +228,7 @@ LLScopedLock::~LLScopedLock() void LLScopedLock::unlock() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(mLocked) { mMutex->unlock(); |