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/llcallstack.cpp | |
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/llcallstack.cpp')
-rw-r--r-- | indra/llcommon/llcallstack.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
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) |