From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/newview/llviewerobjectlist.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 88bb087742..2f171f89d7 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1029,10 +1029,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } */ - LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); - LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); - LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); - LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); + LLStatViewer::NUM_OBJECTS.sample(mObjects.size()); + LLStatViewer::NUM_ACTIVE_OBJECTS.sample(idle_count); + LLStatViewer::NUM_SIZE_CULLED.sample(mNumSizeCulled); + LLStatViewer::NUM_VIS_CULLED.sample(mNumVisCulled); + //LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); + //LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); + //LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); + //LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() -- cgit v1.2.3 From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/llviewerobjectlist.cpp | 145 +++++++++++++++++++++++++++++++---- 1 file changed, 131 insertions(+), 14 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 88bb087742..a1db1f7237 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -76,6 +76,7 @@ #include "object_flags.h" #include "llappviewer.h" +#include "llvocache.h" extern F32 gMinObjectDistance; extern BOOL gAnimateTextures; @@ -228,9 +229,15 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, U32 i, const EObjectUpdateType update_type, LLDataPacker* dpp, - BOOL just_created) + bool just_created, + bool from_cache) { - LLMessageSystem* msg = gMessageSystem; + LLMessageSystem* msg = NULL; + + if(!from_cache) + { + msg = gMessageSystem; + } // ignore returned flags objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); @@ -254,7 +261,18 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // RN: this must be called after we have a drawable // (from gPipeline.addObject) // so that the drawable parent is set properly - findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); + if(msg != NULL) + { + findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); + } + else + { + LLViewerRegion* regionp = objectp->getRegion(); + if(regionp != NULL) + { + findOrphans(objectp, regionp->getHost().getAddress(), regionp->getHost().getPort()); + } + } // If we're just wandering around, don't create new objects selected. if (just_created @@ -277,6 +295,82 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) +{ + LLDataPacker *cached_dpp = entry->getDP(); + + if (!cached_dpp) + { + return NULL; //nothing cached. + } + + LLViewerObject *objectp; + U32 local_id; + LLPCode pcode = 0; + LLUUID fullid; + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + + // Cache Hit. + cached_dpp->reset(); + cached_dpp->unpackUUID(fullid, "ID"); + cached_dpp->unpackU32(local_id, "LocalID"); + cached_dpp->unpackU8(pcode, "PCode"); + + objectp = findObject(fullid); + + if (objectp) + { + if(!objectp->isDead() && (objectp->mLocalID != entry->getLocalID() || + objectp->getRegion() != regionp)) + { + removeFromLocalIDTable(objectp); + setUUIDAndLocal(fullid, entry->getLocalID(), + regionp->getHost().getAddress(), + regionp->getHost().getPort()); + + if (objectp->mLocalID != entry->getLocalID()) + { // Update local ID in object with the one sent from the region + objectp->mLocalID = entry->getLocalID(); + } + + if (objectp->getRegion() != regionp) + { // Object changed region, so update it + objectp->updateRegion(regionp); // for LLVOAvatar + } + } + + //return TRUE; //already loaded. + } + + bool justCreated = false; + if (!objectp) + { + objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID()); + + if (!objectp) + { + llinfos << "createObject failure for object: " << fullid << llendl; + recorder.objectUpdateFailure(entry->getLocalID(), OUT_FULL_CACHED, 0); + return NULL; + } + justCreated = true; + mNumNewObjects++; + sCacheHitRate.addValue(100.f); + } + + if (objectp->isDead()) + { + llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + } + + processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); + + recorder.log(0.2f); + LLVOAvatar::cullAvatarsByPixelArea(); + + return objectp; +} + void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, const EObjectUpdateType update_type, @@ -382,14 +476,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else if (compressed) { - S32 uncompressed_length = 2048; - compressed_dp.reset(); - - U32 flags = 0; - if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? - { - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); - } + S32 uncompressed_length = 2048; + compressed_dp.reset(); uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i); @@ -540,9 +628,15 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, processUpdateCore(objectp, user_data, i, update_type, &compressed_dp, justCreated); if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { - bCached = true; - LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + U32 flags = 0; + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); + + if(!(flags & FLAGS_TEMPORARY_ON_REZ)) + { + bCached = true; + LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + } } } else if (cached) // Cache hit only? @@ -1887,7 +1981,30 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi return objectp; } +LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id) +{ + llassert_always(uuid.notNull()); + LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp); + if (!objectp) + { +// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; + return NULL; + } + + objectp->mLocalID = local_id; + mUUIDObjectMap[uuid] = objectp; + setUUIDAndLocal(uuid, + local_id, + regionp->getHost().getAddress(), + regionp->getHost().getPort()); + mObjects.push_back(objectp); + + updateActive(objectp); + + return objectp; +} + LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { -- cgit v1.2.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/newview/llviewerobjectlist.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2f171f89d7..14a2ac3384 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1033,10 +1033,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) LLStatViewer::NUM_ACTIVE_OBJECTS.sample(idle_count); LLStatViewer::NUM_SIZE_CULLED.sample(mNumSizeCulled); LLStatViewer::NUM_VIS_CULLED.sample(mNumVisCulled); - //LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); - //LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); - //LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); - //LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() -- cgit v1.2.3 From 09591242f90fa9b24a0be2aad02e91041ac0fcc7 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 25 Oct 2012 18:20:36 -0600 Subject: avoid redundant object creation. --- indra/newview/llviewerobjectlist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index a1db1f7237..d41eee5926 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -338,8 +338,10 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* objectp->updateRegion(regionp); // for LLVOAvatar } } - - //return TRUE; //already loaded. + else + { + return objectp; //already loaded. + } } bool justCreated = false; -- cgit v1.2.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/newview/llviewerobjectlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 14a2ac3384..9c6045943f 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -93,7 +93,7 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128); +LLTrace::Measurement<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { @@ -520,7 +520,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } justCreated = TRUE; mNumNewObjects++; - sCacheHitRate.addValue(cached ? 100.f : 0.f); + sCacheHitRate.sample(cached ? 100.f : 0.f); } -- cgit v1.2.3 From c2859e4663c405950b6f433270ae558852330c76 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 8 Nov 2012 21:36:47 -0700 Subject: for SH-3472: prioritize object loading --- indra/newview/llviewerobjectlist.cpp | 85 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 42 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index d41eee5926..f3552e2c2b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -376,7 +376,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, const EObjectUpdateType update_type, - bool cached, bool compressed) + bool compressed) { LLFastTimer t(FTM_PROCESS_OBJECTS); @@ -395,7 +395,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); // I don't think this case is ever hit. TODO* Test this. - if (!cached && !compressed && update_type != OUT_FULL) + if (!compressed && update_type != OUT_FULL) { //llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; gTerseObjectUpdates += num_objects; @@ -439,7 +439,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U8 compressed_dpbuffer[2048]; LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048); - LLDataPacker *cached_dpp = NULL; LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); for (i = 0; i < num_objects; i++) @@ -449,34 +448,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, BOOL justCreated = FALSE; S32 msg_size = 0; - if (cached) - { - U32 id; - U32 crc; - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i); - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); - msg_size += sizeof(U32) * 2; - - // Lookup data packer and add this id to cache miss lists if necessary. - U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; - cached_dpp = regionp->getDP(id, crc, cache_miss_type); - if (cached_dpp) - { - // Cache Hit. - cached_dpp->reset(); - cached_dpp->unpackUUID(fullid, "ID"); - cached_dpp->unpackU32(local_id, "LocalID"); - cached_dpp->unpackU8(pcode, "PCode"); - } - else - { - // Cache Miss. - recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size); - - continue; // no data packer, skip this object - } - } - else if (compressed) + if (compressed) { S32 uncompressed_length = 2048; compressed_dp.reset(); @@ -575,9 +547,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, continue; } } - else if (cached) // Cache hit only? - { - } else { if (update_type != OUT_FULL) @@ -610,7 +579,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } justCreated = TRUE; mNumNewObjects++; - sCacheHitRate.addValue(cached ? 100.f : 0.f); + sCacheHitRate.addValue(0.f); } @@ -641,11 +610,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } } } - else if (cached) // Cache hit only? - { - objectp->mLocalID = local_id; - processUpdateCore(objectp, user_data, i, update_type, cached_dpp, justCreated); - } else { if (update_type == OUT_FULL) @@ -668,14 +632,51 @@ void LLViewerObjectList::processCompressedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, const EObjectUpdateType update_type) { - processObjectUpdate(mesgsys, user_data, update_type, false, true); + processObjectUpdate(mesgsys, user_data, update_type, true); } void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, const EObjectUpdateType update_type) { - processObjectUpdate(mesgsys, user_data, update_type, true, false); + //processObjectUpdate(mesgsys, user_data, update_type, true, false); + + S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); + gFullObjectUpdates += num_objects; + + U64 region_handle; + mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); + LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); + if (!regionp) + { + llwarns << "Object update from unknown region! " << region_handle << llendl; + return; + } + + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + + for (S32 i = 0; i < num_objects; i++) + { + S32 msg_size = 0; + U32 id; + U32 crc; + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i); + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); + msg_size += sizeof(U32) * 2; + + // Lookup data packer and add this id to cache miss lists if necessary. + U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; + if(!regionp->probeCache(id, crc, cache_miss_type)) + { + // Cache Miss. + recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size); + + continue; // no data packer, skip this object + } + sCacheHitRate.addValue(100.f); + } + + return; } void LLViewerObjectList::dirtyAllObjectInventory() -- cgit v1.2.3 From 6db6cb39f41e921e75970d1570a74cf35d353a35 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Nov 2012 23:02:53 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system got new fast timer code to compile and run --- indra/newview/llviewerobjectlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 9c6045943f..1bd028688a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -850,6 +850,8 @@ private: LLSD mObjectIDs; }; +static LLFastTimer::DeclareTimer FTM_IDLE_COPY("Idle Copy"); + void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { // Update globals @@ -900,10 +902,8 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) U32 idle_count = 0; - static LLFastTimer::DeclareTimer idle_copy("Idle Copy"); - { - LLFastTimer t(idle_copy); + LLFastTimer t(FTM_IDLE_COPY); for (std::vector >::iterator active_iter = mActiveObjects.begin(); active_iter != mActiveObjects.end(); active_iter++) -- cgit v1.2.3 From 834a956a70bb49f1a242681bd611df4bbb7e4cc8 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 13 Dec 2012 15:43:10 -0800 Subject: We now handle local_id=0 in KillObject as a prefix to deleted local_id's. This is the real viewer-side work that was the motivation for MAINT-2123. Reviewed with Bao. --- indra/newview/llviewerobjectlist.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f3552e2c2b..5b2214f3b3 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -107,7 +107,6 @@ LLViewerObjectList::LLViewerObjectList() mNumNewObjects = 0; mWasPaused = FALSE; mNumDeadObjectUpdates = 0; - mNumUnknownKills = 0; mNumUnknownUpdates = 0; } @@ -1342,16 +1341,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { - if (objectp->isDead()) - { - // This object is already dead. Don't need to do more. - return TRUE; - } - else - { - objectp->markDead(); - } - + objectp->markDead(); // does the right thing if object already dead return TRUE; } -- cgit v1.2.3 From 4e22f3e3ef15e24d7e9e0ad156e60d4cd1b2d5c9 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 18 Dec 2012 23:16:50 -0700 Subject: fix for SH-3624: Object deletion does not work --- indra/newview/llviewerobjectlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 5b2214f3b3..6e7ce103b5 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1326,7 +1326,7 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) } } -BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) +BOOL LLViewerObjectList::killObject(LLViewerObject *objectp, bool cache_enabled) { // Don't ever kill gAgentAvatarp, just force it to the agent's region // unless region is NULL which is assumed to mean you are logging out. @@ -1341,6 +1341,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { + objectp->EnableToCacheTree(cache_enabled); //enable to add to VO cache tree if set. objectp->markDead(); // does the right thing if object already dead return TRUE; } -- cgit v1.2.3 From 7cc37d949e9319a5b60641ff8453a0fed763d817 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 9 Jan 2013 22:43:10 -0700 Subject: fix the merge errors from the changeset 3eadda9666cf --- indra/newview/llviewerobjectlist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0543d11644..0335cd769b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -356,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sCacheHitRate.addValue(100.f); + sCacheHitRate.sample(100.f); } if (objectp->isDead()) @@ -578,8 +578,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } justCreated = TRUE; mNumNewObjects++; - sCacheHitRate.sample(cached ? 100.f : 0.f); - } @@ -672,7 +670,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, continue; // no data packer, skip this object } - sCacheHitRate.addValue(100.f); + sCacheHitRate.sample(100.f); } return; -- cgit v1.2.3 From 45a7fe901aa4cd7af14fa1cb894da46a988e3aa2 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 15 Jan 2013 23:01:40 -0700 Subject: for SH-3653: Can we repurpose ObjectUpdateCached:ObjectData:UpdateFlags field to carry spatial+size data? --- indra/newview/llviewerobjectlist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0335cd769b..dce963c5c5 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -657,13 +657,15 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, S32 msg_size = 0; U32 id; U32 crc; + U32 flags; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); msg_size += sizeof(U32) * 2; // Lookup data packer and add this id to cache miss lists if necessary. U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; - if(!regionp->probeCache(id, crc, cache_miss_type)) + if(!regionp->probeCache(id, crc, flags, cache_miss_type)) { // Cache Miss. recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size); -- cgit v1.2.3 From bd60fdbe44d9f996686d31cf48a3f2ca664dd301 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 28 Feb 2013 22:49:05 -0700 Subject: for SH-3824: interesting: Ensure viewer can handle object updates from entire region gracefully --- indra/newview/llviewerobjectlist.cpp | 51 +++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index dce963c5c5..995c3e7351 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -455,12 +455,54 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i); compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length); +#if 0 + if (compressed) + { + if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? + { + U32 flags = 0; + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); + + if(!(flags & FLAGS_TEMPORARY_ON_REZ)) + { + //bCached = true; + + compressed_dp.unpackU32(local_id, "LocalID"); + //------------- + compressed_dp.unpackUUID(fullid, "ID"); + //if(fullid == LLUUID("1e5183db-8f28-47f1-abe0-23de9f9042b7")) + { + llinfos << fullid << llendl; + } + //------------- + + U32 crc; + compressed_dp.unpackU32(crc, "CRC"); + /*LLViewerRegion::eCacheUpdateResult result = */regionp->cacheFullUpdate(local_id, crc, compressed_dp); + //recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + + continue; //do not creat LLViewerObject for cacheable object, object cache will do the job. + } + } + } +#endif if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { - compressed_dp.unpackUUID(fullid, "ID"); - compressed_dp.unpackU32(local_id, "LocalID"); - compressed_dp.unpackU8(pcode, "PCode"); + 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"); + } + else //send to object cache + { + regionp->cacheFullUpdate(compressed_dp); + continue; + } } else { @@ -594,6 +636,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, objectp->mLocalID = local_id; } processUpdateCore(objectp, user_data, i, update_type, &compressed_dp, justCreated); + +#if 0 if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { U32 flags = 0; @@ -606,6 +650,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); } } +#endif } else { -- cgit v1.2.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/newview/llviewerobjectlist.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0335cd769b..176ee49d31 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -94,7 +94,7 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::Measurement<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); +LLTrace::MeasurementStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { @@ -356,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sCacheHitRate.sample(100.f); + sample(sCacheHitRate, 100.f); } if (objectp->isDead()) @@ -670,7 +670,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, continue; // no data packer, skip this object } - sCacheHitRate.sample(100.f); + sample(sCacheHitRate, 100.f); } return; @@ -1123,10 +1123,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } */ - LLStatViewer::NUM_OBJECTS.sample(mObjects.size()); - LLStatViewer::NUM_ACTIVE_OBJECTS.sample(idle_count); - LLStatViewer::NUM_SIZE_CULLED.sample(mNumSizeCulled); - LLStatViewer::NUM_VIS_CULLED.sample(mNumVisCulled); + sample(LLStatViewer::NUM_OBJECTS, mObjects.size()); + sample(LLStatViewer::NUM_ACTIVE_OBJECTS, idle_count); + sample(LLStatViewer::NUM_SIZE_CULLED, mNumSizeCulled); + sample(LLStatViewer::NUM_VIS_CULLED, mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() -- cgit v1.2.3 From 50b32cf2bdb93fad14770aa0f6b92fb3815ebdf0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 7 Mar 2013 23:54:11 -0700 Subject: for SH-3937: interesting: implement the new cache probe logic --- indra/newview/llviewerobjectlist.cpp | 59 +++++++++++++++--------------------- 1 file changed, 25 insertions(+), 34 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 995c3e7351..4c959447c6 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -446,6 +446,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, LLTimer update_timer; BOOL justCreated = FALSE; S32 msg_size = 0; + bool remove_from_cache = false; //remove from object cache if it is a full-update or terse update if (compressed) { @@ -455,38 +456,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i); compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length); -#if 0 - if (compressed) - { - if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? - { - U32 flags = 0; - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); - - if(!(flags & FLAGS_TEMPORARY_ON_REZ)) - { - //bCached = true; - - compressed_dp.unpackU32(local_id, "LocalID"); - //------------- - compressed_dp.unpackUUID(fullid, "ID"); - //if(fullid == LLUUID("1e5183db-8f28-47f1-abe0-23de9f9042b7")) - { - llinfos << fullid << llendl; - } - //------------- - - U32 crc; - compressed_dp.unpackU32(crc, "CRC"); - /*LLViewerRegion::eCacheUpdateResult result = */regionp->cacheFullUpdate(local_id, crc, compressed_dp); - //recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); - - continue; //do not creat LLViewerObject for cacheable object, object cache will do the job. - } - } - } -#endif if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { U32 flags = 0; @@ -506,6 +476,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else { + remove_from_cache = true; compressed_dp.unpackU32(local_id, "LocalID"); getUUIDFromLocal(fullid, local_id, @@ -535,6 +506,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else // OUT_FULL only? { + remove_from_cache = true; mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); msg_size += sizeof(LLUUID); @@ -542,6 +514,11 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl; } objectp = findObject(fullid); + + if(remove_from_cache) + { + objectp = regionp->forceToRemoveFromCache(local_id, objectp); + } // This looks like it will break if the local_id of the object doesn't change // upon boundary crossing, but we check for region id matching later... @@ -618,11 +595,11 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } + justCreated = TRUE; mNumNewObjects++; } - if (objectp->isDead()) { llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; @@ -1371,7 +1348,7 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) } } -BOOL LLViewerObjectList::killObject(LLViewerObject *objectp, bool cache_enabled) +BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { // Don't ever kill gAgentAvatarp, just force it to the agent's region // unless region is NULL which is assumed to mean you are logging out. @@ -1386,7 +1363,6 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp, bool cache_enabled) if (objectp) { - objectp->EnableToCacheTree(cache_enabled); //enable to add to VO cache tree if set. objectp->markDead(); // does the right thing if object already dead return TRUE; } @@ -2113,6 +2089,15 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { + if(childp->getRegion()) + { + LLVOCacheEntry* entry = childp->getRegion()->getCacheEntry(childp->getLocalID()); + if(entry != NULL && !entry->isTouched()) + { + return; //object cache will take care of this. + } + } + #ifdef ORPHAN_SPAM llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif @@ -2168,6 +2153,12 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) return; } + //search object cache to get orphans + if(objectp->getRegion()) + { + objectp->getRegion()->findOrphans(objectp->getLocalID()); + } + // See if we are a parent of an orphan. // Note: This code is fairly inefficient but it should happen very rarely. // It can be sped up if this is somehow a performance issue... -- cgit v1.2.3 From 81edcde603b82233662d13d58f8b0c7955b5a7e1 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 8 Mar 2013 11:14:03 -0700 Subject: remove some redundant code for SH-3937: interesting: implement the new cache probe logic --- indra/newview/llviewerobjectlist.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4c959447c6..6202a7b6cc 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2089,15 +2089,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { - if(childp->getRegion()) - { - LLVOCacheEntry* entry = childp->getRegion()->getCacheEntry(childp->getLocalID()); - if(entry != NULL && !entry->isTouched()) - { - return; //object cache will take care of this. - } - } - #ifdef ORPHAN_SPAM llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif -- cgit v1.2.3 From 27bb36b1e796add58f319555bf761e417f7957ef Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 11 Mar 2013 21:23:15 -0600 Subject: for SH-3979: interesting: can not edit objects with new object cache code --- indra/newview/llviewerobjectlist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6202a7b6cc..873b6e1d03 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -365,7 +365,8 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); - + objectp->loadFlags(entry->getUpdateFlags()); //just in case, reload update flags from cache. + recorder.log(0.2f); LLVOAvatar::cullAvatarsByPixelArea(); @@ -470,7 +471,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else //send to object cache { - regionp->cacheFullUpdate(compressed_dp); + regionp->cacheFullUpdate(compressed_dp, flags); continue; } } @@ -623,7 +624,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if(!(flags & FLAGS_TEMPORARY_ON_REZ)) { bCached = true; - LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp, flags); recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); } } -- cgit v1.2.3 From cf4798b8f90eebaa62dcb8817538f1e3965b6bc9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 22 Mar 2013 14:00:09 -0700 Subject: BUILDFIX gcc and vc fixes --- indra/newview/llviewerobjectlist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 5ccb19ab2e..922d386818 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -262,7 +262,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // so that the drawable parent is set properly if(msg != NULL) { - findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); + findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); } else { @@ -451,9 +451,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (compressed) { - S32 uncompressed_length = 2048; - compressed_dp.reset(); - + S32 uncompressed_length = 2048; + compressed_dp.reset(); + uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i); compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length); @@ -626,9 +626,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, bCached = true; LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp, flags); recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + } } #endif - } } else { -- cgit v1.2.3 From a904e7b21b64a87073a446445de46318832d1eb1 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Apr 2013 15:25:34 -0700 Subject: converted #define guarded log spam to use keyword-controlled logging --- indra/newview/llviewerobjectlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index b26be5bc63..dde387509a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2067,7 +2067,7 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { #ifdef ORPHAN_SPAM - llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; + LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif // We're an orphan, flag things appropriately. -- cgit v1.2.3 From 39d8ea6327ad96b4977dfec991a20d66e2442b50 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Apr 2013 15:55:34 -0700 Subject: BUILDFIX: attempted gcc fix --- indra/newview/llviewerobjectlist.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index dde387509a..04c9fc2f94 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2066,9 +2066,7 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { -#ifdef ORPHAN_SPAM - LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; -#endif + LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << LL_ENDL; // We're an orphan, flag things appropriately. childp->mOrphaned = TRUE; @@ -2156,11 +2154,11 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) continue; } + LL_DEBUGS("ORPHANS") << "Reunited parent " << objectp->mID + << " with child " << childp->mID << LL_ENDL; + LL_DEBUGS("ORPHANS") << "Glob: " << objectp->getPositionGlobal() << LL_ENDL; + LL_DEBUGS("ORPHANS") << "Agent: " << objectp->getPositionAgent() << LL_ENDL; #ifdef ORPHAN_SPAM - llinfos << "Reunited parent " << objectp->mID - << " with child " << childp->mID << llendl; - llinfos << "Glob: " << objectp->getPositionGlobal() << llendl; - llinfos << "Agent: " << objectp->getPositionAgent() << llendl; addDebugBeacon(objectp->getPositionAgent(),""); #endif gPipeline.markMoved(objectp->mDrawable); -- cgit v1.2.3 From 6b81b8629e67d82a7620e48781ded73b6e6126ea Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 5 May 2013 17:45:35 -0700 Subject: Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies --- indra/newview/llviewerobjectlist.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4d0d3e8718..6ffd3d8fa4 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -47,6 +47,7 @@ #include "lltooltip.h" #include "llworld.h" #include "llstring.h" +#include "llhudicon.h" #include "llhudnametag.h" #include "lldrawable.h" #include "llflexibleobject.h" @@ -2275,3 +2276,10 @@ bool LLViewerObjectList::OrphanInfo::operator!=(const OrphanInfo &rhs) const } +LLDebugBeacon::~LLDebugBeacon() +{ + if (mHUDObject.notNull()) + { + mHUDObject->markDead(); + } +} -- cgit v1.2.3 From 9ae76d12157641033431381959ef4f798a119b8d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 29 May 2013 17:00:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics fixed copy construction behavior of Recordings to not zero out data split measurement into event and sample, with sample representing a continuous function --- indra/newview/llviewerobjectlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6ffd3d8fa4..c6ac7af93c 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -95,7 +95,7 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::MeasurementStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); +LLTrace::SampleStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { -- cgit v1.2.3 From a6dbd8e089b7d0f462a8ed753258a442b1861541 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 5 Jun 2013 18:01:25 -0600 Subject: fix for SH-4227: interesting: long delay between root and child prim loading. --- indra/newview/llviewerobjectlist.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index c6ac7af93c..dc3be24e3a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2045,6 +2045,10 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe // llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; return NULL; } + if(regionp) + { + regionp->addToCreatedList(local_id); + } mUUIDObjectMap[fullid] = objectp; setUUIDAndLocal(fullid, -- cgit v1.2.3 From fc88265cffe3553803314c6e895a1e3a3c988171 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 13 Jun 2013 18:47:51 -0600 Subject: fix for SH-4241: viewer crash shortly after login in LLViewerRegion::addNewObject and SH-4261: interesting: crash in LLViewerRegion::addToVOCacheTree --- indra/newview/llviewerobjectlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 83ebfc2ec3..ea004560d2 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -340,7 +340,8 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } else { - return objectp; //already loaded. + //should fall through if already loaded because may need to update the object. + //return objectp; //already loaded. } } -- cgit v1.2.3 From d122318bef2ff0eced7641dc24f411f792bd2935 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Jul 2013 00:55:17 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats --- indra/newview/llviewerobjectlist.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index b215869a3e..8299c84663 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -95,12 +95,10 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::SampleStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); +LLTrace::SampleStatHandle > LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { - mNumVisCulled = 0; - mNumSizeCulled = 0; mCurLazyUpdateIndex = 0; mCurBin = 0; mNumDeadObjects = 0; @@ -358,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sample(sCacheHitRate, 100.f); + sample(sCacheHitRate, LLUnits::Percent::fromValue(100.f)); } if (objectp->isDead()) @@ -1091,9 +1089,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) fetchObjectCosts(); fetchPhysicsFlags(); - mNumSizeCulled = 0; - mNumVisCulled = 0; - // update max computed render cost LLVOVolume::updateRenderComplexity(); @@ -1155,8 +1150,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) sample(LLStatViewer::NUM_OBJECTS, mObjects.size()); sample(LLStatViewer::NUM_ACTIVE_OBJECTS, idle_count); - sample(LLStatViewer::NUM_SIZE_CULLED, mNumSizeCulled); - sample(LLStatViewer::NUM_VIS_CULLED, mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llviewerobjectlist.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 8299c84663..4072ab524e 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -29,7 +29,6 @@ #include "llviewerobjectlist.h" #include "message.h" -#include "timing.h" #include "llfasttimer.h" #include "llrender.h" #include "llwindow.h" // decBusyCount() @@ -997,14 +996,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // update global timer F32 last_time = gFrameTimeSeconds; - U64 time = totalTime(); // this will become the new gFrameTime when the update is done + LLUnit time = totalTime(); // this will become the new gFrameTime when the update is done // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - F64 time_diff = U64_to_F64(time - gFrameTime)/(F64)SEC_TO_MICROSEC; + LLUnit time_diff = time - gFrameTime; gFrameTime = time; - F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/(F64)SEC_TO_MICROSEC; - gFrameTimeSeconds = (F32)time_since_start; + LLUnit time_since_start = gFrameTime - gStartTime; + gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; if (gFrameIntervalSeconds < 0.f) @@ -1102,7 +1101,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) /* // Debugging code for viewing orphans, and orphaned parents LLUUID id; - for (i = 0; i < mOrphanParents.count(); i++) + for (i = 0; i < mOrphanParents.size(); i++) { id = sIndexAndLocalIDToUUID[mOrphanParents[i]]; LLViewerObject *objectp = findObject(id); @@ -1119,7 +1118,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } LLColor4 text_color; - for (i = 0; i < mOrphanChildren.count(); i++) + for (i = 0; i < mOrphanChildren.size(); i++) { OrphanInfo oi = mOrphanChildren[i]; LLViewerObject *objectp = findObject(oi.mChildInfo); -- cgit v1.2.3 From f58eb60b1e0bbdf2148255c61100cbc20d1ba1b0 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Aug 2013 08:17:21 -0700 Subject: SH-4374 WIP Interesting: Statistics Object cache hit rate is always 100% --- indra/newview/llviewerobjectlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4072ab524e..e50e666421 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -355,7 +355,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sample(sCacheHitRate, LLUnits::Percent::fromValue(100.f)); + sample(sCacheHitRate, LLUnits::Ratio::fromValue(1)); } if (objectp->isDead()) @@ -697,7 +697,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, continue; // no data packer, skip this object } - sample(sCacheHitRate, 100.f); + //sample(sCacheHitRate, LLUnits::Ratio::fromValue(0)); } return; -- cgit v1.2.3 From ddef4d7ff74ecff49e76afca58d1d3c2486e8af3 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 6 Aug 2013 16:35:46 -0600 Subject: revert some LLUnit changes to temporarily fix SH-4399: Interesting: Texture console MB Bound 0/384 and texture queue bounces once per second --- indra/newview/llviewerobjectlist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4072ab524e..0b75d44096 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1000,9 +1000,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - LLUnit time_diff = time - gFrameTime; + const F64 SEC_TO_MICROSEC = 1000000.f; + F64 time_diff = U64_to_F64(time - gFrameTime)/SEC_TO_MICROSEC; gFrameTime = time; - LLUnit time_since_start = gFrameTime - gStartTime; + F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/SEC_TO_MICROSEC; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; -- cgit v1.2.3 From 8d3daa141e9ea14f533559843d77ab5c0f715421 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 16:14:19 -0700 Subject: SH-4374 FIX Interesting: Statistics Object cache hit rate is always 100% moved object cache sampling code so that it actually gets executed default values for stats are NaN instead of 0 in many cases --- indra/newview/llviewerobjectlist.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e50e666421..d61b6ba18a 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -94,7 +94,6 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::SampleStatHandle > LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { @@ -308,6 +307,8 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); // Cache Hit. + record(LLStatViewer::OBJECT_CACHE_HIT_RATE, LLUnits::Ratio::fromValue(1)); + cached_dpp->reset(); cached_dpp->unpackUUID(fullid, "ID"); cached_dpp->unpackU32(local_id, "LocalID"); @@ -355,7 +356,6 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sample(sCacheHitRate, LLUnits::Ratio::fromValue(1)); } if (objectp->isDead()) @@ -697,7 +697,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, continue; // no data packer, skip this object } - //sample(sCacheHitRate, LLUnits::Ratio::fromValue(0)); } return; -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llviewerobjectlist.cpp | 114 +++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index d61b6ba18a..e8f68527e9 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -170,7 +170,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) U64 ipport = (((U64)ip) << 32) | (U64)port; U32 index = sIPAndPortToIndex[ipport]; - // llinfos << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << llendl; + // LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; U64 indexid = (((U64)index) << 32) | (U64)local_id; @@ -187,8 +187,8 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) return TRUE; } // UUIDs did not match - this would zap a valid entry, so don't erase it - //llinfos << "Tried to erase entry where id in table (" - // << iter->second << ") did not match object " << object.getID() << llendl; + //LL_INFOS() << "Tried to erase entry where id in table (" + // << iter->second << ") did not match object " << object.getID() << LL_ENDL; } return FALSE ; @@ -213,8 +213,8 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, sIndexAndLocalIDToUUID[indexid] = id; - //llinfos << "Adding object to table, full ID " << id - // << ", local ID " << local_id << ", ip " << ip << ":" << port << llendl; + //LL_INFOS() << "Adding object to table, full ID " << id + // << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; } S32 gFullObjectUpdates = 0; @@ -277,8 +277,8 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, { if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() ) { - // llinfos << "DEBUG selecting " << objectp->mID << " " - // << objectp->mLocalID << llendl; + // LL_INFOS() << "DEBUG selecting " << objectp->mID << " " + // << objectp->mLocalID << LL_ENDL; LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); dialog_refresh_all(); } @@ -350,7 +350,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* if (!objectp) { - llinfos << "createObject failure for object: " << fullid << llendl; + LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL; recorder.objectUpdateFailure(entry->getLocalID(), OUT_FULL_CACHED, 0); return NULL; } @@ -360,7 +360,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* if (objectp->isDead()) { - llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL; } processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); @@ -395,7 +395,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // I don't think this case is ever hit. TODO* Test this. if (!compressed && update_type != OUT_FULL) { - //llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; + //LL_INFOS() << "TEST: !cached && !compressed && update_type != OUT_FULL" << LL_ENDL; gTerseObjectUpdates += num_objects; /* S32 size; @@ -407,7 +407,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { size = mesgsys->getReceiveSize(); } - llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + LL_INFOS() << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL; */ } else @@ -423,7 +423,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, size = mesgsys->getReceiveSize(); } - llinfos << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + LL_INFOS() << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL; */ gFullObjectUpdates += num_objects; } @@ -435,7 +435,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (!regionp) { - llwarns << "Object update from unknown region! " << region_handle << llendl; + LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL; return; } @@ -487,7 +487,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, gMessageSystem->getSenderPort()); if (fullid.isNull()) { - // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << llendl; + // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL; mNumUnknownUpdates++; } } @@ -503,7 +503,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, gMessageSystem->getSenderPort()); if (fullid.isNull()) { - // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl; + // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << LL_ENDL; mNumUnknownUpdates++; } } @@ -514,7 +514,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); msg_size += sizeof(LLUUID); msg_size += sizeof(U32); - // llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl; + // LL_INFOS() << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << LL_ENDL; } objectp = findObject(fullid); @@ -532,13 +532,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { //if (objectp->getRegion()) //{ - // llinfos << "Local ID change: Removing object from table, local ID " << objectp->mLocalID + // LL_INFOS() << "Local ID change: Removing object from table, local ID " << objectp->mLocalID // << ", id from message " << local_id << ", from " // << LLHost(objectp->getRegion()->getHost().getAddress(), objectp->getRegion()->getHost().getPort()) // << ", full id " << fullid // << ", objects id " << objectp->getID() // << ", regionp " << (U32) regionp << ", object region " << (U32) objectp->getRegion() - // << llendl; + // << LL_ENDL; //} removeFromLocalIDTable(objectp); setUUIDAndLocal(fullid, @@ -563,7 +563,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type == OUT_TERSE_IMPROVED) { - // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; + // LL_INFOS() << "terse update for an unknown object (compressed):" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -572,7 +572,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type != OUT_FULL) { - //llinfos << "terse update for an unknown object:" << fullid << llendl; + //LL_INFOS() << "terse update for an unknown object:" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -585,7 +585,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; - //llinfos << "update for a dead object:" << fullid << llendl; + //LL_INFOS() << "update for a dead object:" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -594,7 +594,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender()); if (!objectp) { - llinfos << "createObject failure for object: " << fullid << llendl; + LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -605,7 +605,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (objectp->isDead()) { - llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL; } bool bCached = false; @@ -671,7 +671,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); if (!regionp) { - llwarns << "Object update from unknown region! " << region_handle << llendl; + LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL; return; } @@ -810,10 +810,10 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns + LL_WARNS() << "Transport error requesting object cost " << "[status: " << statusNum << "]: " - << content << llendl; + << content << LL_ENDL; // TODO*: Error message to user // For now just clear the request from the pending list @@ -826,11 +826,11 @@ public: { // Improper response or the request had an error, // show an error to the user? - llwarns + LL_WARNS() << "Application level error when fetching object " << "cost. Message: " << content["error"]["message"].asString() << ", identifier: " << content["error"]["identifier"].asString() - << llendl; + << LL_ENDL; // TODO*: Adaptively adjust request size if the // service says we've requested too many and retry @@ -899,10 +899,10 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns + LL_WARNS() << "Transport error requesting object physics flags " << "[status: " << statusNum << "]: " - << content << llendl; + << content << LL_ENDL; // TODO*: Error message to user // For now just clear the request from the pending list @@ -915,11 +915,11 @@ public: { // Improper response or the request had an error, // show an error to the user? - llwarns + LL_WARNS() << "Application level error when fetching object " << "physics flags. Message: " << content["error"]["message"].asString() << ", identifier: " << content["error"]["identifier"].asString() - << llendl; + << LL_ENDL; // TODO*: Adaptively adjust request size if the // service says we've requested too many and retry @@ -984,7 +984,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) phase_out_time < 0.0 || phase_out_time > interp_time) { - llwarns << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << llendl; + LL_WARNS() << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << LL_ENDL; interp_time = 3.0f; phase_out_time = 1.0f; } @@ -1044,7 +1044,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) else { // There shouldn't be any NULL pointers in the list, but they have caused // crashes before. This may be idleUpdate() messing with the list. - llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; + LL_WARNS() << "LLViewerObjectList::update has a NULL objectp" << LL_ENDL; } } } @@ -1280,7 +1280,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { - llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; + LL_INFOS() << "Object " << objectp->mID << " already on dead list!" << LL_ENDL; } else { @@ -1294,16 +1294,16 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) //if (objectp->getRegion()) //{ - // llinfos << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip " + // LL_INFOS() << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip " // << objectp->getRegion()->getHost().getAddress() << ":" - // << objectp->getRegion()->getHost().getPort() << llendl; + // << objectp->getRegion()->getHost().getPort() << LL_ENDL; //} removeFromLocalIDTable(objectp); if (objectp->onActiveList()) { - //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << llendl; + //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << LL_ENDL; objectp->setOnActiveList(FALSE); removeFromActiveList(objectp); } @@ -1403,19 +1403,19 @@ void LLViewerObjectList::killAllObjects() if(!mObjects.empty()) { - llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << llendl; + LL_WARNS() << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << LL_ENDL; mObjects.clear(); } if (!mActiveObjects.empty()) { - llwarns << "Some objects still on active object list!" << llendl; + LL_WARNS() << "Some objects still on active object list!" << LL_ENDL; mActiveObjects.clear(); } if (!mMapObjects.empty()) { - llwarns << "Some objects still on map object list!" << llendl; + LL_WARNS() << "Some objects still on map object list!" << LL_ENDL; mMapObjects.clear(); } } @@ -1506,7 +1506,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) { if (active) { - //llinfos << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << llendl; + //LL_INFOS() << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << LL_ENDL; S32 idx = objectp->getListIndex(); if (idx <= -1) { @@ -1522,13 +1522,13 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) if (idx >= mActiveObjects.size() || mActiveObjects[idx] != objectp) { - llwarns << "Invalid object list index detected!" << llendl; + LL_WARNS() << "Invalid object list index detected!" << LL_ENDL; } } } else { - //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << llendl; + //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << LL_ENDL; removeFromActiveList(objectp); objectp->setOnActiveList(FALSE); } @@ -1566,7 +1566,7 @@ void LLViewerObjectList::updateObjectCost(const LLUUID& object_id, F32 object_co void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id) { - //llwarns << "Failed to fetch object cost for object: " << object_id << llendl; + //LL_WARNS() << "Failed to fetch object cost for object: " << object_id << LL_ENDL; mPendingObjectCost.erase(object_id); } @@ -1605,7 +1605,7 @@ void LLViewerObjectList::updatePhysicsProperties(const LLUUID& object_id, void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) { - //llwarns << "Failed to fetch physics flags for object: " << object_id << llendl; + //LL_WARNS() << "Failed to fetch physics flags for object: " << object_id << LL_ENDL; mPendingPhysicsFlags.erase(object_id); } @@ -1708,7 +1708,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) if(dead_object_list.size() > 0) { - llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ; + LL_WARNS() << "There are " << dead_object_list.size() << " dead objects on the map!" << LL_ENDL ; for(std::set::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter) { @@ -1717,7 +1717,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) } if(region_object_list.size() > 0) { - llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ; + LL_WARNS() << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << LL_ENDL ; for(std::set::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter) { @@ -1983,7 +1983,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << LL_ENDL; return NULL; } @@ -2003,7 +2003,7 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL; return NULL; } @@ -2037,7 +2037,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL; return NULL; } if(regionp) @@ -2106,7 +2106,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip // object probably ISN'T being reparented, but just got an object // update out of order (child update before parent). make_invisible = false; - //llinfos << "Don't make object handoffs invisible!" << llendl; + //LL_INFOS() << "Don't make object handoffs invisible!" << LL_ENDL; } } @@ -2138,8 +2138,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) { if (objectp->isDead()) { - llwarns << "Trying to find orphans for dead obj " << objectp->mID - << ":" << objectp->getPCodeString() << llendl; + LL_WARNS() << "Trying to find orphans for dead obj " << objectp->mID + << ":" << objectp->getPCodeString() << LL_ENDL; return; } @@ -2179,8 +2179,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) { if (childp == objectp) { - llwarns << objectp->mID << " has self as parent, skipping!" - << llendl; + LL_WARNS() << objectp->mID << " has self as parent, skipping!" + << LL_ENDL; continue; } @@ -2213,7 +2213,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) } else { - llinfos << "Missing orphan child, removing from list" << llendl; + LL_INFOS() << "Missing orphan child, removing from list" << LL_ENDL; iter = mOrphanChildren.erase(iter); } -- cgit v1.2.3 From b39cf4770b6d73de51b0ed451139bb4502f396c8 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 12 Aug 2013 20:08:18 -0700 Subject: Backed out changeset: ed09997b4652 --- indra/newview/llviewerobjectlist.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 214d4f2bf6..e8f68527e9 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -999,10 +999,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - const F64 SEC_TO_MICROSEC = 1000000.f; - F64 time_diff = U64_to_F64(time - gFrameTime)/SEC_TO_MICROSEC; + LLUnit time_diff = time - gFrameTime; gFrameTime = time; - F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/SEC_TO_MICROSEC; + LLUnit time_since_start = gFrameTime - gStartTime; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/newview/llviewerobjectlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e8f68527e9..a8183e76b4 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -999,9 +999,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - LLUnit time_diff = time - gFrameTime; + LLUnits::F64Seconds time_diff = time - gFrameTime; gFrameTime = time; - LLUnit time_since_start = gFrameTime - gStartTime; + LLUnits::F64Seconds time_since_start = gFrameTime - gStartTime; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; -- cgit v1.2.3 From 9f7bfa1c3710856cd2b0a0a8a429d6c45b0fcd09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Aug 2013 00:02:23 -0700 Subject: moved unit types out of LLUnits namespace, since they are prefixed --- indra/newview/llviewerobjectlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index a8183e76b4..4643430c6b 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -995,13 +995,13 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // update global timer F32 last_time = gFrameTimeSeconds; - LLUnit time = totalTime(); // this will become the new gFrameTime when the update is done + U64Microseconds time = totalTime(); // this will become the new gFrameTime when the update is done // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - LLUnits::F64Seconds time_diff = time - gFrameTime; + F64Seconds time_diff = time - gFrameTime; gFrameTime = time; - LLUnits::F64Seconds time_since_start = gFrameTime - gStartTime; + F64Seconds time_since_start = gFrameTime - gStartTime; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; -- cgit v1.2.3 From edd1478cc0ba240d428fc4c35f9c97af7d2ce346 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 28 Aug 2013 17:27:28 -0600 Subject: fix for SH-4332: Cacheable object highlights from Render Metadata -> Update Type do not render --- indra/newview/llviewerobjectlist.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4643430c6b..897da7f0b3 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -365,7 +365,16 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); objectp->loadFlags(entry->getUpdateFlags()); //just in case, reload update flags from cache. - + + if(entry->getHitCount() > 0) + { + objectp->setLastUpdateType(OUT_FULL_CACHED); + } + else + { + objectp->setLastUpdateType(OUT_FULL_COMPRESSED); //newly cached + objectp->setLastUpdateCached(TRUE); + } recorder.log(0.2f); LLVOAvatar::cullAvatarsByPixelArea(); @@ -467,10 +476,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, 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); @@ -608,7 +617,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL; } - bool bCached = false; + //bool bCached = false; if (compressed) { if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? @@ -641,8 +650,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size); - objectp->setLastUpdateType(update_type); - objectp->setLastUpdateCached(bCached); + objectp->setLastUpdateType(update_type); } recorder.log(0.2f); -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/newview/llviewerobjectlist.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 897da7f0b3..686eff8426 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -289,7 +289,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { @@ -386,7 +386,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, bool compressed) { - LLFastTimer t(FTM_PROCESS_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS); LLViewerObject *objectp; S32 num_objects; @@ -978,7 +978,7 @@ private: LLSD mObjectIDs; }; -static LLFastTimer::DeclareTimer FTM_IDLE_COPY("Idle Copy"); +static LLTrace::TimeBlock FTM_IDLE_COPY("Idle Copy"); void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { @@ -1031,7 +1031,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) U32 idle_count = 0; { - LLFastTimer t(FTM_IDLE_COPY); + LL_RECORD_BLOCK_TIME(FTM_IDLE_COPY); for (std::vector >::iterator active_iter = mActiveObjects.begin(); active_iter != mActiveObjects.end(); active_iter++) @@ -1328,11 +1328,11 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) mNumDeadObjects++; } -static LLFastTimer::DeclareTimer FTM_REMOVE_DRAWABLE("Remove Drawable"); +static LLTrace::TimeBlock FTM_REMOVE_DRAWABLE("Remove Drawable"); void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) { - LLFastTimer t(FTM_REMOVE_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_DRAWABLE); if (!drawablep) { @@ -1617,9 +1617,9 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) mPendingPhysicsFlags.erase(object_id); } -static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects"); -static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift"); -static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift"); +static LLTrace::TimeBlock FTM_SHIFT_OBJECTS("Shift Objects"); +static LLTrace::TimeBlock FTM_PIPELINE_SHIFT("Pipeline Shift"); +static LLTrace::TimeBlock FTM_REGION_SHIFT("Region Shift"); void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { @@ -1632,7 +1632,7 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) return; } - LLFastTimer t(FTM_SHIFT_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_OBJECTS); LLViewerObject *objectp; for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) @@ -1651,12 +1651,12 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) } { - LLFastTimer t(FTM_PIPELINE_SHIFT); + LL_RECORD_BLOCK_TIME(FTM_PIPELINE_SHIFT); gPipeline.shiftObjects(offset); } { - LLFastTimer t(FTM_REGION_SHIFT); + LL_RECORD_BLOCK_TIME(FTM_REGION_SHIFT); LLWorld::getInstance()->shiftRegions(offset); } } -- cgit v1.2.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/newview/llviewerobjectlist.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 686eff8426..861fc1b8bc 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -289,7 +289,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Objects"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { @@ -978,7 +978,7 @@ private: LLSD mObjectIDs; }; -static LLTrace::TimeBlock FTM_IDLE_COPY("Idle Copy"); +static LLTrace::BlockTimerStatHandle FTM_IDLE_COPY("Idle Copy"); void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { @@ -1328,7 +1328,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) mNumDeadObjects++; } -static LLTrace::TimeBlock FTM_REMOVE_DRAWABLE("Remove Drawable"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_DRAWABLE("Remove Drawable"); void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) { @@ -1617,9 +1617,9 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) mPendingPhysicsFlags.erase(object_id); } -static LLTrace::TimeBlock FTM_SHIFT_OBJECTS("Shift Objects"); -static LLTrace::TimeBlock FTM_PIPELINE_SHIFT("Pipeline Shift"); -static LLTrace::TimeBlock FTM_REGION_SHIFT("Region Shift"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_OBJECTS("Shift Objects"); +static LLTrace::BlockTimerStatHandle FTM_PIPELINE_SHIFT("Pipeline Shift"); +static LLTrace::BlockTimerStatHandle FTM_REGION_SHIFT("Region Shift"); void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { -- cgit v1.2.3 From 4a3e01f8dc1e8cf38183c9be564c7f4fa5dd49d3 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 4 Dec 2013 12:36:28 -0700 Subject: fix for SH-4631: Parts of linked objects are not shown in new release Second Life 3.6.11 --- indra/newview/llviewerobjectlist.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 173473dded..5212ab3651 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -458,7 +458,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, LLTimer update_timer; BOOL justCreated = FALSE; S32 msg_size = 0; - bool remove_from_cache = false; //remove from object cache if it is a full-update or terse update + bool update_cache = false; //update object cache if it is a full-update or terse update if (compressed) { @@ -486,9 +486,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, continue; } } - else + else //OUT_TERSE_IMPROVED { - remove_from_cache = true; + update_cache = true; compressed_dp.unpackU32(local_id, "LocalID"); getUUIDFromLocal(fullid, local_id, @@ -518,7 +518,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else // OUT_FULL only? { - remove_from_cache = true; + update_cache = true; mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); msg_size += sizeof(LLUUID); @@ -527,9 +527,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } objectp = findObject(fullid); - if(remove_from_cache) + if(update_cache) { - objectp = regionp->forceToRemoveFromCache(local_id, objectp); + objectp = regionp->updateCacheEntry(local_id, objectp, update_type); } // This looks like it will break if the local_id of the object doesn't change -- cgit v1.2.3