From e91a192301db37f99a4f5a817f3b4c47b448417a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 26 Jan 2016 11:11:52 -0500 Subject: SL-315 WIP - added callstack info to joint debugging. Made joint debugging run-time configurable via debug setting DebugAvatarJoints --- indra/llcommon/StackWalker.cpp | 2 +- indra/llcommon/StackWalker.h | 2 +- indra/llcommon/llcallstack.cpp | 15 +++++++++------ indra/llcommon/llcallstack.h | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'indra/llcommon') 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& stack) + void getStack(std::vector& 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& stack) + void getStack(std::vector& 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 m_strings; private: static LLCallStackImpl *s_impl; + S32 m_skipCount; }; LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack); -- cgit v1.2.3