diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-05-31 13:54:32 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-05-31 13:54:32 -0400 |
commit | 9552f733ef0b581158665a1a464b5be7d4bada2a (patch) | |
tree | 8b847012264a42ff8c3776ba345b6c509a060788 /indra/newview | |
parent | faaf8ba5c75c925d9922dda8ce43293222cadb3b (diff) |
SH-3635 WIP
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.h | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.cpp | 40 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.h | 5 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.cpp | 3 |
7 files changed, 51 insertions, 37 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 30b6169b46..2288f633f4 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -397,6 +397,12 @@ public: LLCallAfterInventoryBatchMgr(dst_cat_id, phase_name, on_completion_func, on_failure_func, retry_after, max_retries) { addItems(src_items); + sInstanceCount++; + } + + ~LLCallAfterInventoryCopyMgr() + { + sInstanceCount--; } virtual bool requestOperation(const LLUUID& item_id) @@ -419,8 +425,15 @@ public: ); return true; } + + static S32 getInstanceCount() { return sInstanceCount; } + +private: + static S32 sInstanceCount; }; +S32 LLCallAfterInventoryCopyMgr::sInstanceCount = 0; + LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering, bool enforce_item_restrictions, bool enforce_ordering): @@ -2154,6 +2167,11 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool category->getUUID(), copy, append)); } +S32 LLAppearanceMgr::getActiveCopyOperations() const +{ + return LLCallAfterInventoryCopyMgr::getInstanceCount(); +} + void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append) { LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 3fb470ef14..4679ceaf57 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -71,6 +71,8 @@ public: LLInventoryModel::item_array_t& items_to_kill); void enforceCOFItemRestrictions(LLPointer<LLInventoryCallback> cb); + S32 getActiveCopyOperations() const; + // Copy all items and the src category itself. void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index e77b29aca4..b635087d66 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1877,7 +1877,7 @@ std::string LLViewerRegion::getCapability(const std::string& name) const { if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia"))) { - llwarns << "getCapability called before caps received" << llendl; + llwarns << "getCapability called before caps received for " << name << llendl; } CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b73411080a..68633fba6e 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -734,44 +734,28 @@ void send_stats() LLHTTPClient::post(url, body, new ViewerStatsResponder()); } -LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name) +LLTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name) { phase_map_t::iterator iter = mPhaseMap.find(phase_name); if (iter == mPhaseMap.end()) { - LLFrameTimer timer; + LLTimer timer; mPhaseMap[phase_name] = timer; } - LLFrameTimer& timer = mPhaseMap[phase_name]; + LLTimer& timer = mPhaseMap[phase_name]; return timer; } void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name) { - LLFrameTimer& timer = getPhaseTimer(phase_name); - lldebugs << "startPhase " << phase_name << llendl; - timer.unpause(); -} - -void LLViewerStats::PhaseMap::stopAllPhases() -{ - for (phase_map_t::iterator iter = mPhaseMap.begin(); - iter != mPhaseMap.end(); ++iter) - { - const std::string& phase_name = iter->first; - if (iter->second.getStarted()) - { - // Going from started to paused state - record stats. - recordPhaseStat(phase_name,iter->second.getElapsedTimeF32()); - } - lldebugs << "stopPhase (all) " << phase_name << llendl; - iter->second.pause(); - } + LLTimer& timer = getPhaseTimer(phase_name); + timer.start(); + LL_DEBUGS("Avatar") << "startPhase " << phase_name << llendl; } void LLViewerStats::PhaseMap::clearPhases() { - lldebugs << "clearPhases" << llendl; + LL_DEBUGS("Avatar") << "clearPhases" << llendl; mPhaseMap.clear(); } @@ -796,7 +780,6 @@ LLViewerStats::PhaseMap::PhaseMap() { } - void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) { phase_map_t::iterator iter = mPhaseMap.find(phase_name); @@ -809,6 +792,7 @@ void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) } } } + // static LLViewerStats::StatsAccumulator& LLViewerStats::PhaseMap::getPhaseStats(const std::string& phase_name) { @@ -832,14 +816,18 @@ void LLViewerStats::PhaseMap::recordPhaseStat(const std::string& phase_name, F32 bool LLViewerStats::PhaseMap::getPhaseValues(const std::string& phase_name, F32& elapsed, bool& completed) { phase_map_t::iterator iter = mPhaseMap.find(phase_name); + bool found = false; if (iter != mPhaseMap.end()) { + found = true; elapsed = iter->second.getElapsedTimeF32(); completed = !iter->second.getStarted(); - return true; + LL_DEBUGS("Avatar") << " phase_name " << phase_name << " elapsed " << elapsed << " completed " << completed << " timer addr " << (S32)(&iter->second) << llendl; } else { - return false; + LL_DEBUGS("Avatar") << " phase_name " << phase_name << " NOT FOUND" << llendl; } + + return found; } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 6b2461be41..eaa0b6beff 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -279,7 +279,7 @@ public: // Phase tracking (originally put in for avatar rezzing), tracking // progress of active/completed phases for activities like outfit changing. - typedef std::map<std::string,LLFrameTimer> phase_map_t; + typedef std::map<std::string,LLTimer> phase_map_t; typedef std::map<std::string,StatsAccumulator> phase_stats_t; class PhaseMap { @@ -288,11 +288,10 @@ public: static phase_stats_t sStats; public: PhaseMap(); - LLFrameTimer& getPhaseTimer(const std::string& phase_name); + LLTimer& getPhaseTimer(const std::string& phase_name); bool getPhaseValues(const std::string& phase_name, F32& elapsed, bool& completed); void startPhase(const std::string& phase_name); void stopPhase(const std::string& phase_name); - void stopAllPhases(); void clearPhases(); LLSD dumpPhases(); static StatsAccumulator& getPhaseStats(const std::string& phase_name); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6df5fab42b..2cbdf93eeb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6013,9 +6013,12 @@ void LLVOAvatar::clearPhases() void LLVOAvatar::startPhase(const std::string& phase_name) { - F32 elapsed; - bool completed; - if (getPhases().getPhaseValues(phase_name, elapsed, completed)) + F32 elapsed = 0.0; + bool completed = false; + bool found = getPhases().getPhaseValues(phase_name, elapsed, completed); + //LL_DEBUGS("Avatar") << avString() << " phase state " << phase_name + // << " found " << found << " elapsed " << elapsed << " completed " << completed << llendl; + if (found) { if (!completed) { @@ -6029,9 +6032,12 @@ void LLVOAvatar::startPhase(const std::string& phase_name) void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) { - F32 elapsed; - bool completed; - if (getPhases().getPhaseValues(phase_name, elapsed, completed)) + F32 elapsed = 0.0; + bool completed = false; + bool found = getPhases().getPhaseValues(phase_name, elapsed, completed); + //LL_DEBUGS("Avatar") << avString() << " phase state " << phase_name + // << " found " << found << " elapsed " << elapsed << " completed " << completed << llendl; + if (found) { if (!completed) { diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 5b6fcc5d27..b2fcfb6250 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -246,6 +246,8 @@ bool LLVOAvatarSelf::checkStuckAppearance() LL_DEBUGS("Avatar") << "change in progress for " << change_time << " seconds" << llendl; S32 active_hp = LLAppearanceMgr::instance().countActiveHoldingPatterns(); LL_DEBUGS("Avatar") << "active holding patterns " << active_hp << " seconds" << llendl; + S32 active_copies = LLAppearanceMgr::instance().getActiveCopyOperations(); + LL_DEBUGS("Avatar") << "active copy operations " << active_copies << llendl; } // Return false to continue running check periodically. @@ -2369,7 +2371,6 @@ LLSD summarize_by_buckets(std::vector<LLSD> in_records, void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics() { - // gAgentAvatarp->stopAllPhases(); static volatile bool reporting_started(false); static volatile S32 report_sequence(0); |