From 0dce88bc92cfb1ebebb575087ca950a6d5363c0c Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Fri, 19 Nov 2010 16:49:24 -0800 Subject: ER-330 : Improve ObjectUpdateCached message packing. Added some viewer metrics, will disable later. --- indra/newview/llviewerobjectlist.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f5a32438cf..d14fd69348 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -56,6 +56,7 @@ #include "llresmgr.h" #include "llviewerregion.h" #include "llviewerstats.h" +#include "llviewerstatsrecorder.h" #include "llvoavatarself.h" #include "lltoolmgr.h" #include "lltoolpie.h" @@ -345,7 +346,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U8 compressed_dpbuffer[2048]; LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048); LLDataPacker *cached_dpp = NULL; - + +#if LL_RECORD_VIEWER_STATS + static LLViewerStatsRecorder stats_recorder; + stats_recorder.initStatsRecorder(regionp); + stats_recorder.initCachedObjectUpdate(regionp); +#endif + for (i = 0; i < num_objects; i++) { LLTimer update_timer; @@ -369,6 +376,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else { + #if LL_RECORD_VIEWER_STATS + stats_recorder.recordCachedObjectEvent(regionp, id, NULL); + #endif + continue; // no data packer, skip this object } } @@ -540,6 +551,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { objectp->mLocalID = local_id; processUpdateCore(objectp, user_data, i, update_type, cached_dpp, justCreated); + + #if LL_RECORD_VIEWER_STATS + stats_recorder.recordCachedObjectEvent(regionp, local_id, objectp); + #endif } else { @@ -551,6 +566,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } } +#if LL_RECORD_VIEWER_STATS + stats_recorder.closeCachedObjectUpdate(regionp); +#endif + LLVOAvatar::cullAvatarsByPixelArea(); } -- cgit v1.2.3 From 03b68dad4bb6da4fa6ca7dcd05af91cfc96b4e31 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 9 Dec 2010 20:02:36 -0800 Subject: Expanded viewer stats recorder metrics to include all object update types --- indra/newview/llviewerobjectlist.cpp | 75 +++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 26 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index d14fd69348..5a42f10c8f 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -303,8 +303,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // have to transform to absolute coordinates. 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) { + llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; gTerseObjectUpdates += num_objects; S32 size; if (mesgsys->getReceiveCompressedSize()) @@ -315,7 +317,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { size = mesgsys->getReceiveSize(); } - // llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; } else { @@ -349,12 +351,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, #if LL_RECORD_VIEWER_STATS static LLViewerStatsRecorder stats_recorder; - stats_recorder.initStatsRecorder(regionp); - stats_recorder.initCachedObjectUpdate(regionp); + stats_recorder.initObjectUpdateEvents(regionp); #endif for (i = 0; i < num_objects; i++) { + // timer is unused? LLTimer update_timer; BOOL justCreated = FALSE; @@ -369,6 +371,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, cached_dpp = regionp->getDP(id, crc); if (cached_dpp) { + // Cache Hit. cached_dpp->reset(); cached_dpp->unpackUUID(fullid, "ID"); cached_dpp->unpackU32(local_id, "LocalID"); @@ -376,8 +379,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else { + // Cache Miss. #if LL_RECORD_VIEWER_STATS - stats_recorder.recordCachedObjectEvent(regionp, id, NULL); + const BOOL success = TRUE; + stats_recorder.recordObjectUpdateEvent(regionp, id, update_type, success, NULL); #endif continue; // no data packer, skip this object @@ -391,13 +396,15 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, compressed_dp.reset(); U32 flags = 0; - if (update_type != OUT_TERSE_IMPROVED) + if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); } + // I don't think we ever use this flag from the server. DK 2010/12/09 if (flags & FLAGS_ZLIB_COMPRESSED) { + llinfos << "TEST: flags & FLAGS_ZLIB_COMPRESSED" << llendl; compressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compbuffer, 0, i); uncompressed_length = 2048; @@ -413,7 +420,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } - if (update_type != OUT_TERSE_IMPROVED) + if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { compressed_dp.unpackUUID(fullid, "ID"); compressed_dp.unpackU32(local_id, "LocalID"); @@ -433,7 +440,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } } } - else if (update_type != OUT_FULL) + else if (update_type != OUT_FULL) // !compressed, !OUT_FULL ==> OUT_FULL_CACHED only? { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); getUUIDFromLocal(fullid, @@ -446,7 +453,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, mNumUnknownUpdates++; } } - else + else // OUT_FULL only? { mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); @@ -478,12 +485,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, gMessageSystem->getSenderPort()); if (objectp->mLocalID != local_id) - { // Update local ID in object with the one sent from the region + { // Update local ID in object with the one sent from the region objectp->mLocalID = local_id; } if (objectp->getRegion() != regionp) - { // Object changed region, so update it + { // Object changed region, so update it objectp->updateRegion(regionp); // for LLVOAvatar } } @@ -495,10 +502,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type == OUT_TERSE_IMPROVED) { // llinfos << "terse update for an unknown object:" << fullid << llendl; + #if LL_RECORD_VIEWER_STATS + const BOOL success = FALSE; + stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + #endif continue; } } - else if (cached) + else if (cached) // Cache hit only? { } else @@ -506,6 +517,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_FULL) { // llinfos << "terse update for an unknown object:" << fullid << llendl; + #if LL_RECORD_VIEWER_STATS + const BOOL success = FALSE; + stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + #endif continue; } @@ -516,6 +531,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { mNumDeadObjectUpdates++; // llinfos << "update for a dead object:" << fullid << llendl; + #if LL_RECORD_VIEWER_STATS + const BOOL success = FALSE; + stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + #endif continue; } #endif @@ -523,6 +542,10 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender()); if (!objectp) { + #if LL_RECORD_VIEWER_STATS + const BOOL success = FALSE; + stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + #endif continue; } justCreated = TRUE; @@ -537,24 +560,20 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (compressed) { - if (update_type != OUT_TERSE_IMPROVED) + if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { objectp->mLocalID = local_id; } processUpdateCore(objectp, user_data, i, update_type, &compressed_dp, justCreated); - if (update_type != OUT_TERSE_IMPROVED) + if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); } } - else if (cached) + else if (cached) // Cache hit only? { objectp->mLocalID = local_id; processUpdateCore(objectp, user_data, i, update_type, cached_dpp, justCreated); - - #if LL_RECORD_VIEWER_STATS - stats_recorder.recordCachedObjectEvent(regionp, local_id, objectp); - #endif } else { @@ -564,10 +583,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } + #if LL_RECORD_VIEWER_STATS + const BOOL success = TRUE; + stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, objectp); + #endif } #if LL_RECORD_VIEWER_STATS - stats_recorder.closeCachedObjectUpdate(regionp); + stats_recorder.closeObjectUpdateEvents(regionp); #endif LLVOAvatar::cullAvatarsByPixelArea(); @@ -700,12 +723,12 @@ 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 + U64 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; - gFrameTime = time; + gFrameTime = time; F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/(F64)SEC_TO_MICROSEC; gFrameTimeSeconds = (F32)time_since_start; @@ -807,7 +830,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { std::string id_str; objectp->mID.toString(id_str); - std::string tmpstr = std::string("Par: ") + id_str; + std::string tmpstr = std::string("Par: ") + id_str; addDebugBeacon(objectp->getPositionAgent(), tmpstr, LLColor4(1.f,0.f,0.f,1.f), @@ -827,12 +850,12 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) std::string tmpstr; if (objectp->getParent()) { - tmpstr = std::string("ChP: ") + id_str; + tmpstr = std::string("ChP: ") + id_str; text_color = LLColor4(0.f, 1.f, 0.f, 1.f); } else { - tmpstr = std::string("ChNoP: ") + id_str; + tmpstr = std::string("ChNoP: ") + id_str; text_color = LLColor4(1.f, 0.f, 0.f, 1.f); } id = sIndexAndLocalIDToUUID[oi.mParentInfo]; @@ -1538,8 +1561,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) llinfos << "Agent: " << objectp->getPositionAgent() << llendl; addDebugBeacon(objectp->getPositionAgent(),""); #endif - gPipeline.markMoved(objectp->mDrawable); - objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE); + gPipeline.markMoved(objectp->mDrawable); + objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE); // Flag the object as no longer orphaned childp->mOrphaned = FALSE; -- cgit v1.2.3 From f4884faf3a020a718c611f34aa534e80d8a8b666 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 12:33:19 -0800 Subject: Expanded viewer stats recorder to include cache miss type, cache miss requests, and update failures --- indra/newview/llviewerobjectlist.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 5a42f10c8f..249799bf55 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -350,8 +350,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, LLDataPacker *cached_dpp = NULL; #if LL_RECORD_VIEWER_STATS - static LLViewerStatsRecorder stats_recorder; - stats_recorder.initObjectUpdateEvents(regionp); + LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(regionp); #endif for (i = 0; i < num_objects; i++) @@ -368,7 +367,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); // Lookup data packer and add this id to cache miss lists if necessary. - cached_dpp = regionp->getDP(id, crc); + U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; + cached_dpp = regionp->getDP(id, crc, cache_miss_type); if (cached_dpp) { // Cache Hit. @@ -381,8 +381,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { // Cache Miss. #if LL_RECORD_VIEWER_STATS - const BOOL success = TRUE; - stats_recorder.recordObjectUpdateEvent(regionp, id, update_type, success, NULL); + LLViewerStatsRecorder::instance()->recordCacheMissEvent(id, update_type, cache_miss_type); #endif continue; // no data packer, skip this object @@ -503,8 +502,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { // llinfos << "terse update for an unknown object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS - const BOOL success = FALSE; - stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif continue; } @@ -518,8 +516,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { // llinfos << "terse update for an unknown object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS - const BOOL success = FALSE; - stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif continue; } @@ -532,8 +529,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, mNumDeadObjectUpdates++; // llinfos << "update for a dead object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS - const BOOL success = FALSE; - stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif continue; } @@ -543,8 +539,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (!objectp) { #if LL_RECORD_VIEWER_STATS - const BOOL success = FALSE; - stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, NULL); + LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif continue; } @@ -584,13 +579,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } #if LL_RECORD_VIEWER_STATS - const BOOL success = TRUE; - stats_recorder.recordObjectUpdateEvent(regionp, local_id, update_type, success, objectp); + LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); #endif } #if LL_RECORD_VIEWER_STATS - stats_recorder.closeObjectUpdateEvents(regionp); + LLViewerStatsRecorder::instance()->endObjectUpdateEvents(); #endif LLVOAvatar::cullAvatarsByPixelArea(); -- cgit v1.2.3 From b71b9ee08e0b59274346a3b4da2c33ff84a5eb90 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 16:15:25 -0800 Subject: Added object update cache results to viewer stats recorder --- 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 249799bf55..64949ecc44 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -500,7 +500,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type == OUT_TERSE_IMPROVED) { - // llinfos << "terse update for an unknown object:" << fullid << llendl; + llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -514,7 +514,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type != OUT_FULL) { - // llinfos << "terse update for an unknown object:" << fullid << llendl; + llinfos << "terse update for an unknown object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -527,7 +527,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; - // llinfos << "update for a dead object:" << fullid << llendl; + llinfos << "update for a dead object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -538,6 +538,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender()); if (!objectp) { + llinfos << "createObject failure for object: " << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -562,7 +563,10 @@ 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? { - objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + #if LL_RECORD_VIEWER_STATS + LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp); + #endif } } else if (cached) // Cache hit only? -- cgit v1.2.3 From 01c13c3b9403991c04166f6ac57c93aaf5f17f83 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 18:29:31 -0800 Subject: Added in-world color coding to objects based on update type --- indra/newview/llviewerobjectlist.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 64949ecc44..285f067b0e 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -554,6 +554,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; } + bool bCached = false; if (compressed) { if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? @@ -564,6 +565,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + bCached = true; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp); #endif @@ -584,6 +586,36 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); + F32 color_strength = llmin((LLViewerStatsRecorder::instance()->getTimeSinceStart() / 1000.0f) + 64.0f, 255.0f); + LLColor4 color; + switch (update_type) + { + case OUT_FULL: + color[VGREEN] = color_strength; + break; + case OUT_TERSE_IMPROVED: + color[VGREEN] = color_strength; + color[VBLUE] = color_strength; + break; + case OUT_FULL_COMPRESSED: + color[VRED] = color_strength; + if (!bCached) + { + color[VGREEN] = color_strength; + } + break; + case OUT_FULL_CACHED: + color[VBLUE] = color_strength; + break; + default: + llwarns << "Unknown update_type " << update_type << llendl; + break; + }; + U8 te; + for (te = 0; te < objectp->getNumTEs(); ++te) + { + objectp->setTEColor(te, color); + } #endif } -- cgit v1.2.3 From 2938086cdc8668913181ae4072866ae2993e0375 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Tue, 14 Dec 2010 15:56:09 -0800 Subject: Simple fix for color strength of viewer update goggles. --- 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 285f067b0e..70631f9481 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -586,7 +586,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); - F32 color_strength = llmin((LLViewerStatsRecorder::instance()->getTimeSinceStart() / 1000.0f) + 64.0f, 255.0f); + F32 color_strength = llmin(((LLViewerStatsRecorder::instance()->getTimeSinceStart() / 1000.0f) + 128.0f) / 255.0f, 1.0f); LLColor4 color; switch (update_type) { -- cgit v1.2.3 From 14e402cf5e8274caddaf1c763c2e044c53514b1e Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 16 Dec 2010 22:09:49 -0800 Subject: ER-414: Add object update type debug rendering view --- indra/newview/llviewerobjectlist.cpp | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 70631f9481..77fbc08ca4 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -564,10 +564,12 @@ 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? { - LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); bCached = true; #if LL_RECORD_VIEWER_STATS + LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp); + #else + objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); #endif } } @@ -586,37 +588,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); - F32 color_strength = llmin(((LLViewerStatsRecorder::instance()->getTimeSinceStart() / 1000.0f) + 128.0f) / 255.0f, 1.0f); - LLColor4 color; - switch (update_type) - { - case OUT_FULL: - color[VGREEN] = color_strength; - break; - case OUT_TERSE_IMPROVED: - color[VGREEN] = color_strength; - color[VBLUE] = color_strength; - break; - case OUT_FULL_COMPRESSED: - color[VRED] = color_strength; - if (!bCached) - { - color[VGREEN] = color_strength; - } - break; - case OUT_FULL_CACHED: - color[VBLUE] = color_strength; - break; - default: - llwarns << "Unknown update_type " << update_type << llendl; - break; - }; - U8 te; - for (te = 0; te < objectp->getNumTEs(); ++te) - { - objectp->setTEColor(te, color); - } #endif + objectp->setLastUpdateType(update_type); + objectp->setLastUpdateCached(bCached); } #if LL_RECORD_VIEWER_STATS -- cgit v1.2.3 From 649dd6eb74023d48379ebaadd2ff000801306f17 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Wed, 22 Dec 2010 14:23:35 -0800 Subject: Cleanup from review with Andrew and Merov --- 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 77fbc08ca4..5849ab4307 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -306,7 +306,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // I don't think this case is ever hit. TODO* Test this. if (!cached && !compressed && update_type != OUT_FULL) { - llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; + //llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; gTerseObjectUpdates += num_objects; S32 size; if (mesgsys->getReceiveCompressedSize()) @@ -317,7 +317,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { size = mesgsys->getReceiveSize(); } - llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + //llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; } else { @@ -403,7 +403,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // I don't think we ever use this flag from the server. DK 2010/12/09 if (flags & FLAGS_ZLIB_COMPRESSED) { - llinfos << "TEST: flags & FLAGS_ZLIB_COMPRESSED" << llendl; + //llinfos << "TEST: flags & FLAGS_ZLIB_COMPRESSED" << llendl; compressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compbuffer, 0, i); uncompressed_length = 2048; @@ -500,7 +500,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type == OUT_TERSE_IMPROVED) { - llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; + // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -514,7 +514,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type != OUT_FULL) { - llinfos << "terse update for an unknown object:" << fullid << llendl; + //llinfos << "terse update for an unknown object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif @@ -527,7 +527,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; - llinfos << "update for a dead object:" << fullid << llendl; + //llinfos << "update for a dead object:" << fullid << llendl; #if LL_RECORD_VIEWER_STATS LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); #endif -- cgit v1.2.3