From df5127136f9f520aa31c06ddb37ac79b6a8dc16d Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 27 Jul 2021 15:31:15 -0700 Subject: SL-15709: Add Tracy support to viewer --- indra/llcommon/llthread.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llcommon/llthread.cpp') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 6d531d842d..a8cc750437 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(); -- cgit v1.2.3 From 675514bdb372c25b50dd2c42b06633895c86b8ce Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 27 Sep 2021 23:56:06 +0000 Subject: SL-16093 Don't force the console window to be open on developer builds because it causes frame stalls while logging. --- indra/llcommon/llthread.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/llcommon/llthread.cpp') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index a8cc750437..11f5a015f1 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -333,6 +333,7 @@ bool LLThread::runCondition(void) // Stop thread execution if requested until unpaused. void LLThread::checkPause() { + LL_PROFILE_ZONE_SCOPED mDataLock->lock(); // This is in a while loop because the pthread API allows for spurious wakeups. @@ -364,17 +365,20 @@ void LLThread::setQuitting() // static LLThread::id_t LLThread::currentID() { + LL_PROFILE_ZONE_SCOPED return std::this_thread::get_id(); } // static void LLThread::yield() { + LL_PROFILE_ZONE_SCOPED std::this_thread::yield(); } void LLThread::wake() { + LL_PROFILE_ZONE_SCOPED mDataLock->lock(); if(!shouldSleep()) { @@ -385,6 +389,7 @@ void LLThread::wake() void LLThread::wakeLocked() { + LL_PROFILE_ZONE_SCOPED if(!shouldSleep()) { mRunCondition->signal(); @@ -393,11 +398,13 @@ void LLThread::wakeLocked() void LLThread::lockData() { + LL_PROFILE_ZONE_SCOPED mDataLock->lock(); } void LLThread::unlockData() { + LL_PROFILE_ZONE_SCOPED mDataLock->unlock(); } -- cgit v1.2.3 From b504c692554d492113a10ef45427fe0ab0d8a85d Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 12:55:53 -0800 Subject: SL-16606: Add profiler category THREAD --- indra/llcommon/llthread.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llcommon/llthread.cpp') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 11f5a015f1..a807acc56e 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -333,7 +333,7 @@ bool LLThread::runCondition(void) // Stop thread execution if requested until unpaused. void LLThread::checkPause() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mDataLock->lock(); // This is in a while loop because the pthread API allows for spurious wakeups. @@ -365,20 +365,20 @@ void LLThread::setQuitting() // static LLThread::id_t LLThread::currentID() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD return std::this_thread::get_id(); } // static void LLThread::yield() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD std::this_thread::yield(); } void LLThread::wake() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mDataLock->lock(); if(!shouldSleep()) { @@ -389,7 +389,7 @@ void LLThread::wake() void LLThread::wakeLocked() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(!shouldSleep()) { mRunCondition->signal(); @@ -398,13 +398,13 @@ void LLThread::wakeLocked() void LLThread::lockData() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mDataLock->lock(); } void LLThread::unlockData() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD mDataLock->unlock(); } -- cgit v1.2.3