Skip to content

Commit ef916bd

Browse files
RyeMuttbrad-linden
authored andcommitted
Remove or suppress left over debug messages in hot paths (#2392)
1 parent e5fd685 commit ef916bd

File tree

5 files changed

+4
-60
lines changed

5 files changed

+4
-60
lines changed

indra/llcommon/llcallstack.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ struct LLContextStatus
7979

8080
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
8181

82+
#ifndef LL_RELEASE_FOR_DOWNLOAD
8283
#define dumpStack(tag) \
8384
LL_DEBUGS(tag) << "STACK:\n" \
8485
<< "====================\n" \
8586
<< LLCallStack() \
8687
<< "====================" \
8788
<< LL_ENDL;
89+
#else
90+
#define dumpStack(tag)
91+
#endif

indra/llprimitive/llprimitive.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,6 @@ namespace
11261126
{
11271127
const size_t size(sizeof(T));
11281128

1129-
LL_DEBUGS("TEXTUREENTRY") << "Request to read items of size " << size << " with swizzle " << type << " froum buffer sized " << (source_end - source) << LL_ENDL;
1130-
11311129
if ((source + size + 1) > source_end)
11321130
{
11331131
// we add 1 above to take into account the byte that we know must follow the value.

indra/newview/llface.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -828,11 +828,6 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
828828

829829
const LLVolumeFace &face = volume.getVolumeFace(f);
830830

831-
LL_DEBUGS("RiggedBox") << "updating extents for face " << f
832-
<< " starting extents " << mExtents[0] << ", " << mExtents[1]
833-
<< " starting vf extents " << face.mExtents[0] << ", " << face.mExtents[1]
834-
<< " num verts " << face.mNumVertices << LL_ENDL;
835-
836831
// MAINT-8264 - stray vertices, especially in low LODs, cause bounding box errors.
837832
if (face.mNumVertices < 3)
838833
{
@@ -851,21 +846,14 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
851846

852847
matMulBoundBox(mat_vert, face.mExtents, mExtents);
853848

854-
LL_DEBUGS("RiggedBox") << "updated extents for face " << f
855-
<< " bbox gave extents " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
856-
857849
if (!mDrawablep->isActive())
858850
{ // Shift position for region
859851
LLVector4a offset;
860852
offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
861853
mExtents[0].add(offset);
862854
mExtents[1].add(offset);
863-
LL_DEBUGS("RiggedBox") << "updating extents for face " << f
864-
<< " not active, added offset " << offset << LL_ENDL;
865855
}
866856

867-
LL_DEBUGS("RiggedBox") << "updated extents for face " << f
868-
<< " to " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
869857
LLVector4a t;
870858
t.setAdd(mExtents[0],mExtents[1]);
871859
t.mul(0.5f);

indra/newview/llspatialpartition.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -755,14 +755,6 @@ bool LLSpatialGroup::changeLOD()
755755

756756
if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio)
757757
{
758-
LL_DEBUGS("RiggedBox") << "changeLOD true because of ratio compare "
759-
<< fabsf(ratio) << " " << getSpatialPartition()->mSlopRatio << LL_ENDL;
760-
LL_DEBUGS("RiggedBox") << "sg " << this << "\nmDistance " << mDistance
761-
<< " mLastUpdateDistance " << mLastUpdateDistance
762-
<< " mRadius " << mRadius
763-
<< " fab ratio " << fabsf(ratio)
764-
<< " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL;
765-
766758
return true;
767759
}
768760
}

indra/newview/llvovolume.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,6 @@ bool LLVOVolume::calcLOD()
14481448
const LLVector3* box = avatar->getLastAnimExtents();
14491449
LLVector3 diag = box[1] - box[0];
14501450
radius = diag.magVec() * 0.5f;
1451-
LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
14521451
}
14531452
else
14541453
{
@@ -1459,11 +1458,9 @@ bool LLVOVolume::calcLOD()
14591458
const LLVector3* box = avatar->getLastAnimExtents();
14601459
LLVector3 diag = box[1] - box[0];
14611460
radius = diag.magVec(); // preserve old BinRadius behavior - 2x off
1462-
LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
14631461
}
14641462
if (distance <= 0.f || radius <= 0.f)
14651463
{
1466-
LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL;
14671464
return false;
14681465
}
14691466
}
@@ -1473,7 +1470,6 @@ bool LLVOVolume::calcLOD()
14731470
radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
14741471
if (distance <= 0.f || radius <= 0.f)
14751472
{
1476-
LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL;
14771473
return false;
14781474
}
14791475
}
@@ -1554,13 +1550,6 @@ bool LLVOVolume::calcLOD()
15541550

