summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-18 15:15:08 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-18 15:15:08 -0400
commit955473266e511d5bb155be1645a7ec464b1ce0a7 (patch)
tree13a1216897a3118081ecabb2c76535dfd67dc5d3 /indra
parent3e0c0b86c0fb1a1c26d020ca44a30365487edf3b (diff)
AVP-72 FIXED Debug settings for gathering Welcome Island Rez time statistics
Fixed memory leak. Prettied up formatting for debug readouts. Added more notifications for rez and cloud time.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltexturectrl.cpp29
-rw-r--r--indra/newview/llvoavatar.cpp49
-rw-r--r--indra/newview/llvoavatarself.cpp37
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml28
4 files changed, 121 insertions, 22 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 07db3e0cef..9aebc264a2 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1267,22 +1267,25 @@ void LLTextureCtrl::draw()
// fully loaded.
if (mTexturep.notNull() &&
(!mTexturep->isFullyLoaded()) &&
- (mShowLoadingPlaceholder == TRUE) &&
- (mTexturep->getDiscardLevel() != 1) &&
- (mTexturep->getDiscardLevel() != 0))
+ (mShowLoadingPlaceholder == TRUE))
{
U32 v_offset = 25;
LLFontGL* font = LLFontGL::getFontSansSerif();
- font->renderUTF8(
- mLoadingPlaceholderString,
- 0,
- llfloor(interior.mLeft+3),
- llfloor(interior.mTop-v_offset),
- LLColor4::white,
- LLFontGL::LEFT,
- LLFontGL::BASELINE,
- LLFontGL::DROP_SHADOW);
-
+
+ // Don't show as loaded if the texture is almost fully loaded (i.e. discard1) unless god
+ if ((mTexturep->getDiscardLevel() > 1) || gAgent.isGodlike())
+ {
+ font->renderUTF8(
+ mLoadingPlaceholderString,
+ 0,
+ llfloor(interior.mLeft+3),
+ llfloor(interior.mTop-v_offset),
+ LLColor4::white,
+ LLFontGL::LEFT,
+ LLFontGL::BASELINE,
+ LLFontGL::DROP_SHADOW);
+ }
+
// Show more detailed information if this agent is god.
if (gAgent.isGodlike())
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c64f7b5a3e..f95017b658 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -667,6 +667,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mTexEyeColor( NULL ),
mNeedsSkin(FALSE),
mUpdatePeriod(1),
+ mFullyLoaded(FALSE),
+ mPreviousFullyLoaded(FALSE),
mFullyLoadedInitialized(FALSE),
mSupportsAlphaLayers(FALSE)
{
@@ -746,8 +748,10 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mOohMorph = NULL;
mAahMorph = NULL;
- mCurrentGesticulationLevel = 0;
+ mCurrentGesticulationLevel = 0;
+ mRuthTimer.reset();
+ mRuthDebugTimer.reset();
}
//------------------------------------------------------------------------
@@ -755,6 +759,25 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
//------------------------------------------------------------------------
LLVOAvatar::~LLVOAvatar()
{
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
+ {
+ if (!mFullyLoaded)
+ {
+ llinfos << "AVATARREZTIME: Avatar '" << getFullname() << " left after " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds as cloud." << llendl;
+ LLSD args;
+ args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
+ args["NAME"] = getFullname();
+ LLNotificationsUtil::add("AvatarRezLeftCloudNotification",args);
+ }
+ else
+ {
+ llinfos << "AVATARREZTIME: Avatar '" << getFullname() << " left." << llendl;
+ LLSD args;
+ args["NAME"] = getFullname();
+ LLNotificationsUtil::add("AvatarRezLeftNotification",args);
+ }
+
+ }
lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
mRoot.removeAllChildren();
@@ -1269,6 +1292,7 @@ void LLVOAvatar::initInstance(void)
//VTPause(); // VTune
mVoiceVisualizer->setVoiceEnabled( LLVoiceClient::getInstance()->getVoiceEnabled( mID ) );
+
}
const LLVector3 LLVOAvatar::getRenderPosition() const
@@ -2076,9 +2100,22 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
LLMemType mt(LLMemType::MTYPE_AVATAR);
LLVector3 old_vel = getVelocity();
+ const BOOL has_name = !getNVPair("FirstName");
+
// Do base class updates...
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
+ // Print out arrival information once we have name of avatar.
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
+ {
+ if (has_name && getNVPair("FirstName"))
+ {
+ LLSD args;
+ args["NAME"] = getFullname();
+ LLNotificationsUtil::add("AvatarRezArrivedNotification",args);
+ llinfos << "AVATARREZTIME: Avatar '" << getFullname() << "' arrived." << llendl;
+ }
+ }
if(retval & LLViewerObject::INVALID_UPDATE)
{
if (isSelf())
@@ -5863,6 +5900,14 @@ void LLVOAvatar::updateRuthTimer(bool loading)
if (mPreviousFullyLoaded)
{
mRuthTimer.reset();
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
+ {
+ llinfos << "AVATARREZTIME: Avatar '" << getFullname() << "' became cloud." << llendl;
+ LLSD args;
+ args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
+ args["NAME"] = getFullname();
+ LLNotificationsUtil::add("AvatarRezCloudNotification",args);
+ }
mRuthDebugTimer.reset();
}
@@ -5896,7 +5941,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
{
if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
{
- llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl;
+ llinfos << "AVATARREZTIME: Avatar '" << getFullname() << "' resolved in " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl;
LLSD args;
args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
args["NAME"] = getFullname();
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 739c021311..e8f42178a1 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1772,6 +1772,7 @@ void LLVOAvatarSelf::timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *
{
mTextureLoadTimes[(U32)index][(U32)discard_level] = mSelfLoadTimer.getElapsedTimeF32();
}
+ delete data;
}
void LLVOAvatarSelf::bakedTextureUpload(EBakedTextureIndex index, BOOL finished)
@@ -1956,18 +1957,40 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
{
gAgent.sendAgentSetAppearance();
F32 final_time = mSelfLoadTimer.getElapsedTimeF32();
- llinfos << "time from avatar creation to load wearables: " << mTimeWearablesLoaded << llendl;
- llinfos << "time from avatar creation to de-cloud: " << mTimeAvatarVisible << llendl;
- llinfos << "time from avatar creation to de-cloud for others: " << final_time << llendl;
- llinfos << "load time for each texture: " << llendl;
+ llinfos << "AVATARREZTIME: Myself rez stats:" << llendl;
+ llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl;
+ llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl;
+ llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
+ llinfos << "\t Load time for each texture: " << llendl;
for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i)
{
- llinfos << "(" << i << "): " << (S32)mTextureLoadTimes[i][0] << "\t" << (S32)mTextureLoadTimes[i][1] << "\t" << (S32)mTextureLoadTimes[i][2] << "\t" << (S32)mTextureLoadTimes[i][3] << "\t" << (S32)mTextureLoadTimes[i][4] << "\t" << (S32)mTextureLoadTimes[i][5] << llendl;
+ std::stringstream out;
+ out << "\t\t (" << i << ") ";
+ U32 j=0;
+ for (j=0; j <= MAX_DISCARD_LEVEL; j++)
+ {
+ out << "\t";
+ S32 load_time = (S32)mTextureLoadTimes[i][j];
+ if (load_time == -1)
+ {
+ out << "*";
+ if (j == 0)
+ break;
+ }
+ else
+ {
+ out << load_time;
+ }
+ }
+
+ // Don't print out non-existent textures.
+ if (j != 0)
+ llinfos << out.str() << llendl;
}
- llinfos << "Time points for each upload (start / finish)" << llendl;
+ llinfos << "\t Time points for each upload (start / finish)" << llendl;
for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i)
{
- llinfos << "(" << i << "): " << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl;
+ llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl;
}
}
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a2acb8100f..6b486a91c5 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6127,6 +6127,34 @@ Avatar '[NAME]' rezzed in [TIME] seconds.
</notification>
<notification
+ icon="notifytip.tga"
+ name="AvatarRezCloudNotification"
+ type="notifytip">
+Avatar '[NAME]' became cloud.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="AvatarRezArrivedNotification"
+ type="notifytip">
+Avatar '[NAME]' appeared.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="AvatarRezLeftCloudNotification"
+ type="notifytip">
+Avatar '[NAME]' left after [TIME] seconds as cloud.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="AvatarRezLeftNotification"
+ type="notifytip">
+Avatar '[NAME]' left as fully loaded.
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">