From 13284fa954e4edcca43eaf98f1a5b457264597b8 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Fri, 28 Aug 2015 19:27:09 +0300 Subject: MAINT-4360 (Setting LogTextureDownloadsToSimulator causes a viewer crash) The fix in fllowing: LLTextureFetch has object LLTextureInfo which is has Recorder object. The recorder object activate (Recorder::handleStart()) self AccumulatorBufferGroup (Recorder::mBuffers into the current (LLTrace::get_thread_recorder()) ThreadRecorder object which created (as I understand) one per thread, and time to time send accumulated data to the master ThreadRecorder. The problem is that LLTextureFetch also can uses from the main thread. I decide add parameter to CTOR LLTextureInfo(bool postponeStartRecoreder) - if it false the recorder start immediatly in LLTextureInfo CTOR body, if true we need to start it manually. Also I add another one LLTextureInfo in LLTextureFetch::mTextureInfoMainThread which is intended for accumulate data from the main thread. The postponed Recorder started/stoped from LLTextureFetch::startThread()/endThread(). --HG-- branch : MAINT-4360 --- indra/newview/lltexturefetch.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 17b273f316..fab4203ec3 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2522,8 +2522,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mFetchDebugger(NULL), mFetchSource(LLTextureFetch::FROM_ALL), mOriginFetchSource(LLTextureFetch::FROM_ALL), - mFetcherLocked(FALSE), - mTextureInfoMainThread(false) + mFetcherLocked(FALSE) { mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold"))); @@ -3129,7 +3128,6 @@ void LLTextureFetch::shutDownImageDecodeThread() // Threads: Ttf void LLTextureFetch::startThread() { - mTextureInfo.startRecording(); } // Threads: Ttf @@ -3140,8 +3138,6 @@ void LLTextureFetch::endThread() << ", ResWaits: " << mTotalResourceWaitCount << ", TotalHTTPReq: " << getTotalNumHTTPRequests() << LL_ENDL; - - mTextureInfo.stopRecording(); } // Threads: Ttf @@ -3545,8 +3541,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 if (log_to_viewer_log || log_to_sim) { U64Microseconds timeNow = LLTimer::getTotalTime(); - mTextureInfoMainThread.setRequestSize(id, worker->mFileSize); - mTextureInfoMainThread.setRequestCompleteTimeAndLog(id, timeNow); + mTextureInfo.setRequestSize(id, worker->mFileSize); + mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow); } } worker->unlockWorkMutex(); // -Mw -- cgit v1.2.3