15551551
if (cur_detail != mLOD)
15561552
{
1557-
LL_DEBUGS("DynamicBox","CalcLOD") << "new LOD " << cur_detail << " change from " << mLOD
1558-
<< " distance " << distance << " radius " << radius << " rampDist " << rampDist
1559-
<< " drawable rigged? " << (mDrawable ? (S32) mDrawable->isState(LLDrawable::RIGGED) : (S32) -1)
1560-
<< " mRiggedVolume " << (void*)getRiggedVolume()
1561-
<< " distanceWRTCamera " << (mDrawable ? mDrawable->mDistanceWRTCamera : -1.f)
1562-
<< LL_ENDL;
1563-
15641553
mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
15651554
mLOD = cur_detail;
15661555

@@ -1760,11 +1749,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
17601749

17611750
bool any_valid_boxes = false;
17621751

1763-
if (getRiggedVolume())
1764-
{
1765-
LL_DEBUGS("RiggedBox") << "rebuilding box, volume face count " << getVolume()->getNumVolumeFaces() << " drawable face count " << mDrawable->getNumFaces() << LL_ENDL;
1766-
}
1767-
17681752
// There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces()
17691753
for (S32 i = 0;
17701754
i < getVolume()->getNumVolumeFaces() && i < mDrawable->getNumFaces() && i < getNumTEs();
@@ -1788,10 +1772,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
17881772
}
17891773
if (rebuild)
17901774
{
1791-
if (getRiggedVolume())
1792-
{
1793-
LL_DEBUGS("RiggedBox") << "rebuilding box, face " << i << " extents " << face->mExtents[0] << ", " << face->mExtents[1] << LL_ENDL;
1794-
}
17951775
if (!any_valid_boxes)
17961776
{
17971777
min = face->mExtents[0];
@@ -5655,8 +5635,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
56555635
// apply any pending material overrides
56565636
gGLTFMaterialList.applyQueuedOverrides(vobj);
56575637

5658-
std::string vobj_name = llformat("Vol%p", vobj);
5659-
56605638
bool is_mesh = vobj->isMesh();
56615639
if (is_mesh)
56625640
{
@@ -5681,24 +5659,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
56815659
group->mSurfaceArea += volume->getSurfaceArea() * llmax(llmax(scale.mV[0], scale.mV[1]), scale.mV[2]);
56825660
}
56835661

5684-
5685-
F32 est_tris = vobj->getEstTrianglesMax();
5686-
56875662
vobj->updateControlAvatar();
56885663

5689-
LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " rebuilding, isAttachment: " << (U32) vobj->isAttachment()
5690-
<< " is_mesh " << is_mesh
5691-
<< " est_tris " << est_tris
5692-
<< " is_animated " << vobj->isAnimatedObject()
5693-
<< " can_animate " << vobj->canBeAnimatedObject()
5694-
<< " cav " << vobj->getControlAvatar()
5695-
<< " lod " << vobj->getLOD()
5696-
<< " drawable rigged " << (drawablep->isState(LLDrawable::RIGGED))
5697-
<< " drawable state " << drawablep->getState()
5698-
<< " playing " << (U32) (vobj->getControlAvatar() ? vobj->getControlAvatar()->mPlaying : false)
5699-
<< " frame " << LLFrameTimer::getFrameCount()
5700-
<< LL_ENDL;
5701-
57025664
llassert_always(vobj);
57035665
vobj->updateTextureVirtualSize(true);
57045666
vobj->preRebuild();

0 commit comments

Comments
 (0)