summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@mbp.localdomain>2022-12-12 11:05:24 -0800
committerCallum Prentice <callum@mbp.localdomain>2022-12-12 11:05:24 -0800
commit6daa0a9ecba98fc805a3e76573c894f1d956da8a (patch)
tree8dd833707caf512e580cbe8f2a265d4367103894 /indra/llcommon/lltracerecording.cpp
parenta849c51837c9fad2a6929564f4b3a3446a2f4e9a (diff)
parenta0c3d69c620a92d73a1008f218680fb4d0ef9255 (diff)
Merge branch 'main' into DRTVWR-489-emoji
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index 1613af1dcf..8cbb0db135 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -95,7 +95,7 @@ Recording::~Recording()
// allow recording destruction without thread recorder running,
// otherwise thread shutdown could crash if a recording outlives the thread recorder
// besides, recording construction and destruction is fine without a recorder...just don't attempt to start one
- if (isStarted() && LLTrace::get_thread_recorder().notNull())
+ if (isStarted() && LLTrace::get_thread_recorder() != NULL)
{
LLTrace::get_thread_recorder()->deactivate(mBuffers.write());
}
@@ -112,9 +112,9 @@ void Recording::update()
// must have
llassert(mActiveBuffers != NULL
- && LLTrace::get_thread_recorder().notNull());
+ && LLTrace::get_thread_recorder() != NULL);
- if(!mActiveBuffers->isCurrent())
+ if(!mActiveBuffers->isCurrent() && LLTrace::get_thread_recorder() != NULL)
{
AccumulatorBufferGroup* buffers = mBuffers.write();
LLTrace::get_thread_recorder()->deactivate(buffers);
@@ -144,7 +144,7 @@ void Recording::handleStart()
mSamplingTimer.reset();
mBuffers.setStayUnique(true);
// must have thread recorder running on this thread
- llassert(LLTrace::get_thread_recorder().notNull());
+ llassert(LLTrace::get_thread_recorder() != NULL);
mActiveBuffers = LLTrace::get_thread_recorder()->activate(mBuffers.write());
#endif
}
@@ -155,7 +155,7 @@ void Recording::handleStop()
#if LL_TRACE_ENABLED
mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
// must have thread recorder running on this thread
- llassert(LLTrace::get_thread_recorder().notNull());
+ llassert(LLTrace::get_thread_recorder() != NULL);
LLTrace::get_thread_recorder()->deactivate(mBuffers.write());
mActiveBuffers = NULL;
mBuffers.setStayUnique(false);
@@ -1181,8 +1181,8 @@ void ExtendablePeriodicRecording::handleSplitTo(ExtendablePeriodicRecording& oth
PeriodicRecording& get_frame_recording()
{
- static LLThreadLocalPointer<PeriodicRecording> sRecording(new PeriodicRecording(200, PeriodicRecording::STARTED));
- return *sRecording;
+ static thread_local PeriodicRecording sRecording(200, PeriodicRecording::STARTED);
+ return sRecording;
}
}