diff options
| author | Richard Linden <none@none> | 2014-02-06 11:27:16 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2014-02-06 11:27:16 -0800 |
| commit | 3040b429a3b136b87ddb0ae88ccfa3a7aa71e232 (patch) | |
| tree | 46bf70fda640f925c21d519a41a0d7ebd94c56a0 /indra/llcommon/lltracerecording.cpp | |
| parent | 2ab11c8e34f2349500aef76cd8372ca889020728 (diff) | |
added LL_TRACE_ENABLED to allow disabling of lltrace
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
| -rw-r--r-- | indra/llcommon/lltracerecording.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index d6232d771d..0b10438b9f 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -100,6 +100,7 @@ Recording::~Recording() // brings recording to front of recorder stack, with up to date info void Recording::update() { +#if LL_TRACE_ENABLED if (isStarted()) { mElapsedSeconds += mSamplingTimer.getElapsedTimeF64(); @@ -117,46 +118,57 @@ void Recording::update() mSamplingTimer.reset(); } +#endif } void Recording::handleReset() { +#if LL_TRACE_ENABLED mBuffers.write()->reset(); mElapsedSeconds = F64Seconds(0.0); mSamplingTimer.reset(); +#endif } void Recording::handleStart() { +#if LL_TRACE_ENABLED mSamplingTimer.reset(); mBuffers.setStayUnique(true); // must have thread recorder running on this thread llassert(LLTrace::get_thread_recorder().notNull()); mActiveBuffers = LLTrace::get_thread_recorder()->activate(mBuffers.write()); +#endif } void Recording::handleStop() { +#if LL_TRACE_ENABLED mElapsedSeconds += mSamplingTimer.getElapsedTimeF64(); // must have thread recorder running on this thread llassert(LLTrace::get_thread_recorder().notNull()); LLTrace::get_thread_recorder()->deactivate(mBuffers.write()); mActiveBuffers = NULL; mBuffers.setStayUnique(false); +#endif } void Recording::handleSplitTo(Recording& other) { +#if LL_TRACE_ENABLED mBuffers.write()->handOffTo(*other.mBuffers.write()); +#endif } void Recording::appendRecording( Recording& other ) { +#if LL_TRACE_ENABLED update(); other.update(); mBuffers.write()->append(*other.mBuffers); mElapsedSeconds += other.mElapsedSeconds; +#endif } bool Recording::hasValue(const StatType<TimeBlockAccumulator>& stat) |
