summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-03-15 13:26:31 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-03-15 13:26:31 -0400
commite288ff9695f4f2fbfc0f3963985c6e0fa61f6403 (patch)
treef54c563edaad3c1daba998eaf62f1357e9f8d059 /indra/newview
parent24a6c3fda2ba3aa1f40ee31b6f1fc025a6623833 (diff)
SH-3850 WIP, SH-3959 WIP - added additional debug logging for texture loading
Diffstat (limited to 'indra/newview')
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/logcontrol.xml0
-rwxr-xr-xindra/newview/lltexturefetch.cpp29
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewertexture.cpp5
3 files changed, 27 insertions, 7 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index c5561166fc..c5561166fc 100644..100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 0e53fc81b8..b9d80fe326 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1092,12 +1092,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
{
+ LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << llendl;
return true; // abort
}
}
if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP)
{
//nowhere to get data, abort.
+ LL_DEBUGS("Texture") << mID << " abort, nowhere to get data" << llendl;
return true ;
}
@@ -1211,6 +1213,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//
//This should never happen
//
+ LL_DEBUGS("Texture") << mID << " this should never happen" << llendl;
return false;
}
}
@@ -1325,6 +1328,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
//mFetcher->addToNetworkQueue(this);
//recordTextureStart(false);
//setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
+
+ LL_DEBUGS("Texture") << mID << " does this happen?" << llendl;
return false;
}
}
@@ -1343,6 +1348,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
// processSimulatorPackets() failed
// llwarns << "processSimulatorPackets() failed to load buffer" << llendl;
+ LL_DEBUGS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << llendl;
return true; // failed
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
@@ -1394,6 +1400,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (! mCanUseHTTP)
{
releaseHttpSemaphore();
+ LL_DEBUGS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << llendl;
return true; // abort
}
@@ -1417,6 +1424,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
else
{
releaseHttpSemaphore();
+ LL_DEBUGS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << llendl;
return true; // abort.
}
}
@@ -1494,6 +1502,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mState = DONE;
releaseHttpSemaphore();
+ LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << llendl;
return true; // failed, means no map tile on the empty region.
}
@@ -1542,6 +1551,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
resetFormattedData();
mState = DONE;
releaseHttpSemaphore();
+ LL_DEBUGS("Texture") << mID << " abort: fail harder" << llendl;
return true; // failed
}
@@ -1550,6 +1560,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// next time the texture is requested, even if the data have already been fetched.
if(mWriteToCacheState != NOT_WRITE)
{
+ // Why do we want to keep url if NOT_WRITE - is this a proxy for map tiles?
mUrl.clear();
}
@@ -1563,6 +1574,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// abort.
+ LL_DEBUGS("Texture") << mID << " abort: no data received" << llendl;
mState = DONE;
releaseHttpSemaphore();
return true;
@@ -1667,6 +1679,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mDesiredDiscard < 0)
{
// We aborted, don't decode
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << llendl;
mState = DONE;
return true;
}
@@ -1677,6 +1690,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//abort, don't decode
mState = DONE;
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << llendl;
return true;
}
if (mLoadedDiscard < 0)
@@ -1684,6 +1698,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//llerrs << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
//abort, don't decode
+ LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << llendl;
mState = DONE;
return true;
}
@@ -1806,6 +1821,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mDecodedDiscard >= 0 && mDesiredDiscard < mDecodedDiscard)
{
// More data was requested, return to INIT
+ LL_DEBUGS("Texture") << mID << " more data requested, returning to INIT: "
+ << " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard
+ << "<" << " mDecodedDiscard " << mDecodedDiscard << llendl;
mState = INIT;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false;
@@ -1846,10 +1864,10 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
bool partial = false;
LLCore::HttpStatus status(response->getStatus());
- lldebugs << "HTTP COMPLETE: " << mID
- << " status: " << status.toHex()
- << " '" << status.toString() << "'"
- << llendl;
+ LL_DEBUGS("Texture") << "HTTP COMPLETE: " << mID
+ << " status: " << status.toHex()
+ << " '" << status.toString() << "'"
+ << llendl;
// unsigned int offset(0), length(0), full_length(0);
// response->getRange(&offset, &length, &full_length);
// llwarns << "HTTP COMPLETE: " << mID << " handle: " << handle
@@ -2433,6 +2451,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
std::string exten = gDirUtilp->getExtension(url);
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
{
+ LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << llendl;
// Only do partial requests for J2C at the moment
desired_size = MAX_IMAGE_DATA_SIZE;
desired_discard = 0;
@@ -2499,7 +2518,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
worker->unlockWorkMutex(); // -Mw
}
-// llinfos << "REQUESTED: " << id << " Discard: " << desired_discard << llendl;
+ LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << llendl;
return true;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 1d0bda34a7..e0e44cfa1e 100644..100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1952,11 +1952,12 @@ bool LLViewerFetchedTexture::updateFetch()
}
else if (mHasFetcher && !mIsFetching)
{
- // Only delete requests that haven't receeived any network data for a while
+ // Only delete requests that haven't received any network data for a while
const F32 FETCH_IDLE_TIME = 5.f;
if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME)
{
-// llinfos << "Deleting request: " << getID() << " Discard: " << current_discard << " <= min:" << mMinDiscardLevel << " or priority == 0: " << decode_priority << llendl;
+ llinfos << "idle timeout, deleting request: " << getID() << " - is discard: " << current_discard << " <= min:" << mMinDiscardLevel << " or priority == 0: " << decode_priority << "?" << llendl;
+ LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << llendl;
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
mHasFetcher = FALSE;
}