summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2022-04-27 10:27:48 -0700
committerBrad Kittenbrink <brad@lindenlab.com>2022-04-27 10:27:48 -0700
commita3ffa9f006b008b5faad248f700c8c2fbc6b74fd (patch)
treef674d4d4e3ab2d4ef4a7419594ea507506238232 /indra/llcommon/llthread.cpp
parent030d61ac58be38f9f8aafeb68b383d88d670080b (diff)
parentbafa869c21cb8b329f94be6fa930a43d11699082 (diff)
Merge remote-tracking branch 'origin/DRTVWR-546' into DRTVWR-559
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 6d531d842d..a807acc56e 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -135,6 +135,8 @@ void LLThread::threadRun()
set_thread_name(-1, mName.c_str());
#endif
+ LL_PROFILER_SET_THREAD_NAME( mName.c_str() );
+
// this is the first point at which we're actually running in the new thread
mID = currentID();
@@ -331,6 +333,7 @@ bool LLThread::runCondition(void)
// Stop thread execution if requested until unpaused.
void LLThread::checkPause()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->lock();
// This is in a while loop because the pthread API allows for spurious wakeups.
@@ -362,17 +365,20 @@ void LLThread::setQuitting()
// static
LLThread::id_t LLThread::currentID()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
return std::this_thread::get_id();
}
// static
void LLThread::yield()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
std::this_thread::yield();
}
void LLThread::wake()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->lock();
if(!shouldSleep())
{
@@ -383,6 +389,7 @@ void LLThread::wake()
void LLThread::wakeLocked()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
if(!shouldSleep())
{
mRunCondition->signal();
@@ -391,11 +398,13 @@ void LLThread::wakeLocked()
void LLThread::lockData()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->lock();
}
void LLThread::unlockData()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
mDataLock->unlock();
}