diff options
author | Dave Parks <davep@lindenlab.com> | 2012-11-07 16:14:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-11-07 16:14:31 -0600 |
commit | adacf00aadaf9097c2293b6c6b9203b5f4f0c780 (patch) | |
tree | 6022511fe314c3ffaa794fef99b213b592ecae96 /indra | |
parent | 42b9001e97298594f79b2145ac13df925d532a6d (diff) | |
parent | a36b66bd145e99a8f597f1c7c3b48ca30bdd7029 (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-beta
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/GooglePerfTools.cmake | 2 | ||||
-rw-r--r-- | indra/llcommon/llsys.cpp | 34 | ||||
-rwxr-xr-x | indra/newview/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 34 | ||||
-rwxr-xr-x | indra/newview/llviewertexture.h | 1 |
8 files changed, 56 insertions, 27 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 09501e0406..73b3642ae6 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -3,7 +3,7 @@ include(Prebuilt) # If you want to enable or disable TCMALLOC in viewer builds, this is the place. # set ON or OFF as desired. -set (USE_TCMALLOC ON) +set (USE_TCMALLOC OFF) if (STANDALONE) include(FindGooglePerfTools) diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 6073bcd0a6..c96f2191f3 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -944,13 +944,15 @@ LLSD LLMemoryInfo::loadStatsMap() state.dwLength = sizeof(state); GlobalMemoryStatusEx(&state); - stats.add("Percent Memory use", state.dwMemoryLoad); - stats.add("Total Physical KB", state.ullTotalPhys/1024); - stats.add("Avail Physical KB", state.ullAvailPhys/1024); - stats.add("Total page KB", state.ullTotalPageFile/1024); - stats.add("Avail page KB", state.ullAvailPageFile/1024); - stats.add("Total Virtual KB", state.ullTotalVirtual/1024); - stats.add("Avail Virtual KB", state.ullAvailVirtual/1024); + DWORDLONG div = 1024; + + stats.add("Percent Memory use", state.dwMemoryLoad/div); + stats.add("Total Physical KB", state.ullTotalPhys/div); + stats.add("Avail Physical KB", state.ullAvailPhys/div); + stats.add("Total page KB", state.ullTotalPageFile/div); + stats.add("Avail page KB", state.ullAvailPageFile/div); + stats.add("Total Virtual KB", state.ullTotalVirtual/div); + stats.add("Avail Virtual KB", state.ullAvailVirtual/div); PERFORMANCE_INFORMATION perf; perf.cb = sizeof(perf); @@ -982,15 +984,15 @@ LLSD LLMemoryInfo::loadStatsMap() GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem)); stats.add("Page Fault Count", pmem.PageFaultCount); - stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/1024); - stats.add("WorkingSetSize KB", pmem.WorkingSetSize/1024); - stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/1024); - stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/1024); - stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/1024); - stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/1024); - stats.add("PagefileUsage KB", pmem.PagefileUsage/1024); - stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/1024); - stats.add("PrivateUsage KB", pmem.PrivateUsage/1024); + stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/div); + stats.add("WorkingSetSize KB", pmem.WorkingSetSize/div); + stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/div); + stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/div); + stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/div); + stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/div); + stats.add("PagefileUsage KB", pmem.PagefileUsage/div); + stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/div); + stats.add("PrivateUsage KB", pmem.PrivateUsage/div); #elif LL_DARWIN diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ccf4ce8d1f..51f4035d8a 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1565,9 +1565,9 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" + LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) if(USE_PRECOMPILED_HEADERS) set_target_properties( diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5e42fc29f7..4cb9e0eb2f 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5766,7 +5766,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>MemoryPrivatePoolSize</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0a9d6229ef..c3725b7075 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -709,7 +709,7 @@ bool LLAppViewer::init() //set the max heap size. initMaxHeapSize() ; - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ; + LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to our log directory std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index e0ca1232b0..11790d562f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -125,7 +125,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, #if WINDOWS_CRT_MEM_CHECKS && !INCLUDE_VLD _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // dump memory leaks on exit -#elif 1 +#elif 0 // Experimental - enable the low fragmentation heap // This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations) // Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1 diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 8eb8717de2..0b238670b4 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -624,6 +624,7 @@ LLViewerTexture::~LLViewerTexture() void LLViewerTexture::init(bool firstinit) { mBoostLevel = LLViewerTexture::BOOST_NONE; + mSelectedTime = 0.f; mFullWidth = 0; mFullHeight = 0; @@ -679,11 +680,18 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != level) { mBoostLevel = level ; - if(mBoostLevel != LLViewerTexture::BOOST_NONE) + if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_SELECTED) { setNoDelete() ; } } + + if (mBoostLevel == LLViewerTexture::BOOST_SELECTED) + { + mSelectedTime = gFrameTimeSeconds; + } + } @@ -1904,13 +1912,31 @@ void LLViewerFetchedTexture::updateVirtualSize() for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; - if(facep->getDrawable()->isRecentlyVisible()) + LLDrawable* drawable = facep->getDrawable(); + if (drawable) { - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + if(drawable->isRecentlyVisible()) + { + if (getBoostLevel() == LLViewerTexture::BOOST_NONE && + drawable->getVObj() && drawable->getVObj()->isSelected()) + { + setBoostLevel(LLViewerTexture::BOOST_SELECTED); + } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } } } + //reset whether or not a face was selected after 10 seconds + const F32 SELECTION_RESET_TIME = 10.f; + + if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && + gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) + { + setBoostLevel(LLViewerTexture::BOOST_NONE); + } + if(mMaxVirtualSizeResetCounter > 0) { mMaxVirtualSizeResetCounter--; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 2ea9a07e9a..2e7949e9a3 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -275,6 +275,7 @@ private: protected: LLUUID mID; S32 mBoostLevel; // enum describing priority level + F32 mSelectedTime; // time texture was last selected S32 mFullWidth; S32 mFullHeight; BOOL mUseMipMaps ; |