DRTVWR-397 WIP - more logging

master
Brad Payne (Vir Linden) 2015-04-02 17:47:22 -04:00
parent b40bdb266a
commit f1684cdea5
5 changed files with 42 additions and 16 deletions

View File

@ -258,9 +258,12 @@ void LLAttachmentsMgr::LLItemRequestTimes::addTime(const LLUUID& inv_item_id)
void LLAttachmentsMgr::LLItemRequestTimes::removeTime(const LLUUID& inv_item_id)
{
LLInventoryItem *item = gInventory.getItem(inv_item_id);
LL_DEBUGS("Avatar") << "ATT " << mOpName << " removing request time "
<< (item ? item->getName() : "UNKNOWN") << " " << inv_item_id << LL_ENDL;
(*this).erase(inv_item_id);
S32 remove_count = (*this).erase(inv_item_id);
if (remove_count)
{
LL_DEBUGS("Avatar") << "ATT " << mOpName << " removing request time "
<< (item ? item->getName() : "UNKNOWN") << " " << inv_item_id << LL_ENDL;
}
}
BOOL LLAttachmentsMgr::LLItemRequestTimes::getTime(const LLUUID& inv_item_id, LLTimer& timer) const
@ -313,7 +316,7 @@ void LLAttachmentsMgr::expireOldAttachmentRequests()
if (curr_it->second.getElapsedTimeF32() > MAX_ATTACHMENT_REQUEST_LIFETIME)
{
LLInventoryItem *item = gInventory.getItem(curr_it->first);
LL_DEBUGS("Avatar") << "ATT expiring request for attachment "
LL_WARNS("Avatar") << "ATT expiring request for attachment "
<< (item ? item->getName() : "UNKNOWN") << " item_id " << curr_it->first
<< " after " << MAX_ATTACHMENT_REQUEST_LIFETIME << " seconds" << LL_ENDL;
mAttachmentRequests.erase(curr_it);
@ -331,7 +334,7 @@ void LLAttachmentsMgr::expireOldDetachRequests()
if (curr_it->second.getElapsedTimeF32() > MAX_ATTACHMENT_REQUEST_LIFETIME)
{
LLInventoryItem *item = gInventory.getItem(curr_it->first);
LL_DEBUGS("Avatar") << "ATT expiring request for detach "
LL_WARNS("Avatar") << "ATT expiring request for detach "
<< (item ? item->getName() : "UNKNOWN") << " item_id " << curr_it->first
<< " after " << MAX_ATTACHMENT_REQUEST_LIFETIME << " seconds" << LL_ENDL;
mDetachRequests.erase(curr_it);
@ -344,13 +347,19 @@ void LLAttachmentsMgr::expireOldDetachRequests()
void LLAttachmentsMgr::onAttachmentArrived(const LLUUID& inv_item_id)
{
LLTimer timer;
if (!mAttachmentRequests.getTime(inv_item_id, timer))
bool expected = mAttachmentRequests.getTime(inv_item_id, timer);
if (!expected)
{
LLInventoryItem *item = gInventory.getItem(inv_item_id);
LL_WARNS() << "ATT Attachment was unexpected or arrived after " << MAX_ATTACHMENT_REQUEST_LIFETIME << " seconds: "
<< (item ? item->getName() : "UNKNOWN") << " id " << inv_item_id << LL_ENDL;
}
mAttachmentRequests.removeTime(inv_item_id);
if (expected && mAttachmentRequests.empty())
{
// mAttachmentRequests just emptied out
LL_DEBUGS("Avatar") << "ATT all active attachment requests have completed" << LL_ENDL;
}
if (mRecentlyArrivedAttachments.empty())
{
// Start the timer for sending off a COF link batch.
@ -373,6 +382,10 @@ void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id)
LL_DEBUGS("Avatar") << "ATT detach completed after " << timer.getElapsedTimeF32()
<< " seconds for " << (item ? item->getName() : "UNKNOWN") << " " << inv_item_id << LL_ENDL;
mDetachRequests.removeTime(inv_item_id);
if (mDetachRequests.empty())
{
LL_DEBUGS("Avatar") << "ATT all detach requests have completed" << LL_ENDL;
}
}
else
{

View File

@ -4656,7 +4656,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port);
if (id == LLUUID::null)
{
LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
LL_WARNS("Messaging") << "ATT? Unknown kill for local " << local_id << LL_ENDL;
continue;
}
else

View File

@ -1958,6 +1958,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (sent_parentp && (sent_parentp != this) && !sent_parentp->isDead())
{
if (((LLViewerObject*)sent_parentp)->isAvatar())
{
//LL_DEBUGS("Avatar") << "ATT got object update for attachment " << LL_ENDL;
}
//
// We have a viewer object for the parent, and it's not dead.
// Do the actual reparenting here.

View File

@ -474,13 +474,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
U32 flags = 0;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
if(flags & FLAGS_TEMPORARY_ON_REZ)
{
compressed_dp.unpackUUID(fullid, "ID");
compressed_dp.unpackU32(local_id, "LocalID");
compressed_dp.unpackU8(pcode, "PCode");
}
compressed_dp.unpackUUID(fullid, "ID");
compressed_dp.unpackU32(local_id, "LocalID");
compressed_dp.unpackU8(pcode, "PCode");
}
else //send to object cache
{
regionp->cacheFullUpdate(compressed_dp, flags);
@ -497,7 +497,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
gMessageSystem->getSenderPort());
if (fullid.isNull())
{
// LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
LL_WARNS() << "ATT? update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
mNumUnknownUpdates++;
}
}

View File

@ -5725,12 +5725,20 @@ BOOL LLVOAvatar::setParent(LLViewerObject* parent)
void LLVOAvatar::addChild(LLViewerObject *childp)
{
childp->extractAttachmentItemID(); // find the inventory item this object is associated with.
if (isSelf())
{
const LLUUID& item_id = childp->getAttachmentItemID();
LLViewerInventoryItem *item = gInventory.getItem(item_id);
LL_DEBUGS("Avatar") << "ATT attachment child added " << (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
}
LLViewerObject::addChild(childp);
if (childp->mDrawable)
{
if (!attachObject(childp))
{
LL_WARNS() << "addChild() failed for "
LL_WARNS() << "ATT addChild() failed for "
<< childp->getID()
<< " item " << childp->getAttachmentItemID()
<< LL_ENDL;
@ -5813,8 +5821,8 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
{
const LLUUID& item_id = viewer_object->getAttachmentItemID();
LLViewerInventoryItem *item = gInventory.getItem(item_id);
LL_DEBUGS("Avatar") << "ATT attach failed "
<< (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
LL_WARNS("Avatar") << "ATT attach failed "
<< (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
return 0;
}