secondlife/viewer#2391: Remove avatar rigging "callstack" logging

master
Cosmic Linden 2024-08-22 09:11:28 -07:00
parent 28331b2385
commit 1743fe92d6
13 changed files with 0 additions and 339 deletions

View File

@ -34,7 +34,6 @@
#include "llpolymorph.h"
#include "llwearable.h"
#include "llfasttimer.h"
#include "llcallstack.h"
#include "llpolyskeletaldistortion.h"
@ -204,11 +203,6 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
// needed?
// joint->storeScaleForReset( newScale );
// BENTO for detailed stack tracing of params.
std::stringstream ostr;
ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset;
LLScopedContextString str(ostr.str());
joint->setScale(newScale, true);
}

View File

@ -32,7 +32,6 @@
#include "lljoint.h"
#include "llmath.h"
#include "llcallstack.h"
#include <boost/algorithm/string.hpp>
S32 LLJoint::sNumUpdates = 0;
@ -342,7 +341,6 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
{
if (pos != active_override && do_debug_joint(getName()))
{
LLScopedContextString str("setPosition");
LL_DEBUGS("Avatar") << " joint " << getName() << " requested_pos " << requested_pos
<< " overriden by attachment " << active_override << LL_ENDL;
}
@ -350,12 +348,7 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
}
if ((pos != getPosition()) && do_debug_joint(getName()))
{
LLScopedContextString str("setPosition");
LLCallStack cs;
LLContextStatus con_status;
LL_DEBUGS("Avatar") << " joint " << getName() << " set pos " << pos << LL_ENDL;
LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << "====================" << LL_ENDL;
LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
}
if (pos != getPosition())
{
@ -879,7 +872,6 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
{
if (scale != active_override && do_debug_joint(getName()))
{
LLScopedContextString str("setScale");
LL_DEBUGS("Avatar") << " joint " << getName() << " requested_scale " << requested_scale
<< " overriden by attachment " << active_override << LL_ENDL;
}
@ -887,12 +879,7 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
}
if ((mXform.getScale() != scale) && do_debug_joint(getName()))
{
LLScopedContextString str("setScale");
LLCallStack cs;
LLContextStatus con_status;
LL_DEBUGS("Avatar") << " joint " << getName() << " set scale " << scale << LL_ENDL;
LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << LL_ENDL;
LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
}
mXform.setScale(scale);
touch();

View File

@ -26,7 +26,6 @@ set(llcommon_SOURCE_FILES
llbase64.cpp
llbitpack.cpp
llcallbacklist.cpp
llcallstack.cpp
llcleanup.cpp
llcommon.cpp
llcommonutils.cpp
@ -134,7 +133,6 @@ set(llcommon_HEADER_FILES
llbitpack.h
llboost.h
llcallbacklist.h
llcallstack.h
llcleanup.h
llcommon.h
llcommonutils.h

View File

@ -1,188 +0,0 @@
/**
* @file llcallstack.cpp
* @brief run-time extraction of the current callstack
*
* $LicenseInfo:firstyear=2016&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2016, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llcommon.h"
#include "llcallstack.h"
#include "StackWalker.h"
#include "llthreadlocalstorage.h"
#if LL_WINDOWS
class LLCallStackImpl: public StackWalker
{
public:
LLCallStackImpl():
StackWalker(false,0) // non-verbose, options = 0
{
}
~LLCallStackImpl()
{
}
void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
{
m_stack.clear();
ShowCallstack(verbose);
// 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]);
}
}
protected:
virtual void OnOutput(LPCSTR szText)
{
m_stack.push_back(szText);
}
std::vector<std::string> m_stack;
};
#else
// Stub - not implemented currently on other platforms.
class LLCallStackImpl
{
public:
LLCallStackImpl() {}
~LLCallStackImpl() {}
void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
{
stack.clear();
}
};
#endif
LLCallStackImpl *LLCallStack::s_impl = NULL;
LLCallStack::LLCallStack(S32 skip_count, bool verbose):
m_skipCount(skip_count),
m_verbose(verbose)
{
if (!s_impl)
{
s_impl = new LLCallStackImpl;
}
LLTimer t;
s_impl->getStack(m_strings, m_skipCount, m_verbose);
}
bool LLCallStack::contains(const std::string& str)
{
for (const std::string& src_str : m_strings)
{
if (src_str.find(str) != std::string::npos)
{
return true;
}
}
return false;
}
std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack)
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
for (const std::string& str : call_stack.m_strings)
{
s << str;
}
#else
s << "UNAVAILABLE IN RELEASE";
#endif
return s;
}
LLContextStrings::LLContextStrings()
{
}
// static
LLContextStrings* LLContextStrings::getThreadLocalInstance()
{
LLContextStrings *cons = LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
if (!cons)
{
LLThreadLocalSingletonPointer<LLContextStrings>::setInstance(new LLContextStrings);
}
return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
}
// static
void LLContextStrings::addContextString(const std::string& str)
{
LLContextStrings *cons = getThreadLocalInstance();
//LL_INFOS() << "CTX " << (S32)cons << " ADD " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
cons->m_contextStrings[str]++;
}
// static
void LLContextStrings::removeContextString(const std::string& str)
{
LLContextStrings *cons = getThreadLocalInstance();
cons->m_contextStrings[str]--;
//LL_INFOS() << "CTX " << (S32)cons << " REMOVE " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
if (cons->m_contextStrings[str] == 0)
{
cons->m_contextStrings.erase(str);
}
}
// static
bool LLContextStrings::contains(const std::string& str)
{
const std::map<std::string,S32>& strings =
LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
for (const std::map<std::string,S32>::value_type& str_pair : strings)
{
if (str_pair.first.find(str) != std::string::npos)
{
return true;
}
}
return false;
}
// static
void LLContextStrings::output(std::ostream& os)
{
const std::map<std::string,S32>& strings =
LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
for (const std::map<std::string,S32>::value_type& str_pair : strings)
{
os << str_pair.first << "[" << str_pair.second << "]" << "\n";
}
}
// static
std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status)
{
LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->output(s);
return s;
}
bool LLContextStatus::contains(const std::string& str)
{
return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->contains(str);
}

View File

@ -1,91 +0,0 @@
/**
* @file llcallstack.h
* @brief run-time extraction of the current callstack
*
* $LicenseInfo:firstyear=2016&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2016, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include <map>
class LLCallStackImpl;
class LLCallStack
{
public:
LLCallStack(S32 skip_count=0, bool verbose=false);
std::vector<std::string> m_strings;
bool m_verbose;
bool contains(const std::string& str);
private:
static LLCallStackImpl *s_impl;
S32 m_skipCount;
};
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack);
class LLContextStrings
{
public:
LLContextStrings();
static void addContextString(const std::string& str);
static void removeContextString(const std::string& str);
static void output(std::ostream& os);
static LLContextStrings* getThreadLocalInstance();
static bool contains(const std::string& str);
private:
std::map<std::string,S32> m_contextStrings;
};
class LLScopedContextString
{
public:
LLScopedContextString(const std::string& str):
m_str(str)
{
LLContextStrings::addContextString(m_str);
}
~LLScopedContextString()
{
LLContextStrings::removeContextString(m_str);
}
private:
std::string m_str;
};
// Mostly exists as a class to hook an ostream override to.
struct LLContextStatus
{
bool contains(const std::string& str);
};
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
#ifndef LL_RELEASE_FOR_DOWNLOAD
#define dumpStack(tag) \
LL_DEBUGS(tag) << "STACK:\n" \
<< "====================\n" \
<< LLCallStack() \
<< "====================" \
<< LL_ENDL;
#else
#define dumpStack(tag)
#endif

View File

@ -29,7 +29,6 @@
#include "llspatialpartition.h"
#include "llappviewer.h"
#include "llcallstack.h"
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "llimageworker.h"

View File

@ -28,7 +28,6 @@
#include "llappviewer.h"
#include "llstartup.h"
#include "llcallstack.h"
#if LL_WINDOWS
# include <process.h> // _spawnl()

View File

@ -103,7 +103,6 @@
#include "llfloaterperms.h"
#include "llvocache.h"
#include "llcleanup.h"
#include "llcallstack.h"
#include "llmeshrepository.h"
#include "llgltfmateriallist.h"
#include "llgl.h"
@ -151,7 +150,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
{
LL_PROFILE_ZONE_SCOPED;
LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL;
dumpStack("ObjectUpdateStack");
LLViewerObject *res = NULL;
@ -1165,7 +1163,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
dumpStack("ObjectUpdateStack");
// The new OBJECTDATA_FIELD_SIZE_124, OBJECTDATA_FIELD_SIZE_140, OBJECTDATA_FIELD_SIZE_80
// and OBJECTDATA_FIELD_SIZE_64 lengths should be supported in the existing cases below.

View File

@ -68,7 +68,6 @@
#include "u64.h"
#include "llviewertexturelist.h"
#include "lldatapacker.h"
#include "llcallstack.h"
#ifdef LL_USESYSTEMLIBS
#include <zlib.h>
#else
@ -245,7 +244,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// ignore returned flags
LL_DEBUGS("ObjectUpdate") << "uuid " << objectp->mID << " calling processUpdateMessage "
<< objectp << " just_created " << just_created << " from_cache " << from_cache << " msg " << msg << LL_ENDL;
dumpStack("ObjectUpdateStack");
objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
@ -362,7 +360,6 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " created objectp " << objectp << LL_ENDL;
dumpStack("ObjectUpdateStack");
if (!objectp)
{
@ -557,7 +554,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " objectp " << objectp
<< " update_cache " << (S32) update_cache << " compressed " << compressed
<< " update_type " << update_type << LL_ENDL;
dumpStack("ObjectUpdateStack");
if(update_cache)
{
@ -635,7 +631,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
LL_DEBUGS("ObjectUpdate") << "creating object " << fullid << " result " << objectp << LL_ENDL;
dumpStack("ObjectUpdateStack");
if (!objectp)
{
@ -729,7 +724,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
LL_DEBUGS("ObjectUpdate") << "got probe for id " << id << " crc " << crc << LL_ENDL;
dumpStack("ObjectUpdateStack");
// Lookup data packer and add this id to cache miss lists if necessary.
U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@ -1305,7 +1299,6 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
// Remove from object map so noone can look it up.
LL_DEBUGS("ObjectUpdate") << " dereferencing id " << objectp->mID << LL_ENDL;
dumpStack("ObjectUpdateStack");
mUUIDObjectMap.erase(objectp->mID);
@ -1857,7 +1850,6 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
llassert_always(uuid.notNull());
LL_DEBUGS("ObjectUpdate") << "creating " << uuid << " local_id " << local_id << LL_ENDL;
dumpStack("ObjectUpdateStack");
LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp);
if (!objectp)
@ -1893,7 +1885,6 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
}
LL_DEBUGS("ObjectUpdate") << "createObject creating " << fullid << LL_ENDL;
dumpStack("ObjectUpdateStack");
LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
if (!objectp)

View File

@ -81,7 +81,6 @@
#include "llcoros.h"
#include "lleventcoro.h"
#include "llcorehttputil.h"
#include "llcallstack.h"
#include "llsettingsdaycycle.h"
#include <boost/regex.hpp>
@ -2716,7 +2715,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
if (entry->getCRC() == crc)
{
LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL;
dumpStack("AnimatedObjectsStack");
// Record a hit
entry->recordDupe();
@ -2725,7 +2723,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
else //CRC changed
{
LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL;
dumpStack("AnimatedObjectsStack");
// Update the cache entry
entry->updateEntry(crc, dp);
@ -2738,7 +2735,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
else
{
LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL;
dumpStack("AnimatedObjectsStack");
// we haven't seen this object before
// Create new entry and add to map

View File

@ -109,7 +109,6 @@
#include "llsdutil.h"
#include "llscenemonitor.h"
#include "llsdserialize.h"
#include "llcallstack.h"
#include "llrendersphere.h"
#include "llskinningutil.h"
@ -2666,8 +2665,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
}
LLScopedContextString str("avatar_idle_update " + getFullname());
checkTextureLoading() ;
// force immediate pixel area update on avatars using last frames data (before drawable or camera updates)
@ -4689,10 +4686,6 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects
}
LLScopedContextString str("updateCharacter " + getFullname() + " is_control_avatar "
+ boost::lexical_cast<std::string>(is_control_avatar)
+ " is_attachment " + boost::lexical_cast<std::string>(is_attachment));
// For fading out the names above heads, only let the timer
// run if we're visible.
if (mDrawable.notNull() && !visible)
@ -6358,8 +6351,6 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const
void LLVOAvatar::clearAttachmentOverrides()
{
LLScopedContextString str("clearAttachmentOverrides " + getFullname());
for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
{
LLJoint *pJoint = getJoint(i);
@ -6390,10 +6381,7 @@ void LLVOAvatar::clearAttachmentOverrides()
//-----------------------------------------------------------------------------
void LLVOAvatar::rebuildAttachmentOverrides()
{
LLScopedContextString str("rebuildAttachmentOverrides " + getFullname());
LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL;
dumpStack("AnimatedObjectsStack");
clearAttachmentOverrides();
@ -6441,10 +6429,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
// -----------------------------------------------------------------------------
void LLVOAvatar::updateAttachmentOverrides()
{
LLScopedContextString str("updateAttachmentOverrides " + getFullname());
LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL;
dumpStack("AnimatedObjectsStack");
std::set<LLUUID> meshes_seen;
@ -6573,15 +6558,12 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
return;
}
LLScopedContextString str("addAttachmentOverridesForObject " + getFullname());
if (getOverallAppearance() != AOA_NORMAL)
{
return;
}
LL_DEBUGS("AnimatedObjects") << "adding" << LL_ENDL;
dumpStack("AnimatedObjectsStack");
// Process all children
if (recursive)

View File

@ -59,7 +59,6 @@
#include "llsdutil.h"
#include "llstartup.h"
#include "llsdserialize.h"
#include "llcallstack.h"
#include "llcorehttputil.h"
#include "lluiusage.h"

View File

@ -85,7 +85,6 @@
#include "llanimationstates.h"
#include "llinventorytype.h"
#include "llviewerinventory.h"
#include "llcallstack.h"
#include "llsculptidsize.h"
#include "llavatarappearancedefines.h"
#include "llgltfmateriallist.h"
@ -357,7 +356,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
sculpt_type = sculpt_params->getSculptType();
LL_DEBUGS("ObjectUpdate") << "uuid " << mID << " set sculpt_id " << sculpt_id << LL_ENDL;
dumpStack("ObjectUpdateStack");
}
if (!dp)