diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-26 11:11:52 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-01-26 11:11:52 -0500 |
commit | e91a192301db37f99a4f5a817f3b4c47b448417a (patch) | |
tree | 92ca390554fe05d82a91e11bc78eeb618994d91d /indra/llcommon | |
parent | 5345d1e115fdf3fca7ea3e8330f1a23ad19257c8 (diff) |
SL-315 WIP - added callstack info to joint debugging. Made joint debugging run-time configurable via debug setting DebugAvatarJoints
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/StackWalker.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/StackWalker.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llcallstack.cpp | 15 | ||||
-rw-r--r-- | indra/llcommon/llcallstack.h | 3 |
4 files changed, 13 insertions, 9 deletions
diff --git a/indra/llcommon/StackWalker.cpp b/indra/llcommon/StackWalker.cpp index da52386a22..768595f5de 100644 --- a/indra/llcommon/StackWalker.cpp +++ b/indra/llcommon/StackWalker.cpp @@ -4,7 +4,7 @@ * http://stackwalker.codeplex.com/ * * - * $LicenseInfo:firstyear=2016&license=viewerlgpl$ + * $LicenseInfo:firstyear=2016&license=bsd$ * * History: * 2005-07-27 v1 - First public release on http://www.codeproject.com/ diff --git a/indra/llcommon/StackWalker.h b/indra/llcommon/StackWalker.h index f4ef8d557f..b29cdbfc81 100644 --- a/indra/llcommon/StackWalker.h +++ b/indra/llcommon/StackWalker.h @@ -4,7 +4,7 @@ * * * - * $LicenseInfo:firstyear=2016&license=viewerlgpl$ + * $LicenseInfo:firstyear=2016&license=bsd$ * * LICENSE (http://www.opensource.org/licenses/bsd-license.php) * diff --git a/indra/llcommon/llcallstack.cpp b/indra/llcommon/llcallstack.cpp index 87eb37de16..02cf4d0173 100644 --- a/indra/llcommon/llcallstack.cpp +++ b/indra/llcommon/llcallstack.cpp @@ -39,12 +39,14 @@ public: ~LLCallStackImpl() { } - void getStack(std::vector<std::string>& stack) + void getStack(std::vector<std::string>& stack, S32 skip_count=0) { m_stack.clear(); ShowCallstack(); - // Skip the first 2 lines because they're just bookkeeping for LLCallStack. - for (S32 i=3; i<m_stack.size(); ++i) + // Skip the first few lines because they're just bookkeeping for LLCallStack, + // plus any additional lines requested to skip. + S32 first_line = skip_count + 3; + for (S32 i=first_line; i<m_stack.size(); ++i) { stack.push_back(m_stack[i]); } @@ -63,7 +65,7 @@ class LLCallStackImpl public: LLCallStackImpl() {} ~LLCallStackImpl() {} - void getStack(std::vector<std::string>& stack) + void getStack(std::vector<std::string>& stack, S32 skip_count=0) { stack.clear(); } @@ -72,14 +74,15 @@ public: LLCallStackImpl *LLCallStack::s_impl = NULL; -LLCallStack::LLCallStack() +LLCallStack::LLCallStack(S32 skip_count): + m_skipCount(skip_count) { if (!s_impl) { s_impl = new LLCallStackImpl; } LLTimer t; - s_impl->getStack(m_strings); + s_impl->getStack(m_strings, m_skipCount); } std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack) diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h index 6059d4f2c5..598db3d404 100644 --- a/indra/llcommon/llcallstack.h +++ b/indra/llcommon/llcallstack.h @@ -29,10 +29,11 @@ class LLCallStackImpl; class LLCallStack { public: - LLCallStack(); + LLCallStack(S32 skip_count=0); std::vector<std::string> m_strings; private: static LLCallStackImpl *s_impl; + S32 m_skipCount; }; LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack); |