diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-04-30 15:42:48 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-04-30 15:42:48 -0600 |
commit | 32be2a798bb90825710f5029388a7f2c3197b872 (patch) | |
tree | 8202924d0d19eaa8b34d51951fad972a1ddabf1f /indra | |
parent | bb01c0462497977d6a122a93643722d9a589cbaa (diff) |
for EXT-7181: create a cheaper call stack tracing tool.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llerror.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index bd334a6654..41ff5849f4 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1225,17 +1225,32 @@ namespace LLError char** LLCallStacks::sBuffer = NULL ; S32 LLCallStacks::sIndex = 0 ; +#define SINGLE_THREADED 1 + class CallStacksLogLock { public: CallStacksLogLock(); ~CallStacksLogLock(); + +#if SINGLE_THREADED + bool ok() const { return true; } +#else bool ok() const { return mOK; } private: bool mLocked; bool mOK; +#endif }; +#if SINGLE_THREADED + CallStacksLogLock::CallStacksLogLock() + { + } + CallStacksLogLock::~CallStacksLogLock() + { + } +#else CallStacksLogLock::CallStacksLogLock() : mLocked(false), mOK(false) { @@ -1271,6 +1286,7 @@ namespace LLError apr_thread_mutex_unlock(gCallStacksLogMutexp); } } +#endif //static void LLCallStacks::push(const char* function, const int line) |