diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-01-30 14:03:26 +0000 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-01-30 14:03:26 +0000 |
commit | 6e445e82e2a1c1559be5193cd2c131c5f1207f55 (patch) | |
tree | ba6610b440ae0792539e79f053b086aac0a95ecc /indra/newview | |
parent | b0dedf0b68ab47f6926f9b5d60ea05a1ef68eedf (diff) |
MAINT-8091 Removed deprecated and unused private memory pooling
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 10 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 38 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 10 |
6 files changed, 27 insertions, 55 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4a4f4bfc61..1cf3b31ac0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2369,7 +2369,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>DebugShowPrivateMem</key> + <key>DEPRECATED: DebugShowPrivateMem</key> <!-- deprecated (see MAINT-8091) --> <map> <key>Comment</key> <string>Show Private Mem Info</string> @@ -6408,10 +6408,10 @@ <key>Value</key> <real>600.0</real> </map> - <key>MemoryPrivatePoolEnabled</key> + <key>MemoryPrivatePoolEnabled</key> <!-- deprecated (see MAINT-8091) --> <map> <key>Comment</key> - <string>Enable the private memory pool management</string> + <string>DEPRECATED: Enable the private memory pool management</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -6419,10 +6419,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>MemoryPrivatePoolSize</key> + <key>MemoryPrivatePoolSize</key> <!-- deprecated (see MAINT-8091) --> <map> <key>Comment</key> - <string>Size of the private memory pool in MB (min. value is 256)</string> + <string>DEPRECATED: Size of the private memory pool in MB (min. value is 256)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d48ff458d7..73f70dffe4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -799,7 +799,6 @@ bool LLAppViewer::init() initMaxHeapSize() ; LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize")); - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues. std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, ""); mDumpPath = logdir; @@ -1363,10 +1362,6 @@ bool LLAppViewer::doFrame() LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop")); LLSD newFrame; - //LLPrivateMemoryPoolTester::getInstance()->run(false) ; - //LLPrivateMemoryPoolTester::getInstance()->run(true) ; - //LLPrivateMemoryPoolTester::destroy() ; - LL_RECORD_BLOCK_TIME(FTM_FRAME); LLTrace::BlockTimer::processTimes(); LLTrace::get_frame_recording().nextPeriod(); @@ -2075,9 +2070,6 @@ bool LLAppViewer::cleanup() LLMainLoopRepeater::instance().stop(); - //release all private memory pools. - LLPrivateMemoryPoolManager::destroyClass() ; - ll_close_fail_log(); LLError::LLCallStacks::cleanup(); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index dadf2f9701..2a0d961952 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -117,7 +117,7 @@ public: ~LLTextureCacheWorker() { llassert_always(!haveWork()); - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); } // override this interface @@ -237,7 +237,7 @@ bool LLTextureCacheLocalFileWorker::doRead() // << " Bytes: " << mDataSize << " Offset: " << mOffset // << " / " << mDataSize << LL_ENDL; mDataSize = 0; // failed - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; } return true; @@ -252,7 +252,7 @@ bool LLTextureCacheLocalFileWorker::doRead() { mDataSize = local_size; } - mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize); + mReadData = (U8*)ll_aligned_malloc_16(mDataSize); S32 bytes_read = LLAPRFile::readEx(mFileName, mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool()); @@ -262,7 +262,7 @@ bool LLTextureCacheLocalFileWorker::doRead() // << " Bytes: " << mDataSize << " Offset: " << mOffset // << " / " << mDataSize << LL_ENDL; mDataSize = 0; - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; } else @@ -386,7 +386,7 @@ bool LLTextureCacheRemoteWorker::doRead() mDataSize = local_size; } // Allocate read buffer - mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize); + mReadData = (U8*)ll_aligned_malloc_16(mDataSize); if (mReadData) { @@ -402,7 +402,7 @@ bool LLTextureCacheRemoteWorker::doRead() << " Bytes: " << mDataSize << " Offset: " << mOffset << " / " << mDataSize << LL_ENDL; mDataSize = 0; - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; } else @@ -451,7 +451,7 @@ bool LLTextureCacheRemoteWorker::doRead() S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset; size = llmin(size, mDataSize); // Allocate the read buffer - mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), size); + mReadData = (U8*)ll_aligned_malloc_16(size); if (mReadData) { S32 bytes_read = LLAPRFile::readEx(mCache->mHeaderDataFileName, @@ -461,7 +461,7 @@ bool LLTextureCacheRemoteWorker::doRead() LL_WARNS() << "LLTextureCacheWorker: " << mID << " incorrect number of bytes read from header: " << bytes_read << " / " << size << LL_ENDL; - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; mDataSize = -1; // failed done = true; @@ -500,7 +500,7 @@ bool LLTextureCacheRemoteWorker::doRead() S32 data_offset, file_size, file_offset; // Reserve the whole data buffer first - U8* data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize); + U8* data = (U8*)ll_aligned_malloc_16(mDataSize); if (data) { // Set the data file pointers taking the read offset into account. 2 cases: @@ -514,7 +514,7 @@ bool LLTextureCacheRemoteWorker::doRead() // Copy the raw data we've been holding from the header cache into the new sized buffer llassert_always(mReadData); memcpy(data, mReadData, data_offset); - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; } else @@ -540,7 +540,7 @@ bool LLTextureCacheRemoteWorker::doRead() LL_WARNS() << "LLTextureCacheWorker: " << mID << " incorrect number of bytes read from body: " << bytes_read << " / " << file_size << LL_ENDL; - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; mDataSize = -1; // failed done = true; @@ -550,7 +550,7 @@ bool LLTextureCacheRemoteWorker::doRead() { LL_WARNS() << "LLTextureCacheWorker: " << mID << " failed to allocate memory for reading: " << mDataSize << LL_ENDL; - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; mDataSize = -1; // failed done = true; @@ -673,11 +673,11 @@ bool LLTextureCacheRemoteWorker::doWrite() { // We need to write a full record in the header cache so, if the amount of data is smaller // than a record, we need to transfer the data to a buffer padded with 0 and write that - U8* padBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), TEXTURE_CACHE_ENTRY_SIZE); + U8* padBuffer = (U8*)ll_aligned_malloc_16(TEXTURE_CACHE_ENTRY_SIZE); memset(padBuffer, 0, TEXTURE_CACHE_ENTRY_SIZE); // Init with zeros memcpy(padBuffer, mWriteData, mDataSize); // Copy the write buffer bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, padBuffer, offset, size, mCache->getLocalAPRFilePool()); - FREE_MEM(LLImageBase::getPrivatePool(), padBuffer); + ll_aligned_free_16(padBuffer); } else { @@ -783,7 +783,7 @@ void LLTextureCacheWorker::finishWork(S32 param, bool completed) } else { - FREE_MEM(LLImageBase::getPrivatePool(), mReadData); + ll_aligned_free_16(mReadData); mReadData = NULL; } } @@ -845,7 +845,7 @@ LLTextureCache::~LLTextureCache() writeUpdatedEntries() ; delete mFastCachep; delete mFastCachePoolp; - FREE_MEM(LLImageBase::getPrivatePool(), mFastCachePadBuffer); + ll_aligned_free_16(mFastCachePadBuffer); } ////////////////////////////////////////////////////////////////////////////// @@ -1983,10 +1983,10 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d } discardlevel = head[3]; - data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), image_size); + data = (U8*)ll_aligned_malloc_16(image_size); if(mFastCachep->read(data, image_size) != image_size) { - FREE_MEM(LLImageBase::getPrivatePool(), data); + ll_aligned_free_16(data); closeFastCache(); return NULL; } @@ -2078,7 +2078,7 @@ void LLTextureCache::openFastCache(bool first_time) { if(!mFastCachePadBuffer) { - mFastCachePadBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), TEXTURE_FAST_CACHE_ENTRY_SIZE); + mFastCachePadBuffer = (U8*)ll_aligned_malloc_16(TEXTURE_FAST_CACHE_ENTRY_SIZE); } mFastCachePoolp = new LLVolatileAPRPool(); if (LLAPRFile::isExist(mFastCacheFileName, mFastCachePoolp)) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 1f7796e6d0..6fd90e4935 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1761,7 +1761,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mRequestedOffset += src_offset; } - U8 * buffer = (U8 *)ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_size); + U8 * buffer = (U8 *)ll_aligned_malloc_16(total_size); if (!buffer) { // abort. If we have no space for packet, we have not enough space to decode image @@ -2266,7 +2266,7 @@ bool LLTextureFetchWorker::processSimulatorPackets() if (buffer_size > cur_size) { /// We have new data - U8* buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), buffer_size); + U8* buffer = (U8*)ll_aligned_malloc_16(buffer_size); S32 offset = 0; if (cur_size > 0 && mFirstPacket > 0) { @@ -5059,7 +5059,7 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon //LL_INFOS(LOG_TXT) << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << LL_ENDL; if ((fetch.mCurlReceivedSize >= fetch.mRequestedSize) || !partial || (fetch.mRequestedSize == 600)) { - U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); + U8* d_buffer = (U8*)ll_aligned_malloc_16(data_size); if (ba) { ba->read(0, d_buffer, data_size); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 74deaffe16..c057954606 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -740,16 +740,6 @@ public: ypos += y_inc; } - if (gSavedSettings.getBOOL("DebugShowPrivateMem")) - { - LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ; - addText(xpos, ypos, llformat("Total Reserved(KB): %d", LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024)); - ypos += y_inc; - - addText(xpos, ypos, llformat("Total Allocated(KB): %d", LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024)); - ypos += y_inc; - } - // only display these messages if we are actually rendering beacons at this moment if (LLPipeline::getRenderBeacons() && LLFloaterReg::instanceVisible("beacons")) { diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 92511167c0..fa15fb0657 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2373,16 +2373,6 @@ function="ToggleControl" parameter="DebugShowMemory" /> </menu_item_check> - <menu_item_check - label="Show Private Mem Info" - name="Show Private Mem Info"> - <menu_item_check.on_check - function="CheckControl" - parameter="DebugShowPrivateMem" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="DebugShowPrivateMem" /> - </menu_item_check> <menu_item_separator/> |