summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llassettype.cpp3
-rw-r--r--indra/llmessage/llassetstorage.h2
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/lltexturefetch.cpp5
-rw-r--r--indra/newview/llviewerassetstorage.cpp51
-rw-r--r--indra/newview/llviewerassetstorage.h8
-rw-r--r--indra/newview/llviewerdisplay.cpp7
7 files changed, 81 insertions, 6 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index 5e8129b9b2..4304db36be 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -31,9 +31,6 @@
#include "llmemory.h"
#include "llsingleton.h"
-#include <set>
-#include <boost/algorithm/string.hpp>
-
///----------------------------------------------------------------------------
/// Class LLAssetType
///----------------------------------------------------------------------------
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index d6b4fa0c7b..33b88473b9 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -253,6 +253,8 @@ public:
bool user_waiting= false,
F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) = 0;
+ virtual void logAssetStorageInfo() = 0;
+
void checkForTimeouts();
void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 097a9ac7b9..d2d629339d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14639,6 +14639,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>AssetStorageLogFrequency</key>
+ <map>
+ <key>Comment</key>
+ <string>Seconds between display of AssetStorage info in log (0 for never)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>60.0</real>
+ </map>
<key>LogWearableAssetSave</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 09d7c2eb2d..7245a70962 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1428,7 +1428,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
F64 byte_count = 0;
for (S32 i=mFirstPacket; i<=mLastPacket; i++)
{
- byte_count += mPackets[i]->mSize;
+ if (mPackets[i])
+ {
+ byte_count += mPackets[i]->mSize;
+ }
}
LL_DEBUGS(LOG_TXT) << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL;
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 6523b89d7f..9918d226c2 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -99,17 +99,30 @@ public:
/// LLViewerAssetStorage
///----------------------------------------------------------------------------
+// Unused?
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, LLVFS *static_vfs,
const LLHost &upstream_host)
- : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host)
+ : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host),
+ mAssetCoroCount(0),
+ mCountRequests(0),
+ mCountStarted(0),
+ mCountCompleted(0),
+ mCountSucceeded(0),
+ mTotalBytesFetched(0)
{
}
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, LLVFS *static_vfs)
- : LLAssetStorage(msg, xfer, vfs, static_vfs)
+ : LLAssetStorage(msg, xfer, vfs, static_vfs),
+ mAssetCoroCount(0),
+ mCountRequests(0),
+ mCountStarted(0),
+ mCountCompleted(0),
+ mCountSucceeded(0),
+ mTotalBytesFetched(0)
{
}
@@ -351,6 +364,7 @@ void LLViewerAssetStorage::_queueDataRequest(
BOOL duplicate,
BOOL is_priority)
{
+ mCountRequests++;
queueRequestHttp(uuid, atype, callback, user_data, duplicate, is_priority);
}
@@ -404,6 +418,20 @@ void LLViewerAssetStorage::capsRecvForRegion(const LLUUID& region_id, std::strin
LLEventPumps::instance().obtain(pumpname).post(LLSD());
}
+struct LLScopedIncrement
+{
+ LLScopedIncrement(S32& counter):
+ mCounter(counter)
+ {
+ ++mCounter;
+ }
+ ~LLScopedIncrement()
+ {
+ --mCounter;
+ }
+ S32& mCounter;
+};
+
void LLViewerAssetStorage::assetRequestCoro(
LLViewerAssetRequest *req,
const LLUUID& uuid,
@@ -411,6 +439,9 @@ void LLViewerAssetStorage::assetRequestCoro(
LLGetAssetCallback callback,
void *user_data)
{
+ LLScopedIncrement coro_count_boost(mAssetCoroCount);
+ mCountStarted++;
+
S32 result_code = LL_ERR_NOERR;
LLExtStat ext_status = LL_EXSTAT_NONE;
@@ -463,6 +494,8 @@ void LLViewerAssetStorage::assetRequestCoro(
// Bail out if result arrives after shutdown has been started.
return;
}
+
+ mCountCompleted++;
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@@ -481,6 +514,8 @@ void LLViewerAssetStorage::assetRequestCoro(
S32 size = raw.size();
if (size > 0)
{
+ mTotalBytesFetched += size;
+
// This create-then-rename flow is modeled on
// LLTransferTargetVFile, which is what was used in the UDP
// case.
@@ -502,6 +537,7 @@ void LLViewerAssetStorage::assetRequestCoro(
result_code = LL_ERR_ASSET_REQUEST_FAILED;
ext_status = LL_EXSTAT_VFS_CORRUPT;
}
+ mCountSucceeded++;
}
else
{
@@ -522,3 +558,14 @@ std::string LLViewerAssetStorage::getAssetURL(const std::string& cap_url, const
std::string url = cap_url + "/?" + type_name + "_id=" + uuid.asString();
return url;
}
+
+void LLViewerAssetStorage::logAssetStorageInfo()
+{
+ LLMemory::logMemoryInfo(true);
+ LL_INFOS("AssetStorage") << "Active coros " << mAssetCoroCount << LL_ENDL;
+ LL_INFOS("AssetStorage") << "mPendingDownloads size " << mPendingDownloads.size() << LL_ENDL;
+ LL_INFOS("AssetStorage") << "mCountStarted " << mCountStarted << LL_ENDL;
+ LL_INFOS("AssetStorage") << "mCountCompleted " << mCountCompleted << LL_ENDL;
+ LL_INFOS("AssetStorage") << "mCountSucceeded " << mCountSucceeded << LL_ENDL;
+ LL_INFOS("AssetStorage") << "mTotalBytesFetched " << mTotalBytesFetched << LL_ENDL;
+}
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index 2f3eaa15a7..8a58241378 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -90,7 +90,15 @@ protected:
std::string getAssetURL(const std::string& cap_url, const LLUUID& uuid, LLAssetType::EType atype);
+ void logAssetStorageInfo();
+
std::string mViewerAssetUrl;
+ S32 mAssetCoroCount;
+ S32 mCountRequests;
+ S32 mCountStarted;
+ S32 mCountCompleted;
+ S32 mCountSucceeded;
+ S64 mTotalBytesFetched;
};
#endif
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index afa00e3e6e..bfa9fa03fa 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -106,6 +106,7 @@ const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
U32 gRecentFrameCount = 0; // number of 'recent' frames
LLFrameTimer gRecentFPSTime;
LLFrameTimer gRecentMemoryTime;
+LLFrameTimer gAssetStorageLogTime;
// Rendering stuff
void pre_show_depth_buffer();
@@ -226,6 +227,12 @@ void display_stats()
LLMemory::logMemoryInfo(TRUE) ;
gRecentMemoryTime.reset();
}
+ F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency");
+ if (asset_storage_log_freq > 0.f && gAssetStorageLogTime.getElapsedTimeF32() >= asset_storage_log_freq)
+ {
+ gAssetStorageLogTime.reset();
+ gAssetStorage->logAssetStorageInfo();
+ }
}
static LLTrace::BlockTimerStatHandle FTM_PICK("Picking");