diff options
author | Richard Linden <none@none> | 2013-01-03 00:30:54 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-01-03 00:30:54 -0800 |
commit | cda2cdda511eb2f7a58e284db2c852fd4a3808ae (patch) | |
tree | 0dcca3e19c051c827df5c167894f927b2692fe9c /indra/llcommon/lltrace.cpp | |
parent | 3fd640a6e3dea7a3551c239323d782fb082e1dbd (diff) |
SH-3406 WIP convert fast timers to lltrace system
made fast timer stack thread local
added LLThreadLocalSingleton
made LLThreadLocalPointer obey pointer rules for const
added LLThreadLocalSingletonPointer for fast thread local pointers
Diffstat (limited to 'indra/llcommon/lltrace.cpp')
-rw-r--r-- | indra/llcommon/lltrace.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llcommon/lltrace.cpp b/indra/llcommon/lltrace.cpp index 9d0c93b352..9cadd70dd8 100644 --- a/indra/llcommon/lltrace.cpp +++ b/indra/llcommon/lltrace.cpp @@ -60,12 +60,23 @@ MasterThreadRecorder& getMasterThreadRecorder() return *gMasterThreadRecorder; } -LLThreadLocalPointer<ThreadRecorder>& get_thread_recorder() +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), |