summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltrace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lltrace.cpp')
-rw-r--r--indra/llcommon/lltrace.cpp50
1 files changed, 9 insertions, 41 deletions
diff --git a/indra/llcommon/lltrace.cpp b/indra/llcommon/lltrace.cpp
index 59a4b42c97..3dffbe6d4a 100644
--- a/indra/llcommon/lltrace.cpp
+++ b/indra/llcommon/lltrace.cpp
@@ -30,58 +30,26 @@
#include "lltracethreadrecorder.h"
#include "llfasttimer.h"
-static S32 sInitializationCount = 0;
-
namespace LLTrace
{
-static MasterThreadRecorder* gUIThreadRecorder = NULL;
-
-void init()
-{
- if (sInitializationCount++ == 0)
- {
- gUIThreadRecorder = new MasterThreadRecorder();
- }
-}
-
-bool isInitialized()
-{
- return sInitializationCount > 0;
-}
-
-void cleanup()
+TraceBase::TraceBase( const char* name, const char* description )
+: mName(name),
+ mDescription(description ? description : "")
{
- if (--sInitializationCount == 0)
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+ if (LLTrace::get_master_thread_recorder() != NULL)
{
- delete gUIThreadRecorder;
- gUIThreadRecorder = NULL;
+ llerrs << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << llendl;
}
+#endif
}
-MasterThreadRecorder& getUIThreadRecorder()
+const char* TraceBase::getUnitLabel()
{
- llassert(gUIThreadRecorder != NULL);
- return *gUIThreadRecorder;
+ return "";
}
-LLThreadLocalPointer<ThreadRecorder>& get_thread_recorder_ptr()
-{
- static LLThreadLocalPointer<ThreadRecorder> s_thread_recorder;
- return s_thread_recorder;
-}
-
-const LLThreadLocalPointer<ThreadRecorder>& get_thread_recorder()
-{
- return get_thread_recorder_ptr();
-}
-
-void set_thread_recorder(ThreadRecorder* recorder)
-{
- get_thread_recorder_ptr() = recorder;
-}
-
-
TimeBlockTreeNode::TimeBlockTreeNode()
: mBlock(NULL),
mParent(NULL),