From 4de6759cd9d566ab92f0d9efa0c0338359dfa85c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 6 Jan 2011 16:18:26 -0700 Subject: add debug info to the UI. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerwindow.cpp | 11 +++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 3 files changed, 32 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 905c683f69..ca48f8b16a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1829,6 +1829,17 @@ Value 0 + DebugShowPrivateMem + + Comment + Show Private Mem Info + Persist + 1 + Type + Boolean + Value + 0 + DebugShowRenderInfo Comment diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 943b5b5886..f1d0cf2128 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -548,6 +548,17 @@ public: addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3])); 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(NULL) && 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 9a08be2405..1371411656 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1937,6 +1937,16 @@ function="ToggleControl" parameter="DebugShowColor" /> + + + + -- cgit v1.2.3