summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/app_settings/logcontrol.xml2
-rwxr-xr-xindra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl1
-rw-r--r--indra/newview/gpu_table.txt10
-rwxr-xr-xindra/newview/llagent.cpp6
-rw-r--r--indra/newview/llagentcamera.cpp9
-rw-r--r--indra/newview/llappviewer.cpp116
-rw-r--r--indra/newview/llappviewer.h8
-rw-r--r--indra/newview/llappviewerlinux.cpp3
-rw-r--r--indra/newview/llappviewermacosx.cpp4
-rw-r--r--indra/newview/llappviewerwin32.cpp3
-rw-r--r--indra/newview/llchatbar.cpp18
-rw-r--r--indra/newview/llcompilequeue.cpp2
-rw-r--r--indra/newview/lldebugview.cpp9
-rw-r--r--indra/newview/lldrawable.cpp16
-rw-r--r--indra/newview/lldrawable.h2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp3
-rw-r--r--indra/newview/lldrawpoolbump.cpp2
-rw-r--r--indra/newview/lldrawpoolwater.cpp2
-rwxr-xr-xindra/newview/llface.cpp12
-rw-r--r--indra/newview/llfasttimerview.cpp188
-rw-r--r--indra/newview/llfasttimerview.h8
-rw-r--r--indra/newview/llflexibleobject.cpp6
-rw-r--r--indra/newview/llfloaterabout.cpp3
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp2
-rw-r--r--indra/newview/llfloatercamera.cpp4
-rw-r--r--indra/newview/llfloaterjoystick.cpp17
-rw-r--r--indra/newview/llfloaterjoystick.h1
-rw-r--r--indra/newview/llfloaterlagmeter.cpp375
-rw-r--r--indra/newview/llfloaterlagmeter.h80
-rw-r--r--indra/newview/llfloaterland.cpp3
-rw-r--r--indra/newview/llfloatermap.cpp18
-rw-r--r--indra/newview/llfloatermap.h1
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp2
-rw-r--r--indra/newview/llfloatersnapshot.cpp2
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llhudnametag.cpp5
-rw-r--r--indra/newview/llinventorybridge.cpp19
-rw-r--r--indra/newview/llinventoryfunctions.cpp1
-rw-r--r--indra/newview/llinventorypanel.cpp9
-rw-r--r--indra/newview/lllandmarklist.cpp1
-rw-r--r--indra/newview/llmemoryview.cpp333
-rw-r--r--indra/newview/llmemoryview.h62
-rw-r--r--indra/newview/llnearbychatbar.cpp22
-rw-r--r--indra/newview/lloutfitslist.cpp30
-rw-r--r--indra/newview/lloutfitslist.h10
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/llpanellandmarks.cpp13
-rw-r--r--indra/newview/llpanellandmarks.h1
-rw-r--r--indra/newview/llpanelmaininventory.cpp3
-rw-r--r--indra/newview/llpanelpermissions.cpp1
-rw-r--r--indra/newview/llpanelplaces.cpp2
-rw-r--r--indra/newview/llpanelteleporthistory.cpp5
-rw-r--r--indra/newview/llpaneltopinfobar.cpp8
-rw-r--r--indra/newview/llpolymesh.cpp4
-rw-r--r--indra/newview/llpreviewgesture.cpp2
-rw-r--r--indra/newview/llpreviewnotecard.cpp2
-rw-r--r--indra/newview/llpreviewscript.cpp9
-rw-r--r--indra/newview/llselectmgr.cpp6
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp1
-rw-r--r--indra/newview/llsimplestat.h58
-rw-r--r--indra/newview/llspatialpartition.cpp42
-rwxr-xr-xindra/newview/llstartup.cpp10
-rw-r--r--indra/newview/llstatusbar.cpp34
-rw-r--r--indra/newview/llsurface.cpp3
-rw-r--r--indra/newview/llsurface.h4
-rw-r--r--indra/newview/lltexlayer.cpp2
-rw-r--r--indra/newview/lltexturefetch.cpp372
-rw-r--r--indra/newview/lltexturefetch.h19
-rwxr-xr-xindra/newview/lltextureview.cpp34
-rw-r--r--indra/newview/lltoastalertpanel.cpp1
-rw-r--r--indra/newview/lltooldraganddrop.cpp6
-rw-r--r--indra/newview/lltoolplacer.cpp2
-rw-r--r--indra/newview/llviewerassetstats.cpp825
-rw-r--r--indra/newview/llviewerassetstats.h264
-rw-r--r--indra/newview/llviewerassetstorage.cpp6
-rw-r--r--indra/newview/llviewercamera.cpp12
-rw-r--r--indra/newview/llviewercamera.h14
-rw-r--r--indra/newview/llviewerdisplay.cpp27
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerjoystick.cpp6
-rw-r--r--indra/newview/llviewerkeyboard.cpp5
-rw-r--r--indra/newview/llviewermenu.cpp102
-rw-r--r--indra/newview/llviewermenufile.cpp25
-rw-r--r--indra/newview/llviewermenufile.h1
-rwxr-xr-xindra/newview/llviewermessage.cpp173
-rw-r--r--indra/newview/llviewerobject.cpp63
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp78
-rw-r--r--indra/newview/llviewerobjectlist.h4
-rw-r--r--indra/newview/llviewerparceloverlay.cpp1
-rw-r--r--indra/newview/llviewerpartsim.cpp26
-rw-r--r--indra/newview/llviewerpartsim.h2
-rw-r--r--indra/newview/llviewerpartsource.cpp22
-rw-r--r--indra/newview/llviewerprecompiledheaders.h7
-rw-r--r--indra/newview/llviewerregion.cpp17
-rw-r--r--indra/newview/llviewerregion.h6
-rwxr-xr-xindra/newview/llviewerstats.cpp705
-rw-r--r--indra/newview/llviewerstats.h343
-rw-r--r--indra/newview/llviewerstatsrecorder.cpp181
-rw-r--r--indra/newview/llviewerstatsrecorder.h82
-rw-r--r--indra/newview/llviewertexteditor.cpp8
-rw-r--r--indra/newview/llviewertexture.cpp46
-rwxr-xr-xindra/newview/llviewertexture.h15
-rw-r--r--indra/newview/llviewertexturelist.cpp62
-rw-r--r--indra/newview/llviewertexturelist.h14
-rw-r--r--indra/newview/llviewerthrottle.cpp5
-rwxr-xr-xindra/newview/llviewerwindow.cpp83
-rw-r--r--indra/newview/llviewerwindow.h8
-rw-r--r--indra/newview/llvlcomposition.cpp2
-rwxr-xr-xindra/newview/llvoavatar.cpp38
-rwxr-xr-xindra/newview/llvoavatarself.cpp28
-rw-r--r--indra/newview/llvograss.cpp1
-rw-r--r--indra/newview/llvopartgroup.cpp1
-rw-r--r--indra/newview/llvovolume.cpp19
-rw-r--r--indra/newview/llvowlsky.cpp2
-rw-r--r--indra/newview/llwearablelist.cpp1
-rw-r--r--indra/newview/llworld.cpp34
-rw-r--r--indra/newview/llworldmapview.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp2
-rw-r--r--indra/newview/pipeline.cpp167
-rw-r--r--indra/newview/pipeline.h8
-rw-r--r--indra/newview/skins/default/xui/da/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/de/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/en/floater_lagmeter.xml336
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_ui_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml27
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_script_ed.xml1
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml1092
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/es/floater_lagmeter.xml154
-rw-r--r--indra/newview/skins/default/xui/fr/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/it/floater_lagmeter.xml154
-rw-r--r--indra/newview/skins/default/xui/ja/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/pl/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/pt/floater_lagmeter.xml154
-rw-r--r--indra/newview/skins/default/xui/ru/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/tr/floater_lagmeter.xml151
-rw-r--r--indra/newview/skins/default/xui/zh/floater_lagmeter.xml151
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp644
148 files changed, 2714 insertions, 6731 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7eea9ece5a..734042fefe 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -215,7 +215,6 @@ set(viewer_SOURCE_FILES
llfloaterinspect.cpp
llfloaterinventory.cpp
llfloaterjoystick.cpp
- llfloaterlagmeter.cpp
llfloaterland.cpp
llfloaterlandholdings.cpp
llfloatermap.cpp
@@ -336,7 +335,6 @@ set(viewer_SOURCE_FILES
llmarketplacenotifications.cpp
llmediactrl.cpp
llmediadataclient.cpp
- llmemoryview.cpp
llmeshrepository.cpp
llmimetypes.cpp
llmorphview.cpp
@@ -792,7 +790,6 @@ set(viewer_HEADER_FILES
llfloaterinspect.h
llfloaterinventory.h
llfloaterjoystick.h
- llfloaterlagmeter.h
llfloaterland.h
llfloaterlandholdings.h
llfloatermap.h
@@ -913,7 +910,6 @@ set(viewer_HEADER_FILES
llmarketplacenotifications.h
llmediactrl.h
llmediadataclient.h
- llmemoryview.h
llmeshrepository.h
llmimetypes.h
llmorphview.h
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 64122bbb6c..92a241857e 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -48,6 +48,6 @@
-->
</array>
</map>
- </array>
+ </array>
</map>
</llsd>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4fa1663907..f3912055bb 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5168,7 +5168,7 @@
<key>Comment</key>
<string>Center the focal point of the minimap.</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index e02a7b405b..2cef8f2a5d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -2093,7 +2093,6 @@ uniform sampler2D diffuseMap;
uniform vec2 rcp_screen_res;
uniform vec4 rcp_frame_opt;
uniform vec4 rcp_frame_opt2;
-uniform vec2 screen_res;
VARYING vec2 vary_fragcoord;
VARYING vec2 vary_tc;
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 5e8189caa5..2a07b5ed70 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -371,10 +371,17 @@ NVIDIA GTX 690M .*NVIDIA .*GTX *69*M.* 5 1 0 0
NVIDIA G100 .*NVIDIA .*G10.* 3 1 1 4.2
NVIDIA GT 120 .*NVIDIA .*GT *12.* 2 1 0 0
NVIDIA GT 130 .*NVIDIA .*GT *13.* 2 1 0 0
+NVIDIA GT 140 .*NVIDIA .*GT *140.* 2 1 0 0
+NVIDIA GT 150 .*NVIDIA .*GT *150.* 2 1 0 0
+NVIDIA GT 160 .*NVIDIA .*GT *160.* 2 1 0 0
NVIDIA GTS 150 .*NVIDIA .*GTS *15.* 2 1 0 0
NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1 1 3.3
NVIDIA 210 .*NVIDIA .*GeForce 210.* 3 1 1 3.3
NVIDIA GT 220 .*NVIDIA .*GT *22.* 2 1 1 3.3
+NVIDIA GT 230 .*NVIDIA .*GT *230.* 2 1 1 3.3
+NVIDIA GT 240 .*NVIDIA .*GT *240.* 2 1 1 3.3
+NVIDIA GT 250 .*NVIDIA .*GT *250.* 2 1 1 3.3
+NVIDIA GT 260 .*NVIDIA .*GT *260.* 2 1 1 3.3
NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 4 1 1 3.3
NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 4 1 1 3.3
NVIDIA GTX 260 .*NVIDIA .*GTX *26.* 4 1 1 3.3
@@ -387,9 +394,11 @@ NVIDIA GT 320 .*NVIDIA .*GT *32.* 3 1 0 0
NVIDIA GT 330 .*NVIDIA .*GT *33.* 3 1 0 0
NVIDIA GT 340 .*NVIDIA .*GT *34.* 3 1 0 0
NVIDIA 405 .*NVIDIA .* 405.* 3 1 0 0
+NVIDIA GT 415 .*NVIDIA .*GT *415.* 3 1 1 4.2
NVIDIA GT 420 .*NVIDIA .*GT *42.* 3 1 1 4.2
NVIDIA GT 430 .*NVIDIA .*GT *43.* 3 1 1 4.1
NVIDIA GT 440 .*NVIDIA .*GT *44.* 4 1 0 0
+NVIDIA GT 450 .*NVIDIA .*GT *45.* 4 1 0 0
NVIDIA GTS 450 .*NVIDIA .*GTS *45.* 4 1 1 4.2
NVIDIA GTX 460 .*NVIDIA .*GTX *46.* 5 1 1 4.2
NVIDIA GTX 470 .*NVIDIA .*GTX *47.* 5 1 1 4.2
@@ -398,6 +407,7 @@ NVIDIA 510 .*NVIDIA .* 510.* 3 1 0 0
NVIDIA GT 520 .*NVIDIA .*GT *52.* 3 1 1 4.2
NVIDIA GT 530 .*NVIDIA .*GT *53.* 3 1 1 4.2
NVIDIA GT 540 .*NVIDIA .*GT *54.* 3 1 1 4.2
+NVIDIA GT 550 .*NVIDIA .*GT *55.* 3 1 1 4.2
NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 5 1 1 4.2
NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 5 1 1 4.2
NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 5 1 1 4.2
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 11fa50b51a..8e093fac95 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -753,7 +753,7 @@ void LLAgent::setFlying(BOOL fly)
}
if( !was_flying )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT);
+ LLStatViewer::FLY.add(1);
}
setControlFlags(AGENT_CONTROL_FLY);
}
@@ -3809,7 +3809,7 @@ bool LLAgent::teleportCore(bool is_local)
gAgentCamera.resetView(FALSE);
// local logic
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT);
+ LLStatViewer::TELEPORT.add(1);
if (is_local)
{
gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL );
@@ -4126,7 +4126,7 @@ void LLAgent::setTeleportState(ETeleportState state)
case TELEPORT_ARRIVING:
// First two position updates after a teleport tend to be weird
- LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2;
+ //LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2;
// Let the interested parties know we've teleported.
LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal());
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 751b73e1eb..4e6079e3f2 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1081,8 +1081,8 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
LLQuaternion av_inv_rot = ~gAgentAvatarp->mRoot.getWorldRotation();
LLVector3 root_at = LLVector3::x_axis * gAgentAvatarp->mRoot.getWorldRotation();
- if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) &&
- (root_at * last_at_axis > 0.95f))
+ if (LLTrace::get_frame_recording().getLastRecordingPeriod().getLastValue(*gViewerWindow->getMouseVelocityStat()) < 0.01f
+ && (root_at * last_at_axis > 0.95f))
{
LLVector3 vel = gAgentAvatarp->getVelocity();
if (vel.magVecSquared() > 4.f)
@@ -1137,13 +1137,14 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
}
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Camera");
+
//-----------------------------------------------------------------------------
// updateCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::updateCamera()
{
- static LLFastTimer::DeclareTimer ftm("Camera");
- LLFastTimer t(ftm);
+ LLFastTimer t(FTM_UPDATE_CAMERA);
// - changed camera_skyward to the new global "mCameraUpVector"
mCameraUpVector = LLVector3::z_axis;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 438194c715..f73fc4b990 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -60,7 +60,8 @@
#include "llcurl.h"
#include "llcalc.h"
#include "lltexturestats.h"
-#include "lltexturestats.h"
+#include "lltrace.h"
+#include "lltracethreadrecorder.h"
#include "llviewerwindow.h"
#include "llviewerdisplay.h"
#include "llviewermedia.h"
@@ -277,7 +278,7 @@ LLPumpIO* gServicePump = NULL;
U64 gFrameTime = 0;
F32 gFrameTimeSeconds = 0.f;
-F32 gFrameIntervalSeconds = 0.f;
+LLUnit<LLUnits::Seconds, F32> gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
U64 gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
@@ -679,7 +680,7 @@ bool LLAppViewer::init()
// into the log files during normal startup until AFTER
// we run the "program crashed last time" error handler below.
//
- LLFastTimer::reset();
+ LLTrace::BlockTimer::reset();
// initialize SSE options
LLVector4a::initClass();
@@ -731,14 +732,14 @@ bool LLAppViewer::init()
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::initClass();
-#endif
-
// Initialize the non-LLCurl libcurl library. Should be called
// before consumers (LLTextureFetch).
mAppCoreHttp.init();
+#if LL_RECORD_VIEWER_STATS
+ LLViewerStatsRecorder::initClass();
+#endif
+
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
LLCurl::initClass(gSavedSettings.getF32("CurlRequestTimeOut"),
@@ -808,9 +809,6 @@ bool LLAppViewer::init()
//////////////////////////////////////////////////////////////////////////////
// *FIX: The following code isn't grouped into functions yet.
- // Statistics / debug timer initialization
- init_statistics();
-
//
// Various introspection concerning the libs we're using - particularly
// the libs involved in getting to a full login screen.
@@ -1196,9 +1194,10 @@ static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback");
static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot");
static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update");
+LLFastTimer::DeclareTimer FTM_FRAME("Frame", true);
+
bool LLAppViewer::mainLoop()
{
- LLMemType mt1(LLMemType::MTYPE_MAIN);
mMainloopTimeout = new LLWatchdogTimeout();
//-------------------------------------------
@@ -1234,7 +1233,9 @@ bool LLAppViewer::mainLoop()
// Handle messages
while (!LLApp::isExiting())
{
- LLFastTimer::nextFrame(); // Should be outside of any timer instances
+ LLFastTimer _(FTM_FRAME);
+ LLTrace::BlockTimer::nextFrame();
+ LLTrace::getMasterThreadRecorder().pullFromSlaveThreads();
//clear call stack records
llclearcallstacks;
@@ -1298,7 +1299,6 @@ bool LLAppViewer::mainLoop()
&& (gHeadlessClient || !gViewerWindow->getShowProgress())
&& !gFocusMgr.focusLocked())
{
- LLMemType mjk(LLMemType::MTYPE_JOY_KEY);
joystick->scanJoystick();
gKeyboard->scanKeyboard();
}
@@ -1312,7 +1312,6 @@ bool LLAppViewer::mainLoop()
if (gAres != NULL && gAres->isInitialized())
{
- LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP);
pingMainloopTimeout("Main:ServicePump");
LLFastTimer t4(FTM_PUMP);
{
@@ -1362,7 +1361,6 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
- LLMemType mt_sleep(LLMemType::MTYPE_SLEEP);
LLFastTimer t2(FTM_SLEEP);
// yield some time to the os based on command line option
@@ -1409,7 +1407,7 @@ bool LLAppViewer::mainLoop()
{
S32 work_pending = 0;
S32 io_pending = 0;
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
+ F32 max_time = llmin(gFrameIntervalSeconds.value() *10.f, 1.f);
{
LLFastTimer ftm(FTM_TEXTURE_CACHE);
@@ -1566,9 +1564,9 @@ bool LLAppViewer::cleanup()
if (LLFastTimerView::sAnalyzePerformance)
{
llinfos << "Analyzing performance" << llendl;
- std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
- std::string current_name = LLFastTimer::sLogName + ".slp";
- std::string report_name = LLFastTimer::sLogName + "_report.csv";
+ std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
+ std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
+ std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";
LLFastTimerView::doAnalysis(
gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name),
@@ -1927,9 +1925,9 @@ bool LLAppViewer::cleanup()
{
llinfos << "Analyzing performance" << llendl;
- std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
- std::string current_name = LLFastTimer::sLogName + ".slp";
- std::string report_name = LLFastTimer::sLogName + "_report.csv";
+ std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
+ std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
+ std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";
LLFastTimerView::doAnalysis(
gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name),
@@ -1939,10 +1937,6 @@ bool LLAppViewer::cleanup()
LLMetricPerformanceTesterBasic::cleanClass() ;
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::cleanupClass();
-#endif
-
llinfos << "Cleaning up Media and Textures" << llendflush;
//Note:
@@ -2056,10 +2050,10 @@ bool LLAppViewer::initThreads()
enable_threads && true,
app_metrics_qa_mode);
- if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
+ if (LLTrace::BlockTimer::sLog || LLTrace::BlockTimer::sMetricLog)
{
- LLFastTimer::sLogLock = new LLMutex(NULL);
- mFastTimerLogThread = new LLFastTimerLogThread(LLFastTimer::sLogName);
+ LLTrace::BlockTimer::setLogLock(new LLMutex(NULL));
+ mFastTimerLogThread = new LLFastTimerLogThread(LLTrace::BlockTimer::sLogName);
mFastTimerLogThread->start();
}
@@ -2264,7 +2258,7 @@ bool LLAppViewer::initConfiguration()
OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
return false;
}
-
+
initStrings(); // setup paths for LLTrans based on settings files only
// - set procedural settings
// Note: can't use LL_PATH_PER_SL_ACCOUNT for any of these since we haven't logged in yet
@@ -2468,13 +2462,13 @@ bool LLAppViewer::initConfiguration()
if (clp.hasOption("logperformance"))
{
- LLFastTimer::sLog = TRUE;
- LLFastTimer::sLogName = std::string("performance");
+ LLTrace::BlockTimer::sLog = true;
+ LLTrace::BlockTimer::sLogName = std::string("performance");
}
if (clp.hasOption("logmetrics"))
{
- LLFastTimer::sMetricLog = TRUE ;
+ LLTrace::BlockTimer::sMetricLog = true ;
// '--logmetrics' can be specified with a named test metric argument so the data gathering is done only on that test
// In the absence of argument, every metric is gathered (makes for a rather slow run and hard to decipher report...)
std::string test_name = clp.getOption("logmetrics")[0];
@@ -2482,11 +2476,11 @@ bool LLAppViewer::initConfiguration()
if (test_name == "")
{
llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl;
- LLFastTimer::sLogName = DEFAULT_METRIC_NAME;
+ LLTrace::BlockTimer::sLogName = DEFAULT_METRIC_NAME;
}
else
{
- LLFastTimer::sLogName = test_name;
+ LLTrace::BlockTimer::sLogName = test_name;
}
}
@@ -2579,15 +2573,15 @@ bool LLAppViewer::initConfiguration()
LLStartUp::setStartSLURL(start_slurl);
}
- const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
- if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
- {
+ const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
+ if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
+ {
// Examining "Language" may not suffice -- see LLUI::getLanguage()
// logic. Unfortunately LLUI::getLanguage() doesn't yet do us much
// good because we haven't yet called LLUI::initClass().
gDirUtilp->setSkinFolder(skinfolder->getValue().asString(),
gSavedSettings.getString("Language"));
- }
+ }
if (gSavedSettings.getBOOL("SpellCheck"))
{
@@ -3222,8 +3216,6 @@ void LLAppViewer::writeSystemInfo()
LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
- LL_INFOS("SystemInfo") << "Timers: " << LLFastTimer::sClockType << LL_ENDL;
-
writeDebugInfo(); // Save out debug_info.log early, in case of crash.
}
@@ -4198,6 +4190,8 @@ static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World");
static LLFastTimer::DeclareTimer FTM_NETWORK("Network");
static LLFastTimer::DeclareTimer FTM_AGENT_NETWORK("Agent Network");
static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
+static LLFastTimer::DeclareTimer FTM_AGENT_POSITION("Agent Position");
+static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("HUD Effects");
///////////////////////////////////////////////////////
// idle()
@@ -4207,7 +4201,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
///////////////////////////////////////////////////////
void LLAppViewer::idle()
{
- LLMemType mt_idle(LLMemType::MTYPE_IDLE);
pingMainloopTimeout("Main:Idle");
// Update frame timers
@@ -4320,7 +4313,6 @@ void LLAppViewer::idle()
// of SEND_STATS_PERIOD so that the initial stats report will
// be sent immediately.
static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD);
- reset_statistics();
// Update session stats every large chunk of time
// *FIX: (???) SAMANTHA
@@ -4352,10 +4344,6 @@ void LLAppViewer::idle()
gObjectList.mNumUnknownUpdates = 0;
}
- // ViewerMetrics FPS piggy-backing on the debug timer.
- // The 5-second interval is nice for this purpose. If the object debug
- // bit moves or is disabled, please give this a suitable home.
- LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
LLViewerAssetStatsFF::record_avatar_stats();
}
}
@@ -4380,9 +4368,12 @@ void LLAppViewer::idle()
idle_afk_check();
// Update statistics for this frame
- update_statistics(gFrameCount);
+ update_statistics();
}
+ LLTrace::get_frame_recording().nextPeriod();
+
+
////////////////////////////////////////
//
// Handle the regular UI idle callbacks as well as
@@ -4437,8 +4428,7 @@ void LLAppViewer::idle()
{
// Handle pending gesture processing
- static LLFastTimer::DeclareTimer ftm("Agent Position");
- LLFastTimer t(ftm);
+ LLFastTimer t(FTM_AGENT_POSITION);
LLGestureMgr::instance().update();
gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY);
@@ -4485,8 +4475,7 @@ void LLAppViewer::idle()
//
{
- static LLFastTimer::DeclareTimer ftm("HUD Effects");
- LLFastTimer t(ftm);
+ LLFastTimer t(FTM_HUD_EFFECTS);
LLSelectMgr::getInstance()->updateEffects();
LLHUDManager::getInstance()->cleanupEffects();
LLHUDManager::getInstance()->sendEffects();
@@ -4806,7 +4795,6 @@ static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"
void LLAppViewer::idleNetwork()
{
- LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK);
pingMainloopTimeout("idleNetwork");
gObjectList.mNumNewObjects = 0;
@@ -4885,7 +4873,7 @@ void LLAppViewer::idleNetwork()
gPrintMessagesThisFrame = FALSE;
}
}
- LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
+ LLStatViewer::NUM_NEW_OBJECTS.sample(gObjectList.mNumNewObjects);
// Retransmit unacknowledged packets.
gXferManager->retransmitUnackedPackets();
@@ -5295,17 +5283,7 @@ void LLAppViewer::metricsUpdateRegion(U64 region_handle)
{
if (0 != region_handle)
{
- LLViewerAssetStatsFF::set_region_main(region_handle);
- if (LLAppViewer::sTextureFetch)
- {
- // Send a region update message into 'thread1' to get the new region.
- LLAppViewer::sTextureFetch->commandSetRegion(region_handle);
- }
- else
- {
- // No 'thread1', a.k.a. TextureFetch, so update directly
- LLViewerAssetStatsFF::set_region_thread1(region_handle);
- }
+ LLViewerAssetStatsFF::set_region(region_handle);
}
}
@@ -5316,7 +5294,7 @@ void LLAppViewer::metricsUpdateRegion(U64 region_handle)
*/
void LLAppViewer::metricsSend(bool enable_reporting)
{
- if (! gViewerAssetStatsMain)
+ if (! gViewerAssetStats)
return;
if (LLAppViewer::sTextureFetch)
@@ -5329,7 +5307,9 @@ void LLAppViewer::metricsSend(bool enable_reporting)
// Make a copy of the main stats to send into another thread.
// Receiving thread takes ownership.
- LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStatsMain));
+ LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStats));
+
+ main_stats->updateStats();
// Send a report request into 'thread1' to get the rest of the data
// and provide some additional parameters while here.
@@ -5348,6 +5328,6 @@ void LLAppViewer::metricsSend(bool enable_reporting)
// Reset even if we can't report. Rather than gather up a huge chunk of
// data, we'll keep to our sampling interval and retain the data
// resolution in time.
- gViewerAssetStatsMain->reset();
+ gViewerAssetStats->reset();
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 7a474f9122..58237d573d 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -32,6 +32,7 @@
#include "llsys.h" // for LLOSInfo
#include "lltimer.h"
#include "llappcorehttp.h"
+#include "llunit.h"
class LLCommandLineParser;
class LLFrameTimer;
@@ -42,6 +43,9 @@ class LLTextureFetch;
class LLWatchdogTimeout;
class LLUpdaterService;
+extern LLFastTimer::DeclareTimer FTM_FRAME;
+
+
class LLAppViewer : public LLApp
{
public:
@@ -174,7 +178,7 @@ public:
// Metrics policy helper statics.
static void metricsUpdateRegion(U64 region_handle);
static void metricsSend(bool enable_reporting);
-
+
// llcorehttp init/shutdown/config information.
LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; }
@@ -326,7 +330,7 @@ extern LLPumpIO* gServicePump;
extern U64 gFrameTime; // The timestamp of the most-recently-processed frame
extern F32 gFrameTimeSeconds; // Loses msec precision after ~4.5 hours...
-extern F32 gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
+extern LLUnit<LLUnits::Seconds, F32> gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
extern U64 gStartTime;
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index e8d8efdc0a..8695652168 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -31,7 +31,6 @@
#include "llcommandlineparser.h"
#include "lldiriterator.h"
-#include "llmemtype.h"
#include "llurldispatcher.h" // SLURL from other app instance
#include "llviewernetwork.h"
#include "llviewercontrol.h"
@@ -71,8 +70,6 @@ static void exceptionTerminateHandler()
int main( int argc, char **argv )
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index c2916717bd..4d340cafa9 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -33,8 +33,6 @@
#include "llappviewermacosx.h"
#include "llcommandlineparser.h"
-#include "llmemtype.h"
-
#include "llviewernetwork.h"
#include "llviewercontrol.h"
#include "llmd5.h"
@@ -67,8 +65,6 @@ namespace
int main( int argc, char **argv )
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index e0ca1232b0..510ec47a31 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -32,7 +32,6 @@
#include "llappviewerwin32.h"
-#include "llmemtype.h"
#include "llwindowwin32.h" // *FIX: for setting gIconResource.
#include "llgl.h"
@@ -117,8 +116,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
#endif // _DEBUG
#endif // INCLUDE_VLD
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
const S32 MAX_HEAPS = 255;
DWORD heap_enable_lfh_error[MAX_HEAPS];
S32 num_heaps = 0;
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index d6095cce07..f6bad18070 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -618,24 +618,6 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
send_chat_from_viewer(utf8_out_text, type, channel);
}
-/*
-void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
-{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_ChatFromViewer);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_ChatData);
- msg->addStringFast(_PREHASH_Message, utf8_out_text);
- msg->addU8Fast(_PREHASH_Type, type);
- msg->addS32("Channel", channel);
-
- gAgent.sendReliableMessage();
-
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
-}
-*/
void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
{
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 4f5f9e22b6..033c8f4865 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -436,8 +436,6 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LLSD args;
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 29b1d23d7d..aeecf054b8 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -30,7 +30,6 @@
// library includes
#include "llfasttimerview.h"
-#include "llmemoryview.h"
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
@@ -38,7 +37,6 @@
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
-#include "llmemoryview.h"
#include "llsceneview.h"
#include "llviewertexture.h"
#include "llfloaterreg.h"
@@ -103,13 +101,6 @@ void LLDebugView::init()
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
- LLMemoryView::Params mp;
- mp.name("memory");
- mp.rect(r);
- mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
- mp.visible(false);
- mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp);
- addChild(mMemoryView);
r.set(150, rect.getHeight() - 50, 820, 100);
LLTextureView::Params tvp;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4894d63e13..09bbafd54a 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -256,8 +256,6 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
-
LLFace *face = new LLFace(this, mVObjp);
if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl;
@@ -280,8 +278,6 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
-
LLFace *face;
face = new LLFace(this, mVObjp);
@@ -624,7 +620,7 @@ BOOL LLDrawable::updateMove()
{
return FALSE;
}
-
+
makeActive();
BOOL done;
@@ -764,8 +760,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
void LLDrawable::updateTexture()
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
-
if (isDead())
{
llwarns << "Dead drawable updating texture!" << llendl;
@@ -1410,7 +1404,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
markDead();
return;
}
-
+
if (gShiftFrame)
{
return;
@@ -1497,7 +1491,7 @@ void LLSpatialBridge::cleanupReferences()
DON'T DO THIS -- this should happen through octree destruction
- mDrawable->setSpatialGroup(NULL);
+ mDrawable->setSpatialGroup(NULL);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1508,9 +1502,9 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable* drawable = child->mDrawable;
if (drawable)
{
- drawable->setSpatialGroup(NULL);
+ drawable->setSpatialGroup(NULL);
+ }
}
- }
}*/
LLDrawable* drawablep = mDrawable;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index b1e32bdb5b..4608d16fec 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -38,7 +38,6 @@
#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
-#include "llmemtype.h"
#include "lldarray.h"
#include "llviewerobject.h"
#include "llrect.h"
@@ -87,7 +86,6 @@ public:
}
LLDrawable() { init(); }
- MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE);
void markDead(); // Mark this drawable as dead
BOOL isDead() const { return isState(DEAD); }
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 730ad1a364..59161d063e 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1272,6 +1272,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
face->setGeomIndex(0);
face->setIndicesIndex(0);
+ //rigged faces do not batch textures
+ face->setTextureIndex(255);
+
if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())
{ //make a new buffer
if (sShaderLevel > 0)
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index a264eae302..1b0b11298c 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1192,7 +1192,7 @@ static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
-static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create");
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 4f6eaa5a5b..61f5ecc46f 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -463,7 +463,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face)
gGL.getTexUnit(0)->bind(mHBTex[dr]);
- LLOverrideFaceColor override(this, face->getFaceColor().mV);
+ LLOverrideFaceColor override(this, LLColor4(face->getFaceColor().mV));
face->renderIndexed();
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 605cb81c10..0b3bc2b19a 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
@@ -263,8 +263,6 @@ void LLFace::setPool(LLFacePool* pool)
void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (!new_pool)
{
llerrs << "Setting pool to null!" << llendl;
@@ -442,8 +440,6 @@ U16 LLFace::getGeometryAvatar(
LLStrider<F32> &vertex_weights,
LLStrider<LLVector4> &clothing_weights)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount);
@@ -459,8 +455,6 @@ U16 LLFace::getGeometryAvatar(
U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount);
@@ -770,8 +764,6 @@ bool less_than_max_mag(const LLVector4a& vec)
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
{
- LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
-
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
{
@@ -1066,7 +1058,7 @@ bool LLFace::canRenderAsMask()
{
return false;
}
-
+
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 9664aa7dbe..7a5c9dba46 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -46,7 +46,6 @@
#include "llviewertexturelist.h"
#include "llui.h"
#include "llviewercontrol.h"
-#include "llstat.h"
#include "llfasttimer.h"
#include "lltreeiterators.h"
@@ -62,17 +61,17 @@ static const S32 LINE_GRAPH_HEIGHT = 240;
static S32 FTV_NUM_TIMERS;
const S32 FTV_MAX_DEPTH = 8;
-std::vector<LLFastTimer::NamedTimer*> ft_display_idx; // line of table entry for display purposes (for collapse)
+std::vector<LLTrace::BlockTimer*> ft_display_idx; // line of table entry for display purposes (for collapse)
-typedef LLTreeDFSIter<LLFastTimer::NamedTimer, LLFastTimer::NamedTimer::child_const_iter> timer_tree_iterator_t;
+typedef LLTreeDFSIter<LLTrace::BlockTimer, LLTrace::BlockTimer::child_const_iter> timer_tree_iterator_t;
BOOL LLFastTimerView::sAnalyzePerformance = FALSE;
-static timer_tree_iterator_t begin_timer_tree(LLFastTimer::NamedTimer& id)
+static timer_tree_iterator_t begin_timer_tree(LLTrace::BlockTimer& id)
{
return timer_tree_iterator_t(&id,
- boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::beginChildren), _1),
- boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::endChildren), _1));
+ boost::bind(boost::mem_fn(&LLTrace::BlockTimer::beginChildren), _1),
+ boost::bind(boost::mem_fn(&LLTrace::BlockTimer::endChildren), _1));
}
static timer_tree_iterator_t end_timer_tree()
@@ -93,19 +92,18 @@ LLFastTimerView::LLFastTimerView(const LLSD& key)
mScrollIndex = 0;
mHoverID = NULL;
mHoverBarIndex = -1;
- FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
+ FTV_NUM_TIMERS = LLInstanceTracker<LLTrace::BlockTimer>::instanceCount();
mPrintStats = -1;
- mAverageCyclesPerTimer = 0;
}
void LLFastTimerView::onPause()
{
- LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
+ LLTrace::BlockTimer::sPauseHistory = !LLTrace::BlockTimer::sPauseHistory;
// reset scroll to bottom when unpausing
- if (!LLFastTimer::sPauseHistory)
+ if (!LLTrace::BlockTimer::sPauseHistory)
{
mScrollIndex = 0;
- LLFastTimer::sResetHistory = true;
+ LLTrace::BlockTimer::sResetHistory = true;
getChild<LLButton>("pause_btn")->setLabel(getString("pause"));
}
else
@@ -141,13 +139,13 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
S32 bar_idx = MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight());
bar_idx = llclamp(bar_idx, 0, MAX_VISIBLE_HISTORY);
- mPrintStats = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - bar_idx;
+ mPrintStats = LLTrace::BlockTimer::HISTORY_NUM - mScrollIndex - bar_idx;
return TRUE;
}
return LLFloater::handleRightMouseDown(x, y, mask);
}
-LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
+LLTrace::BlockTimer* LLFastTimerView::getLegendID(S32 y)
{
S32 idx = (getRect().getHeight() - y) / (LLFontGL::getFontMonospace()->getLineHeight()+2) - 5;
@@ -161,7 +159,7 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
@@ -174,7 +172,7 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* idp = getLegendID(y);
+ LLTrace::BlockTimer* idp = getLegendID(y);
if (idp)
{
idp->setCollapsed(!idp->getCollapsed());
@@ -210,16 +208,7 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
gFocusMgr.setMouseCapture(this);
return TRUE;
}
- //else
- //{
- // // pause/unpause
- // LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
- // // reset scroll to bottom when unpausing
- // if (!LLFastTimer::sPauseHistory)
- // {
- // mScrollIndex = 0;
- // }
- //}
+
return LLFloater::handleMouseDown(x, y, mask);
}
@@ -237,16 +226,16 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
- mScrollIndex = llround( lerp * (F32)(LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
- mScrollIndex = llclamp( mScrollIndex, 0, LLFastTimer::getLastFrameIndex());
+ mScrollIndex = llround( lerp * (F32)(LLTrace::BlockTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
+ mScrollIndex = llclamp( mScrollIndex, 0, LLTrace::BlockTimer::getLastFrameIndex());
return TRUE;
}
mHoverTimer = NULL;
mHoverID = NULL;
- if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y))
+ if(LLTrace::BlockTimer::sPauseHistory && mBarRect.pointInRect(x, y))
{
- mHoverBarIndex = llmin(LLFastTimer::getCurFrameIndex() - 1,
+ mHoverBarIndex = llmin(LLTrace::BlockTimer::getCurFrameIndex() - 1,
MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight()));
if (mHoverBarIndex == 0)
{
@@ -258,7 +247,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it, ++i)
{
@@ -290,7 +279,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
else if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* timer_id = getLegendID(y);
+ LLTrace::BlockTimer* timer_id = getLegendID(y);
if (timer_id)
{
mHoverID = timer_id;
@@ -301,9 +290,26 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
+static std::string get_tooltip(LLTrace::BlockTimer& timer, S32 history_index = -1)
+{
+ F64 ms_multiplier = 1000.0 / (F64)LLTrace::BlockTimer::countsPerSecond();
+
+ std::string tooltip;
+ if (history_index < 0)
+ {
+ // by default, show average number of call
+ tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(timer.getCountAverage() * ms_multiplier), (S32)timer.getCallAverage());
+ }
+ else
+ {
+ tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)(timer.getHistoricalCount(history_index) * ms_multiplier), (S32)timer.getHistoricalCalls(history_index));
+ }
+ return tooltip;
+}
+
BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
{
- if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y))
+ if(LLTrace::BlockTimer::sPauseHistory && mBarRect.pointInRect(x, y))
{
// tooltips for timer bars
if (mHoverTimer)
@@ -311,8 +317,10 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
LLRect screen_rect;
localRectToScreen(mToolTipRect, &screen_rect);
+ std::string tooltip = get_tooltip(*mHoverTimer, LLTrace::BlockTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex);
+
LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(mHoverTimer->getToolTip(LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex))
+ .message(tooltip)
.sticky_rect(screen_rect)
.delay_time(0.f));
@@ -324,10 +332,10 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
// tooltips for timer legend
if (x < mBarRect.mLeft)
{
- LLFastTimer::NamedTimer* idp = getLegendID(y);
+ LLTrace::BlockTimer* idp = getLegendID(y);
if (idp)
{
- LLToolTipMgr::instance().show(idp->getToolTip());
+ LLToolTipMgr::instance().show(get_tooltip(*idp));
return TRUE;
}
@@ -339,16 +347,16 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- LLFastTimer::sPauseHistory = TRUE;
+ LLTrace::BlockTimer::sPauseHistory = TRUE;
mScrollIndex = llclamp( mScrollIndex + clicks,
0,
- llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
+ llmin(LLTrace::BlockTimer::getLastFrameIndex(), (S32)LLTrace::BlockTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
return TRUE;
}
-static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers", true);
+static LLTrace::BlockTimer FTM_RENDER_TIMER("Timers", true);
-static std::map<LLFastTimer::NamedTimer*, LLColor4> sTimerColors;
+static std::map<LLTrace::BlockTimer*, LLColor4> sTimerColors;
void LLFastTimerView::draw()
{
@@ -356,7 +364,7 @@ void LLFastTimerView::draw()
std::string tdesc;
- F64 clock_freq = (F64)LLFastTimer::countsPerSecond();
+ F64 clock_freq = (F64)LLTrace::BlockTimer::countsPerSecond();
F64 iclock_freq = 1000.0 / clock_freq;
S32 margin = 10;
@@ -379,12 +387,6 @@ void LLFastTimerView::draw()
S32 xleft = margin;
S32 ytop = margin;
- mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0
- ? 0
- : llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
- LLFastTimer::sTimerCycles = 0;
- LLFastTimer::sTimerCalls = 0;
-
// Draw some help
{
@@ -392,10 +394,6 @@ void LLFastTimerView::draw()
y = height - ytop;
texth = (S32)LLFontGL::getFontMonospace()->getLineHeight();
-#if TIME_FAST_TIMERS
- tdesc = llformat("Cycles per timer call: %d", mAverageCyclesPerTimer);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-#else
char modedesc[][32] = {
"2 x Average ",
"Max ",
@@ -419,11 +417,10 @@ void LLFastTimerView::draw()
LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"),
0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-#endif
y -= (texth + 2);
}
- S32 histmax = llmin(LLFastTimer::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY);
+ S32 histmax = llmin(LLTrace::BlockTimer::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY);
// Draw the legend
xleft = margin;
@@ -431,15 +428,15 @@ void LLFastTimerView::draw()
y -= (texth + 2);
- sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey;
+ sTimerColors[&getFrameTimer()] = LLColor4::grey;
F32 hue = 0.f;
- for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != timer_tree_iterator_t();
++it)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
const F32 HUE_INCREMENT = 0.23f;
hue = fmodf(hue + HUE_INCREMENT, 1.f);
@@ -459,12 +456,12 @@ void LLFastTimerView::draw()
LLLocalClipRect clip(LLRect(margin, y, LEGEND_WIDTH, margin));
S32 cur_line = 0;
ft_display_idx.clear();
- std::map<LLFastTimer::NamedTimer*, S32> display_line;
- for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ std::map<LLTrace::BlockTimer*, S32> display_line;
+ for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != timer_tree_iterator_t();
++it)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
display_line[idp] = cur_line;
ft_display_idx.push_back(idp);
cur_line++;
@@ -484,7 +481,7 @@ void LLFastTimerView::draw()
S32 calls = 0;
if (mHoverBarIndex > 0 && mHoverID)
{
- S32 hidx = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex;
+ S32 hidx = LLTrace::BlockTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex;
U64 ticks = idp->getHistoricalCount(hidx);
ms = (F32)((F64)ticks * iclock_freq);
calls = (S32)idp->getHistoricalCalls(hidx);
@@ -522,10 +519,11 @@ void LLFastTimerView::draw()
x += dx;
BOOL is_child_of_hover_item = (idp == mHoverID);
- LLFastTimer::NamedTimer* next_parent = idp->getParent();
+ LLTrace::BlockTimer* next_parent = idp->getParent();
while(!is_child_of_hover_item && next_parent)
{
is_child_of_hover_item = (mHoverID == next_parent);
+ if (next_parent->getParent() == next_parent) break;
next_parent = next_parent->getParent();
}
@@ -563,18 +561,18 @@ void LLFastTimerView::draw()
barw = width - xleft - margin;
// Draw the history bars
- if (LLFastTimer::getLastFrameIndex() >= 0)
+ if (LLTrace::BlockTimer::getLastFrameIndex() >= 0)
{
LLLocalClipRect clip(LLRect(xleft, ytop, getRect().getWidth() - margin, margin));
U64 totalticks;
- if (!LLFastTimer::sPauseHistory)
+ if (!LLTrace::BlockTimer::sPauseHistory)
{
- U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex);
+ U64 ticks = getFrameTimer().getHistoricalCount(mScrollIndex);
- if (LLFastTimer::getCurFrameIndex() >= 10)
+ if (LLTrace::BlockTimer::getCurFrameIndex() >= 10)
{
- U64 framec = LLFastTimer::getCurFrameIndex();
+ U64 framec = LLTrace::BlockTimer::getCurFrameIndex();
U64 avg = (U64)mAvgCountTotal;
mAvgCountTotal = (avg*framec + ticks) / (framec + 1);
if (ticks > mMaxCountTotal)
@@ -585,14 +583,14 @@ void LLFastTimerView::draw()
if (ticks < mAvgCountTotal/100 || ticks > mAvgCountTotal*100)
{
- LLFastTimer::sResetHistory = true;
+ LLTrace::BlockTimer::sResetHistory = true;
}
- if (LLFastTimer::getCurFrameIndex() < 10 || LLFastTimer::sResetHistory)
+ if (LLTrace::BlockTimer::getCurFrameIndex() < 10 || LLTrace::BlockTimer::sResetHistory)
{
mAvgCountTotal = ticks;
mMaxCountTotal = ticks;
- LLFastTimer::sResetHistory = false;
+ LLTrace::BlockTimer::sResetHistory = false;
}
}
@@ -610,7 +608,7 @@ void LLFastTimerView::draw()
totalticks = 0;
for (S32 j=0; j<histmax; j++)
{
- U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(j);
+ U64 ticks = getFrameTimer().getHistoricalCount(j);
if (ticks > totalticks)
totalticks = ticks;
@@ -699,7 +697,7 @@ void LLFastTimerView::draw()
S32 tidx;
if (j >= 0)
{
- tidx = LLFastTimer::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex;
+ tidx = LLTrace::BlockTimer::HISTORY_NUM - j - 1 - mScrollIndex;
}
else
{
@@ -713,14 +711,14 @@ void LLFastTimerView::draw()
std::vector<S32> deltax;
xpos.push_back(xleft);
- LLFastTimer::NamedTimer* prev_id = NULL;
+ LLTrace::BlockTimer* prev_id = NULL;
S32 i = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it, ++i)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
F32 frac = tidx == -1
? (F32)idp->getCountAverage() / (F32)totalticks
: (F32)idp->getHistoricalCount(tidx) / (F32)totalticks;
@@ -747,7 +745,7 @@ void LLFastTimerView::draw()
{
U64 sublevelticks = 0;
- for (LLFastTimer::NamedTimer::child_const_iter it = prev_id->beginChildren();
+ for (LLTrace::BlockTimer::child_const_iter it = prev_id->beginChildren();
it != prev_id->endChildren();
++it)
{
@@ -789,10 +787,11 @@ void LLFastTimerView::draw()
S32 scale_offset = 0;
BOOL is_child_of_hover_item = (idp == mHoverID);
- LLFastTimer::NamedTimer* next_parent = idp->getParent();
+ LLTrace::BlockTimer* next_parent = idp->getParent();
while(!is_child_of_hover_item && next_parent)
{
is_child_of_hover_item = (mHoverID == next_parent);
+ if (next_parent->getParent() == next_parent) break;
next_parent = next_parent->getParent();
}
@@ -853,10 +852,10 @@ void LLFastTimerView::draw()
//highlight visible range
{
- S32 first_frame = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex;
+ S32 first_frame = LLTrace::BlockTimer::HISTORY_NUM - mScrollIndex;
S32 last_frame = first_frame - MAX_VISIBLE_HISTORY;
- F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1);
+ F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(LLTrace::BlockTimer::HISTORY_NUM-1);
F32 right = (F32) mGraphRect.mLeft + frame_delta*first_frame;
F32 left = (F32) mGraphRect.mLeft + frame_delta*last_frame;
@@ -879,11 +878,11 @@ void LLFastTimerView::draw()
}
U64 cur_max = 0;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
//fatten highlighted timer
if (mHoverID == idp)
@@ -907,8 +906,8 @@ void LLFastTimerView::draw()
gGL.color4f(col[0], col[1], col[2], alpha);
gGL.begin(LLRender::TRIANGLE_STRIP);
- for (U32 j = llmax(0, LLFastTimer::NamedTimer::HISTORY_NUM - LLFastTimer::getLastFrameIndex());
- j < LLFastTimer::NamedTimer::HISTORY_NUM;
+ for (U32 j = llmax(0, LLTrace::BlockTimer::HISTORY_NUM - LLTrace::BlockTimer::getLastFrameIndex());
+ j < LLTrace::BlockTimer::HISTORY_NUM;
j++)
{
U64 ticks = idp->getHistoricalCount(j);
@@ -929,7 +928,7 @@ void LLFastTimerView::draw()
//normalize to highlighted timer
cur_max = llmax(cur_max, ticks);
}
- F32 x = mGraphRect.mLeft + ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j;
+ F32 x = mGraphRect.mLeft + ((F32) (mGraphRect.getWidth()))/(LLTrace::BlockTimer::HISTORY_NUM-1)*j;
F32 y = mGraphRect.mBottom + (F32) mGraphRect.getHeight()/max_ticks*ticks;
gGL.vertex2f(x,y);
gGL.vertex2f(x,mGraphRect.mBottom);
@@ -980,11 +979,11 @@ void LLFastTimerView::draw()
{
std::string legend_stat;
bool first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
if (!first)
{
@@ -1002,11 +1001,11 @@ void LLFastTimerView::draw()
std::string timer_stat;
first = true;
- for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
+ for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer());
it != end_timer_tree();
++it)
{
- LLFastTimer::NamedTimer* idp = (*it);
+ LLTrace::BlockTimer* idp = (*it);
if (!first)
{
@@ -1044,11 +1043,8 @@ void LLFastTimerView::draw()
F64 LLFastTimerView::getTime(const std::string& name)
{
- const LLFastTimer::NamedTimer* timerp = LLFastTimer::getTimerByName(name);
- if (timerp)
- {
- return (F64)timerp->getCountAverage() / (F64)LLFastTimer::countsPerSecond();
- }
+ //TODO: replace calls to this with use of timer object directly
+ //llstatic_assert(false, "TODO: implement");
return 0.0;
}
@@ -1546,13 +1542,13 @@ void LLFastTimerView::outputAllMetrics()
//static
void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output)
{
- if(LLFastTimer::sLog)
+ if(LLTrace::BlockTimer::sLog)
{
doAnalysisDefault(baseline, target, output) ;
return ;
}
- if(LLFastTimer::sMetricLog)
+ if(LLTrace::BlockTimer::sMetricLog)
{
LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ;
return ;
@@ -1563,3 +1559,9 @@ void LLFastTimerView::onClickCloseBtn()
setVisible(false);
}
+LLTrace::BlockTimer& LLFastTimerView::getFrameTimer()
+{
+ return FTM_FRAME;
+}
+
+
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index a349e7ad4c..d7f7f27cd4 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -46,6 +46,7 @@ private:
static LLSD analyzePerformanceLogDefault(std::istream& is) ;
static void exportCharts(const std::string& base, const std::string& target);
void onPause();
+ LLTrace::BlockTimer& getFrameTimer();
public:
@@ -58,7 +59,7 @@ public:
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
- LLFastTimer::NamedTimer* getLegendID(S32 y);
+ LLTrace::BlockTimer* getLegendID(S32 y);
F64 getTime(const std::string& name);
protected:
@@ -84,13 +85,12 @@ private:
U64 mMaxCountTotal;
LLRect mBarRect;
S32 mScrollIndex;
- LLFastTimer::NamedTimer* mHoverID;
- LLFastTimer::NamedTimer* mHoverTimer;
+ LLTrace::BlockTimer* mHoverID;
+ LLTrace::BlockTimer* mHoverTimer;
LLRect mToolTipRect;
S32 mHoverBarIndex;
LLFrameTimer mHighlightTimer;
S32 mPrintStats;
- S32 mAverageCyclesPerTimer;
LLRect mGraphRect;
};
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index f5bf900d0d..5f4a84b6f1 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -48,7 +48,7 @@ std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
-static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update");
+static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// LLFlexibleObjectData::pack/unpack now in llprimitive.cpp
@@ -377,7 +377,7 @@ void LLVolumeImplFlexible::doIdleUpdate()
if (visible)
{
if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
- mVO->getPixelArea() > 256.f)
+ pixel_area > 256.f)
{
U32 id;
@@ -444,7 +444,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
//the object is not visible
return ;
}
-
+
// stinson 11/12/2012: Need to check with davep on the following.
// Skipping the flexible update if render res is negative. If we were to continue with a negative value,
// the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 83fb887d81..58701ca3c9 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -296,7 +296,8 @@ LLSD LLFloaterAbout::getInfo()
if (gPacketsIn > 0)
{
- info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
+ LLTrace::Recording cur_frame = LLTrace::get_frame_recording().snapshotCurRecordingPeriod();
+ info["PACKETS_LOST"] = cur_frame.getSum(LLStatViewer::PACKETS_LOST);
info["PACKETS_IN"] = F32(gPacketsIn);
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
}
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 90f40628a8..39b6e465f3 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -336,8 +336,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
// This slices the object into what we're concerned about on the viewer.
// The simulator will take the permissions and transfer ownership.
LLPointer<LLViewerInventoryItem> task_item =
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 21b58d3e3d..c85d048c5a 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -330,6 +330,10 @@ void LLFloaterCamera::onClose(bool app_quitting)
//We don't care of camera mode if app is quitting
if(app_quitting)
return;
+ // It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so
+ // to avoid seeing an empty floater when reopening the control.
+ if (mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA)
+ mCurrMode = CAMERA_CTRL_MODE_PAN;
// When mCurrMode is in CAMERA_CTRL_MODE_PAN
// switchMode won't modify mPrevMode, so force it here.
// It is needed to correctly return to previous mode on open, see EXT-2727.
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index c37798c330..e2813a8272 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -33,6 +33,7 @@
#include "llerror.h"
#include "llrect.h"
#include "llstring.h"
+#include "lltrace.h"
// project includes
#include "lluictrlfactory.h"
@@ -41,6 +42,16 @@
#include "llviewerjoystick.h"
#include "llcheckboxctrl.h"
+static LLTrace::Measurement<> sJoystickAxes[6] =
+{
+ LLTrace::Measurement<>("Joystick axis 1"),
+ LLTrace::Measurement<>("Joystick axis 2"),
+ LLTrace::Measurement<>("Joystick axis 3"),
+ LLTrace::Measurement<>("Joystick axis 4"),
+ LLTrace::Measurement<>("Joystick axis 5"),
+ LLTrace::Measurement<>("Joystick axis 6")
+};
+
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
: LLFloater(data)
{
@@ -60,7 +71,7 @@ void LLFloaterJoystick::draw()
for (U32 i = 0; i < 6; i++)
{
F32 value = joystick->getJoystickAxis(i);
- mAxisStats[i]->addValue(value * gFrameIntervalSeconds);
+ sJoystickAxes[i].sample(value * gFrameIntervalSeconds.value());
if (mAxisStatsBar[i])
{
F32 minbar, maxbar;
@@ -83,12 +94,12 @@ BOOL LLFloaterJoystick::postBuild()
for (U32 i = 0; i < 6; i++)
{
- mAxisStats[i] = new LLStat(4);
+ std::string stat_name(llformat("Joystick axis %d", i));
std::string axisname = llformat("axis%d", i);
mAxisStatsBar[i] = getChild<LLStatBar>(axisname);
if (mAxisStatsBar[i])
{
- mAxisStatsBar[i]->setStat(mAxisStats[i]);
+ mAxisStatsBar[i]->setStat(stat_name);
mAxisStatsBar[i]->setRange(-range, range, range * 0.25f, range * 0.5f);
}
}
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index dfdb108ff8..9c3752540d 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -84,7 +84,6 @@ private:
LLCheckBoxCtrl *mCheckFlycamEnabled;
// stats view
- LLStat* mAxisStats[6];
LLStatBar* mAxisStatsBar[6];
};
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
deleted file mode 100644
index 68b1770bb2..0000000000
--- a/indra/newview/llfloaterlagmeter.cpp
+++ /dev/null
@@ -1,375 +0,0 @@
-/**
- * @file llfloaterlagmeter.cpp
- * @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterlagmeter.h"
-
-#include "lluictrlfactory.h"
-#include "llviewerstats.h"
-#include "llviewertexture.h"
-#include "llviewercontrol.h"
-#include "llappviewer.h"
-
-#include "lltexturefetch.h"
-
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "lltextbox.h"
-
-const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
-const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
-const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
-
-LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
- : LLFloater(key)
-{
- mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
-}
-
-BOOL LLFloaterLagMeter::postBuild()
-{
- // Don't let this window take keyboard focus -- it's confusing to
- // lose arrow-key driving when testing lag.
- setIsChrome(TRUE);
-
- // were we shrunk last time?
- if (isShrunk())
- {
- onClickShrink();
- }
-
- mClientButton = getChild<LLButton>("client_lagmeter");
- mClientText = getChild<LLTextBox>("client_text");
- mClientCause = getChild<LLTextBox>("client_lag_cause");
-
- mNetworkButton = getChild<LLButton>("network_lagmeter");
- mNetworkText = getChild<LLTextBox>("network_text");
- mNetworkCause = getChild<LLTextBox>("network_lag_cause");
-
- mServerButton = getChild<LLButton>("server_lagmeter");
- mServerText = getChild<LLTextBox>("server_text");
- mServerCause = getChild<LLTextBox>("server_lag_cause");
-
- std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs);
- mClientFrameTimeCritical = 1.0f / (float)atof( config_string.c_str() );
- config_string = getString("client_frame_rate_warning_fps", mStringArgs);
- mClientFrameTimeWarning = 1.0f / (float)atof( config_string.c_str() );
-
- config_string = getString("network_packet_loss_critical_pct", mStringArgs);
- mNetworkPacketLossCritical = (float)atof( config_string.c_str() );
- config_string = getString("network_packet_loss_warning_pct", mStringArgs);
- mNetworkPacketLossWarning = (float)atof( config_string.c_str() );
-
- config_string = getString("network_ping_critical_ms", mStringArgs);
- mNetworkPingCritical = (float)atof( config_string.c_str() );
- config_string = getString("network_ping_warning_ms", mStringArgs);
- mNetworkPingWarning = (float)atof( config_string.c_str() );
- config_string = getString("server_frame_rate_critical_fps", mStringArgs);
-
- mServerFrameTimeCritical = 1000.0f / (float)atof( config_string.c_str() );
- config_string = getString("server_frame_rate_warning_fps", mStringArgs);
- mServerFrameTimeWarning = 1000.0f / (float)atof( config_string.c_str() );
- config_string = getString("server_single_process_max_time_ms", mStringArgs);
- mServerSingleProcessMaxTime = (float)atof( config_string.c_str() );
-
-// mShrunk = false;
- config_string = getString("max_width_px", mStringArgs);
- mMaxWidth = atoi( config_string.c_str() );
- config_string = getString("min_width_px", mStringArgs);
- mMinWidth = atoi( config_string.c_str() );
-
- mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps");
- mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps");
-
- mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct");
- mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct");
-
- mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms");
- mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms");
-
- mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
- mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
-
-// childSetAction("minimize", onClickShrink, this);
- updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)
-
- return TRUE;
-}
-LLFloaterLagMeter::~LLFloaterLagMeter()
-{
- // save shrunk status for next time
-// gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
- // expand so we save the large window rectangle
- if (isShrunk())
- {
- onClickShrink();
- }
-}
-
-void LLFloaterLagMeter::draw()
-{
- determineClient();
- determineNetwork();
- determineServer();
-
- LLFloater::draw();
-}
-
-void LLFloaterLagMeter::determineClient()
-{
- F32 client_frame_time = LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
- bool find_cause = false;
-
- if (!gFocusMgr.getAppHasFocus())
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) );
- mClientCause->setText( LLStringUtil::null );
- }
- else if(client_frame_time >= mClientFrameTimeCritical)
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) );
- find_cause = true;
- }
- else if(client_frame_time >= mClientFrameTimeWarning)
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) );
- find_cause = true;
- }
- else
- {
- mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) );
- mClientCause->setText( LLStringUtil::null );
- }
-
- if(find_cause)
- {
- if(gSavedSettings.getF32("RenderFarClip") > 128)
- {
- mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) );
- }
- else if(LLAppViewer::instance()->getTextureFetch()->getNumRequests() > 2)
- {
- mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
- }
- else if((BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes)) > LLViewerTexture::sMaxBoundTextureMemInMegaBytes)
- {
- mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
- }
- else
- {
- mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) );
- }
- }
-}
-
-void LLFloaterLagMeter::determineNetwork()
-{
- F32 packet_loss = LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean();
- F32 ping_time = LLViewerStats::getInstance()->mSimPingStat.getMean();
- bool find_cause_loss = false;
- bool find_cause_ping = false;
-
- // *FIXME: We can't blame a large ping time on anything in
- // particular if the frame rate is low, because a low frame
- // rate is a sure recipe for bad ping times right now until
- // the network handlers are de-synched from the rendering.
- F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration();
-
- if(packet_loss >= mNetworkPacketLossCritical)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) );
- find_cause_loss = true;
- }
- else if(ping_time >= mNetworkPingCritical)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- if (client_frame_time_ms < mNetworkPingCritical)
- {
- mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) );
- find_cause_ping = true;
- }
- }
- else if(packet_loss >= mNetworkPacketLossWarning)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) );
- find_cause_loss = true;
- }
- else if(ping_time >= mNetworkPingWarning)
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- if (client_frame_time_ms < mNetworkPingWarning)
- {
- mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) );
- find_cause_ping = true;
- }
- }
- else
- {
- mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) );
- }
-
- if(find_cause_loss)
- {
- mNetworkCause->setText( getString("network_packet_loss_cause_msg", mStringArgs) );
- }
- else if(find_cause_ping)
- {
- mNetworkCause->setText( getString("network_ping_cause_msg", mStringArgs) );
- }
- else
- {
- mNetworkCause->setText( LLStringUtil::null );
- }
-}
-
-void LLFloaterLagMeter::determineServer()
-{
- F32 sim_frame_time = LLViewerStats::getInstance()->mSimFrameMsec.getCurrent();
- bool find_cause = false;
-
- if(sim_frame_time >= mServerFrameTimeCritical)
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) );
- find_cause = true;
- }
- else if(sim_frame_time >= mServerFrameTimeWarning)
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) );
- find_cause = true;
- }
- else
- {
- mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
- mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) );
- mServerCause->setText( LLStringUtil::null );
- }
-
- if(find_cause)
- {
- if(LLViewerStats::getInstance()->mSimSimPhysicsMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_physics_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimScriptMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_scripts_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimNetMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_net_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimAgentMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_agent_cause_msg", mStringArgs) );
- }
- else if(LLViewerStats::getInstance()->mSimImagesMsec.getCurrent() > mServerSingleProcessMaxTime)
- {
- mServerCause->setText( getString("server_images_cause_msg", mStringArgs) );
- }
- else
- {
- mServerCause->setText( getString("server_generic_cause_msg", mStringArgs) );
- }
- }
-}
-
-void LLFloaterLagMeter::updateControls(bool shrink)
-{
-// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
-
- LLButton * button = getChild<LLButton>("minimize");
- S32 delta_width = mMaxWidth -mMinWidth;
- LLRect r = getRect();
-
- if(!shrink)
- {
- setTitle(getString("max_title_msg", mStringArgs) );
- // make left edge appear to expand
- r.translate(-delta_width, 0);
- setRect(r);
- reshape(mMaxWidth, getRect().getHeight());
-
- getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) + ":");
- getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) + ":");
- getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) + ":");
-
- // usually "<<"
- button->setLabel( getString("smaller_label", mStringArgs) );
- }
- else
- {
- setTitle( getString("min_title_msg", mStringArgs) );
- // make left edge appear to collapse
- r.translate(delta_width, 0);
- setRect(r);
- reshape(mMinWidth, getRect().getHeight());
-
- getChild<LLUICtrl>("client")->setValue(getString("client_text_msg", mStringArgs) );
- getChild<LLUICtrl>("network")->setValue(getString("network_text_msg",mStringArgs) );
- getChild<LLUICtrl>("server")->setValue(getString("server_text_msg", mStringArgs) );
-
- // usually ">>"
- button->setLabel( getString("bigger_label", mStringArgs) );
- }
- // Don't put keyboard focus on the button
- button->setFocus(FALSE);
-
-// self->mClientText->setVisible(self->mShrunk);
-// self->mClientCause->setVisible(self->mShrunk);
-// self->getChildView("client_help")->setVisible( self->mShrunk);
-
-// self->mNetworkText->setVisible(self->mShrunk);
-// self->mNetworkCause->setVisible(self->mShrunk);
-// self->getChildView("network_help")->setVisible( self->mShrunk);
-
-// self->mServerText->setVisible(self->mShrunk);
-// self->mServerCause->setVisible(self->mShrunk);
-// self->getChildView("server_help")->setVisible( self->mShrunk);
-
-// self->mShrunk = !self->mShrunk;
-}
-
-BOOL LLFloaterLagMeter::isShrunk()
-{
- return gSavedSettings.getBOOL("LagMeterShrunk");
-}
-
-void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
-{
- bool shrunk = isShrunk();
- updateControls(!shrunk);
- gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
-}
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
deleted file mode 100644
index eef6955601..0000000000
--- a/indra/newview/llfloaterlagmeter.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file llfloaterlagmeter.h
- * @brief The "Lag-o-Meter" floater used to tell users what is causing lag.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LLFLOATERLAGMETER_H
-#define LLFLOATERLAGMETER_H
-
-#include "llfloater.h"
-
-class LLTextBox;
-
-class LLFloaterLagMeter : public LLFloater
-{
- friend class LLFloaterReg;
-
-public:
- /*virtual*/ void draw();
- /*virtual*/ BOOL postBuild();
-private:
-
- LLFloaterLagMeter(const LLSD& key);
- /*virtual*/ ~LLFloaterLagMeter();
- void determineClient();
- void determineNetwork();
- void determineServer();
- void updateControls(bool shrink);
- BOOL isShrunk();
-
- void onClickShrink();
-
- bool mShrunk;
- S32 mMaxWidth, mMinWidth;
-
- F32 mClientFrameTimeCritical;
- F32 mClientFrameTimeWarning;
- LLButton * mClientButton;
- LLTextBox * mClientText;
- LLTextBox * mClientCause;
-
- F32 mNetworkPacketLossCritical;
- F32 mNetworkPacketLossWarning;
- F32 mNetworkPingCritical;
- F32 mNetworkPingWarning;
- LLButton * mNetworkButton;
- LLTextBox * mNetworkText;
- LLTextBox * mNetworkCause;
-
- F32 mServerFrameTimeCritical;
- F32 mServerFrameTimeWarning;
- F32 mServerSingleProcessMaxTime;
- LLButton * mServerButton;
- LLTextBox * mServerText;
- LLTextBox * mServerCause;
-
- LLStringUtil::format_map_t mStringArgs;
-};
-
-#endif
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 55f3d548ec..be743d57d2 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -783,8 +783,9 @@ void LLPanelLandGeneral::refresh()
mBtnReleaseLand->setEnabled( can_release );
}
- BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
+ BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
mBtnBuyPass->setEnabled(use_pass);
+
}
}
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index a65e9e911a..473e2938be 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -122,16 +122,13 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
- // If we're not tracking a beacon already, double-click will set one
- if (!LLTracker::isTracking(NULL))
+ LLTracker::stopTracking(NULL);
+ LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ if (world_map)
{
- LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
- if (world_map)
- {
- world_map->trackLocation(pos_global);
- }
+ world_map->trackLocation(pos_global);
}
-
+
if (gSavedSettings.getBOOL("DoubleClickTeleport"))
{
// If DoubleClickTeleport is on, double clicking the minimap will teleport there
@@ -249,3 +246,8 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
mMap->setScale(scale);
}
}
+
+LLFloaterMap* LLFloaterMap::getInstance()
+{
+ return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map");
+}
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 8a1b965e62..ff2fb20535 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -39,6 +39,7 @@ class LLFloaterMap : public LLFloater
{
public:
LLFloaterMap(const LLSD& key);
+ static LLFloaterMap* getInstance();
virtual ~LLFloaterMap();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index a071f338ba..a5e3cd404d 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -113,8 +113,6 @@
#include "llviewernetwork.h"
#include "llviewershadermgr.h"
#include "glod/glod.h"
-#include <boost/algorithm/string.hpp>
-
const S32 SLM_SUPPORTED_VERSION = 3;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index fe29bb38c7..6cce013105 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2491,8 +2491,6 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index d8d62e5bbb..0d90037e7b 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -992,7 +992,7 @@ void LLSnapshotLivePreview::saveTexture()
llwarns << "Error encoding snapshot" << llendl;
}
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT );
+ LLStatViewer::SNAPSHOT.add(1);
mDataSize = 0;
}
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 66ca76bfb0..27a29d3ace 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -1137,8 +1137,6 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 482294c8a6..56fbdb429a 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -30,6 +30,7 @@
#include "llhudnametag.h"
#include "llrender.h"
+#include "lltracerecording.h"
#include "llagent.h"
#include "llviewercontrol.h"
@@ -899,8 +900,8 @@ void LLHUDNameTag::updateAll()
// }
}
- LLStat* camera_vel_stat = LLViewerCamera::getInstance()->getVelocityStat();
- F32 camera_vel = camera_vel_stat->getCurrent();
+ LLTrace::Count<>* camera_vel_stat = LLViewerCamera::getVelocityStat();
+ F32 camera_vel = LLTrace::get_frame_recording().getLastRecordingPeriod().getPerSec(*camera_vel_stat);
if (camera_vel > MAX_STABLE_CAMERA_VELOCITY)
{
return;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 14a228df1c..87b900da62 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2588,12 +2588,12 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
cat_count = cat_array->count();
}
-
+
// Move to next if current folder empty
if ((item_count == 0) && (cat_count == 0))
- {
+ {
continue;
- }
+ }
uuid_vec_t ids;
LLRightClickInventoryFetchObserver* outfit = NULL;
@@ -3214,6 +3214,7 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags)
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
+ const LLUUID favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (lost_and_found_id == mUUID)
{
@@ -3227,7 +3228,10 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags)
mDisabledItems.push_back(std::string("New Clothes"));
mDisabledItems.push_back(std::string("New Body Parts"));
}
-
+ if (favorites == mUUID)
+ {
+ mDisabledItems.push_back(std::string("New Folder"));
+ }
if(trash_id == mUUID)
{
// This is the trash.
@@ -4667,6 +4671,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Share"));
}
+ if ((flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Open"));
+ }
addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
@@ -5633,7 +5641,8 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Wearable Edit"));
- if ((flags & FIRST_SELECTED_ITEM) == 0)
+ bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID());
+ if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable)
{
disabled_items.push_back(std::string("Wearable Edit"));
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e98d3f88a6..68732024de 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -959,7 +959,6 @@ void LLSaveFolderState::setApply(BOOL apply)
void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER);
LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener();
if(!bridge) return;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 05c81957c6..4c10717ce8 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -44,6 +44,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llsidepanelinventory.h"
+#include "lltrans.h"
#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
@@ -191,8 +192,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD);
-
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
buildFolderView(params);
@@ -397,9 +396,10 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
return getFilter()->getShowFolderState();
}
+static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
+
void LLInventoryPanel::modelChanged(U32 mask)
{
- static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
LLFastTimer t2(FTM_REFRESH);
bool handled = false;
@@ -975,7 +975,6 @@ bool LLInventoryPanel::beginIMSession()
std::set<LLUUID> selected_items = mFolderRoot->getSelectionList();
std::string name;
- static int session_num = 1;
LLDynamicArray<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
@@ -1055,7 +1054,7 @@ bool LLInventoryPanel::beginIMSession()
if (name.empty())
{
- name = llformat("Session %d", session_num++);
+ name = LLTrans::getString("conference-title");
}
LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index dd402de394..2a131eff58 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -141,7 +141,6 @@ void LLLandmarkList::processGetAssetReply(
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
// SJB: No use case for a notification here. Use lldebugs instead
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
deleted file mode 100644
index c0a323d6cb..0000000000
--- a/indra/newview/llmemoryview.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * @file llmemoryview.cpp
- * @brief LLMemoryView class implementation
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llmemoryview.h"
-
-#include "llappviewer.h"
-#include "llallocator_heap_profile.h"
-#include "llgl.h" // LLGLSUIDefault
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-
-#include <sstream>
-#include <boost/algorithm/string/split.hpp>
-
-#include "llmemory.h"
-
-LLMemoryView::LLMemoryView(const LLMemoryView::Params& p)
-: LLView(p),
- mPaused(FALSE),
- //mDelay(120),
- mAlloc(NULL)
-{
-}
-
-LLMemoryView::~LLMemoryView()
-{
-}
-
-BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask)
-{
- if (mask & MASK_SHIFT)
- {
- }
- else if (mask & MASK_CONTROL)
- {
- }
- else
- {
- mPaused = !mPaused;
- }
- return TRUE;
-}
-
-BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask)
-{
- return TRUE;
-}
-
-
-BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask)
-{
- return FALSE;
-}
-
-void LLMemoryView::refreshProfile()
-{
- /*
- LLAllocator & alloc = LLAppViewer::instance()->getAllocator();
- if(alloc.isProfiling()) {
- std::string profile_text = alloc.getRawProfile();
-
- boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to<llwchar>(), '\n', _1));
- } else {
- mLines.clear();
- }
- */
- if (mAlloc == NULL) {
- mAlloc = &LLAppViewer::instance()->getAllocator();
- }
-
- mLines.clear();
-
- if(mAlloc->isProfiling())
- {
- const LLAllocatorHeapProfile &prof = mAlloc->getProfile();
- for(size_t i = 0; i < prof.mLines.size(); ++i)
- {
- std::stringstream ss;
- ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: ";
- for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k)
- {
- ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " ";
- }
- mLines.push_back(utf8string_to_wstring(ss.str()));
- }
- }
-}
-
-void LLMemoryView::draw()
-{
- const S32 UPDATE_INTERVAL = 60;
- const S32 MARGIN_AMT = 10;
- static S32 curUpdate = UPDATE_INTERVAL;
- static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black);
-
- // setup update interval
- if (curUpdate >= UPDATE_INTERVAL)
- {
- refreshProfile();
- curUpdate = 0;
- }
- curUpdate++;
-
- // setup window properly
- S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
- S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f);
- setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height));
-
- // setup window color
- F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
- LLColor4 color = s_console_color;
- color.mV[VALPHA] *= console_opacity;
-
- LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(0, height, width, 0, color);
-
- LLFontGL * font = LLFontGL::getFontSansSerifSmall();
-
- // draw remaining lines
- F32 y_pos = 0.f;
- F32 y_off = 0.f;
-
- F32 line_height = font->getLineHeight();
- S32 target_width = width - 2 * MARGIN_AMT;
-
- // cut off lines on bottom
- U32 max_lines = U32((height - 2 * line_height) / line_height);
- y_pos = height - MARGIN_AMT - line_height;
- y_off = 0.f;
-
-#if !MEM_TRACK_MEM
- std::vector<LLWString>::const_iterator end = mLines.end();
- if(mLines.size() > max_lines) {
- end = mLines.begin() + max_lines;
- }
- for (std::vector<LLWString>::const_iterator i = mLines.begin(); i != end; ++i)
- {
- font->render(*i, 0, MARGIN_AMT, y_pos - y_off,
- LLColor4::white,
- LLFontGL::LEFT,
- LLFontGL::BASELINE,
- LLFontGL::NORMAL,
- LLFontGL::DROP_SHADOW,
- S32_MAX,
- target_width
- );
- y_off += line_height;
- }
-
-#else
- LLMemTracker::getInstance()->preDraw(mPaused) ;
-
- {
- F32 x_pos = MARGIN_AMT ;
- U32 lines = 0 ;
- const char* str = LLMemTracker::getInstance()->getNextLine() ;
- while(str != NULL)
- {
- lines++ ;
- font->renderUTF8(str, 0, x_pos, y_pos - y_off,
- LLColor4::white,
- LLFontGL::LEFT,
- LLFontGL::BASELINE,
- LLFontGL::NORMAL,
- LLFontGL::DROP_SHADOW,
- S32_MAX,
- target_width,
- NULL, FALSE);
-
- str = LLMemTracker::getInstance()->getNextLine() ;
- y_off += line_height;
-
- if(lines >= max_lines)
- {
- lines = 0 ;
- x_pos += 512.f ;
- if(x_pos + 512.f > target_width)
- {
- break ;
- }
-
- y_pos = height - MARGIN_AMT - line_height;
- y_off = 0.f;
- }
- }
- }
-
- LLMemTracker::getInstance()->postDraw() ;
-#endif
-
-#if MEM_TRACK_TYPE
-
- S32 left, top, right, bottom;
- S32 x, y;
-
- S32 margin = 10;
- S32 texth = LLFontGL::getFontMonospace()->getLineHeight();
-
- S32 xleft = margin;
- S32 ytop = height - margin;
- S32 labelwidth = 0;
- S32 maxmaxbytes = 1;
-
- // Make sure all timers are accounted for
- // Set 'MT_OTHER' to unaccounted ticks last frame
- {
- S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES];
- for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++)
- {
- display_memtypes[i] = 0;
- }
- for (S32 i=0; i < MTV_DISPLAY_NUM; i++)
- {
- S32 tidx = mtv_display_table[i].memtype;
- display_memtypes[tidx]++;
- }
- LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0;
- LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0;
- for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++)
- {
- if (display_memtypes[tidx] == 0)
- {
- LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx];
- LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx];
- }
- }
- }
-
- // Labels
- {
- y = ytop;
- S32 peak = 0;
- for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
- {
- x = xleft;
-
- int tidx = mtv_display_table[i].memtype;
- S32 bytes = LLMemType::sMemCount[tidx];
- S32 maxbytes = LLMemType::sMaxMemCount[tidx];
- maxmaxbytes = llmax(maxbytes, maxmaxbytes);
- peak += maxbytes;
- S32 mbytes = bytes >> 20;
-
- tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
-
- y -= (texth + 2);
-
- S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc);
- if (textw > labelwidth)
- labelwidth = textw;
- }
-
- S32 num_avatars = 0;
- S32 num_motions = 0;
- S32 num_loading_motions = 0;
- S32 num_loaded_motions = 0;
- S32 num_active_motions = 0;
- S32 num_deprecated_motions = 0;
- for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
- {
- num_avatars++;
- (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
- }
-
- x = xleft;
- tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d",
- LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10,
- num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
- LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
- }
-
- // Bars
- y = ytop;
- labelwidth += 8;
- S32 barw = width - labelwidth - xleft - margin;
- for (S32 i=0; i<MTV_DISPLAY_NUM; i++)
- {
- x = xleft + labelwidth;
-
- int tidx = mtv_display_table[i].memtype;
- S32 bytes = LLMemType::sMemCount[tidx];
- F32 frac = (F32)bytes / (F32)maxmaxbytes;
- S32 w = (S32)(frac * (F32)barw);
- left = x; right = x + w;
- top = y; bottom = y - texth;
- gl_rect_2d(left, top, right, bottom, *mtv_display_table[i].color);
-
- S32 maxbytes = LLMemType::sMaxMemCount[tidx];
- F32 frac2 = (F32)maxbytes / (F32)maxmaxbytes;
- S32 w2 = (S32)(frac2 * (F32)barw);
- left = x + w + 1; right = x + w2;
- top = y; bottom = y - texth;
- LLColor4 tcolor = *mtv_display_table[i].color;
- tcolor.setAlpha(.5f);
- gl_rect_2d(left, top, right, bottom, tcolor);
-
- y -= (texth + 2);
- }
-
- dumpData();
-
-#endif
-
- LLView::draw();
-}
diff --git a/indra/newview/llmemoryview.h b/indra/newview/llmemoryview.h
deleted file mode 100644
index dc4849a9c4..0000000000
--- a/indra/newview/llmemoryview.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file llmemoryview.h
- * @brief LLMemoryView class definition
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLMEMORYVIEW_H
-#define LL_LLMEMORYVIEW_H
-
-#include "llview.h"
-
-class LLAllocator;
-
-class LLMemoryView : public LLView
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLView::Params>
- {
- Params()
- {
- changeDefault(mouse_opaque, true);
- changeDefault(visible, false);
- }
- };
- LLMemoryView(const LLMemoryView::Params&);
- virtual ~LLMemoryView();
-
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual void draw();
-
- void refreshProfile();
-
-private:
- std::vector<LLWString> mLines;
- LLAllocator* mAlloc;
- BOOL mPaused ;
-
-};
-
-#endif
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index f8f0f7d243..23cbfae044 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -203,7 +203,12 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
sendChat(CHAT_TYPE_SHOUT);
handled = TRUE;
}
-
+ else if (KEY_RETURN == key && mask == MASK_SHIFT)
+ {
+ // whisper
+ sendChat(CHAT_TYPE_WHISPER);
+ handled = TRUE;
+ }
return handled;
}
@@ -390,12 +395,6 @@ void LLNearbyChatBar::sendChat( EChatType type )
gAgent.stopTyping();
- // If the user wants to stop chatting on hitting return, lose focus
- // and go out of chat mode.
- if (gSavedSettings.getBOOL("CloseChatOnReturn"))
- {
- stopChat();
- }
}
void LLNearbyChatBar::showNearbyChatPanel(bool show)
@@ -446,7 +445,12 @@ void LLNearbyChatBar::onChatBoxCommit()
{
sendChat(CHAT_TYPE_NORMAL);
}
-
+ // If the user wants to stop chatting on hitting return, lose focus
+ // and go out of chat mode.
+ if (gSavedSettings.getBOOL("CloseChatOnReturn"))
+ {
+ stopChat();
+ }
gAgent.stopTyping();
}
@@ -634,7 +638,7 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32
gAgent.sendReliableMessage();
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
+ LLStatViewer::CHAT_COUNT.add(1);
}
class LLChatCommandHandler : public LLCommandHandler
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index ef5ef2ddc8..c15b6bd0d3 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -117,6 +117,8 @@ public:
registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this));
registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList));
registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
+ registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList));
+ registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this));
@@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const
}
}
+void LLOutfitsList::collapse_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && tab->isExpanded())
+ {
+ tab->changeOpenClose(true);
+ }
+ }
+}
+
+void LLOutfitsList::expand_all_folders()
+{
+ for (outfits_map_t::iterator iter = mOutfitsMap.begin();
+ iter != mOutfitsMap.end();
+ ++iter)
+ {
+ LLAccordionCtrlTab* tab = iter->second;
+ if(tab && !tab->isExpanded())
+ {
+ tab->changeOpenClose(false);
+ }
+ }
+}
+
boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb)
{
return mSelectionChangeSignal.connect(cb);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index a0598737f1..2e3fb3f488 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -108,6 +108,16 @@ public:
*/
bool hasItemSelected();
+ /**
+ Collapses all outfit accordions.
+ */
+ void collapse_all_folders();
+ /**
+ Expands all outfit accordions.
+ */
+ void expand_all_folders();
+
+
private:
void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 202be9671b..39ded21183 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1049,7 +1049,7 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
void LLPanelFace::onCommitTexture( const LLSD& data )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ LLStatViewer::EDIT_TEXTURE.add(1);
sendTexture();
}
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 68a3b6d1cd..d6fccb9705 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -418,12 +418,13 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_
bool LLLandmarksPanel::isLandmarkSelected() const
{
LLFolderViewItem* current_item = getCurSelectedItem();
- if(current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- return true;
- }
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK;
+}
- return false;
+bool LLLandmarksPanel::isFolderSelected() const
+{
+ LLFolderViewItem* current_item = getCurSelectedItem();
+ return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY;
}
bool LLLandmarksPanel::isReceivedFolderSelected() const
@@ -720,7 +721,7 @@ void LLLandmarksPanel::initListCommandsHandlers()
void LLLandmarksPanel::updateListCommands()
{
bool add_folder_enabled = isActionEnabled("category");
- bool trash_enabled = isActionEnabled("delete");
+ bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected());
// keep Options & Add Landmark buttons always enabled
mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled);
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index b2f4e92473..4e787317ba 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -84,6 +84,7 @@ protected:
* @return true - if current selected panel is not null and selected item is a landmark
*/
bool isLandmarkSelected() const;
+ bool isFolderSelected() const;
bool isReceivedFolderSelected() const;
void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
LLFolderViewItem* getCurSelectedItem() const;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9f3273da2d..28cfb5b282 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -105,7 +105,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mMenuAdd(NULL),
mNeedUploadCost(true)
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT);
// Menu Callbacks (non contex menus)
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this));
@@ -604,7 +603,6 @@ void LLPanelMainInventory::setFilterTextFromFilter()
void LLPanelMainInventory::toggleFindOptions()
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE);
LLFloater *floater = getFinder();
if (!floater)
{
@@ -726,7 +724,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
void LLFloaterInventoryFinder::draw()
{
- LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW);
U64 filter = 0xffffffffffffffffULL;
BOOL filtered_by_all_types = TRUE;
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 51ab7649a4..8027783bd8 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -915,7 +915,6 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
-// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
}
}
return false;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 6d321d4716..6c2a01fc82 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -366,6 +366,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
if (key.size() != 0)
{
+ isLandmarkEditModeOn = false;
std::string key_type = key["type"].asString();
if (key_type == LANDMARK_TAB_INFO_TYPE)
{
@@ -392,7 +393,6 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mPlaceInfoType = key_type;
mPosGlobal.setZero();
mItem = NULL;
- isLandmarkEditModeOn = false;
togglePlaceInfoPanel(TRUE);
if (mPlaceInfoType == AGENT_INFO_TYPE)
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index c63d89fc98..0756faf5c0 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -972,6 +972,11 @@ void LLTeleportHistoryPanel::onCollapseAllFolders()
mItemContainers.get(n)->setDisplayChildren(false);
}
mHistoryAccordion->arrange();
+
+ if (mLastSelectedFlatlList)
+ {
+ mLastSelectedFlatlList->resetSelection();
+ }
}
void LLTeleportHistoryPanel::onClearTeleportHistory()
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 280cc11179..1830086da2 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -64,9 +64,6 @@ private:
LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0)
{
- LLUICtrl::CommitCallbackRegistry::currentRegistrar()
- .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
-
buildFromFile( "panel_topinfo_bar.xml");
}
@@ -132,6 +129,11 @@ void LLPanelTopInfoBar::handleLoginComplete()
BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
+ if(!LLUICtrl::CommitCallbackRegistry::getValue("TopInfoBar.Action"))
+ {
+ LLUICtrl::CommitCallbackRegistry::currentRegistrar()
+ .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2));
+ }
show_topinfobar_context_menu(this, x, y);
return TRUE;
}
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 9902d047e4..e26fcc74bd 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -241,7 +241,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseNormals[i].clear();
mBaseBinormals[i].clear();
mTexCoords[i].clear();
- mWeights[i] = 0.f;
+ mWeights[i] = 0.f;
}
mNumVertices = numVertices;
return TRUE;
@@ -750,8 +750,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
-
llassert(shared_data);
mSharedData = shared_data;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index f47928b131..cbb4d5f964 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -883,8 +883,6 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 3a9360fd23..97c9de4b72 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -339,8 +339,6 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 9c25e69db0..050db136bc 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -942,7 +942,7 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata)
void LLScriptEdCore::doSave( BOOL close_after_save )
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT );
+ LLStatViewer::LSL_SAVES.add(1);
if( mSaveCallback )
{
@@ -1146,8 +1146,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data )
void LLScriptEdCore::onBtnSaveToFile( void* userdata )
{
-
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT );
+ LLStatViewer::LSL_SAVES.add(1);
LLScriptEdCore* self = (LLScriptEdCore*) userdata;
@@ -1670,8 +1669,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
@@ -1902,8 +1899,6 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index c3c37141ed..36ce7bb60e 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1550,7 +1550,7 @@ void LLObjectSelection::applyNoCopyTextureToTEs(LLViewerInventoryItem* item)
}
// apply texture for the selected faces
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ LLStatViewer::EDIT_TEXTURE.add(1);
object->setTEImage(te, image);
dialog_refresh_all();
@@ -3424,9 +3424,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response,
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
// Keep track of how many objects have been deleted.
- F64 obj_delete_count = LLViewerStats::getInstance()->getStat(LLViewerStats::ST_OBJECT_DELETE_COUNT);
- obj_delete_count += LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount();
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_OBJECT_DELETE_COUNT, obj_delete_count );
+ LLStatViewer::DELETE_OBJECT.add(LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount());
}
break;
case 1:
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 853656905c..d909a218e3 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -456,10 +456,10 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch)
{
LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
-
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
if (panel)
{
+ panel->showOutfitsInventoryPanel();
panel->showWearableEditPanel(wearable, disable_camera_switch);
}
}
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index c351b1a128..8fb56eb6d8 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -945,7 +945,6 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
if (group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
-// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
}
}
return FALSE;
diff --git a/indra/newview/llsimplestat.h b/indra/newview/llsimplestat.h
index 9d7780c4f9..80ce99b774 100644
--- a/indra/newview/llsimplestat.h
+++ b/indra/newview/llsimplestat.h
@@ -99,43 +99,43 @@ public:
* values back to zero.
*/
void reset()
- {
- mCount = 0;
- mMin = Value(0);
- mMax = Value(0);
- mTotal = Value(0);
- }
+ {
+ mCount = 0;
+ mMin = Value(0);
+ mMax = Value(0);
+ mTotal = Value(0);
+ }
void record(Value v)
+ {
+ if (mCount)
+ {
+ mMin = llmin(mMin, v);
+ mMax = llmax(mMax, v);
+ }
+ else
{
- if (mCount)
- {
- mMin = llmin(mMin, v);
- mMax = llmax(mMax, v);
- }
- else
- {
- mMin = v;
- mMax = v;
- }
- mTotal += v;
- ++mCount;
+ mMin = v;
+ mMax = v;
}
+ mTotal += v;
+ ++mCount;
+ }
void merge(const LLSimpleStatMMM<VALUE_T> & src)
+ {
+ if (! mCount)
+ {
+ *this = src;
+ }
+ else if (src.mCount)
{
- if (! mCount)
- {
- *this = src;
- }
- else if (src.mCount)
- {
- mMin = llmin(mMin, src.mMin);
- mMax = llmax(mMax, src.mMax);
- mCount += src.mCount;
- mTotal += src.mTotal;
- }
+ mMin = llmin(mMin, src.mMin);
+ mMax = llmax(mMax, src.mMax);
+ mCount += src.mCount;
+ mTotal += src.mTotal;
}
+ }
inline U32 getCount() const { return mCount; }
inline Value getMin() const { return mMin; }
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2083afdcf5..88fb609d1c 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -55,7 +55,7 @@
#include "llviewershadermgr.h"
static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
-static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
+static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition");
const F32 SG_OCCLUSION_FUDGE = 0.25f;
#define SG_DISCARD_TOLERANCE 0.01f
@@ -376,7 +376,6 @@ LLSpatialGroup::~LLSpatialGroup()
}
}
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
clearDrawMap();
clearAtlasList() ;
}
@@ -615,8 +614,6 @@ void LLSpatialGroup::validateDrawMap()
BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
drawablep->updateSpatialExtents();
OctreeNode* parent = mOctreeNode->getOctParent();
@@ -638,7 +635,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (!from_octree)
{
mOctreeNode->insert(drawablep);
@@ -664,7 +660,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc
void LLSpatialGroup::rebuildGeom()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (!isDead())
{
mSpatialPartition->rebuildGeom(this);
@@ -876,7 +871,6 @@ LLSpatialGroup* LLSpatialGroup::getParent()
BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
unbound();
if (mOctreeNode && !from_octree)
{
@@ -913,7 +907,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree)
void LLSpatialGroup::shift(const LLVector4a &offset)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLVector4a t = mOctreeNode->getCenter();
t.add(offset);
mOctreeNode->setCenter(t);
@@ -968,8 +961,6 @@ void LLSpatialGroup::setState(U32 state)
void LLSpatialGroup::setState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
llassert(state <= LLSpatialGroup::STATE_MASK);
if (mode > STATE_MODE_SINGLE)
@@ -1026,8 +1017,6 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
{
llassert(state <= LLSpatialGroup::STATE_MASK);
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1084,8 +1073,6 @@ public:
void LLSpatialGroup::setOcclusionState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1150,8 +1137,6 @@ public:
void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (mode > STATE_MODE_SINGLE)
{
if (mode == STATE_MODE_DIFF)
@@ -1203,7 +1188,6 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
ll_assert_aligned(this,16);
sNodeCount++;
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
mViewAngle.splat(0.f);
mLastUpdateViewAngle.splat(-1.f);
@@ -1389,7 +1373,6 @@ BOOL LLSpatialGroup::changeLOD()
void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
addObject(drawablep, FALSE, TRUE);
unbound();
setState(OBJECT_DIRTY);
@@ -1397,14 +1380,12 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep
void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
removeObject(drawable, TRUE);
setState(OBJECT_DIRTY);
}
void LLSpatialGroup::handleDestruction(const TreeNode* node)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
setState(DEAD);
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
@@ -1446,7 +1427,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node)
void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (child->getListenerCount() == 0)
{
new LLSpatialGroup(child, mSpatialPartition);
@@ -1600,7 +1580,7 @@ void LLSpatialGroup::checkOcclusion()
LLFastTimer t(FTM_OCCLUSION_WAIT);
while (!available && max_loop-- > 0)
{
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
+ F32 max_time = llmin(gFrameIntervalSeconds.value()*10.f, 1.f);
//do some usefu work while we wait
LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
@@ -1792,7 +1772,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage)
: mRenderByGroup(render_by_group), mBridge(NULL)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
mOcclusionEnabled = TRUE;
mDrawableType = 0;
mPartitionType = LLViewerRegion::PARTITION_NONE;
@@ -1816,8 +1795,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
LLSpatialPartition::~LLSpatialPartition()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
delete mOctree;
mOctree = NULL;
}
@@ -1825,8 +1802,6 @@ LLSpatialPartition::~LLSpatialPartition()
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
drawablep->updateSpatialExtents();
//keep drawable from being garbage collected
@@ -1848,8 +1823,6 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
if (!curp->removeObject(drawablep))
{
OCT_ERRS << "Failed to remove drawable from octree!" << llendl;
@@ -1868,8 +1841,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
// sanity check submitted by open source user bushing Spatula
// who was seeing crashing here. (See VWR-424 reported by Bunny Mayne)
if (!drawablep)
@@ -1926,7 +1897,6 @@ public:
void LLSpatialPartition::shift(const LLVector4a &offset)
{ //shift octree node bounding boxes by offset
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLSpatialShift shifter(offset);
shifter.traverse(mOctree);
}
@@ -2340,7 +2310,6 @@ public:
void LLSpatialPartition::restoreGL()
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
}
void LLSpatialPartition::resetVertexBuffers()
@@ -2383,7 +2352,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
#if LL_OCTREE_PARANOIA_CHECK
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif
@@ -2608,7 +2576,7 @@ void renderOctree(LLSpatialGroup* group)
LLVector4 col;
if (group->mBuilt > 0.f)
{
- group->mBuilt -= 2.f * gFrameIntervalSeconds;
+ group->mBuilt -= 2.f * gFrameIntervalSeconds.value();
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
{
col.setVec(1.0f, 0, 0, group->mBuilt*0.5f);
@@ -4196,7 +4164,7 @@ public:
{
if (index < 255)
{
- if (facep->mDrawInfo->mTextureList.size() <= index)
+ if (facep->mDrawInfo->mTextureList.size()<= index)
{
llerrs << "Face texture index out of bounds." << llendl;
}
@@ -4441,8 +4409,6 @@ void LLSpatialPartition::renderDebug()
sCurMaxTexPriority = 0.f;
}
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
-
LLGLDisable cullface(GL_CULL_FACE);
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 3d1fd74ba6..511e6ec2ab 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -312,8 +312,6 @@ void update_texture_fetch()
// true when all initialization done.
bool idle_startup()
{
- LLMemType mt1(LLMemType::MTYPE_STARTUP);
-
const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
static LLTimer timeout;
static S32 timeout_count = 0;
@@ -1420,7 +1418,7 @@ bool idle_startup()
display_startup();
//reset statistics
- LLViewerStats::getInstance()->resetStats();
+ LLViewerStats::instance().resetStats();
display_startup();
//
@@ -2073,7 +2071,7 @@ bool idle_startup()
if (wearables_time > MAX_WEARABLES_TIME)
{
LLNotificationsUtil::add("ClothingLoading");
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
+ LLStatViewer::LOADING_WEARABLES_LONG_DELAY.add(1);
LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE;
}
@@ -2186,7 +2184,7 @@ bool idle_startup()
LLAppViewer::instance()->handleLoginComplete();
// reset timers now that we are running "logged in" logic
- LLFastTimer::reset();
+ LLTrace::BlockTimer::reset();
LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
@@ -3308,7 +3306,7 @@ bool process_login_success_response()
// replace the default help URL format
gSavedSettings.setString("HelpURLFormat",text);
}
-
+
std::string home_location = response["home"];
if(!home_location.empty())
{
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index ff69c6e9fd..b945ec2318 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -37,7 +37,6 @@
#include "llviewercontrol.h"
#include "llfloaterbuycurrency.h"
#include "llbuycurrencyhtml.h"
-#include "llfloaterlagmeter.h"
#include "llpanelnearbymedia.h"
#include "llpanelvolumepulldown.h"
#include "llfloaterregioninfo.h"
@@ -199,10 +198,10 @@ BOOL LLStatusBar::postBuild()
sgp.rect(r);
sgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
sgp.mouse_opaque(false);
+ sgp.stat.count_stat_float(&LLStatViewer::KBIT);
+ sgp.units("Kbps");
+ sgp.precision(0);
mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp);
- mSGBandwidth->setStat(&LLViewerStats::getInstance()->mKBitStat);
- mSGBandwidth->setUnits("Kbps");
- mSGBandwidth->setPrecision(0);
addChild(mSGBandwidth);
x -= SIM_STAT_WIDTH + 2;
@@ -213,17 +212,20 @@ BOOL LLStatusBar::postBuild()
pgp.rect(r);
pgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT);
pgp.mouse_opaque(false);
+ pgp.stat.measurement_stat_float(&LLStatViewer::PACKETS_LOST_PERCENT);
+ pgp.units("%");
+ pgp.min(0.f);
+ pgp.max(5.f);
+ pgp.precision(1);
+ pgp.per_sec(false);
+ LLStatGraph::Thresholds thresholds;
+ thresholds.threshold.add(LLStatGraph::ThresholdParams().value(0.1).color(LLColor4::green))
+ .add(LLStatGraph::ThresholdParams().value(0.25f).color(LLColor4::yellow))
+ .add(LLStatGraph::ThresholdParams().value(0.6f).color(LLColor4::red));
+
+ pgp.thresholds(thresholds);
mSGPacketLoss = LLUICtrlFactory::create<LLStatGraph>(pgp);
- mSGPacketLoss->setStat(&LLViewerStats::getInstance()->mPacketsLostPercentStat);
- mSGPacketLoss->setUnits("%");
- mSGPacketLoss->setMin(0.f);
- mSGPacketLoss->setMax(5.f);
- mSGPacketLoss->setThreshold(0, 0.5f);
- mSGPacketLoss->setThreshold(1, 1.f);
- mSGPacketLoss->setThreshold(2, 3.f);
- mSGPacketLoss->setPrecision(1);
- mSGPacketLoss->mPerSec = FALSE;
addChild(mSGPacketLoss);
mPanelVolumePulldown = new LLPanelVolumePulldown();
@@ -253,9 +255,9 @@ void LLStatusBar::refresh()
F32 bwtotal = gViewerThrottle.getMaxBandwidth() / 1000.f;
mSGBandwidth->setMin(0.f);
mSGBandwidth->setMax(bwtotal*1.25f);
- mSGBandwidth->setThreshold(0, bwtotal*0.75f);
- mSGBandwidth->setThreshold(1, bwtotal);
- mSGBandwidth->setThreshold(2, bwtotal);
+ //mSGBandwidth->setThreshold(0, bwtotal*0.75f);
+ //mSGBandwidth->setThreshold(1, bwtotal);
+ //mSGBandwidth->setThreshold(2, bwtotal);
}
// update clock every 10 seconds
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index f64a72a616..ec11a23eb8 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -62,8 +62,6 @@ LLColor4U MAX_WATER_COLOR(0, 48, 96, 240);
S32 LLSurface::sTextureSize = 256;
-S32 LLSurface::sTexelsUpdated = 0;
-F32 LLSurface::sTextureUpdateTime = 0.f;
// ---------------- LLSurface:: Public Members ---------------
@@ -647,7 +645,6 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent)
BOOL LLSurface::idleUpdate(F32 max_update_time)
{
- LLMemType mt_ius(LLMemType::MTYPE_IDLE_UPDATE_SURFACE);
if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN))
{
return FALSE;
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 8052fb0d18..33a64ae7d5 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -45,7 +45,6 @@
class LLTimer;
class LLUUID;
class LLAgent;
-class LLStat;
static const U8 NO_EDGE = 0x00;
static const U8 EAST_EDGE = 0x01;
@@ -169,9 +168,6 @@ public:
F32 mDetailTextureScale; // Number of times to repeat detail texture across this surface
- static F32 sTextureUpdateTime;
- static S32 sTexelsUpdated;
-
protected:
void createSTexture();
void createWaterTexture();
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index ad09af6594..fad7a73008 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -460,7 +460,7 @@ BOOL LLTexLayerSetBuffer::requestUpdateImmediate()
void LLTexLayerSetBuffer::doUpload()
{
llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl;
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES);
+ LLStatViewer::TEX_BAKES.add(1);
// Don't need caches since we're baked now. (note: we won't *really* be baked
// until this image is sent to the server and the Avatar Appearance message is received.)
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index a2854dd6d8..885292131f 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -50,8 +50,10 @@
#include "llviewertexture.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
+#include "llviewerstatsrecorder.h"
#include "llviewerassetstats.h"
#include "llworld.h"
+#include "llsdparam.h"
#include "llsdutil.h"
#include "llstartup.h"
#include "llsdserialize.h"
@@ -63,8 +65,8 @@
#include "bufferstream.h"
bool LLTextureFetchDebugger::sDebuggerEnabled = false ;
-LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128);
-LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128);
+LLTrace::Measurement<> LLTextureFetch::sCacheHitRate("texture_cache_hits");
+LLTrace::Measurement<> LLTextureFetch::sCacheReadLatency("texture_cache_read_latency");
//////////////////////////////////////////////////////////////////////////////
@@ -351,13 +353,13 @@ public:
// Threads: Tmain
/*virtual*/ bool deleteOK(); // called from update()
-
+
~LLTextureFetchWorker();
// Threads: Ttf
// Locks: Mw
S32 callbackHttpGet(LLCore::HttpResponse * response,
- bool partial, bool success);
+ bool partial, bool success);
// Threads: Ttc
void callbackCacheRead(bool success, LLImageFormatted* image,
@@ -382,7 +384,7 @@ public:
bool getCanUseHTTP() const { return mCanUseHTTP; }
LLTextureFetch & getFetcher() { return *mFetcher; }
-
+
// Inherited from LLCore::HttpHandler
// Threads: Ttf
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -561,7 +563,7 @@ private:
U8 mImageCodec;
LLViewerAssetStats::duration_t mMetricsStartTime;
-
+
LLCore::HttpHandle mHttpHandle; // Handle of any active request
LLCore::BufferArray * mHttpBufferArray; // Refcounted pointer to response data
int mHttpPolicyClass;
@@ -569,7 +571,7 @@ private:
unsigned int mHttpReplySize; // Actual received data size
unsigned int mHttpReplyOffset; // Actual received data offset
bool mHttpHasResource; // Counts against Fetcher's mHttpSemaphore
-
+
// State history
U32 mCacheReadCount;
U32 mCacheWriteCount;
@@ -1235,7 +1237,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
- LLTextureFetch::sCacheHitRate.addValue(100.f);
+ LLTextureFetch::sCacheHitRate.sample(100.f);
}
else
{
@@ -1252,7 +1254,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// fall through
- LLTextureFetch::sCacheHitRate.addValue(0.f);
+ LLTextureFetch::sCacheHitRate.sample(0.f);
}
}
@@ -1347,16 +1349,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
recordTextureDone(false);
}
else
- {
+ {
mFetcher->addToNetworkQueue(this); // failsafe
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
recordTextureStart(false);
- }
+ }
return false;
- }
+ }
if (mState == WAIT_HTTP_RESOURCE)
- {
+ {
// NOTE:
// control the number of the http requests issued for:
// 1, not openning too many file descriptors at the same time;
@@ -1365,19 +1367,19 @@ bool LLTextureFetchWorker::doWork(S32 param)
// If it looks like we're busy, keep this request here.
// Otherwise, advance into the HTTP states.
if (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore())
- {
+ {
mState = WAIT_HTTP_RESOURCE2;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mFetcher->addHttpWaiter(this->mID);
++mResourceWaitCount;
return false;
- }
+ }
mState = SEND_HTTP_REQ;
// *NOTE: You must invoke releaseHttpSemaphore() if you transition
// to a state other than SEND_HTTP_REQ or WAIT_HTTP_REQ or abort
// the request.
- }
+ }
if (mState == WAIT_HTTP_RESOURCE2)
{
@@ -1393,33 +1395,33 @@ bool LLTextureFetchWorker::doWork(S32 param)
return true; // abort
}
- mFetcher->removeFromNetworkQueue(this, false);
+ mFetcher->removeFromNetworkQueue(this, false);
- S32 cur_size = 0;
- if (mFormattedImage.notNull())
- {
- cur_size = mFormattedImage->getDataSize(); // amount of data we already have
- if (mFormattedImage->getDiscardLevel() == 0)
+ S32 cur_size = 0;
+ if (mFormattedImage.notNull())
{
- if (cur_size > 0)
+ cur_size = mFormattedImage->getDataSize(); // amount of data we already have
+ if (mFormattedImage->getDiscardLevel() == 0)
{
- // We already have all the data, just decode it
- mLoadedDiscard = mFormattedImage->getDiscardLevel();
- setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ if(cur_size > 0)
+ {
+ // We already have all the data, just decode it
+ mLoadedDiscard = mFormattedImage->getDiscardLevel();
+ setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mState = DECODE_IMAGE;
releaseHttpSemaphore();
- return false;
- }
- else
- {
+ return false;
+ }
+ else
+ {
releaseHttpSemaphore();
- return true; // abort.
+ return true ; //abort.
+ }
}
}
- }
- mRequestedSize = mDesiredSize;
- mRequestedDiscard = mDesiredDiscard;
- mRequestedSize -= cur_size;
+ mRequestedSize = mDesiredSize;
+ mRequestedDiscard = mDesiredDiscard;
+ mRequestedSize -= cur_size;
mRequestedOffset = cur_size;
if (mRequestedOffset)
{
@@ -1435,20 +1437,20 @@ bool LLTextureFetchWorker::doWork(S32 param)
mRequestedOffset -= 1;
mRequestedSize += 1;
}
-
+
mHttpHandle = LLCORE_HTTP_HANDLE_INVALID;
- if (!mUrl.empty())
- {
- mRequestedTimer.reset();
- mLoaded = FALSE;
+ if (!mUrl.empty())
+ {
+ mRequestedTimer.reset();
+ mLoaded = FALSE;
mGetStatus = LLCore::HttpStatus();
- mGetReason.clear();
+ mGetReason.clear();
LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << mRequestedOffset
- << " Bytes: " << mRequestedSize
- << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
- << LL_ENDL;
+ << " Bytes: " << mRequestedSize
+ << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
+ << LL_ENDL;
- // Will call callbackHttpGet when curl request completes
+ // Will call callbackHttpGet when curl request completes
mHttpHandle = mFetcher->mHttpRequest->requestGetByteRange(mHttpPolicyClass,
mWorkPriority,
mUrl,
@@ -1457,14 +1459,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFetcher->mHttpOptions,
mFetcher->mHttpHeaders,
this);
- }
+ }
if (LLCORE_HTTP_HANDLE_INVALID == mHttpHandle)
- {
- llwarns << "HTTP GET request failed for " << mID << llendl;
- resetFormattedData();
+ {
+ llwarns << "HTTP GET request failed for " << mID << llendl;
+ resetFormattedData();
releaseHttpSemaphore();
- return true; // failed
- }
+ return true; // failed
+ }
mHttpActive = true;
mFetcher->addToHTTPQueue(mID);
@@ -1472,8 +1474,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mState = WAIT_HTTP_REQ;
- // fall through
- }
+ // fall through
+ }
if (mState == WAIT_HTTP_REQ)
{
@@ -1495,15 +1497,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
llwarns << "Texture missing from server (404): " << mUrl << llendl;
- // roll back to try UDP
- if (mCanUseNET)
+ //roll back to try UDP
+ if(mCanUseNET)
{
- mState = INIT;
- mCanUseHTTP = false;
+ mState = INIT ;
+ mCanUseHTTP = false ;
mUrl.clear();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
releaseHttpSemaphore();
- return false;
+ return false ;
}
}
else if (http_service_unavail == mGetStatus)
@@ -1523,23 +1525,23 @@ bool LLTextureFetchWorker::doWork(S32 param)
<< llendl;
}
- mUrl.clear();
- if (cur_size > 0)
- {
- // Use available data
- mLoadedDiscard = mFormattedImage->getDiscardLevel();
- setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ mUrl.clear();
+ if (cur_size > 0)
+ {
+ // Use available data
+ mLoadedDiscard = mFormattedImage->getDiscardLevel();
+ setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mState = DECODE_IMAGE;
releaseHttpSemaphore();
- return false;
- }
+ return false;
+ }
// Fail harder
- resetFormattedData();
- mState = DONE;
+ resetFormattedData();
+ mState = DONE;
releaseHttpSemaphore();
- return true; // failed
- }
+ return true; // failed
+ }
// Clear the url since we're done with the fetch
// Note: mUrl is used to check is fetching is required so failure to clear it will force an http fetch
@@ -1548,17 +1550,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mUrl.clear();
}
-
+
if (! mHttpBufferArray || ! mHttpBufferArray->size())
{
// no data received.
if (mHttpBufferArray)
- {
+ {
mHttpBufferArray->release();
mHttpBufferArray = NULL;
}
- // abort.
+ //abort.
mState = DONE;
releaseHttpSemaphore();
return true;
@@ -1626,7 +1628,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mLoadedDiscard = mRequestedDiscard;
mState = DECODE_IMAGE;
- if (mWriteToCacheState != NOT_WRITE)
+ if(mWriteToCacheState != NOT_WRITE)
{
mWriteToCacheState = SHOULD_WRITE ;
}
@@ -1653,7 +1655,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
- if (textures_decode_disabled)
+ if(textures_decode_disabled)
{
// for debug use, don't decode
mState = DONE;
@@ -1883,7 +1885,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
{
gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size ;
}
- }
+}
mFetcher->removeFromHTTPQueue(mID, data_size);
@@ -2064,7 +2066,7 @@ bool LLTextureFetchWorker::processSimulatorPackets()
// Threads: Ttf
// Locks: Mw
S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
- bool partial, bool success)
+ bool partial, bool success)
{
S32 data_size = 0 ;
@@ -2084,7 +2086,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
// get length of stream:
LLCore::BufferArray * body(response->getBody());
data_size = body ? body->size() : 0;
-
+
LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
@@ -2360,7 +2362,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
LLTextureFetch::~LLTextureFetch()
{
- clearDeleteList();
+ clearDeleteList() ;
while (! mCommands.empty())
{
@@ -2368,7 +2370,7 @@ LLTextureFetch::~LLTextureFetch()
mCommands.erase(mCommands.begin());
delete req;
}
-
+
if (mHttpOptions)
{
mHttpOptions->release();
@@ -2644,7 +2646,7 @@ U32 LLTextureFetch::getTotalNumHTTPRequests()
U32 size = mTotalHTTPRequests;
mNetworkQueueMutex.unlock(); // -Mfq
- return size;
+ return size ;
}
// call lockQueue() first!
@@ -2666,7 +2668,7 @@ LLTextureFetchWorker* LLTextureFetch::getWorker(const LLUUID& id)
{
LLMutexLock lock(&mQueueMutex); // +Mfq
- return getWorkerAfterLock(id);
+ return getWorkerAfterLock(id) ;
} // -Mfq
@@ -2700,7 +2702,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
F32 cache_read_time = worker->mCacheReadTime;
if (cache_read_time != 0.f)
{
- sCacheReadLatency.addValue(cache_read_time * 1000.f);
+ sCacheReadLatency.sample(cache_read_time * 1000.f);
}
res = true;
LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL;
@@ -2824,7 +2826,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
{
mNetworkQueueMutex.lock(); // +Mfnq
- mMaxBandwidth = band_width;
+ mMaxBandwidth = band_width ;
gTextureList.sTextureBits += mHTTPTextureBits;
mHTTPTextureBits = 0;
@@ -2850,7 +2852,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
commonUpdate();
}
- if (mFetchDebugger)
+ if(mFetchDebugger)
{
mFetchDebugger->tryToStopDebug(); //check if need to stop debugger.
}
@@ -2858,7 +2860,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
return res;
}
-// called in the MAIN thread after the TextureCacheThread shuts down.
+//called in the MAIN thread after the TextureCacheThread shuts down.
//
// Threads: Tmain
void LLTextureFetch::shutDownTextureCacheThread()
@@ -2870,7 +2872,7 @@ void LLTextureFetch::shutDownTextureCacheThread()
}
}
-// called in the MAIN thread after the ImageDecodeThread shuts down.
+//called in the MAIN thread after the ImageDecodeThread shuts down.
//
// Threads: Tmain
void LLTextureFetch::shutDownImageDecodeThread()
@@ -2914,7 +2916,7 @@ void LLTextureFetch::threadedUpdate()
#endif
commonUpdate();
-
+
#if 0
const F32 INFO_TIME = 1.0f;
static LLFrameTimer info_timer;
@@ -2959,46 +2961,46 @@ void LLTextureFetch::sendRequestListToSimulators()
work_request_map_t requests;
{
LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq
- for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); )
+ for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); )
+ {
+ queue_t::iterator curiter = iter++;
+ LLTextureFetchWorker* req = getWorker(*curiter);
+ if (!req)
{
- queue_t::iterator curiter = iter++;
- LLTextureFetchWorker* req = getWorker(*curiter);
- if (!req)
- {
- mNetworkQueue.erase(curiter);
- continue; // paranoia
- }
- if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) &&
- (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
- {
- // We already received our URL, remove from the queue
- llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
- mNetworkQueue.erase(curiter);
- continue;
- }
- if (req->mID == mDebugID)
- {
- mDebugCount++; // for setting breakpoints
- }
- if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM &&
- req->mTotalPackets > 0 &&
- req->mLastPacket >= req->mTotalPackets-1)
- {
- // We have all the packets... make sure this is high priority
+ mNetworkQueue.erase(curiter);
+ continue; // paranoia
+ }
+ if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) &&
+ (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
+ {
+ // We already received our URL, remove from the queue
+ llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
+ mNetworkQueue.erase(curiter);
+ continue;
+ }
+ if (req->mID == mDebugID)
+ {
+ mDebugCount++; // for setting breakpoints
+ }
+ if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM &&
+ req->mTotalPackets > 0 &&
+ req->mLastPacket >= req->mTotalPackets-1)
+ {
+ // We have all the packets... make sure this is high priority
// req->setPriority(LLWorkerThread::PRIORITY_HIGH | req->mWorkPriority);
- continue;
- }
- F32 elapsed = req->mRequestedTimer.getElapsedTimeF32();
+ continue;
+ }
+ F32 elapsed = req->mRequestedTimer.getElapsedTimeF32();
+ {
+ F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority);
+ if ((req->mSimRequestedDiscard != req->mDesiredDiscard) ||
+ (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) ||
+ (elapsed >= SIM_LAZY_FLUSH_TIMEOUT))
{
- F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority);
- if ((req->mSimRequestedDiscard != req->mDesiredDiscard) ||
- (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) ||
- (elapsed >= SIM_LAZY_FLUSH_TIMEOUT))
- {
- requests[req->mHost].insert(req);
- }
+ requests[req->mHost].insert(req);
}
}
+ }
} // -Mfnq
for (work_request_map_t::iterator iter1 = requests.begin();
@@ -3080,49 +3082,49 @@ void LLTextureFetch::sendRequestListToSimulators()
// Send cancelations
{
LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq
- if (gMessageSystem && !mCancelQueue.empty())
+ if (gMessageSystem && !mCancelQueue.empty())
+ {
+ for (cancel_queue_t::iterator iter1 = mCancelQueue.begin();
+ iter1 != mCancelQueue.end(); ++iter1)
{
- for (cancel_queue_t::iterator iter1 = mCancelQueue.begin();
- iter1 != mCancelQueue.end(); ++iter1)
+ LLHost host = iter1->first;
+ if (host == LLHost::invalid)
+ {
+ host = gAgent.getRegionHost();
+ }
+ S32 request_count = 0;
+ for (queue_t::iterator iter2 = iter1->second.begin();
+ iter2 != iter1->second.end(); ++iter2)
{
- LLHost host = iter1->first;
- if (host == LLHost::invalid)
+ if (0 == request_count)
{
- host = gAgent.getRegionHost();
+ gMessageSystem->newMessageFast(_PREHASH_RequestImage);
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
}
- S32 request_count = 0;
- for (queue_t::iterator iter2 = iter1->second.begin();
- iter2 != iter1->second.end(); ++iter2)
- {
- if (0 == request_count)
- {
- gMessageSystem->newMessageFast(_PREHASH_RequestImage);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- }
- gMessageSystem->nextBlockFast(_PREHASH_RequestImage);
- gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2);
- gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1);
- gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
- gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
- gMessageSystem->addU8Fast(_PREHASH_Type, 0);
+ gMessageSystem->nextBlockFast(_PREHASH_RequestImage);
+ gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2);
+ gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1);
+ gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
+ gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
+ gMessageSystem->addU8Fast(_PREHASH_Type, 0);
// llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl;
- request_count++;
- if (request_count >= IMAGES_PER_REQUEST)
- {
- gMessageSystem->sendSemiReliable(host, NULL, NULL);
- request_count = 0;
- }
- }
- if (request_count > 0 && request_count < IMAGES_PER_REQUEST)
+ request_count++;
+ if (request_count >= IMAGES_PER_REQUEST)
{
gMessageSystem->sendSemiReliable(host, NULL, NULL);
+ request_count = 0;
}
}
- mCancelQueue.clear();
+ if (request_count > 0 && request_count < IMAGES_PER_REQUEST)
+ {
+ gMessageSystem->sendSemiReliable(host, NULL, NULL);
+ }
}
+ mCancelQueue.clear();
+ }
} // -Mfnq
}
@@ -3269,7 +3271,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
removeFromNetworkQueue(worker, true); // failsafe
}
- if (packet_num >= (worker->mTotalPackets - 1))
+ if(packet_num >= (worker->mTotalPackets - 1))
{
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
@@ -3297,7 +3299,7 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id)
if (worker)
{
worker->lockWorkMutex(); // +Mw
- from_cache = worker->mInLocalCache;
+ from_cache = worker->mInLocalCache ;
worker->unlockWorkMutex(); // -Mw
}
@@ -3725,8 +3727,8 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
static const U32 report_priority(1);
static LLCore::HttpHandler * const handler(fetcher->isQAMode() || true ? &stats_handler : NULL);
- if (! gViewerAssetStatsThread1)
- return true;
+ //if (! gViewerAssetStatsThread1)
+ // return true;
static volatile bool reporting_started(false);
static volatile S32 report_sequence(0);
@@ -3736,31 +3738,35 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// but leave it in 'this'. Destructor will rid us of it.
LLViewerAssetStats & main_stats = *mMainStats;
- // Merge existing stats into those from main, convert to LLSD
- main_stats.merge(*gViewerAssetStatsThread1);
- LLSD merged_llsd = main_stats.asLLSD(true);
-
- // Add some additional meta fields to the content
- merged_llsd["session_id"] = mSessionID;
- merged_llsd["agent_id"] = mAgentID;
- merged_llsd["message"] = "ViewerAssetMetrics"; // Identifies the type of metrics
- merged_llsd["sequence"] = report_sequence; // Sequence number
- merged_llsd["initial"] = ! reporting_started; // Initial data from viewer
- merged_llsd["break"] = LLTextureFetch::svMetricsDataBreak; // Break in data prior to this report
+ LLViewerAssetStats::AssetStats stats;
+ main_stats.getStats(stats, true);
+ //LLSD merged_llsd = main_stats.asLLSD();
+
+ stats.session_id = mSessionID;
+ stats.agent_id = mAgentID;
+ stats.message = "ViewerAssetMetrics";
+ stats.sequence = static_cast<bool>(report_sequence);
+ stats.initial = static_cast<bool>(!reporting_started);
+ stats.break_ = static_cast<bool>(LLTextureFetch::svMetricsDataBreak);
+
+ LLSD sd;
+ LLParamSDParser parser;
+ parser.writeSD(sd, stats);
// Update sequence number
if (S32_MAX == ++report_sequence)
report_sequence = 0;
reporting_started = true;
-
+
// Limit the size of the stats report if necessary.
- merged_llsd["truncated"] = truncate_viewer_metrics(10, merged_llsd);
+
+ sd["truncated"] = truncate_viewer_metrics(10, sd);
if (! mCapsURL.empty())
{
LLCore::BufferArray * ba = new LLCore::BufferArray;
LLCore::BufferArrayStream bas(ba);
- LLSDSerialize::toXML(merged_llsd, bas);
+ LLSDSerialize::toXML(sd, bas);
fetcher->getHttpRequest().requestPost(fetcher->getPolicyClass(),
report_priority,
@@ -3780,11 +3786,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// In QA mode, Metrics submode, log the result for ease of testing
if (fetcher->isQAMode())
{
- LL_INFOS("Textures") << ll_pretty_print_sd(merged_llsd) << LL_ENDL;
+ LL_INFOS("Textures") << ll_pretty_print_sd(sd) << LL_ENDL;
}
- gViewerAssetStatsThread1->reset();
-
return true;
}
@@ -4026,7 +4030,7 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time)
}
//collect statistics
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32() - mTotalFetchingTime;
std::set<LLUUID> fetched_textures;
S32 size = mFetchingHistory.size();
@@ -4083,7 +4087,7 @@ void LLTextureFetchDebugger::tryToStopDebug()
{
mTextureCache->readComplete(mFetchingHistory[i].mCacheHandle, true);
}
- }
+ }
break;
case WRITE_CACHE:
for(S32 i = 0 ; i < size; i++)
@@ -4127,7 +4131,7 @@ void LLTextureFetchDebugger::tryToStopDebug()
mFetchingHistory.clear();
mHandleToFetchIndex.clear();
init();
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32(); //reset
}
}
}
@@ -4322,7 +4326,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
if (mNbCurlRequests > HTTP_REQUESTS_IN_QUEUE_LOW_WATER)
{
return mNbCurlRequests;
- }
+ }
S32 size = mFetchingHistory.size();
for (S32 i = 0 ; i < size ; i++)
@@ -4339,7 +4343,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
requestedSize = llmax(0,requestedSize);
// We request the whole file if the size was set to an absurdly high value (meaning all file)
requestedSize = (requestedSize == 33554432 ? 0 : requestedSize);
-
+
LLCore::HttpHandle handle = mFetcher->getHttpRequest().requestGetByteRange(mHttpPolicyClass,
LLWorkerThread::PRIORITY_LOWBITS,
texture_url,
@@ -4352,7 +4356,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
{
mHandleToFetchIndex[handle] = i;
mFetchingHistory[i].mHttpHandle = handle;
- mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS;
+ mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS;
mNbCurlRequests++;
// Hack
if (mNbCurlRequests == HTTP_REQUESTS_IN_QUEUE_HIGH_WATER) // emulate normal pipeline
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 3a99432b48..90d0c7e04b 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -42,6 +42,7 @@
#include "httpoptions.h"
#include "httpheaders.h"
#include "httphandler.h"
+#include "lltrace.h"
class LLViewerTexture;
class LLTextureFetchWorker;
@@ -64,8 +65,8 @@ public:
class TFRequest;
// Threads: Tmain
- /*virtual*/ S32 update(F32 max_time_ms);
-
+ /*virtual*/ S32 update(F32 max_time_ms);
+
// called in the main thread after the TextureCacheThread shuts down.
// Threads: Tmain
void shutDownTextureCacheThread();
@@ -125,8 +126,8 @@ public:
void dump();
// Threads: T*
- S32 getNumRequests();
-
+ S32 getNumRequests() ;
+
// Threads: T*
S32 getNumHTTPRequests();
@@ -219,7 +220,7 @@ public:
void getStateStats(U32 * cache_read, U32 * cache_write, U32 * res_wait);
// ----------------------------------
-
+
protected:
// Threads: T* (but Ttf in practice)
void addToNetworkQueue(LLTextureFetchWorker* worker);
@@ -239,7 +240,7 @@ protected:
//
// Threads: T*
void removeRequest(LLTextureFetchWorker* worker, bool cancel);
-
+
// Overrides from the LLThread tree
// Locks: Ct
bool runCondition();
@@ -307,12 +308,12 @@ private:
LLMutex mQueueMutex; //to protect mRequestMap and mCommands only
LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
- static LLStat sCacheHitRate;
- static LLStat sCacheReadLatency;
+ static LLTrace::Measurement<> sCacheHitRate;
+ static LLTrace::Measurement<> sCacheReadLatency;
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
-
+
// Map of all requests by UUID
typedef std::map<LLUUID,LLTextureFetchWorker*> map_t;
map_t mRequestMap; // Mfq
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 16c42dbd43..5331bb03cb 100755
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -505,23 +505,23 @@ private:
void LLGLTexMemBar::draw()
{
- S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes);
- S32 max_bound_mem = LLViewerTexture::sMaxBoundTextureMemInMegaBytes;
- S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes);
- S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes;
+ LLUnit<LLUnits::Megabytes, S32> bound_mem = LLViewerTexture::sBoundTextureMemory;
+ LLUnit<LLUnits::Megabytes, S32> max_bound_mem = LLViewerTexture::sMaxBoundTextureMem;
+ LLUnit<LLUnits::Megabytes, S32> total_mem = LLViewerTexture::sTotalTextureMemory;
+ LLUnit<LLUnits::Megabytes, S32> max_total_mem = LLViewerTexture::sMaxTotalTextureMem;
F32 discard_bias = LLViewerTexture::sDesiredDiscardBias;
- F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ;
- F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ;
+ F32 cache_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ;
+ F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ;
S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f);
F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024);
F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024);
- U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests();
+ U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ;
//----------------------------------------------------------------------------
LLGLSUIDefault gls_ui;
LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
LLColor4 color;
-
+
// Gray background using completely magic numbers
gGL.color4f(0.f, 0.f, 0.f, 0.25f);
// const LLRect & rect(getRect());
@@ -532,10 +532,10 @@ void LLGLTexMemBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP);
text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
- total_mem,
- max_total_mem,
- bound_mem,
- max_bound_mem,
+ total_mem.value(),
+ max_total_mem.value(),
+ bound_mem.value(),
+ max_bound_mem.value(),
LLRenderTarget::sBytesAllocated/(1024*1024),
LLImageRaw::sGlobalRawMemory >> 20,
discard_bias,
@@ -550,8 +550,8 @@ void LLGLTexMemBar::draw()
LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d Cread: %u Cwrite: %u Rwait: %u",
- total_texture_downloaded,
- total_object_downloaded,
+ total_texture_downloaded.value(),
+ total_object_downloaded.value(),
total_http_requests,
cache_read,
cache_write,
@@ -679,7 +679,7 @@ void LLGLTexSizeBar::draw()
if(LLImageGL::sCurTexSizeBar == mIndex)
{
- F32 text_color[] = {1.f, 1.f, 1.f, 0.75f};
+ LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
std::string text;
text = llformat("%d", mTopLoaded) ;
@@ -691,8 +691,8 @@ void LLGLTexSizeBar::draw()
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
- F32 loaded_color[] = {1.0f, 0.0f, 0.0f, 0.75f};
- F32 bound_color[] = {1.0f, 1.0f, 0.0f, 0.75f};
+ LLColor4 loaded_color(1.0f, 0.0f, 0.0f, 0.75f);
+ LLColor4 bound_color(1.0f, 1.0f, 0.0f, 0.75f);
gl_rect_2d(mLeft, mBottom + (S32)(mTopLoaded * mScale), (mLeft + mRight) / 2, mBottom, loaded_color) ;
gl_rect_2d((mLeft + mRight) / 2, mBottom + (S32)(mTopBound * mScale), mRight, mBottom, bound_color) ;
}
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index 8fef2ed6d1..3f75f8da5e 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -357,6 +357,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
if (mLineEditor)
{
mLineEditor->selectAll();
+ mLineEditor->setFocus(TRUE);
}
if(mDefaultOption >= 0)
{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index c69999981c..652847aac9 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1062,7 +1062,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
return;
}
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ LLStatViewer::EDIT_TEXTURE.add(1);
S32 num_faces = hit_obj->getNumTEs();
for( S32 face = 0; face < num_faces; face++ )
{
@@ -1130,7 +1130,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
}
// update viewer side image in anticipation of update from simulator
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
+ LLStatViewer::EDIT_TEXTURE.add(1);
hit_obj->setTEImage(hit_face, image);
dialog_refresh_all();
@@ -1354,7 +1354,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT);
+ LLStatViewer::OBJECT_REZ.add(1);
}
void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index 93ba3b2558..329249eee8 100644
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -433,7 +433,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CREATE_COUNT);
+ LLStatViewer::OBJECT_CREATE.add(1);
return TRUE;
}
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 4c59fd0371..73a2e24424 100644
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -31,6 +31,8 @@
#include "stdtypes.h"
#include "llvoavatar.h"
+#include "llsdparam.h"
+#include "llsdutil.h"
/*
* Classes and utility functions for per-thread and per-region
@@ -78,128 +80,194 @@
*
*/
-
-// ------------------------------------------------------
-// Global data definitions
-// ------------------------------------------------------
-LLViewerAssetStats * gViewerAssetStatsMain(0);
-LLViewerAssetStats * gViewerAssetStatsThread1(0);
-
-
-// ------------------------------------------------------
-// Local declarations
-// ------------------------------------------------------
-namespace
-{
-
-static LLViewerAssetStats::EViewerAssetCategories
-asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-}
-
-// ------------------------------------------------------
-// LLViewerAssetStats::PerRegionStats struct definition
-// ------------------------------------------------------
-void
-LLViewerAssetStats::PerRegionStats::reset()
-{
- for (int i(0); i < LL_ARRAY_SIZE(mRequests); ++i)
- {
- mRequests[i].mEnqueued.reset();
- mRequests[i].mDequeued.reset();
- mRequests[i].mResponse.reset();
- }
- mFPS.reset();
-
- mTotalTime = 0;
- mStartTimestamp = LLViewerAssetStatsFF::get_timestamp();
-}
-
-
-void
-LLViewerAssetStats::PerRegionStats::merge(const LLViewerAssetStats::PerRegionStats & src)
+namespace LLViewerAssetStatsFF
{
- // mRegionHandle, mTotalTime, mStartTimestamp are left alone.
-
- // mFPS
- if (src.mFPS.getCount() && mFPS.getCount())
+ static EViewerAssetCategories asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
- mFPS.merge(src.mFPS);
- }
+ // For statistical purposes, we divide GETs into several
+ // populations of asset fetches:
+ // - textures which are de-prioritized in the asset system
+ // - wearables (clothing, bodyparts) which directly affect
+ // user experiences when they log in
+ // - sounds
+ // - gestures
+ // - everything else.
+ //
+ llassert_always(50 == LLViewerAssetType::AT_COUNT);
+
+ // Multiple asset definitions are floating around so this requires some
+ // maintenance and attention.
+ static const EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] =
+ {
+ EVACTextureTempHTTPGet, // (0) AT_TEXTURE
+ EVACSoundUDPGet, // AT_SOUND
+ EVACOtherGet, // AT_CALLINGCARD
+ EVACOtherGet, // AT_LANDMARK
+ EVACOtherGet, // AT_SCRIPT
+ EVACWearableUDPGet, // AT_CLOTHING
+ EVACOtherGet, // AT_OBJECT
+ EVACOtherGet, // AT_NOTECARD
+ EVACOtherGet, // AT_CATEGORY
+ EVACOtherGet, // AT_ROOT_CATEGORY
+ EVACOtherGet, // (10) AT_LSL_TEXT
+ EVACOtherGet, // AT_LSL_BYTECODE
+ EVACOtherGet, // AT_TEXTURE_TGA
+ EVACWearableUDPGet, // AT_BODYPART
+ EVACOtherGet, // AT_TRASH
+ EVACOtherGet, // AT_SNAPSHOT_CATEGORY
+ EVACOtherGet, // AT_LOST_AND_FOUND
+ EVACSoundUDPGet, // AT_SOUND_WAV
+ EVACOtherGet, // AT_IMAGE_TGA
+ EVACOtherGet, // AT_IMAGE_JPEG
+ EVACGestureUDPGet, // (20) AT_ANIMATION
+ EVACGestureUDPGet, // AT_GESTURE
+ EVACOtherGet, // AT_SIMSTATE
+ EVACOtherGet, // AT_FAVORITE
+ EVACOtherGet, // AT_LINK
+ EVACOtherGet, // AT_LINK_FOLDER
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // (30)
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // (40)
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, //
+ EVACOtherGet, // AT_MESH
+ // (50)
+ };
- // Avatar stats - data all comes from main thread, so leave alone.
+ if (at < 0 || at >= LLViewerAssetType::AT_COUNT)
+ {
+ return EVACOtherGet;
+ }
+ EViewerAssetCategories ret(asset_to_bin_map[at]);
+ if (EVACTextureTempHTTPGet == ret)
+ {
+ // Indexed with [is_temp][with_http]
+ static const EViewerAssetCategories texture_bin_map[2][2] =
+ {
+ {
+ EVACTextureNonTempUDPGet,
+ EVACTextureNonTempHTTPGet,
+ },
+ {
+ EVACTextureTempUDPGet,
+ EVACTextureTempHTTPGet,
+ }
+ };
- // Requests
- for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
- {
- mRequests[i].mEnqueued.merge(src.mRequests[i].mEnqueued);
- mRequests[i].mDequeued.merge(src.mRequests[i].mDequeued);
- mRequests[i].mResponse.merge(src.mRequests[i].mResponse);
+ ret = texture_bin_map[is_temp][with_http];
+ }
+ return ret;
}
-
-}
-
-
-void
-LLViewerAssetStats::PerRegionStats::accumulateTime(duration_t now)
-{
- mTotalTime += (now - mStartTimestamp);
- mStartTimestamp = now;
+ static LLTrace::Count<> sEnqueued[EVACCount] = {LLTrace::Count<>("enqueuedassetrequeststemptexturehttp",
+ "Number of temporary texture asset http requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequeststemptextureudp",
+ "Number of temporary texture asset udp requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestsnontemptexturehttp",
+ "Number of texture asset http requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestsnontemptextureudp",
+ "Number of texture asset udp requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestswearableudp",
+ "Number of wearable asset requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestssoundudp",
+ "Number of sound asset requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestsgestureudp",
+ "Number of gesture asset requests enqueued"),
+ LLTrace::Count<>("enqueuedassetrequestsother",
+ "Number of other asset requests enqueued")};
+
+ static LLTrace::Count<> sDequeued[EVACCount] = {LLTrace::Count<>("dequeuedassetrequeststemptexturehttp",
+ "Number of temporary texture asset http requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequeststemptextureudp",
+ "Number of temporary texture asset udp requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestsnontemptexturehttp",
+ "Number of texture asset http requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestsnontemptextureudp",
+ "Number of texture asset udp requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestswearableudp",
+ "Number of wearable asset requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestssoundudp",
+ "Number of sound asset requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestsgestureudp",
+ "Number of gesture asset requests dequeued"),
+ LLTrace::Count<>("dequeuedassetrequestsother",
+ "Number of other asset requests dequeued")};
+ static LLTrace::Measurement<LLTrace::Seconds> sResponse[EVACCount] = {LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimestemptexturehttp",
+ "Time spent responding to temporary texture asset http requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimestemptextureudp",
+ "Time spent responding to temporary texture asset udp requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimesnontemptexturehttp",
+ "Time spent responding to texture asset http requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimesnontemptextureudp",
+ "Time spent responding to texture asset udp requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimeswearableudp",
+ "Time spent responding to wearable asset requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimessoundudp",
+ "Time spent responding to sound asset requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimesgestureudp",
+ "Time spent responding to gesture asset requests"),
+ LLTrace::Measurement<LLTrace::Seconds>("assetresponsetimesother",
+ "Time spent responding to other asset requests")};
}
+// ------------------------------------------------------
+// Global data definitions
+// ------------------------------------------------------
+LLViewerAssetStats * gViewerAssetStats(0);
// ------------------------------------------------------
// LLViewerAssetStats class definition
// ------------------------------------------------------
LLViewerAssetStats::LLViewerAssetStats()
- : mRegionHandle(U64(0))
+: mRegionHandle(U64(0)),
+ mCurRecording(NULL)
{
reset();
}
LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
- : mRegionHandle(src.mRegionHandle),
- mResetTimestamp(src.mResetTimestamp),
- mPhaseStats(src.mPhaseStats),
- mAvatarRezStates(src.mAvatarRezStates)
+: mRegionHandle(src.mRegionHandle),
+ mPhaseStats(src.mPhaseStats),
+ mAvatarRezStates(src.mAvatarRezStates)
{
- const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
- for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
- {
- mRegionStats[it->first] = new PerRegionStats(*it->second);
- }
- mCurRegionStats = mRegionStats[mRegionHandle];
+ src.mCurRecording->update();
+ mRegionRecordings = src.mRegionRecordings;
+
+ mCurRecording = &mRegionRecordings[mRegionHandle];
}
-void
-LLViewerAssetStats::reset()
+void LLViewerAssetStats::reset()
{
// Empty the map of all region stats
- mRegionStats.clear();
+ mRegionRecordings.clear();
- // If we have a current stats, reset it, otherwise, as at construction,
- // create a new one as we must always have a current stats block.
- if (mCurRegionStats)
- {
- mCurRegionStats->reset();
- }
- else
+ // initialize new recording for current region
+ if (mRegionHandle)
{
- mCurRegionStats = new PerRegionStats(mRegionHandle);
+ mCurRecording = &mRegionRecordings[mRegionHandle];
}
-
- // And add reference to map
- mRegionStats[mRegionHandle] = mCurRegionStats;
-
- // Start timestamp consistent with per-region collector
- mResetTimestamp = mCurRegionStats->mStartTimestamp;
}
-
-void
-LLViewerAssetStats::setRegion(region_handle_t region_handle)
+void LLViewerAssetStats::setRegion(region_handle_t region_handle)
{
if (region_handle == mRegionHandle)
{
@@ -207,445 +275,308 @@ LLViewerAssetStats::setRegion(region_handle_t region_handle)
return;
}
- // Get duration for current set
- const duration_t now = LLViewerAssetStatsFF::get_timestamp();
- mCurRegionStats->accumulateTime(now);
-
- // Prepare new set
- PerRegionContainer::iterator new_stats = mRegionStats.find(region_handle);
- if (mRegionStats.end() == new_stats)
+ if (mCurRecording)
{
- // Haven't seen this region_id before, create a new block and make it current.
- mCurRegionStats = new PerRegionStats(region_handle);
- mRegionStats[region_handle] = mCurRegionStats;
+ mCurRecording->pause();
}
- else
+ if (region_handle)
{
- mCurRegionStats = new_stats->second;
+ mCurRecording = &mRegionRecordings[region_handle];
+ mCurRecording->start();
}
- mCurRegionStats->mStartTimestamp = now;
+
mRegionHandle = region_handle;
}
-
-void
-LLViewerAssetStats::recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
-
- ++(mCurRegionStats->mRequests[int(eac)].mEnqueued);
-}
-
-void
-LLViewerAssetStats::recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+void LLViewerAssetStats::recordAvatarStats()
{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
-
- ++(mCurRegionStats->mRequests[int(eac)].mDequeued);
+ LLVOAvatar::getNearbyRezzedStats(mAvatarRezStates);
+ mPhaseStats.clear();
+ mPhaseStats["cloud"] = LLViewerStats::PhaseMap::getPhaseStats("cloud");
+ mPhaseStats["cloud-or-gray"] = LLViewerStats::PhaseMap::getPhaseStats("cloud-or-gray");
}
-void
-LLViewerAssetStats::recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration)
+void LLViewerAssetStats::updateStats()
{
- const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
-
- mCurRegionStats->mRequests[int(eac)].mResponse.record(duration);
+ if (mCurRecording && mCurRecording->isStarted())
+ {
+ mCurRecording->update();
+ }
}
-void
-LLViewerAssetStats::recordFPS(F32 fps)
+void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output)
{
- mCurRegionStats->mFPS.record(fps);
-}
+ using namespace LLViewerAssetStatsFF;
+
+ stats.regions.setProvided();
+
+ for (PerRegionRecordingContainer::iterator it = mRegionRecordings.begin(), end_it = mRegionRecordings.end();
+ it != end_it;
+ ++it)
+ {
+ RegionStats& r = stats.regions.add();
+ LLTrace::Recording& rec = it->second;
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACTextureTempHTTPGet])
+ || rec.getSum(sDequeued[EVACTextureTempHTTPGet])
+ || rec.getSum(sResponse[EVACTextureTempHTTPGet]).value())
+ {
+ r.get_texture_temp_http .enqueued(rec.getSum(sEnqueued[EVACTextureTempHTTPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACTextureTempHTTPGet]))
+ .resp_count(rec.getSum(sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACTextureTempHTTPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACTextureTempHTTPGet]).value());
+ }
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACTextureTempUDPGet])
+ || rec.getSum(sDequeued[EVACTextureTempUDPGet])
+ || rec.getSum(sResponse[EVACTextureTempUDPGet]).value())
+ {
+ r.get_texture_temp_udp .enqueued(rec.getSum(sEnqueued[EVACTextureTempUDPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACTextureTempUDPGet]))
+ .resp_count(rec.getSum(sResponse[EVACTextureTempUDPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACTextureTempUDPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACTextureTempUDPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACTextureTempUDPGet]).value());
+ }
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACTextureNonTempHTTPGet])
+ || rec.getSum(sDequeued[EVACTextureNonTempHTTPGet])
+ || rec.getSum(sResponse[EVACTextureNonTempHTTPGet]).value())
+ {
+ r.get_texture_non_temp_http .enqueued(rec.getSum(sEnqueued[EVACTextureNonTempHTTPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACTextureNonTempHTTPGet]))
+ .resp_count(rec.getSum(sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACTextureNonTempHTTPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACTextureNonTempHTTPGet]).value());
+ }
-void
-LLViewerAssetStats::recordAvatarStats()
-{
- std::vector<S32> rez_counts;
- LLVOAvatar::getNearbyRezzedStats(rez_counts);
- mAvatarRezStates = rez_counts;
- mPhaseStats.clear();
- mPhaseStats["cloud"] = LLViewerStats::PhaseMap::getPhaseStats("cloud");
- mPhaseStats["cloud-or-gray"] = LLViewerStats::PhaseMap::getPhaseStats("cloud-or-gray");
-}
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACTextureNonTempUDPGet])
+ || rec.getSum(sDequeued[EVACTextureNonTempUDPGet])
+ || rec.getSum(sResponse[EVACTextureNonTempUDPGet]).value())
+ {
+ r.get_texture_non_temp_udp .enqueued(rec.getSum(sEnqueued[EVACTextureNonTempUDPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACTextureNonTempUDPGet]))
+ .resp_count(rec.getSum(sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACTextureNonTempUDPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACTextureNonTempUDPGet]).value());
+ }
-LLSD
-LLViewerAssetStats::asLLSD(bool compact_output)
-{
- // Top-level tags
- static const LLSD::String tags[EVACCount] =
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACWearableUDPGet])
+ || rec.getSum(sDequeued[EVACWearableUDPGet])
+ || rec.getSum(sResponse[EVACWearableUDPGet]).value())
{
- LLSD::String("get_texture_temp_http"),
- LLSD::String("get_texture_temp_udp"),
- LLSD::String("get_texture_non_temp_http"),
- LLSD::String("get_texture_non_temp_udp"),
- LLSD::String("get_wearable_udp"),
- LLSD::String("get_sound_udp"),
- LLSD::String("get_gesture_udp"),
- LLSD::String("get_other")
- };
+ r.get_wearable_udp .enqueued(rec.getSum(sEnqueued[EVACWearableUDPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACWearableUDPGet]))
+ .resp_count(rec.getSum(sResponse[EVACWearableUDPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACWearableUDPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACWearableUDPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACWearableUDPGet]).value());
+ }
- // Stats Group Sub-tags.
- static const LLSD::String enq_tag("enqueued");
- static const LLSD::String deq_tag("dequeued");
- static const LLSD::String rcnt_tag("resp_count");
- static const LLSD::String rmin_tag("resp_min");
- static const LLSD::String rmax_tag("resp_max");
- static const LLSD::String rmean_tag("resp_mean");
-
- // MMM Group Sub-tags.
- static const LLSD::String cnt_tag("count");
- static const LLSD::String min_tag("min");
- static const LLSD::String max_tag("max");
- static const LLSD::String mean_tag("mean");
-
- // Avatar sub-tags
- static const LLSD::String avatar_tag("avatar");
- static const LLSD::String avatar_nearby_tag("nearby");
- static const LLSD::String avatar_phase_stats_tag("phase_stats");
-
- const duration_t now = LLViewerAssetStatsFF::get_timestamp();
- mCurRegionStats->accumulateTime(now);
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACSoundUDPGet])
+ || rec.getSum(sDequeued[EVACSoundUDPGet])
+ || rec.getSum(sResponse[EVACSoundUDPGet]).value())
+ {
+ r.get_sound_udp .enqueued(rec.getSum(sEnqueued[EVACSoundUDPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACSoundUDPGet]))
+ .resp_count(rec.getSum(sResponse[EVACSoundUDPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACSoundUDPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACSoundUDPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACSoundUDPGet]).value());
+ }
- LLSD regions = LLSD::emptyArray();
- for (PerRegionContainer::iterator it = mRegionStats.begin();
- mRegionStats.end() != it;
- ++it)
- {
- if (0 == it->first)
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACGestureUDPGet])
+ || rec.getSum(sDequeued[EVACGestureUDPGet])
+ || rec.getSum(sResponse[EVACGestureUDPGet]).value())
{
- // Never emit NULL UUID/handle in results.
- continue;
+ r.get_gesture_udp .enqueued(rec.getSum(sEnqueued[EVACGestureUDPGet]))
+ .dequeued(rec.getSum(sDequeued[EVACGestureUDPGet]))
+ .resp_count(rec.getSum(sResponse[EVACGestureUDPGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACGestureUDPGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACGestureUDPGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACGestureUDPGet]).value());
}
- PerRegionStats & stats = *it->second;
-
- LLSD reg_stat = LLSD::emptyMap();
-
- for (int i = 0; i < LL_ARRAY_SIZE(tags); ++i)
+ if (!compact_output
+ || rec.getSum(sEnqueued[EVACOtherGet])
+ || rec.getSum(sDequeued[EVACOtherGet])
+ || rec.getSum(sResponse[EVACOtherGet]).value())
{
- PerRegionStats::prs_group & group(stats.mRequests[i]);
-
- if ((! compact_output) ||
- group.mEnqueued.getCount() ||
- group.mDequeued.getCount() ||
- group.mResponse.getCount())
- {
- LLSD & slot = reg_stat[tags[i]];
- slot = LLSD::emptyMap();
- slot[enq_tag] = LLSD(S32(stats.mRequests[i].mEnqueued.getCount()));
- slot[deq_tag] = LLSD(S32(stats.mRequests[i].mDequeued.getCount()));
- slot[rcnt_tag] = LLSD(S32(stats.mRequests[i].mResponse.getCount()));
- slot[rmin_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMin() * 1.0e-6));
- slot[rmax_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMax() * 1.0e-6));
- slot[rmean_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMean() * 1.0e-6));
- }
+ r.get_other .enqueued(rec.getSum(sEnqueued[EVACOtherGet]))
+ .dequeued(rec.getSum(sDequeued[EVACOtherGet]))
+ .resp_count(rec.getSum(sResponse[EVACOtherGet]).value())
+ .resp_min(rec.getMin(sResponse[EVACOtherGet]).value())
+ .resp_max(rec.getMax(sResponse[EVACOtherGet]).value())
+ .resp_mean(rec.getMean(sResponse[EVACOtherGet]).value());
}
- if ((! compact_output) || stats.mFPS.getCount())
+ S32 fps = rec.getSum(LLStatViewer::FPS_SAMPLE);
+ if (!compact_output || fps != 0)
{
- LLSD & slot = reg_stat["fps"];
- slot = LLSD::emptyMap();
- slot[cnt_tag] = LLSD(S32(stats.mFPS.getCount()));
- slot[min_tag] = LLSD(F64(stats.mFPS.getMin()));
- slot[max_tag] = LLSD(F64(stats.mFPS.getMax()));
- slot[mean_tag] = LLSD(F64(stats.mFPS.getMean()));
+ r.fps.count(fps);
+ r.fps.min(rec.getMin(LLStatViewer::FPS_SAMPLE));
+ r.fps.max(rec.getMax(LLStatViewer::FPS_SAMPLE));
+ r.fps.mean(rec.getMean(LLStatViewer::FPS_SAMPLE));
}
U32 grid_x(0), grid_y(0);
grid_from_region_handle(it->first, &grid_x, &grid_y);
- reg_stat["grid_x"] = LLSD::Integer(grid_x);
- reg_stat["grid_y"] = LLSD::Integer(grid_y);
- reg_stat["duration"] = LLSD::Real(stats.mTotalTime * 1.0e-6);
- regions.append(reg_stat);
+ r.grid_x(grid_x);
+ r.grid_y(grid_y);
+ r.duration(LLUnit<LLUnits::Microseconds, F64>(rec.getDuration()).value());
}
- LLSD ret = LLSD::emptyMap();
- ret["regions"] = regions;
- ret["duration"] = LLSD::Real((now - mResetTimestamp) * 1.0e-6);
- LLSD avatar_info;
- avatar_info[avatar_nearby_tag] = LLSD::emptyArray();
+ stats.duration(mCurRecording ? LLUnit<LLUnits::Microseconds, F64>(mCurRecording->getDuration()).value() : 0.0);
+ stats.avatar.setProvided(true);
+
for (S32 rez_stat=0; rez_stat < mAvatarRezStates.size(); ++rez_stat)
{
- std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat);
- avatar_info[avatar_nearby_tag][rez_status_name] = mAvatarRezStates[rez_stat];
+ stats.avatar.nearby .cloud(mAvatarRezStates[0])
+ .gray(mAvatarRezStates[1])
+ .textured(mAvatarRezStates[2]);
}
- avatar_info[avatar_phase_stats_tag]["cloud"] = mPhaseStats["cloud"].getData();
- avatar_info[avatar_phase_stats_tag]["cloud-or-gray"] = mPhaseStats["cloud-or-gray"].getData();
- ret[avatar_tag] = avatar_info;
-
- return ret;
+
+ stats.avatar.phase_stats .cloud(mPhaseStats["cloud"].asLLSD())
+ .cloud_or_gray(mPhaseStats["cloud-or-gray"].asLLSD());
}
-void
-LLViewerAssetStats::merge(const LLViewerAssetStats & src)
+LLSD LLViewerAssetStats::asLLSD(bool compact_output)
{
- // mRegionHandle, mCurRegionStats and mResetTimestamp are left untouched.
- // Just merge the stats bodies
-
- const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
- for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
+ LLParamSDParser parser;
+ LLSD sd;
+ AssetStats stats;
+ getStats(stats, compact_output);
+ LLInitParam::predicate_rule_t rule = LLInitParam::default_parse_rules();
+ if (!compact_output)
{
- PerRegionContainer::iterator dst(mRegionStats.find(it->first));
- if (mRegionStats.end() == dst)
- {
- // Destination is missing data, just make a private copy
- mRegionStats[it->first] = new PerRegionStats(*it->second);
- }
- else
- {
- dst->second->merge(*it->second);
- }
+ rule.allow(LLInitParam::EMPTY);
}
+ parser.writeSD(sd, stats, rule);
+ return sd;
}
-
// ------------------------------------------------------
// Global free-function definitions (LLViewerAssetStatsFF namespace)
// ------------------------------------------------------
namespace LLViewerAssetStatsFF
{
-
-//
-// Target thread is elaborated in the function name. This could
-// have been something 'templatey' like specializations iterated
-// over a set of constants but with so few, this is clearer I think.
-//
-// As for the threads themselves... rather than do fine-grained
-// locking as we gather statistics, this code creates a collector
-// for each thread, allocated and run independently. Logging
-// happens at relatively infrequent intervals and at that time
-// the data is sent to a single thread to be aggregated into
-// a single entity with locks, thread safety and other niceties.
-//
-// A particularly fussy implementation would distribute the
-// per-thread pointers across separate cache lines. But that should
-// be beyond current requirements.
-//
-
-// 'main' thread - initial program thread
-
-void
-set_region_main(LLViewerAssetStats::region_handle_t region_handle)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->setRegion(region_handle);
-}
-
-void
-record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordGetEnqueued(at, with_http, is_temp);
-}
-
-void
-record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordGetDequeued(at, with_http, is_temp);
-}
-
-void
-record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
-{
- if (! gViewerAssetStatsMain)
- return;
-
- gViewerAssetStatsMain->recordGetServiced(at, with_http, is_temp, duration);
-}
-
-void
-record_fps_main(F32 fps)
+void set_region(LLViewerAssetStats::region_handle_t region_handle)
{
- if (! gViewerAssetStatsMain)
+ if (! gViewerAssetStats)
return;
- gViewerAssetStatsMain->recordFPS(fps);
+ gViewerAssetStats->setRegion(region_handle);
}
-void
-record_avatar_stats()
+void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
- if (! gViewerAssetStatsMain)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsMain->recordAvatarStats();
+ sEnqueued[int(eac)].add(1);
}
-// 'thread1' - should be for TextureFetch thread
-
-void
-set_region_thread1(LLViewerAssetStats::region_handle_t region_handle)
+void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
- if (! gViewerAssetStatsThread1)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsThread1->setRegion(region_handle);
+ sDequeued[int(eac)].add(1);
}
-void
-record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
{
- if (! gViewerAssetStatsThread1)
- return;
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
- gViewerAssetStatsThread1->recordGetEnqueued(at, with_http, is_temp);
+ sResponse[int(eac)].sample<LLTrace::Microseconds>(duration);
}
-void
-record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+void record_avatar_stats()
{
- if (! gViewerAssetStatsThread1)
+ if (! gViewerAssetStats)
return;
- gViewerAssetStatsThread1->recordGetDequeued(at, with_http, is_temp);
+ gViewerAssetStats->recordAvatarStats();
}
-void
-record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+void init()
{
- if (! gViewerAssetStatsThread1)
- return;
-
- gViewerAssetStatsThread1->recordGetServiced(at, with_http, is_temp, duration);
-}
-
-
-void
-init()
-{
- if (! gViewerAssetStatsMain)
+ if (! gViewerAssetStats)
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
- }
- if (! gViewerAssetStatsThread1)
- {
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
+ gViewerAssetStats = new LLViewerAssetStats();
}
}
void
cleanup()
{
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = 0;
-
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = 0;
+ delete gViewerAssetStats;
+ gViewerAssetStats = 0;
}
} // namespace LLViewerAssetStatsFF
-// ------------------------------------------------------
-// Local function definitions
-// ------------------------------------------------------
-namespace
+LLViewerAssetStats::AssetRequestType::AssetRequestType()
+: enqueued("enqueued"),
+ dequeued("dequeued"),
+ resp_count("resp_count"),
+ resp_min("resp_min"),
+ resp_max("resp_max"),
+ resp_mean("resp_mean")
+{}
+
+LLViewerAssetStats::FPSStats::FPSStats()
+: count("count"),
+ min("min"),
+ max("max"),
+ mean("mean")
+{}
+
+LLViewerAssetStats::RegionStats::RegionStats()
+: get_texture_temp_http("get_texture_temp_http"),
+ get_texture_temp_udp("get_texture_temp_udp"),
+ get_texture_non_temp_http("get_texture_non_temp_http"),
+ get_texture_non_temp_udp("get_texture_non_temp_udp"),
+ get_wearable_udp("get_wearable_udp"),
+ get_sound_udp("get_sound_udp"),
+ get_gesture_udp("get_gesture_udp"),
+ get_other("get_other"),
+ fps("fps"),
+ grid_x("grid_x"),
+ grid_y("grid_y"),
+ duration("duration")
+{}
+
+LLViewerAssetStats::AvatarRezState::AvatarRezState()
+: cloud("cloud"),
+ gray("gray"),
+ textured("textured")
+{}
+
+LLViewerAssetStats::AvatarInfo::AvatarInfo()
+: nearby("nearby"),
+ phase_stats("phase_stats")
{
-LLViewerAssetStats::EViewerAssetCategories
-asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp)
-{
- // For statistical purposes, we divide GETs into several
- // populations of asset fetches:
- // - textures which are de-prioritized in the asset system
- // - wearables (clothing, bodyparts) which directly affect
- // user experiences when they log in
- // - sounds
- // - gestures
- // - everything else.
- //
- llassert_always(50 == LLViewerAssetType::AT_COUNT);
-
- // Multiple asset definitions are floating around so this requires some
- // maintenance and attention.
- static const LLViewerAssetStats::EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] =
- {
- LLViewerAssetStats::EVACTextureTempHTTPGet, // (0) AT_TEXTURE
- LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND
- LLViewerAssetStats::EVACOtherGet, // AT_CALLINGCARD
- LLViewerAssetStats::EVACOtherGet, // AT_LANDMARK
- LLViewerAssetStats::EVACOtherGet, // AT_SCRIPT
- LLViewerAssetStats::EVACWearableUDPGet, // AT_CLOTHING
- LLViewerAssetStats::EVACOtherGet, // AT_OBJECT
- LLViewerAssetStats::EVACOtherGet, // AT_NOTECARD
- LLViewerAssetStats::EVACOtherGet, // AT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // AT_ROOT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // (10) AT_LSL_TEXT
- LLViewerAssetStats::EVACOtherGet, // AT_LSL_BYTECODE
- LLViewerAssetStats::EVACOtherGet, // AT_TEXTURE_TGA
- LLViewerAssetStats::EVACWearableUDPGet, // AT_BODYPART
- LLViewerAssetStats::EVACOtherGet, // AT_TRASH
- LLViewerAssetStats::EVACOtherGet, // AT_SNAPSHOT_CATEGORY
- LLViewerAssetStats::EVACOtherGet, // AT_LOST_AND_FOUND
- LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND_WAV
- LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_TGA
- LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_JPEG
- LLViewerAssetStats::EVACGestureUDPGet, // (20) AT_ANIMATION
- LLViewerAssetStats::EVACGestureUDPGet, // AT_GESTURE
- LLViewerAssetStats::EVACOtherGet, // AT_SIMSTATE
- LLViewerAssetStats::EVACOtherGet, // AT_FAVORITE
- LLViewerAssetStats::EVACOtherGet, // AT_LINK
- LLViewerAssetStats::EVACOtherGet, // AT_LINK_FOLDER
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // (30)
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // (40)
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, //
- LLViewerAssetStats::EVACOtherGet, // AT_MESH
- // (50)
- };
-
- if (at < 0 || at >= LLViewerAssetType::AT_COUNT)
- {
- return LLViewerAssetStats::EVACOtherGet;
- }
- LLViewerAssetStats::EViewerAssetCategories ret(asset_to_bin_map[at]);
- if (LLViewerAssetStats::EVACTextureTempHTTPGet == ret)
- {
- // Indexed with [is_temp][with_http]
- static const LLViewerAssetStats::EViewerAssetCategories texture_bin_map[2][2] =
- {
- {
- LLViewerAssetStats::EVACTextureNonTempUDPGet,
- LLViewerAssetStats::EVACTextureNonTempHTTPGet,
- },
- {
- LLViewerAssetStats::EVACTextureTempUDPGet,
- LLViewerAssetStats::EVACTextureTempHTTPGet,
- }
- };
-
- ret = texture_bin_map[is_temp][with_http];
- }
- return ret;
}
-} // anonymous namespace
+LLViewerAssetStats::AssetStats::AssetStats()
+: regions("regions"),
+ duration("duration"),
+ avatar("avatar"),
+ session_id("session_id"),
+ agent_id("agent_id"),
+ message("message"),
+ sequence("sequence"),
+ initial("initial"),
+ break_("break")
+{}
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index 8319752230..835df89149 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -37,6 +37,7 @@
#include "llsimplestat.h"
#include "llsd.h"
#include "llvoavatar.h"
+#include "lltrace.h"
/**
* @class LLViewerAssetStats
@@ -76,20 +77,6 @@
class LLViewerAssetStats
{
public:
- enum EViewerAssetCategories
- {
- EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP
- EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP
- EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP
- EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP
- EVACWearableUDPGet, //< Wearable GETs
- EVACSoundUDPGet, //< Sound GETs
- EVACGestureUDPGet, //< Gesture GETs
- EVACOtherGet, //< Other GETs
-
- EVACCount // Must be last
- };
-
/**
* Type for duration and other time values in the metrics. Selected
* for compatibility with the pre-existing timestamp on the texture
@@ -104,59 +91,87 @@ public:
*/
typedef U64 region_handle_t;
- /**
- * @brief Collected data for a single region visited by the avatar.
- *
- * Fairly simple, for each asset bin enumerated above a count
- * of enqueue and dequeue operations and simple stats on response
- * times for completed requests.
- */
- class PerRegionStats : public LLRefCount
+ struct AssetRequestType : public LLInitParam::Block<AssetRequestType>
+ {
+ Mandatory<S32> enqueued,
+ dequeued,
+ resp_count;
+ Mandatory<F64> resp_min,
+ resp_max,
+ resp_mean;
+
+ AssetRequestType();
+ };
+
+ struct FPSStats : public LLInitParam::Block<FPSStats>
+ {
+ Mandatory<S32> count;
+ Mandatory<F64> min,
+ max,
+ mean;
+ FPSStats();
+ };
+
+ struct RegionStats : public LLInitParam::Block<RegionStats>
{
- public:
- PerRegionStats(const region_handle_t region_handle)
- : LLRefCount(),
- mRegionHandle(region_handle)
- {
- reset();
- }
-
- PerRegionStats(const PerRegionStats & src)
- : LLRefCount(),
- mRegionHandle(src.mRegionHandle),
- mTotalTime(src.mTotalTime),
- mStartTimestamp(src.mStartTimestamp),
- mFPS(src.mFPS)
- {
- for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
- {
- mRequests[i] = src.mRequests[i];
- }
- }
-
- // Default assignment and destructor are correct.
-
- void reset();
-
- void merge(const PerRegionStats & src);
-
- // Apply current running time to total and reset start point.
- // Return current timestamp as a convenience.
- void accumulateTime(duration_t now);
-
- public:
- region_handle_t mRegionHandle;
- duration_t mTotalTime;
- duration_t mStartTimestamp;
- LLSimpleStatMMM<> mFPS;
-
- struct prs_group
- {
- LLSimpleStatCounter mEnqueued;
- LLSimpleStatCounter mDequeued;
- LLSimpleStatMMM<duration_t> mResponse;
- }
- mRequests [EVACCount];
+ Optional<AssetRequestType> get_texture_temp_http,
+ get_texture_temp_udp,
+ get_texture_non_temp_http,
+ get_texture_non_temp_udp,
+ get_wearable_udp,
+ get_sound_udp,
+ get_gesture_udp,
+ get_other;
+ Optional<FPSStats> fps;
+ Optional<S32> grid_x,
+ grid_y;
+ Optional<F64> duration;
+
+ RegionStats();
+ };
+
+ struct AvatarRezState : public LLInitParam::Block<AvatarRezState>
+ {
+ Mandatory<S32> cloud,
+ gray,
+ textured;
+ AvatarRezState();
+ };
+
+ struct AvatarPhaseStats : public LLInitParam::Block<AvatarPhaseStats>
+ {
+ Mandatory<LLSD> cloud,
+ cloud_or_gray;
+
+ AvatarPhaseStats()
+ : cloud("cloud"),
+ cloud_or_gray("cloud-or-gray")
+ {}
+ };
+
+ struct AvatarInfo : public LLInitParam::Block<AvatarInfo>
+ {
+ Optional<AvatarRezState> nearby;
+ Optional<AvatarPhaseStats> phase_stats;
+
+ AvatarInfo();
+ };
+
+ struct AssetStats : public LLInitParam::Block<AssetStats>
+ {
+ Multiple<RegionStats> regions;
+ Mandatory<F64> duration;
+ Mandatory<AvatarInfo> avatar;
+
+ Mandatory<LLUUID> session_id,
+ agent_id;
+
+ Mandatory<std::string> message;
+ Mandatory<S32> sequence;
+ Mandatory<bool> initial,
+ break_;
+
+ AssetStats();
};
public:
@@ -174,88 +189,31 @@ public:
// collection calls.
void setRegion(region_handle_t region_handle);
- // Asset GET Requests
- void recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
- void recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
- void recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration);
-
- // Frames-Per-Second Samples
- void recordFPS(F32 fps);
-
// Avatar-related statistics
void recordAvatarStats();
- // Merge a source instance into a destination instance. This is
- // conceptually an 'operator+=()' method:
- // - counts are added
- // - minimums are min'd
- // - maximums are max'd
- // - other scalars are ignored ('this' wins)
- //
- void merge(const LLViewerAssetStats & src);
-
+ // gather latest metrics data
+ // call from main thread
+ void updateStats();
+
// Retrieve current metrics for all visited regions (NULL region UUID/handle excluded)
- // Returned LLSD is structured as follows:
- //
- // &stats_group = {
- // enqueued : int,
- // dequeued : int,
- // resp_count : int,
- // resp_min : float,
- // resp_max : float,
- // resp_mean : float
- // }
- //
- // &mmm_group = {
- // count : int,
- // min : float,
- // max : float,
- // mean : float
- // }
- //
- // {
- // duration: int
- // regions: {
- // $: { // Keys are strings of the region's handle in hex
- // duration: : int,
- // fps: : &mmm_group,
- // get_texture_temp_http : &stats_group,
- // get_texture_temp_udp : &stats_group,
- // get_texture_non_temp_http : &stats_group,
- // get_texture_non_temp_udp : &stats_group,
- // get_wearable_udp : &stats_group,
- // get_sound_udp : &stats_group,
- // get_gesture_udp : &stats_group,
- // get_other : &stats_group
- // }
- // }
- // }
- //
- // @param compact_output If true, omits from conversion any mmm_block
- // or stats_block that would contain all zero data.
- // Useful for transmission when the receiver knows
- // what is expected and will assume zero for missing
- // blocks.
+ // Uses AssetStats structure seen above
+ void getStats(AssetStats& stats, bool compact_output);
LLSD asLLSD(bool compact_output);
protected:
- typedef std::map<region_handle_t, LLPointer<PerRegionStats> > PerRegionContainer;
+ typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer;
// Region of the currently-active region. Always valid but may
// be zero after construction or when explicitly set. Unchanged
// by a reset() call.
region_handle_t mRegionHandle;
- // Pointer to metrics collection for currently-active region. Always
- // valid and unchanged after reset() though contents will be changed.
- // Always points to a collection contained in mRegionStats.
- LLPointer<PerRegionStats> mCurRegionStats;
+ // Pointer to metrics collection for currently-active region.
+ LLTrace::Recording* mCurRecording;
// Metrics data for all regions during one collection cycle
- PerRegionContainer mRegionStats;
-
- // Time of last reset
- duration_t mResetTimestamp;
+ PerRegionRecordingContainer mRegionRecordings;
// Nearby avatar stats
std::vector<S32> mAvatarRezStates;
@@ -277,12 +235,24 @@ protected:
* - Main: main() program execution thread
* - Thread1: TextureFetch worker thread
*/
-extern LLViewerAssetStats * gViewerAssetStatsMain;
-
-extern LLViewerAssetStats * gViewerAssetStatsThread1;
+extern LLViewerAssetStats * gViewerAssetStats;
namespace LLViewerAssetStatsFF
{
+ enum EViewerAssetCategories
+ {
+ EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP
+ EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP
+ EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP
+ EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP
+ EVACWearableUDPGet, //< Wearable GETs
+ EVACSoundUDPGet, //< Sound GETs
+ EVACGestureUDPGet, //< Gesture GETs
+ EVACOtherGet, //< Other GETs
+
+ EVACCount // Must be last
+ };
+
/**
* @brief Allocation and deallocation of globals.
*
@@ -307,31 +277,17 @@ inline LLViewerAssetStats::duration_t get_timestamp()
/**
* Region context, event and duration loggers for the Main thread.
*/
-void set_region_main(LLViewerAssetStats::region_handle_t region_handle);
+void set_region(LLViewerAssetStats::region_handle_t region_handle);
-void record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-void record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp,
+void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp,
LLViewerAssetStats::duration_t duration);
-void record_fps_main(F32 fps);
-
void record_avatar_stats();
-/**
- * Region context, event and duration loggers for Thread 1.
- */
-void set_region_thread1(LLViewerAssetStats::region_handle_t region_handle);
-
-void record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-void record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
-
-void record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp,
- LLViewerAssetStats::duration_t duration);
-
} // namespace LLViewerAssetStatsFF
#endif // LL_LLVIEWERASSETSTATUS_H
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index d042f62830..6f41abbd8a 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -73,8 +73,8 @@ protected:
{
// Okay, it appears this request was used for useful things. Record
// the expected dequeue and duration of request processing.
- LLViewerAssetStatsFF::record_dequeue_main(mType, false, false);
- LLViewerAssetStatsFF::record_response_main(mType, false, false,
+ LLViewerAssetStatsFF::record_dequeue(mType, false, false);
+ LLViewerAssetStatsFF::record_response(mType, false, false,
(LLViewerAssetStatsFF::get_timestamp()
- mMetricsStartTime));
mMetricsStartTime = 0;
@@ -373,7 +373,7 @@ void LLViewerAssetStorage::_queueDataRequest(
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET);
ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f));
- LLViewerAssetStatsFF::record_enqueue_main(atype, false, false);
+ LLViewerAssetStatsFF::record_enqueue(atype, false, false);
}
}
else
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index a437a8b3b5..f74897daa7 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -49,10 +49,14 @@
#include "llglheaders.h"
#include "llquaternion.h"
#include "llwindow.h" // getPixelAspectRatio()
+#include "lltracerecording.h"
// System includes
#include <iomanip> // for setprecision
+LLTrace::Count<> LLViewerCamera::sVelocityStat("camera_velocity");
+LLTrace::Count<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity");
+
U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
//glu pick matrix implementation borrowed from Mesa3D
@@ -163,11 +167,11 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center,
F32 drot;
rotation.getAngleAxis(&drot, &x, &y, &z);
- mVelocityStat.addValue(dpos);
- mAngularVelocityStat.addValue(drot);
+ sVelocityStat.add(dpos);
+ sAngularVelocityStat.add(drot);
- mAverageSpeed = mVelocityStat.getMeanPerSec() ;
- mAverageAngularSpeed = mAngularVelocityStat.getMeanPerSec() ;
+ mAverageSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sVelocityStat);
+ mAverageAngularSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sAngularVelocityStat);
mCosHalfCameraFOV = cosf(0.5f * getView() * llmax(1.0f, getAspect()));
// update pixel meter ratio using default fov, not modified one
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index b857c7fe89..607bfa7199 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -29,10 +29,10 @@
#include "llcamera.h"
#include "llsingleton.h"
-#include "llstat.h"
#include "lltimer.h"
#include "m4math.h"
#include "llcoord.h"
+#include "lltrace.h"
class LLViewerObject;
@@ -101,8 +101,8 @@ public:
BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const;
const LLVector3* getVelocityDir() const {return &mVelocityDir;}
- LLStat *getVelocityStat() { return &mVelocityStat; }
- LLStat *getAngularVelocityStat() { return &mAngularVelocityStat; }
+ static LLTrace::Count<>* getVelocityStat() {return &sVelocityStat; }
+ static LLTrace::Count<>* getAngularVelocityStat() {return &sAngularVelocityStat; }
F32 getCosHalfFov() {return mCosHalfCameraFOV;}
F32 getAverageSpeed() {return mAverageSpeed ;}
F32 getAverageAngularSpeed() {return mAverageAngularSpeed;}
@@ -117,9 +117,9 @@ public:
F32 getDefaultFOV() { return mCameraFOVDefault; }
BOOL cameraUnderWater() const;
+ BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; }
- BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
F32 getPixelMeterRatio() const { return mPixelMeterRatio; }
S32 getScreenPixelArea() const { return mScreenPixelArea; }
@@ -130,12 +130,12 @@ public:
protected:
void calcProjection(const F32 far_distance) const;
- LLStat mVelocityStat;
- LLStat mAngularVelocityStat;
+ static LLTrace::Count<> sVelocityStat;
+ static LLTrace::Count<> sAngularVelocityStat;
+
LLVector3 mVelocityDir ;
F32 mAverageSpeed ;
F32 mAverageAngularSpeed ;
-
mutable LLMatrix4 mProjectionMatrix; // Cache of perspective matrix
mutable LLMatrix4 mModelviewMatrix;
F32 mCameraFOVDefault;
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index d58ee05fb6..41a08398bb 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -168,7 +168,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera");
void display_update_camera()
{
LLFastTimer t(FTM_UPDATE_CAMERA);
- LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA);
// TODO: cut draw distance down if customizing avatar?
// TODO: cut draw distance on per-parcel basis?
@@ -218,7 +217,7 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
-static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window");
@@ -230,7 +229,6 @@ static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
- LLMemType mt_render(LLMemType::MTYPE_RENDER);
LLFastTimer t(FTM_RENDER);
if (gWindowResized)
@@ -581,7 +579,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!gDisconnected)
{
- LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE);
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{ //don't draw hud objects in this frame
@@ -603,7 +600,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// *TODO: merge these two methods
{
LLFastTimer t(FTM_HUD_UPDATE);
- LLMemType mt_uh(LLMemType::MTYPE_DISPLAY_UPDATE_HUD);
LLHUDManager::getInstance()->updateEffects();
LLHUDObject::updateAll();
stop_glerror();
@@ -611,8 +607,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM);
- LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM);
- const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time
+ const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds.value(); // 50 ms/second update time
gPipeline.createObjects(max_geom_update_time);
gPipeline.processPartitionQ();
gPipeline.updateGeom(max_geom_update_time);
@@ -672,8 +667,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
{
- LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
-
if (gResizeScreenTexture)
{
gResizeScreenTexture = FALSE;
@@ -732,7 +725,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//if (!for_snapshot)
{
- LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION);
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
@@ -752,13 +744,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages");
{
- LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(FTM_IMAGE_UPDATE);
{
LLFastTimer t(FTM_IMAGE_UPDATE_CLASS);
- LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
- LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat();
+ LLTrace::Count<>* angular_velocity_stat = LLViewerCamera::getAngularVelocityStat();
+ LLViewerTexture::updateClass(LLTrace::get_frame_recording().getPeriodMeanPerSec(*velocity_stat),
+ LLTrace::get_frame_recording().getPeriodMeanPerSec(*angular_velocity_stat));
}
@@ -769,7 +762,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLFastTimer t(FTM_IMAGE_UPDATE_LIST);
- F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds.value(); // 50 ms/second decode time
max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
gTextureList.updateImages(max_image_decode_time);
}
@@ -796,7 +789,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort");
{
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT);
gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
stop_glerror();
@@ -818,7 +810,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = occlusion;
{
- LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SKY);
LLAppViewer::instance()->pingMainloopTimeout("Display:Sky");
LLFastTimer t(FTM_UPDATE_SKY);
gSky.updateSky();
@@ -907,7 +898,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
&& !gRestoreGL)
{
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM);
if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction)
{
@@ -968,7 +958,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (to_texture)
{
- LLMemType mt_rf(LLMemType::MTYPE_DISPLAY_RENDER_FLUSH);
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
gPipeline.mDeferredScreen.flush();
@@ -1035,7 +1024,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
void render_hud_attachments()
{
- LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
@@ -1225,7 +1213,6 @@ static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
void render_ui(F32 zoom_factor, int subfield)
{
- LLMemType mt_ru(LLMemType::MTYPE_DISPLAY_RENDER_UI);
LLGLState::checkStates();
glh::matrix4f saved_view = glh_get_current_modelview();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 1f7cf0cdd4..69586e3634 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -73,7 +73,6 @@
#include "llfloaterinspect.h"
#include "llfloaterinventory.h"
#include "llfloaterjoystick.h"
-#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
#include "llfloaterlandholdings.h"
#include "llfloatermap.h"
@@ -227,7 +226,6 @@ void LLViewerFloaterReg::registerFloaters()
LLNotificationsUI::registerFloater();
LLFloaterDisplayNameUtil::registerFloater();
- LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index f6e840adcd..f4155df4d1 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -501,7 +501,7 @@ void LLViewerJoystick::moveObjects(bool reset)
};
F32 cur_delta[6];
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridicously big movements if there's a big drop in fps
if (time > .2f)
@@ -665,7 +665,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
};
// time interval in seconds between this frame and the previous
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridicously big movements if there's a big drop in fps
if (time > .2f)
@@ -878,7 +878,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
gSavedSettings.getF32("FlycamAxisDeadZone6")
};
- F32 time = gFrameIntervalSeconds;
+ F32 time = gFrameIntervalSeconds.value();
// avoid making ridiculously big movements if there's a big drop in fps
if (time > .2f)
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 1aa9fd8a45..f5d3341c66 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -160,6 +160,11 @@ void agent_push_backward( EKeystate s )
camera_move_backward(s);
return;
}
+ else if (gAgentAvatarp->isSitting())
+ {
+ gAgentCamera.changeCameraToThirdPerson();
+ return;
+ }
agent_push_forwardbackward(s, -1, LLAgent::DOUBLETAP_BACKWARD);
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index d11e7e32c7..1ba78f18d3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -341,7 +341,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver()
void LLMenuParcelObserver::changed()
{
- gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL));
+ LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
+ gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID()));
BOOL buyable = enable_buy_land(NULL);
gMenuHolder->childSetEnabled("Land Buy", buyable);
@@ -1316,22 +1317,6 @@ class LLAdvancedPrintAgentInfo : public view_listener_t
}
};
-
-
-////////////////////////////////
-// PRINT TEXTURE MEMORY STATS //
-////////////////////////////////
-
-
-class LLAdvancedPrintTextureMemoryStats : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- output_statistics(NULL);
- return true;
- }
-};
-
//////////////////
// DEBUG CLICKS //
//////////////////
@@ -3463,6 +3448,20 @@ bool enable_sitdown_self()
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
+class LLCheckPanelPeopleTab : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string panel_name = userdata.asString();
+
+ LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name);
+ if(panel && panel->isInVisibleChain())
+ {
+ return true;
+ }
+ return false;
+ }
+};
// Toggle one of "People" panel tabs in side tray.
class LLTogglePanelPeopleTab : public view_listener_t
{
@@ -3940,6 +3939,7 @@ class LLViewToggleUI : public view_listener_t
if (option == 0) // OK
{
gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
+ LLPanelStandStopFlying::getInstance()->setVisible(gViewerWindow->getUIVisibility());
}
}
};
@@ -3973,72 +3973,6 @@ void handle_duplicate_in_place(void*)
LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE);
}
-/* dead code 30-apr-2008
-void handle_deed_object_to_group(void*)
-{
- LLUUID group_id;
-
- LLSelectMgr::getInstance()->selectGetGroup(group_id);
- LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
-}
-
-BOOL enable_deed_object_to_group(void*)
-{
- if(LLSelectMgr::getInstance()->getSelection()->isEmpty()) return FALSE;
- LLPermissions perm;
- LLUUID group_id;
-
- if (LLSelectMgr::getInstance()->selectGetGroup(group_id) &&
- gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) &&
- LLSelectMgr::getInstance()->selectGetPermissions(perm) &&
- perm.deedToGroup(gAgent.getID(), group_id))
- {
- return TRUE;
- }
- return FALSE;
-}
-
-*/
-
-
-/*
- * No longer able to support viewer side manipulations in this way
- *
-void god_force_inv_owner_permissive(LLViewerObject* object,
- LLInventoryObject::object_list_t* inventory,
- S32 serial_num,
- void*)
-{
- typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
- item_array_t items;
-
- LLInventoryObject::object_list_t::const_iterator inv_it = inventory->begin();
- LLInventoryObject::object_list_t::const_iterator inv_end = inventory->end();
- for ( ; inv_it != inv_end; ++inv_it)
- {
- if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY))
- {
- LLInventoryObject* obj = *inv_it;
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem((LLViewerInventoryItem*)obj);
- LLPermissions perm(new_item->getPermissions());
- perm.setMaskBase(PERM_ALL);
- perm.setMaskOwner(PERM_ALL);
- new_item->setPermissions(perm);
- items.push_back(new_item);
- }
- }
- item_array_t::iterator end = items.end();
- item_array_t::iterator it;
- for(it = items.begin(); it != end; ++it)
- {
- // since we have the inventory item in the callback, it should not
- // invalidate iteration through the selection manager.
- object->updateInventory((*it), TASK_INVENTORY_ITEM_KEY, false);
- }
-}
-*/
-
void handle_object_owner_permissive(void*)
{
// only send this if they're a god.
@@ -8432,7 +8366,6 @@ void initialize_menus()
commit.add("Advanced.DumpFocusHolder", boost::bind(&handle_dump_focus) );
view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo");
view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo");
- view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats");
view_listener_t::addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks");
view_listener_t::addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks");
view_listener_t::addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews");
@@ -8551,6 +8484,7 @@ void initialize_menus()
// we don't use boost::bind directly to delay side tray construction
view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab");
+ view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab");
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index dc2ea4bd1f..50ca8db267 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -34,6 +34,7 @@
#include "llfilepicker.h"
#include "llfloaterreg.h"
#include "llbuycurrencyhtml.h"
+#include "llfloatermap.h"
#include "llfloatermodelpreview.h"
#include "llfloatersnapshot.h"
#include "llimage.h"
@@ -475,7 +476,7 @@ class LLFileEnableCloseWindow : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = NULL != LLFloater::getClosableFloaterFromFocus();
+ bool new_value = NULL != gFloaterView->getFrontmostClosableFloater();
return new_value;
}
};
@@ -484,8 +485,7 @@ class LLFileCloseWindow : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloater::closeFocusedFloater();
-
+ LLFloater::closeFrontmostFloater();
return true;
}
};
@@ -494,7 +494,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool open_children = gFloaterView->allChildrenClosed();
+ bool open_children = gFloaterView->allChildrenClosed() && !LLFloaterSnapshot::getInstance()->isInVisibleChain();
return !open_children;
}
};
@@ -505,7 +505,7 @@ class LLFileCloseAllWindows : public view_listener_t
{
bool app_quitting = false;
gFloaterView->closeAllChildren(app_quitting);
-
+ LLFloaterSnapshot::getInstance()->closeFloater(app_quitting);
return true;
}
};
@@ -1096,17 +1096,17 @@ void upload_new_resource(
if( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ LLStatViewer::UPLOAD_SOUND.add(1);
}
else
if( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ LLStatViewer::UPLOAD_TEXTURE.add(1);
}
else
if( LLAssetType::AT_ANIMATION == asset_type)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ LLStatViewer::ANIMATION_UPLOADS.add(1);
}
if(LLInventoryType::IT_NONE == inv_type)
@@ -1231,18 +1231,15 @@ void increase_new_upload_stats(LLAssetType::EType asset_type)
{
if ( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ LLStatViewer::UPLOAD_SOUND.add(1);
}
else if ( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ LLStatViewer::UPLOAD_TEXTURE.add(1);
}
else if ( LLAssetType::AT_ANIMATION == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ LLStatViewer::ANIMATION_UPLOADS.add(1);
}
}
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 3136358b83..6bba375f50 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -31,6 +31,7 @@
#include "llassetstorage.h"
#include "llinventorytype.h"
#include "llfilepicker.h"
+#include <queue>
class LLTransactionID;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b048332e59..6da93f0653 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2587,7 +2587,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD args;
args["SUBJECT"] = subj;
args["MESSAGE"] = mes;
- LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(timestamp));
+ LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(LLDate(timestamp)));
}
// Also send down the old path for now.
@@ -4416,19 +4416,18 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// *TODO: Remove this dependency, or figure out a better way to handle
// this hack.
-extern U32 gObjectBits;
+extern LLUnit<LLUnits::Bits, U32> gObjectData;
void process_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4437,15 +4436,14 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data)
void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4454,15 +4452,14 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data
void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
// Update the data counters
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveSize();
}
// Update the object...
@@ -4472,20 +4469,19 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data)
void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (mesgsys->getReceiveCompressedSize())
{
- gObjectBits += mesgsys->getReceiveCompressedSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveCompressedSize();
}
else
{
- gObjectBits += mesgsys->getReceiveSize() * 8;
+ gObjectData += (LLUnit<LLUnits::Bytes, U32>)mesgsys->getReceiveSize();
}
gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED);
}
-static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects");
+static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects");
void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
@@ -4757,145 +4753,18 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
F32 stat_value;
msg->getU32("Stat", "StatID", stat_id, i);
msg->getF32("Stat", "StatValue", stat_value, i);
- switch (stat_id)
+ LLStatViewer::SimMeasurementSampler* measurementp = LLStatViewer::SimMeasurementSampler::getInstance((ESimStatID)stat_id);
+
+ if (measurementp )
{
- case LL_SIM_STAT_TIME_DILATION:
- LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value);
- break;
- case LL_SIM_STAT_FPS:
- LLViewerStats::getInstance()->mSimFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSFPS:
- LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTUPS:
- LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_FRAMEMS:
- LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NETMS:
- LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMOTHERMS:
- LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMS:
- LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_AGENTMS:
- LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IMAGESMS:
- LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPTMS:
- LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKS:
- LLViewerStats::getInstance()->mSimObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMTASKSACTIVE:
- LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTMAIN:
- LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMAGENTCHILD:
- LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value);
- break;
- case LL_SIM_STAT_NUMSCRIPTSACTIVE:
- LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value);
- break;
- case LL_SIM_STAT_SCRIPT_EPS:
- LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_INPPS:
- LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_OUTPPS:
- LLViewerStats::getInstance()->mSimOutPPS.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_DOWNLOADS:
- LLViewerStats::getInstance()->mSimPendingDownloads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_PENDING_LOCAL_UPLOADS:
- LLViewerStats::getInstance()->mSimPendingLocalUploads.addValue(stat_value);
- break;
- case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
- LLViewerStats::getInstance()->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
- break;
- case LL_SIM_STAT_PHYSICS_PINNED_TASKS:
- LLViewerStats::getInstance()->mPhysicsPinnedTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_PHYSICS_LOD_TASKS:
- LLViewerStats::getInstance()->mPhysicsLODTasks.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSTEPMS:
- LLViewerStats::getInstance()->mSimSimPhysicsStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSSHAPEMS:
- LLViewerStats::getInstance()->mSimSimPhysicsShapeUpdateMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSOTHERMS:
- LLViewerStats::getInstance()->mSimSimPhysicsOtherMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMPHYSICSMEMORY:
- LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSPARETIME:
- LLViewerStats::getInstance()->mSimSpareMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMSLEEPTIME:
- LLViewerStats::getInstance()->mSimSleepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_IOPUMPTIME:
- LLViewerStats::getInstance()->mSimPumpIOMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSCRIPTSRUN:
- LLViewerStats::getInstance()->mSimPctScriptsRun.addValue(stat_value);
- break;
- case LL_SIM_STAT_SIMAISTEPTIMEMS:
- LLViewerStats::getInstance()->mSimSimAIStepMsec.addValue(stat_value);
- break;
- case LL_SIM_STAT_SKIPPEDAISILSTEPS_PS:
- LLViewerStats::getInstance()->mSimSimSkippedSilhouetteSteps.addValue(stat_value);
- break;
- case LL_SIM_STAT_PCTSTEPPEDCHARACTERS:
- LLViewerStats::getInstance()->mSimSimPctSteppedCharacters.addValue(stat_value);
- break;
- default:
- // Used to be a commented out warning.
- LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
- break;
+ measurementp->sample(stat_value);
+ }
+ else
+ {
+ llwarns << "Unknown sim stat identifier: " << stat_id << llendl;
}
}
- /*
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_PhysicsTimeDilation, time_dilation);
- LLViewerStats::getInstance()->mSimTDStat.addValue(time_dilation);
-
- // Process information
- // { CpuUsage F32 }
- // { SimMemTotal F32 }
- // { SimMemRSS F32 }
- // { ProcessUptime F32 }
- F32 cpu_usage;
- F32 sim_mem_total;
- F32 sim_mem_rss;
- F32 process_uptime;
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_CpuUsage, cpu_usage);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_SimMemTotal, sim_mem_total);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_SimMemRSS, sim_mem_rss);
- msg->getF32Fast(_PREHASH_Statistics, _PREHASH_ProcessUptime, process_uptime);
- LLViewerStats::getInstance()->mSimCPUUsageStat.addValue(cpu_usage);
- LLViewerStats::getInstance()->mSimMemTotalStat.addValue(sim_mem_total);
- LLViewerStats::getInstance()->mSimMemRSSStat.addValue(sim_mem_rss);
- */
-
//
// Various hacks that aren't statistics, but are being handled here.
//
@@ -5942,7 +5811,7 @@ void process_alert_core(const std::string& message, BOOL modal)
// HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
if ( message == "You died and have been teleported to your home location")
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
+ LLStatViewer::KILLED.add(1);
}
else if( message == "Home position set." )
{
@@ -7369,8 +7238,6 @@ void onCovenantLoadComplete(LLVFS *vfs,
}
else
{
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f9342a9736..fff1875ad6 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -785,7 +785,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
-
+
if (parentp && mDrawable->isActive())
{
parentp->makeActive();
@@ -876,7 +876,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
U32 retval = 0x0;
// If region is removed from the list it is also deleted.
@@ -2038,7 +2037,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps
if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) )
{
- LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() );
+ LLStatViewer::AGENT_POSITION_SNAP.sample<LLTrace::Meters>(diff.length());
}
}
@@ -2046,7 +2045,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|| (new_angv != old_angv))
{
if (new_rot != mPreviousRotation)
- {
+ {
resetRot();
}
else if (new_angv != old_angv)
@@ -2170,28 +2169,28 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
if (!mDead)
{
- // CRO - don't velocity interp linked objects!
- // Leviathan - but DO velocity interp joints
- if (!mStatic && sVelocityInterpolate && !isSelected())
- {
- // calculate dt from last update
- F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
- F32 dt = mTimeDilation * dt_raw;
+ // CRO - don't velocity interp linked objects!
+ // Leviathan - but DO velocity interp joints
+ if (!mStatic && sVelocityInterpolate && !isSelected())
+ {
+ // calculate dt from last update
+ F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
+ F32 dt = mTimeDilation * dt_raw;
applyAngularVelocity(dt);
-
+
if (isAttachment())
- {
- mLastInterpUpdateSecs = time;
+ {
+ mLastInterpUpdateSecs = time;
return;
+ }
+ else
+ { // Move object based on it's velocity and rotation
+ interpolateLinearMotion(time, dt);
+ }
}
- else
- { // Move object based on it's velocity and rotation
- interpolateLinearMotion(time, dt);
- }
- }
- updateDrawable(FALSE);
+ updateDrawable(FALSE);
}
}
@@ -2352,8 +2351,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
delete [] mData;
if (datap)
@@ -2395,8 +2392,6 @@ void LLViewerObject::doUpdateInventory(
U8 key,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLViewerInventoryItem* old_item = NULL;
if(TASK_INVENTORY_ITEM_KEY == key)
{
@@ -2480,8 +2475,6 @@ void LLViewerObject::saveScript(
BOOL active,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
/*
* XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the
* interaction with doUpdateInventory() called below.
@@ -2557,8 +2550,6 @@ void LLViewerObject::dirtyInventory()
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo;
info->mListener = listener;
info->mInventoryData = user_data;
@@ -2656,8 +2647,6 @@ S32 LLFilenameAndTask::sCount = 0;
// static
void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
LLUUID task_id;
msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id);
LLViewerObject* object = gObjectList.findObject(task_id);
@@ -2744,8 +2733,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
void LLViewerObject::loadTaskInvFile(const std::string& filename)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
llifstream ifs(filename_and_local_path);
if(ifs.good())
@@ -2869,8 +2856,6 @@ void LLViewerObject::updateInventory(
U8 key,
bool is_new)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
// This slices the object into what we're concerned about on the
// viewer. The simulator will take the permissions and transfer
// ownership.
@@ -3879,8 +3864,6 @@ std::string LLViewerObject::getMediaURL() const
void LLViewerObject::setMediaURL(const std::string& media_url)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
if (!mMedia)
{
mMedia = new LLViewerObjectMedia;
@@ -3930,8 +3913,6 @@ BOOL LLViewerObject::setMaterial(const U8 material)
void LLViewerObject::setNumTEs(const U8 num_tes)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
U32 i;
if (num_tes != getNumTEs())
{
@@ -5380,9 +5361,9 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
mPhysicsShapeUnknown = false;
if (type != mPhysicsShapeType)
{
- mPhysicsShapeType = type;
- mCostStale = true;
-}
+ mPhysicsShapeType = type;
+ mCostStale = true;
+ }
}
void LLViewerObject::setPhysicsGravity(F32 gravity)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 1fb30db8f2..97cf0a4850 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -34,7 +34,6 @@
#include "llhudicon.h"
#include "llinventory.h"
#include "llrefcount.h"
-#include "llmemtype.h"
#include "llprimitive.h"
#include "lluuid.h"
#include "llvoinventorylistener.h"
@@ -128,7 +127,6 @@ public:
typedef const child_list_t const_child_list_t;
LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE);
- MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT);
virtual void markDead(); // Mark this object as dead, and clean up its references
BOOL isDead() const {return mDead;}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 3eeab0bf3e..fc3b7e7942 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -93,7 +93,7 @@ extern LLPipeline gPipeline;
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
-LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128);
+LLTrace::Measurement<> LLViewerObjectList::sCacheHitRate("object_cache_hits");
LLViewerObjectList::LLViewerObjectList()
{
@@ -230,7 +230,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
LLDataPacker* dpp,
BOOL just_created)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE);
LLMessageSystem* msg = gMessageSystem;
// ignore returned flags
@@ -283,7 +282,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
const EObjectUpdateType update_type,
bool cached, bool compressed)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE);
LLFastTimer t(FTM_PROCESS_OBJECTS);
LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal();
@@ -334,6 +332,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U64 region_handle;
mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle);
+
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle);
if (!regionp)
@@ -345,16 +344,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U8 compressed_dpbuffer[2048];
LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048);
LLDataPacker *cached_dpp = NULL;
-
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(regionp);
-#endif
+ LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance();
for (i = 0; i < num_objects; i++)
{
// timer is unused?
LLTimer update_timer;
BOOL justCreated = FALSE;
+ S32 msg_size = 0;
if (cached)
{
@@ -362,6 +359,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
U32 crc;
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i);
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i);
+ msg_size += sizeof(U32) * 2;
// Lookup data packer and add this id to cache miss lists if necessary.
U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@@ -377,9 +375,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
else
{
// Cache Miss.
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordCacheMissEvent(id, update_type, cache_miss_type);
- #endif
+ recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size);
continue; // no data packer, skip this object
}
@@ -422,6 +418,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
else if (update_type != OUT_FULL) // !compressed, !OUT_FULL ==> OUT_FULL_CACHED only?
{
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ msg_size += sizeof(U32);
+
getUUIDFromLocal(fullid,
local_id,
gMessageSystem->getSenderIP(),
@@ -436,6 +434,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
{
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i);
mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
+ msg_size += sizeof(LLUUID);
+ msg_size += sizeof(U32);
// llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl;
}
objectp = findObject(fullid);
@@ -481,9 +481,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type == OUT_TERSE_IMPROVED)
{
// llinfos << "terse update for an unknown object (compressed):" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
}
@@ -495,22 +493,20 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type != OUT_FULL)
{
//llinfos << "terse update for an unknown object:" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_PCode, pcode, i);
+ msg_size += sizeof(U8);
+
}
#ifdef IGNORE_DEAD
if (mDeadObjects.find(fullid) != mDeadObjects.end())
{
mNumDeadObjectUpdates++;
//llinfos << "update for a dead object:" << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
#endif
@@ -519,14 +515,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (!objectp)
{
llinfos << "createObject failure for object: " << fullid << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type);
- #endif
+ recorder.objectUpdateFailure(local_id, update_type, msg_size);
continue;
}
justCreated = TRUE;
mNumNewObjects++;
- sCacheHitRate.addValue(cached ? 100.f : 0.f);
+ sCacheHitRate.sample(cached ? 100.f : 0.f);
}
@@ -547,12 +541,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
bCached = true;
- #if LL_RECORD_VIEWER_STATS
LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
- LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp);
- #else
- objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
- #endif
+ recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size);
}
}
else if (cached) // Cache hit only?
@@ -568,16 +558,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
}
processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated);
}
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp);
- #endif
+ recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size);
objectp->setLastUpdateType(update_type);
objectp->setLastUpdateCached(bCached);
}
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->endObjectUpdateEvents();
-#endif
+ recorder.log(0.2f);
LLVOAvatar::cullAvatarsByPixelArea();
}
@@ -864,10 +850,10 @@ private:
LLSD mObjectIDs;
};
+static LLFastTimer::DeclareTimer FTM_IDLE_COPY("Idle Copy");
+
void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
-
// Update globals
LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") );
LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") );
@@ -916,10 +902,8 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
U32 idle_count = 0;
- static LLFastTimer::DeclareTimer idle_copy("Idle Copy");
-
{
- LLFastTimer t(idle_copy);
+ LLFastTimer t(FTM_IDLE_COPY);
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
active_iter != mActiveObjects.end(); active_iter++)
@@ -1045,10 +1029,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
*/
- LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size());
- LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count);
- LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
- LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
+ LLStatViewer::NUM_OBJECTS.sample(mObjects.size());
+ LLStatViewer::NUM_ACTIVE_OBJECTS.sample(idle_count);
+ LLStatViewer::NUM_SIZE_CULLED.sample(mNumSizeCulled);
+ LLStatViewer::NUM_VIS_CULLED.sample(mNumVisCulled);
}
void LLViewerObjectList::fetchObjectCosts()
@@ -1179,7 +1163,6 @@ void LLViewerObjectList::clearDebugText()
void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
{
llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;
@@ -1407,7 +1390,6 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
void LLViewerObjectList::updateActive(LLViewerObject *objectp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
if (objectp->isDead())
{
return; // We don't update dead objects!
@@ -1889,7 +1871,6 @@ void LLViewerObjectList::resetObjectBeacons()
LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
LLUUID fullid;
fullid.generate();
@@ -1910,13 +1891,9 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
}
-static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object");
-
LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp,
const LLUUID &uuid, const U32 local_id, const LLHost &sender)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
- LLFastTimer t(FTM_CREATE_OBJECT);
LLUUID fullid;
if (uuid == LLUUID::null)
@@ -1980,7 +1957,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port)
{
- LLMemType mt(LLMemType::MTYPE_OBJECT);
#ifdef ORPHAN_SPAM
llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl;
#endif
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 449a4633ff..9a36b66302 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -31,8 +31,8 @@
#include <set>
// common includes
-#include "llstat.h"
#include "llstring.h"
+#include "lltrace.h"
// project includes
#include "llviewerobject.h"
@@ -195,7 +195,7 @@ protected:
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
- static LLStat sCacheHitRate;
+ static LLTrace::Measurement<> sCacheHitRate;
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index a0cf2fc803..a1c12c5cd6 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -828,7 +828,6 @@ void LLViewerParcelOverlay::updateGL()
void LLViewerParcelOverlay::idleUpdate(bool force_update)
{
- LLMemType mt_iup(LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY);
if (gGLManager.mIsDisabled)
{
return;
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 345023dbfa..6bd9f66b9c 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -79,7 +79,6 @@ LLViewerPart::LLViewerPart() :
mVPCallback(NULL),
mImagep(NULL)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartSourcep = NULL;
++LLViewerPartSim::sParticleCount2 ;
@@ -87,7 +86,6 @@ LLViewerPart::LLViewerPart() :
LLViewerPart::~LLViewerPart()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartSourcep = NULL;
--LLViewerPartSim::sParticleCount2 ;
@@ -95,7 +93,6 @@ LLViewerPart::~LLViewerPart()
void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartID = LLViewerPart::sNextPartID;
LLViewerPart::sNextPartID++;
mFlags = 0x00f;
@@ -120,7 +117,6 @@ void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *
LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 box_side, bool hud)
: mHud(hud)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mVOPartGroupp = NULL;
mUniformParticles = TRUE;
@@ -177,7 +173,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 &center_agent, const F32 bo
LLViewerPartGroup::~LLViewerPartGroup()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
cleanup();
S32 count = (S32) mParticles.size();
@@ -192,7 +187,6 @@ LLViewerPartGroup::~LLViewerPartGroup()
void LLViewerPartGroup::cleanup()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (mVOPartGroupp)
{
if (!mVOPartGroupp->isDead())
@@ -205,7 +199,6 @@ void LLViewerPartGroup::cleanup()
BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if ((pos.mV[VX] < mMinObjPos.mV[VX])
|| (pos.mV[VY] < mMinObjPos.mV[VY])
|| (pos.mV[VZ] < mMinObjPos.mV[VZ]))
@@ -233,8 +226,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size)
BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
if (part->mFlags & LLPartData::LL_PART_HUD && !mHud)
{
return FALSE;
@@ -261,7 +252,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size)
void LLViewerPartGroup::updateParticles(const F32 lastdt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 dt;
LLVector3 gravity(0.f, 0.f, GRAVITY);
@@ -429,7 +419,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
void LLViewerPartGroup::shift(const LLVector3 &offset)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mCenterAgent += offset;
mMinObjPos += offset;
mMaxObjPos += offset;
@@ -442,8 +431,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset)
void LLViewerPartGroup::removeParticlesByID(const U32 source_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
for (S32 i = 0; i < (S32)mParticles.size(); i++)
{
if(mParticles[i]->mPartSourcep->getID() == source_id)
@@ -475,7 +462,6 @@ void LLViewerPartSim::checkParticleCount(U32 size)
LLViewerPartSim::LLViewerPartSim()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT);
static U32 id_seed = 0;
mID = ++id_seed;
@@ -484,7 +470,6 @@ LLViewerPartSim::LLViewerPartSim()
void LLViewerPartSim::destroyClass()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
S32 i;
S32 count;
@@ -500,9 +485,9 @@ void LLViewerPartSim::destroyClass()
mViewerPartSources.clear();
}
+//static
BOOL LLViewerPartSim::shouldAddPart()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount)
{
@@ -525,7 +510,6 @@ BOOL LLViewerPartSim::shouldAddPart()
void LLViewerPartSim::addPart(LLViewerPart* part)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (sParticleCount < MAX_PART_COUNT)
{
put(part);
@@ -541,7 +525,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part)
LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million
LLViewerPartGroup *return_group = NULL ;
if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite())
@@ -599,7 +582,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part)
LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
//find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses
//pos_agent
LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud);
@@ -632,8 +614,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles");
void LLViewerPartSim::updateSimulation()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
static LLFrameTimer update_timer;
const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f);
@@ -800,7 +780,6 @@ void LLViewerPartSim::updatePartBurstRate()
void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!sourcep)
{
llwarns << "Null part source!" << llendl;
@@ -817,7 +796,6 @@ void LLViewerPartSim::removeLastCreatedSource()
void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (group_list_t::iterator i = mViewerPartGroups.begin(); i != mViewerPartGroups.end(); )
{
group_list_t::iterator iter = i++;
@@ -832,7 +810,6 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp)
void LLViewerPartSim::clearParticlesByID(const U32 system_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g)
{
(*g)->removeParticlesByID(system_id);
@@ -850,7 +827,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id)
void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter)
{
if ((*iter)->getOwnerUUID() == task_id)
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index c9959c63ec..c91fcf0691 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -142,7 +142,7 @@ public:
void cleanupRegion(LLViewerRegion *regionp);
- BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
+ static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping)
F32 maxRate() // Return maximum particle generation rate
{
if (sParticleCount >= MAX_PART_COUNT)
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 4af92e79ff..b311f659fb 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -90,7 +90,6 @@ void LLViewerPartSource::setStart()
LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) :
LLViewerPartSource(LL_PART_SOURCE_SCRIPT)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
llassert(source_objp);
mSourceObjectp = source_objp;
mPosAgent = mSourceObjectp->getPositionAgent();
@@ -102,7 +101,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
void LLViewerPartSourceScript::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
@@ -113,7 +111,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
if( mIsSuspended )
return;
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 old_update_time = mLastUpdateTime;
mLastUpdateTime += dt;
@@ -394,7 +391,6 @@ void LLViewerPartSourceScript::update(const F32 dt)
// static
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
if (LLPartSysData::isNullPS(block_num))
@@ -436,7 +432,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
@@ -470,8 +465,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer
/* static */
LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
-
LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
new_pssp->mPartSysData = particle_parameters;
@@ -487,13 +480,11 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer
void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mImagep = imagep;
}
void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mTargetObjectp = objp;
}
@@ -509,7 +500,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) :
void LLViewerPartSourceSpiral::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
}
@@ -517,7 +507,6 @@ void LLViewerPartSourceSpiral::setDead()
void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLVector3 center_pos;
@@ -542,7 +531,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceSpiral::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
@@ -588,7 +576,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
@@ -612,7 +599,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam()
void LLViewerPartSourceBeam::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
mTargetObjectp = NULL;
@@ -626,7 +612,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color)
void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep;
@@ -671,7 +656,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceBeam::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
const F32 RATE = 0.025f;
mLastUpdateTime += dt;
@@ -743,13 +727,11 @@ void LLViewerPartSourceBeam::update(const F32 dt)
void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mTargetObjectp = objp;
}
@@ -764,7 +746,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) :
void LLViewerPartSourceChat::setDead()
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mIsDead = TRUE;
mSourceObjectp = NULL;
}
@@ -772,7 +753,6 @@ void LLViewerPartSourceChat::setDead()
void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
F32 frac = part.mLastUpdateTime/part.mMaxAge;
LLVector3 center_pos;
@@ -797,7 +777,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt)
void LLViewerPartSourceChat::update(const F32 dt)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
@@ -853,7 +832,6 @@ void LLViewerPartSourceChat::update(const F32 dt)
void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp)
{
- LLMemType mt(LLMemType::MTYPE_PARTICLES);
mSourceObjectp = objp;
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 6c8a827ba3..0316f79973 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -59,8 +59,6 @@
#include "indra_constants.h"
#include "llinitparam.h"
-//#include "linden_common.h"
-//#include "llpreprocessor.h"
#include "llallocator.h"
#include "llapp.h"
#include "llcriticaldamp.h"
@@ -77,10 +75,8 @@
#include "llprocessor.h"
#include "llrefcount.h"
#include "llsafehandle.h"
-//#include "llsecondlifeurls.h"
#include "llsd.h"
#include "llsingleton.h"
-#include "llstat.h"
#include "llstl.h"
#include "llstrider.h"
#include "llstring.h"
@@ -88,11 +84,8 @@
#include "llthread.h"
#include "lltimer.h"
#include "lluuidhashmap.h"
-//#include "processor.h"
#include "stdenums.h"
#include "stdtypes.h"
-//#include "string_table.h"
-//#include "timer.h"
#include "timing.h"
#include "u64.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index b607afbd9d..7e81e9714f 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -290,7 +290,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheLoaded(FALSE),
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
- mCapabilitiesReceived(false)
+ mCapabilitiesReceived(false),
+ mBitsReceived(0.f),
+ mPacketsReceived(0.f)
{
mWidth = region_width_meters;
mImpl->mOriginGlobal = from_region_handle(handle);
@@ -719,7 +721,6 @@ void LLViewerRegion::dirtyHeights()
BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
{
- LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION);
// did_update returns TRUE if we did at least one significant update
BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time);
@@ -909,9 +910,8 @@ void LLViewerRegion::updateNetStats()
mPacketsLost = cdp->getPacketsLost();
mPingDelay = cdp->getPingDelay();
- mBitStat.addValue(mBitsIn - mLastBitsIn);
- mPacketsStat.addValue(mPacketsIn - mLastPacketsIn);
- mPacketsLostStat.addValue(mPacketsLost);
+ mBitsReceived += mBitsIn - mLastBitsIn;
+ mPacketsReceived += mPacketsIn - mLastPacketsIn;
}
@@ -1342,11 +1342,8 @@ void LLViewerRegion::requestCacheMisses()
mCacheDirty = TRUE ;
// llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl;
- #if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(this);
- LLViewerStatsRecorder::instance()->recordRequestCacheMissesEvent(full_count + crc_count);
- LLViewerStatsRecorder::instance()->endObjectUpdateEvents();
- #endif
+ LLViewerStatsRecorder::instance().requestCacheMissesEvent(full_count + crc_count);
+ LLViewerStatsRecorder::instance().log(0.2f);
}
void LLViewerRegion::dumpCache()
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index c9fffaf30e..756c0dc61f 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -34,7 +34,6 @@
#include "lldarray.h"
#include "llwind.h"
-#include "llstat.h"
#include "v3dmath.h"
#include "llstring.h"
#include "llregionflags.h"
@@ -351,9 +350,8 @@ public:
LLWind mWind;
LLViewerParcelOverlay *mParcelOverlay;
- LLStat mBitStat;
- LLStat mPacketsStat;
- LLStat mPacketsLostStat;
+ F32 mBitsReceived;
+ F32 mPacketsReceived;
LLMatrix4 mRenderMatrix;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 603634e5f3..077c9f43a4 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -61,589 +61,312 @@
#include "llviewernetwork.h"
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
-
-class StatAttributes
+namespace LLStatViewer
{
-public:
- StatAttributes(const char* name,
- const BOOL enabled,
- const BOOL is_timer)
- : mName(name),
- mEnabled(enabled),
- mIsTimer(is_timer)
- {
- }
+
+LLTrace::Count<> FPS("fpsstat"),
+ PACKETS_IN("packetsinstat"),
+ PACKETS_LOST("packetsloststat"),
+ PACKETS_OUT("packetsoutstat"),
+ TEXTURE_PACKETS("texturepacketsstat"),
+ TRIANGLES_DRAWN("trianglesdrawnstat"),
+ CHAT_COUNT("chatcount", "Chat messages sent"),
+ IM_COUNT("imcount", "IMs sent"),
+ OBJECT_CREATE("objectcreate"),
+ OBJECT_REZ("objectrez", "Object rez count"),
+ LOADING_WEARABLES_LONG_DELAY("loadingwearableslongdelay", "Wearables took too long to load"),
+ LOGIN_TIMEOUTS("logintimeouts", "Number of login attempts that timed out"),
+ LSL_SAVES("lslsaves", "Number of times user has saved a script"),
+ ANIMATION_UPLOADS("animationuploads", "Animations uploaded"),
+ FLY("fly", "Fly count"),
+ TELEPORT("teleport", "Teleport count"),
+ DELETE_OBJECT("deleteobject", "Objects deleted"),
+ SNAPSHOT("snapshot", "Snapshots taken"),
+ UPLOAD_SOUND("uploadsound", "Sounds uploaded"),
+ UPLOAD_TEXTURE("uploadtexture", "Textures uploaded"),
+ EDIT_TEXTURE("edittexture", "Changes to textures on objects"),
+ KILLED("killed", "Number of times killed"),
+ FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"),
+ TEX_BAKES("texbakes"),
+ TEX_REBAKES("texrebakes");
+LLTrace::Count<LLTrace::Kilobits> KBIT("kbitstat"),
+ LAYERS_KBIT("layerskbitstat"),
+ OBJECT_KBIT("objectkbitstat"),
+ ASSET_KBIT("assetkbitstat"),
+ TEXTURE_KBIT("texturekbitstat"),
+ ACTUAL_IN_KBIT("actualinkbitstat"),
+ ACTUAL_OUT_KBIT("actualoutkbitstat");
+
+LLTrace::Count<LLTrace::Seconds> AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearence"),
+ TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"),
+ MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"),
+ FPS_10_TIME("fps10time", "Seconds below 10 FPS"),
+ FPS_8_TIME("fps8time", "Seconds below 8 FPS"),
+ FPS_2_TIME("fps2time", "Seconds below 2 FPS"),
+ SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"),
+ SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"),
+ LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%");
+
+SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "", LL_SIM_STAT_TIME_DILATION),
+ SIM_FPS("simfps", "", LL_SIM_STAT_FPS),
+ SIM_PHYSICS_FPS("simphysicsfps", "", LL_SIM_STAT_PHYSFPS),
+ SIM_AGENT_UPS("simagentups", "", LL_SIM_STAT_AGENTUPS),
+ SIM_SCRIPT_EPS("simscripteps", "", LL_SIM_STAT_SCRIPT_EPS),
+ SIM_SKIPPED_SILHOUETTE("simsimskippedsilhouettesteps", "", LL_SIM_STAT_SKIPPEDAISILSTEPS_PS),
+ SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS),
+ SIM_MAIN_AGENTS("simmainagents", "", LL_SIM_STAT_NUMAGENTMAIN),
+ SIM_CHILD_AGENTS("simchildagents", "", LL_SIM_STAT_NUMAGENTCHILD),
+ SIM_OBJECTS("simobjects", "", LL_SIM_STAT_NUMTASKS),
+ SIM_ACTIVE_OBJECTS("simactiveobjects", "", LL_SIM_STAT_NUMTASKSACTIVE),
+ SIM_ACTIVE_SCRIPTS("simactivescripts", "", LL_SIM_STAT_NUMSCRIPTSACTIVE),
+ SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN),
+ SIM_IN_PACKETS_PER_SEC("siminpps", "", LL_SIM_STAT_INPPS),
+ SIM_OUT_PACKETS_PER_SEC("simoutpps", "", LL_SIM_STAT_OUTPPS),
+ SIM_PENDING_DOWNLOADS("simpendingdownloads", "", LL_SIM_STAT_PENDING_DOWNLOADS),
+ SIM_PENDING_UPLOADS("simpendinguploads", "", LL_SIM_STAT_PENDING_UPLOADS),
+ SIM_PENDING_LOCAL_UPLOADS("simpendinglocaluploads", "", LL_SIM_STAT_PENDING_LOCAL_UPLOADS),
+ SIM_PHYSICS_PINNED_TASKS("physicspinnedtasks", "", LL_SIM_STAT_PHYSICS_PINNED_TASKS),
+ SIM_PHYSICS_LOD_TASKS("physicslodtasks", "", LL_SIM_STAT_PHYSICS_LOD_TASKS);
+
+LLTrace::Measurement<> FPS_SAMPLE("fpssample"),
+ NUM_IMAGES("numimagesstat"),
+ NUM_RAW_IMAGES("numrawimagesstat"),
+ NUM_OBJECTS("numobjectsstat"),
+ NUM_ACTIVE_OBJECTS("numactiveobjectsstat"),
+ NUM_NEW_OBJECTS("numnewobjectsstat"),
+ NUM_SIZE_CULLED("numsizeculledstat"),
+ NUM_VIS_CULLED("numvisculledstat"),
+ ENABLE_VBO("enablevbo", "Vertex Buffers Enabled"),
+ LIGHTING_DETAIL("lightingdetail", "Lighting Detail"),
+ VISIBLE_AVATARS("visibleavatars", "Visible Avatars"),
+ SHADER_OBJECTS("shaderobjects", "Object Shaders"),
+ DRAW_DISTANCE("drawdistance", "Draw Distance"),
+ CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"),
+ PENDING_VFS_OPERATIONS("vfspendingoperations"),
+ PACKETS_LOST_PERCENT("packetslostpercentstat"),
+ WINDOW_WIDTH("windowwidth", "Window width"),
+ WINDOW_HEIGHT("windowheight", "Window height");
- std::string mName;
- BOOL mEnabled;
- BOOL mIsTimer;
-};
+LLTrace::Measurement<LLTrace::Meters> AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections");
-const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
-{
- // ST_VERSION
- StatAttributes("Version", TRUE, FALSE),
- // ST_AVATAR_EDIT_SECONDS
- StatAttributes("Seconds in Edit Appearence", FALSE, TRUE),
- // ST_TOOLBOX_SECONDS
- StatAttributes("Seconds using Toolbox", FALSE, TRUE),
- // ST_CHAT_COUNT
- StatAttributes("Chat messages sent", FALSE, FALSE),
- // ST_IM_COUNT
- StatAttributes("IMs sent", FALSE, FALSE),
- // ST_FULLSCREEN_BOOL
- StatAttributes("Fullscreen mode", FALSE, FALSE),
- // ST_RELEASE_COUNT
- StatAttributes("Object release count", FALSE, FALSE),
- // ST_CREATE_COUNT
- StatAttributes("Object create count", FALSE, FALSE),
- // ST_REZ_COUNT
- StatAttributes("Object rez count", FALSE, FALSE),
- // ST_FPS_10_SECONDS
- StatAttributes("Seconds below 10 FPS", FALSE, TRUE),
- // ST_FPS_2_SECONDS
- StatAttributes("Seconds below 2 FPS", FALSE, TRUE),
- // ST_MOUSELOOK_SECONDS
- StatAttributes("Seconds in Mouselook", FALSE, TRUE),
- // ST_FLY_COUNT
- StatAttributes("Fly count", FALSE, FALSE),
- // ST_TELEPORT_COUNT
- StatAttributes("Teleport count", FALSE, FALSE),
- // ST_OBJECT_DELETE_COUNT
- StatAttributes("Objects deleted", FALSE, FALSE),
- // ST_SNAPSHOT_COUNT
- StatAttributes("Snapshots taken", FALSE, FALSE),
- // ST_UPLOAD_SOUND_COUNT
- StatAttributes("Sounds uploaded", FALSE, FALSE),
- // ST_UPLOAD_TEXTURE_COUNT
- StatAttributes("Textures uploaded", FALSE, FALSE),
- // ST_EDIT_TEXTURE_COUNT
- StatAttributes("Changes to textures on objects", FALSE, FALSE),
- // ST_KILLED_COUNT
- StatAttributes("Number of times killed", FALSE, FALSE),
- // ST_FRAMETIME_JITTER
- StatAttributes("Average delta between sucessive frame times", FALSE, FALSE),
- // ST_FRAMETIME_SLEW
- StatAttributes("Average delta between frame time and mean", FALSE, FALSE),
- // ST_INVENTORY_TOO_LONG
- StatAttributes("Inventory took too long to load", FALSE, FALSE),
- // ST_WEARABLES_TOO_LONG
- StatAttributes("Wearables took too long to load", FALSE, FALSE),
- // ST_LOGIN_SECONDS
- StatAttributes("Time between LoginRequest and LoginReply", FALSE, FALSE),
- // ST_LOGIN_TIMEOUT_COUNT
- StatAttributes("Number of login attempts that timed out", FALSE, FALSE),
- // ST_HAS_BAD_TIMER
- StatAttributes("Known bad timer if != 0.0", FALSE, FALSE),
- // ST_DOWNLOAD_FAILED
- StatAttributes("Number of times LLAssetStorage::getAssetData() has failed", FALSE, FALSE),
- // ST_LSL_SAVE_COUNT
- StatAttributes("Number of times user has saved a script", FALSE, FALSE),
- // ST_UPLOAD_ANIM_COUNT
- StatAttributes("Animations uploaded", FALSE, FALSE),
- // ST_FPS_8_SECONDS
- StatAttributes("Seconds below 8 FPS", FALSE, TRUE),
- // ST_SIM_FPS_20_SECONDS
- StatAttributes("Seconds with sim FPS below 20", FALSE, TRUE),
- // ST_PHYS_FPS_20_SECONDS
- StatAttributes("Seconds with physics FPS below 20", FALSE, TRUE),
- // ST_LOSS_05_SECONDS
- StatAttributes("Seconds with packet loss > 5%", FALSE, TRUE),
- // ST_FPS_DROP_50_RATIO
- StatAttributes("Ratio of frames 2x longer than previous", FALSE, FALSE),
- // ST_ENABLE_VBO
- StatAttributes("Vertex Buffers Enabled", TRUE, FALSE),
- // ST_DELTA_BANDWIDTH
- StatAttributes("Increase/Decrease in bandwidth based on packet loss", FALSE, FALSE),
- // ST_MAX_BANDWIDTH
- StatAttributes("Max bandwidth setting", FALSE, FALSE),
- // ST_LIGHTING_DETAIL
- StatAttributes("Lighting Detail", FALSE, FALSE),
- // ST_VISIBLE_AVATARS
- StatAttributes("Visible Avatars", FALSE, FALSE),
- // ST_SHADER_OJECTS
- StatAttributes("Object Shaders", FALSE, FALSE),
- // ST_SHADER_ENVIRONMENT
- StatAttributes("Environment Shaders", FALSE, FALSE),
- // ST_VISIBLE_DRAW_DIST
- StatAttributes("Draw Distance", FALSE, FALSE),
- // ST_VISIBLE_CHAT_BUBBLES
- StatAttributes("Chat Bubbles Enabled", FALSE, FALSE),
- // ST_SHADER_AVATAR
- StatAttributes("Avatar Shaders", FALSE, FALSE),
- // ST_FRAME_SECS
- StatAttributes("FRAME_SECS", FALSE, FALSE),
- // ST_UPDATE_SECS
- StatAttributes("UPDATE_SECS", FALSE, FALSE),
- // ST_NETWORK_SECS
- StatAttributes("NETWORK_SECS", FALSE, FALSE),
- // ST_IMAGE_SECS
- StatAttributes("IMAGE_SECS", FALSE, FALSE),
- // ST_REBUILD_SECS
- StatAttributes("REBUILD_SECS", FALSE, FALSE),
- // ST_RENDER_SECS
- StatAttributes("RENDER_SECS", FALSE, FALSE),
- // ST_CROSSING_AVG
- StatAttributes("CROSSING_AVG", FALSE, FALSE),
- // ST_CROSSING_MAX
- StatAttributes("CROSSING_MAX", FALSE, FALSE),
- // ST_LIBXUL_WIDGET_USED
- StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused
- // ST_WINDOW_WIDTH
- StatAttributes("Window width", FALSE, FALSE),
- // ST_WINDOW_HEIGHT
- StatAttributes("Window height", FALSE, FALSE),
- // ST_TEX_BAKES
- StatAttributes("Texture Bakes", FALSE, FALSE),
- // ST_TEX_REBAKES
- StatAttributes("Texture Rebakes", FALSE, FALSE)
-};
+LLTrace::Measurement<LLTrace::Bytes> GL_TEX_MEM("gltexmemstat"),
+ GL_BOUND_MEM("glboundmemstat"),
+ RAW_MEM("rawmemstat"),
+ FORMATTED_MEM("formattedmemstat"),
+ DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"),
+ MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting");
-LLViewerStats::LLViewerStats() :
- mKBitStat("kbitstat"),
- mLayersKBitStat("layerskbitstat"),
- mObjectKBitStat("objectkbitstat"),
- mAssetKBitStat("assetkbitstat"),
- mTextureKBitStat("texturekbitstat"),
- mVFSPendingOperations("vfspendingoperations"),
- mObjectsDrawnStat("objectsdrawnstat"),
- mObjectsCulledStat("objectsculledstat"),
- mObjectsTestedStat("objectstestedstat"),
- mObjectsComparedStat("objectscomparedstat"),
- mObjectsOccludedStat("objectsoccludedstat"),
- mFPSStat("fpsstat"),
- mPacketsInStat("packetsinstat"),
- mPacketsLostStat("packetsloststat"),
- mPacketsOutStat("packetsoutstat"),
- mPacketsLostPercentStat("packetslostpercentstat", 64),
- mTexturePacketsStat("texturepacketsstat"),
- mActualInKBitStat("actualinkbitstat"),
- mActualOutKBitStat("actualoutkbitstat"),
- mTrianglesDrawnStat("trianglesdrawnstat"),
- mSimTimeDilation("simtimedilation"),
- mSimFPS("simfps"),
- mSimPhysicsFPS("simphysicsfps"),
- mSimAgentUPS("simagentups"),
- mSimScriptEPS("simscripteps"),
- mSimFrameMsec("simframemsec"),
- mSimNetMsec("simnetmsec"),
- mSimSimOtherMsec("simsimothermsec"),
- mSimSimPhysicsMsec("simsimphysicsmsec"),
- mSimSimPhysicsStepMsec("simsimphysicsstepmsec"),
- mSimSimPhysicsShapeUpdateMsec("simsimphysicsshapeupdatemsec"),
- mSimSimPhysicsOtherMsec("simsimphysicsothermsec"),
- mSimSimAIStepMsec("simsimaistepmsec"),
- mSimSimSkippedSilhouetteSteps("simsimskippedsilhouettesteps"),
- mSimSimPctSteppedCharacters("simsimpctsteppedcharacters"),
- mSimAgentMsec("simagentmsec"),
- mSimImagesMsec("simimagesmsec"),
- mSimScriptMsec("simscriptmsec"),
- mSimSpareMsec("simsparemsec"),
- mSimSleepMsec("simsleepmsec"),
- mSimPumpIOMsec("simpumpiomsec"),
- mSimMainAgents("simmainagents"),
- mSimChildAgents("simchildagents"),
- mSimObjects("simobjects"),
- mSimActiveObjects("simactiveobjects"),
- mSimActiveScripts("simactivescripts"),
- mSimPctScriptsRun("simpctscriptsrun"),
- mSimInPPS("siminpps"),
- mSimOutPPS("simoutpps"),
- mSimPendingDownloads("simpendingdownloads"),
- mSimPendingUploads("simpendinguploads"),
- mSimPendingLocalUploads("simpendinglocaluploads"),
- mSimTotalUnackedBytes("simtotalunackedbytes"),
- mPhysicsPinnedTasks("physicspinnedtasks"),
- mPhysicsLODTasks("physicslodtasks"),
- mPhysicsMemoryAllocated("physicsmemoryallocated"),
- mSimPingStat("simpingstat"),
- mNumImagesStat("numimagesstat", 32, TRUE),
- mNumRawImagesStat("numrawimagesstat", 32, TRUE),
- mGLTexMemStat("gltexmemstat", 32, TRUE),
- mGLBoundMemStat("glboundmemstat", 32, TRUE),
- mRawMemStat("rawmemstat", 32, TRUE),
- mFormattedMemStat("formattedmemstat", 32, TRUE),
- mNumObjectsStat("numobjectsstat"),
- mNumActiveObjectsStat("numactiveobjectsstat"),
- mNumNewObjectsStat("numnewobjectsstat"),
- mNumSizeCulledStat("numsizeculledstat"),
- mNumVisCulledStat("numvisculledstat"),
- mLastTimeDiff(0.0)
-{
- for (S32 i = 0; i < ST_COUNT; i++)
- {
- mStats[i] = 0.0;
- }
- if (LLTimer::knownBadTimer())
- {
- mStats[ST_HAS_BAD_TIMER] = 1.0;
- }
+SimMeasurement<LLTrace::Milliseconds> SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS),
+ SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS),
+ SIM_OTHER_TIME("simsimothermsec", "", LL_SIM_STAT_SIMOTHERMS),
+ SIM_PHYSICS_TIME("simsimphysicsmsec", "", LL_SIM_STAT_SIMPHYSICSMS),
+ SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec", "", LL_SIM_STAT_SIMPHYSICSSTEPMS),
+ SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec", "", LL_SIM_STAT_SIMPHYSICSSHAPEMS),
+ SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec", "", LL_SIM_STAT_SIMPHYSICSOTHERMS),
+ SIM_AI_TIME("simsimaistepmsec", "", LL_SIM_STAT_SIMAISTEPTIMEMS),
+ SIM_AGENTS_TIME("simagentmsec", "", LL_SIM_STAT_AGENTMS),
+ SIM_IMAGES_TIME("simimagesmsec", "", LL_SIM_STAT_IMAGESMS),
+ SIM_SCRIPTS_TIME("simscriptmsec", "", LL_SIM_STAT_SCRIPTMS),
+ SIM_SPARE_TIME("simsparemsec", "", LL_SIM_STAT_SIMSPARETIME),
+ SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME),
+ SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME);
- mAgentPositionSnaps.reset();
-}
-
-LLViewerStats::~LLViewerStats()
-{
-}
-
-void LLViewerStats::resetStats()
-{
- LLViewerStats::getInstance()->mKBitStat.reset();
- LLViewerStats::getInstance()->mLayersKBitStat.reset();
- LLViewerStats::getInstance()->mObjectKBitStat.reset();
- LLViewerStats::getInstance()->mTextureKBitStat.reset();
- LLViewerStats::getInstance()->mVFSPendingOperations.reset();
- LLViewerStats::getInstance()->mAssetKBitStat.reset();
- LLViewerStats::getInstance()->mPacketsInStat.reset();
- LLViewerStats::getInstance()->mPacketsLostStat.reset();
- LLViewerStats::getInstance()->mPacketsOutStat.reset();
- LLViewerStats::getInstance()->mFPSStat.reset();
- LLViewerStats::getInstance()->mTexturePacketsStat.reset();
+SimMeasurement<LLTrace::Bytes> SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES),
+ SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY);
+
+
+LLTrace::Measurement<LLTrace::Milliseconds> FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"),
+ FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
+ LOGIN_SECONDS("loginseconds", "Time between LoginRequest and LoginReply"),
+ REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"),
+ FRAME_STACKTIME("framestacktime", "FRAME_SECS"),
+ UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"),
+ NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"),
+ IMAGE_STACKTIME("imagestacktime", "IMAGE_SECS"),
+ REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"),
+ RENDER_STACKTIME("renderstacktime", "RENDER_SECS"),
+ SIM_PING("simpingstat");
- LLViewerStats::getInstance()->mAgentPositionSnaps.reset();
}
-
-F64 LLViewerStats::getStat(EStatType type) const
+LLViewerStats::LLViewerStats()
+: mLastTimeDiff(0.0)
{
- return mStats[type];
+ mRecording.start();
+ LLTrace::get_frame_recording().start();
}
-F64 LLViewerStats::setStat(EStatType type, F64 value)
+LLViewerStats::~LLViewerStats()
{
- mStats[type] = value;
- return mStats[type];
}
-F64 LLViewerStats::incStat(EStatType type, F64 value)
+void LLViewerStats::resetStats()
{
- mStats[type] += value;
- return mStats[type];
+ LLViewerStats::instance().mRecording.reset();
}
void LLViewerStats::updateFrameStats(const F64 time_diff)
{
- if (mPacketsLostPercentStat.getCurrent() > 5.0)
+ LLTrace::Seconds time_diff_seconds(time_diff);
+ if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0)
{
- incStat(LLViewerStats::ST_LOSS_05_SECONDS, time_diff);
+ LLStatViewer::LOSS_5_PERCENT_TIME.add(time_diff_seconds);
}
- if (mSimFPS.getCurrent() < 20.f && mSimFPS.getCurrent() > 0.f)
+ F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS);
+ if (0.f < sim_fps && sim_fps < 20.f)
{
- incStat(LLViewerStats::ST_SIM_FPS_20_SECONDS, time_diff);
+ LLStatViewer::SIM_20_FPS_TIME.add(time_diff_seconds);
}
- if (mSimPhysicsFPS.getCurrent() < 20.f && mSimPhysicsFPS.getCurrent() > 0.f)
+ F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
+
+ if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
{
- incStat(LLViewerStats::ST_PHYS_FPS_20_SECONDS, time_diff);
+ LLStatViewer::SIM_PHYSICS_20_FPS_TIME.add(time_diff_seconds);
}
if (time_diff >= 0.5)
{
- incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff);
+ LLStatViewer::FPS_2_TIME.add(time_diff_seconds);
}
if (time_diff >= 0.125)
{
- incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff);
+ LLStatViewer::FPS_8_TIME.add(time_diff_seconds);
}
if (time_diff >= 0.1)
{
- incStat(LLViewerStats::ST_FPS_10_SECONDS, time_diff);
+ LLStatViewer::FPS_10_TIME.add(time_diff_seconds);
}
if (gFrameCount && mLastTimeDiff > 0.0)
{
// new "stutter" meter
- setStat(LLViewerStats::ST_FPS_DROP_50_RATIO,
- (getStat(LLViewerStats::ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) +
- (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount);
-
+ LLStatViewer::FRAMETIME_DOUBLED.add(time_diff >= 2.0 * mLastTimeDiff ? 1 : 0);
// old stats that were never really used
- setStat(LLViewerStats::ST_FRAMETIME_JITTER,
- (getStat(LLViewerStats::ST_FRAMETIME_JITTER) * (gFrameCount - 1) +
- fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount);
+ LLStatViewer::FRAMETIME_JITTER.sample<LLTrace::Milliseconds>(mLastTimeDiff - time_diff);
F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
- setStat(LLViewerStats::ST_FRAMETIME_SLEW,
- (getStat(LLViewerStats::ST_FRAMETIME_SLEW) * (gFrameCount - 1) +
- fabs(average_frametime - time_diff) / average_frametime) / gFrameCount);
+ LLStatViewer::FRAMETIME_SLEW.sample<LLTrace::Milliseconds>(average_frametime - time_diff);
F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth;
- setStat(LLViewerStats::ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f);
-
- setStat(LLViewerStats::ST_MAX_BANDWIDTH, max_bandwidth / 1024.f);
-
+ LLStatViewer::DELTA_BANDWIDTH.sample<LLTrace::Bits>(delta_bandwidth);
+ LLStatViewer::MAX_BANDWIDTH.sample<LLTrace::Bits>(max_bandwidth);
}
mLastTimeDiff = time_diff;
-
}
void LLViewerStats::addToMessage(LLSD &body) const
{
LLSD &misc = body["misc"];
- for (S32 i = 0; i < ST_COUNT; i++)
- {
- if (STAT_INFO[i].mEnabled)
- {
- // TODO: send timer value so dataserver can normalize
- misc[STAT_INFO[i].mName] = mStats[i];
- llinfos << "STAT: " << STAT_INFO[i].mName << ": " << mStats[i]
- << llendl;
- }
- }
+ misc["Version"] = TRUE;
+ //TODO RN: get last value, not mean
+ misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO);
- body["AgentPositionSnaps"] = mAgentPositionSnaps.getData();
- llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev()
- << "; Count = " << mAgentPositionSnaps.getCount() << llendl;
+ body["AgentPositionSnaps"] = getRecording().getSum(LLStatViewer::AGENT_POSITION_SNAP).value(); //mAgentPositionSnaps.asLLSD();
+ llinfos << "STAT: AgentPositionSnaps: Mean = " << getRecording().getMean(LLStatViewer::AGENT_POSITION_SNAP).value() << "; StdDev = " << getRecording().getStandardDeviation(LLStatViewer::AGENT_POSITION_SNAP).value()
+ << "; Count = " << getRecording().getSampleCount(LLStatViewer::AGENT_POSITION_SNAP) << llendl;
}
-// static
-// const std::string LLViewerStats::statTypeToText(EStatType type)
-// {
-// if (type >= 0 && type < ST_COUNT)
-// {
-// return STAT_INFO[type].mName;
-// }
-// else
-// {
-// return "Unknown statistic";
-// }
-// }
-
// *NOTE:Mani The following methods used to exist in viewer.cpp
// Moving them here, but not merging them into LLViewerStats yet.
-void reset_statistics()
-{
- if (LLSurface::sTextureUpdateTime)
- {
- LLSurface::sTexelsUpdated = 0;
- LLSurface::sTextureUpdateTime = 0.f;
- }
-}
-
-
-void output_statistics(void*)
-{
- llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl;
- llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl;
- llinfos << "Num images: " << gTextureList.getNumImages() << llendl;
- llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl;
- llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl;
- llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl;
- llinfos << "Formatted usage: " << LLImageFormatted::sGlobalFormattedMemory << llendl;
- llinfos << "Zombie Viewer Objects: " << LLViewerObject::getNumZombieObjects() << llendl;
- llinfos << "Number of lights: " << gPipeline.getLightCount() << llendl;
-
- llinfos << "Memory Usage:" << llendl;
- llinfos << "--------------------------------" << llendl;
- llinfos << "Pipeline:" << llendl;
- llinfos << llendl;
-
-#if LL_SMARTHEAP
- llinfos << "--------------------------------" << llendl;
- {
- llinfos << "sizeof(LLVOVolume) = " << sizeof(LLVOVolume) << llendl;
-
- U32 total_pool_size = 0;
- U32 total_used_size = 0;
- MEM_POOL_INFO pool_info;
- MEM_POOL_STATUS pool_status;
- U32 pool_num = 0;
- for(pool_status = MemPoolFirst( &pool_info, 1 );
- pool_status != MEM_POOL_END;
- pool_status = MemPoolNext( &pool_info, 1 ) )
- {
- llinfos << "Pool #" << pool_num << llendl;
- if( MEM_POOL_OK != pool_status )
- {
- llwarns << "Pool not ok" << llendl;
- continue;
- }
-
- llinfos << "Pool blockSizeFS " << pool_info.blockSizeFS
- << " pageSize " << pool_info.pageSize
- << llendl;
-
- U32 pool_count = MemPoolCount(pool_info.pool);
- llinfos << "Blocks " << pool_count << llendl;
-
- U32 pool_size = MemPoolSize( pool_info.pool );
- if( pool_size == MEM_ERROR_RET )
- {
- llinfos << "MemPoolSize() failed (" << pool_num << ")" << llendl;
- }
- else
- {
- llinfos << "MemPool Size " << pool_size / 1024 << "K" << llendl;
- }
-
- total_pool_size += pool_size;
-
- if( !MemPoolLock( pool_info.pool ) )
- {
- llinfos << "MemPoolLock failed (" << pool_num << ") " << llendl;
- continue;
- }
-
- U32 used_size = 0;
- MEM_POOL_ENTRY entry;
- entry.entry = NULL;
- while( MemPoolWalk( pool_info.pool, &entry ) == MEM_POOL_OK )
- {
- if( entry.isInUse )
- {
- used_size += entry.size;
- }
- }
-
- MemPoolUnlock( pool_info.pool );
-
- llinfos << "MemPool Used " << used_size/1024 << "K" << llendl;
- total_used_size += used_size;
- pool_num++;
- }
-
- llinfos << "Total Pool Size " << total_pool_size/1024 << "K" << llendl;
- llinfos << "Total Used Size " << total_used_size/1024 << "K" << llendl;
-
- }
-#endif
-
- llinfos << "--------------------------------" << llendl;
- llinfos << "Avatar Memory (partly overlaps with above stats):" << llendl;
- LLTexLayerStaticImageList::getInstance()->dumpByteCount();
- LLVOAvatarSelf::dumpScratchTextureByteCount();
- LLTexLayerSetBuffer::dumpTotalByteCount();
- LLVOAvatarSelf::dumpTotalLocalTextureByteCount();
- LLTexLayerParamAlpha::dumpCacheByteCount();
- LLVOAvatar::dumpBakedStatus();
-
- llinfos << llendl;
-
- llinfos << "Object counts:" << llendl;
- S32 i;
- S32 obj_counts[256];
-// S32 app_angles[256];
- for (i = 0; i < 256; i++)
- {
- obj_counts[i] = 0;
- }
- for (i = 0; i < gObjectList.getNumObjects(); i++)
- {
- LLViewerObject *objectp = gObjectList.getObject(i);
- if (objectp)
- {
- obj_counts[objectp->getPCode()]++;
- }
- }
- for (i = 0; i < 256; i++)
- {
- if (obj_counts[i])
- {
- llinfos << LLPrimitive::pCodeToString(i) << ":" << obj_counts[i] << llendl;
- }
- }
-}
-
-
-U32 gTotalLandIn = 0, gTotalLandOut = 0;
-U32 gTotalWaterIn = 0, gTotalWaterOut = 0;
-
-F32 gAveLandCompression = 0.f, gAveWaterCompression = 0.f;
-F32 gBestLandCompression = 1.f, gBestWaterCompression = 1.f;
-F32 gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f;
-
-
-
-U32 gTotalWorldBytes = 0, gTotalObjectBytes = 0, gTotalTextureBytes = 0, gSimPingCount = 0;
-U32 gObjectBits = 0;
+U32 gTotalLandIn = 0,
+ gTotalLandOut = 0,
+ gTotalWaterIn = 0,
+ gTotalWaterOut = 0;
+
+F32 gAveLandCompression = 0.f,
+ gAveWaterCompression = 0.f,
+ gBestLandCompression = 1.f,
+ gBestWaterCompression = 1.f,
+ gWorstLandCompression = 0.f,
+ gWorstWaterCompression = 0.f;
+
+LLUnit<LLUnits::Bytes, U32> gTotalWorldData = 0,
+ gTotalObjectData = 0,
+ gTotalTextureData = 0;
+U32 gSimPingCount = 0;
+LLUnit<LLUnits::Bits, U32> gObjectData = 0;
F32 gAvgSimPing = 0.f;
-U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0};
+LLUnit<LLUnits::Bytes, U32> gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0};
extern U32 gVisCompared;
extern U32 gVisTested;
-std::map<S32,LLFrameTimer> gDebugTimers;
-std::map<S32,std::string> gDebugTimerLabel;
-
-void init_statistics()
-{
- // Label debug timers
- gDebugTimerLabel[0] = "Texture";
-}
+LLFrameTimer gTextureTimer;
-void update_statistics(U32 frame_count)
+void update_statistics()
{
- gTotalWorldBytes += gVLManager.getTotalBytes();
- gTotalObjectBytes += gObjectBits / 8;
+ gTotalWorldData += gVLManager.getTotalBytes();
+ gTotalObjectData += gObjectData;
// make sure we have a valid time delta for this frame
if (gFrameIntervalSeconds > 0.f)
{
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_MOUSELOOK_SECONDS, gFrameIntervalSeconds);
+ LLStatViewer::MOUSELOOK_TIME.add(gFrameIntervalSeconds);
}
else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds);
+ LLStatViewer::AVATAR_EDIT_TIME.add(gFrameIntervalSeconds);
}
else if (LLFloaterReg::instanceVisible("build"))
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds);
+ LLStatViewer::TOOLBOX_TIME.add(gFrameIntervalSeconds);
}
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail());
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles"));
-#if 0 // 1.9.2
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_ENVIRONMENT, (F64)gSavedSettings.getBOOL("VertexShaderLevelEnvironment"));
-#endif
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame"));
+ LLStatViewer::ENABLE_VBO.sample((F64)gSavedSettings.getBOOL("RenderVBOEnable"));
+ LLStatViewer::LIGHTING_DETAIL.sample((F64)gPipeline.getLightingDetail());
+ LLStatViewer::DRAW_DISTANCE.sample((F64)gSavedSettings.getF32("RenderFarClip"));
+ LLStatViewer::CHAT_BUBBLES.sample((F64)gSavedSettings.getBOOL("UseChatBubbles"));
+
+ LLStatViewer::FRAME_STACKTIME.sample<LLTrace::Seconds>(gDebugView->mFastTimerView->getTime("Frame"));
F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle");
F64 network_secs = gDebugView->mFastTimerView->getTime("Network");
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_NETWORK_SECS, network_secs);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State"));
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry"));
+ LLStatViewer::UPDATE_STACKTIME.sample<LLTrace::Seconds>(idle_secs - network_secs);
+ LLStatViewer::NETWORK_STACKTIME.sample<LLTrace::Seconds>(network_secs);
+ LLStatViewer::IMAGE_STACKTIME.sample<LLTrace::Seconds>(gDebugView->mFastTimerView->getTime("Update Images"));
+ LLStatViewer::REBUILD_STACKTIME.sample<LLTrace::Seconds>(gDebugView->mFastTimerView->getTime("Sort Draw State"));
+ LLStatViewer::RENDER_STACKTIME.sample<LLTrace::Seconds>(gDebugView->mFastTimerView->getTime("Geometry"));
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost());
if (cdp)
{
- LLViewerStats::getInstance()->mSimPingStat.addValue(cdp->getPingDelay());
+ LLStatViewer::SIM_PING.sample<LLTrace::Milliseconds>(cdp->getPingDelay());
gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1);
gSimPingCount++;
}
else
{
- LLViewerStats::getInstance()->mSimPingStat.addValue(10000);
+ LLStatViewer::SIM_PING.sample<LLTrace::Seconds>(10);
}
- LLViewerStats::getInstance()->mFPSStat.addValue(1);
+ LLStatViewer::FPS.add(1);
+ if (LLTrace::get_frame_recording().getTotalRecording().getSampleCount(LLStatViewer::FPS))
+ {
+ LLStatViewer::FPS_SAMPLE.sample(LLTrace::get_frame_recording().getTotalRecording().getPerSec(LLStatViewer::FPS));
+ }
F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
- LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f);
- LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f);
- LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
- LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
+ LLStatViewer::LAYERS_KBIT.add<LLTrace::Bits>(layer_bits);
+ LLStatViewer::OBJECT_KBIT.add(gObjectData);
+ LLStatViewer::PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending());
+ LLStatViewer::ASSET_KBIT.add<LLTrace::Bits>(gTransferManager.getTransferBitsIn(LLTCT_ASSET));
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
{
- gDebugTimers[0].pause();
+ gTextureTimer.pause();
}
else
{
- gDebugTimers[0].unpause();
+ gTextureTimer.unpause();
}
{
@@ -655,14 +378,14 @@ void update_statistics(U32 frame_count)
visible_avatar_frames = 1.f;
avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames;
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars);
+ LLStatViewer::VISIBLE_AVATARS.sample((F64)avg_visible_avatars);
}
LLWorld::getInstance()->updateNetStats();
LLWorld::getInstance()->requestCacheMisses();
// Reset all of these values.
gVLManager.resetBitCounts();
- gObjectBits = 0;
+ gObjectData = 0;
// gDecodedBits = 0;
// Only update texture stats periodically so that they are less noisy
@@ -671,15 +394,10 @@ void update_statistics(U32 frame_count)
static LLFrameTimer texture_stats_timer;
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
{
- LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f);
- LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets);
- gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8;
- LLViewerTextureList::sTextureBits = 0;
- LLViewerTextureList::sTexturePackets = 0;
+ gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value();
texture_stats_timer.reset();
}
}
-
}
class ViewerStatsResponder : public LLHTTPClient::Responder
@@ -808,8 +526,8 @@ void send_stats()
}
else
{
- shader_level = 3;
- }
+ shader_level = 3;
+ }
}
else if (gPipeline.canUseWindLightShadersOnObjects())
{
@@ -825,9 +543,9 @@ void send_stats()
LLSD &download = body["downloads"];
- download["world_kbytes"] = gTotalWorldBytes / 1024.0;
- download["object_kbytes"] = gTotalObjectBytes / 1024.0;
- download["texture_kbytes"] = gTotalTextureBytes / 1024.0;
+ download["world_kbytes"] = LLTrace::Kilobytes(gTotalWorldData).value();
+ download["object_kbytes"] = LLTrace::Kilobytes(gTotalObjectData).value();
+ download["texture_kbytes"] = LLTrace::Kilobytes(gTotalTextureData).value();
download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0;
LLSD &in = body["stats"]["net"]["in"];
@@ -868,10 +586,7 @@ void send_stats()
S32 window_height = gViewerWindow->getWindowHeightRaw();
S32 window_size = (window_width * window_height) / 1024;
misc["string_1"] = llformat("%d", window_size);
- if (gDebugTimers.find(0) != gDebugTimers.end() && gFrameTimeSeconds > 0)
- {
- misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gDebugTimers[0].getElapsedTimeF32(), gFrameTimeSeconds);
- }
+ misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds);
// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
@@ -954,7 +669,7 @@ void LLViewerStats::PhaseMap::clearPhases()
mPhaseMap.clear();
}
-LLSD LLViewerStats::PhaseMap::dumpPhases()
+LLSD LLViewerStats::PhaseMap::asLLSD()
{
LLSD result;
for (phase_map_t::iterator iter = mPhaseMap.begin(); iter != mPhaseMap.end(); ++iter)
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 554e4d647e..14ee41dba0 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -1,5 +1,5 @@
/**
- * @file llviewerstats.h
+ * @file llviewerim_peningtats.h
* @brief LLViewerStats class header file
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
@@ -27,171 +27,175 @@
#ifndef LL_LLVIEWERSTATS_H
#define LL_LLVIEWERSTATS_H
-#include "llstat.h"
+#include "llstatenums.h"
#include "lltextureinfo.h"
+#include "lltracerecording.h"
+#include "lltrace.h"
+
+namespace LLStatViewer
+{
+
+struct SimMeasurementSampler : public LLInstanceTracker<SimMeasurementSampler, ESimStatID>
+{
+ SimMeasurementSampler(ESimStatID id)
+ : LLInstanceTracker(id)
+ {}
+ virtual ~SimMeasurementSampler() {}
+ virtual void sample(F64 value) = 0;
+};
+
+template<typename T = F64>
+struct SimMeasurement : public LLTrace::Measurement<T>, public SimMeasurementSampler
+{
+ SimMeasurement(const char* name, const char* description, ESimStatID stat_id)
+ : LLTrace::Measurement<T>(name, description),
+ SimMeasurementSampler(stat_id)
+ {}
+
+ using SimMeasurementSampler::getInstance;
+
+ /*virtual*/ void sample(F64 value)
+ {
+ LLTrace::Measurement<T>::sample(T(value));
+ }
+};
+
+extern LLTrace::Count<> FPS,
+ PACKETS_IN,
+ PACKETS_LOST,
+ PACKETS_OUT,
+ TEXTURE_PACKETS,
+ TRIANGLES_DRAWN,
+ CHAT_COUNT,
+ IM_COUNT,
+ OBJECT_CREATE,
+ OBJECT_REZ,
+ LOADING_WEARABLES_LONG_DELAY,
+ LOGIN_TIMEOUTS,
+ LSL_SAVES,
+ ANIMATION_UPLOADS,
+ FLY,
+ TELEPORT,
+ DELETE_OBJECT,
+ SNAPSHOT,
+ UPLOAD_SOUND,
+ UPLOAD_TEXTURE,
+ EDIT_TEXTURE,
+ KILLED,
+ FRAMETIME_DOUBLED,
+ TEX_BAKES,
+ TEX_REBAKES;
+
+
+extern LLTrace::Count<LLTrace::Kilobits> KBIT,
+ LAYERS_KBIT,
+ OBJECT_KBIT,
+ ASSET_KBIT,
+ TEXTURE_KBIT,
+ ACTUAL_IN_KBIT,
+ ACTUAL_OUT_KBIT;
+
+extern LLTrace::Count<LLTrace::Seconds> AVATAR_EDIT_TIME,
+ TOOLBOX_TIME,
+ MOUSELOOK_TIME,
+ FPS_10_TIME,
+ FPS_8_TIME,
+ FPS_2_TIME,
+ SIM_20_FPS_TIME,
+ SIM_PHYSICS_20_FPS_TIME,
+ LOSS_5_PERCENT_TIME;
+
+extern SimMeasurement<> SIM_TIME_DILATION,
+ SIM_FPS,
+ SIM_PHYSICS_FPS,
+ SIM_AGENT_UPS,
+ SIM_SCRIPT_EPS,
+ SIM_SKIPPED_SILHOUETTE,
+ SIM_SKIPPED_CHARACTERS_PERCENTAGE,
+ SIM_MAIN_AGENTS,
+ SIM_CHILD_AGENTS,
+ SIM_OBJECTS,
+ SIM_ACTIVE_OBJECTS,
+ SIM_ACTIVE_SCRIPTS,
+ SIM_PERCENTAGE_SCRIPTS_RUN,
+ SIM_IN_PACKETS_PER_SEC,
+ SIM_OUT_PACKETS_PER_SEC,
+ SIM_PENDING_DOWNLOADS,
+ SIM_PENDING_UPLOADS,
+ SIM_PENDING_LOCAL_UPLOADS,
+ SIM_PHYSICS_PINNED_TASKS,
+ SIM_PHYSICS_LOD_TASKS;
+
+extern LLTrace::Measurement<> FPS_SAMPLE,
+ NUM_IMAGES,
+ NUM_RAW_IMAGES,
+ NUM_OBJECTS,
+ NUM_ACTIVE_OBJECTS,
+ NUM_NEW_OBJECTS,
+ NUM_SIZE_CULLED,
+ NUM_VIS_CULLED,
+ ENABLE_VBO,
+ LIGHTING_DETAIL,
+ VISIBLE_AVATARS,
+ SHADER_OBJECTS,
+ DRAW_DISTANCE,
+ CHAT_BUBBLES,
+ PENDING_VFS_OPERATIONS,
+ PACKETS_LOST_PERCENT,
+ WINDOW_WIDTH,
+ WINDOW_HEIGHT;
+
+extern LLTrace::Measurement<LLTrace::Meters> AGENT_POSITION_SNAP;
+
+extern LLTrace::Measurement<LLTrace::Bytes> DELTA_BANDWIDTH,
+ MAX_BANDWIDTH,
+ GL_TEX_MEM,
+ GL_BOUND_MEM,
+ RAW_MEM,
+ FORMATTED_MEM;
+
+extern SimMeasurement<LLTrace::Milliseconds> SIM_FRAME_TIME,
+ SIM_NET_TIME,
+ SIM_OTHER_TIME,
+ SIM_PHYSICS_TIME,
+ SIM_PHYSICS_STEP_TIME,
+ SIM_PHYSICS_SHAPE_UPDATE_TIME,
+ SIM_PHYSICS_OTHER_TIME,
+ SIM_AI_TIME,
+ SIM_AGENTS_TIME,
+ SIM_IMAGES_TIME,
+ SIM_SCRIPTS_TIME,
+ SIM_SPARE_TIME,
+ SIM_SLEEP_TIME,
+ SIM_PUMP_IO_TIME;
+
+extern SimMeasurement<LLTrace::Bytes> SIM_UNACKED_BYTES,
+ SIM_PHYSICS_MEM;
+
+
+extern LLTrace::Measurement<LLTrace::Milliseconds> FRAMETIME_JITTER,
+ FRAMETIME_SLEW,
+ LOGIN_SECONDS,
+ REGION_CROSSING_TIME,
+ FRAME_STACKTIME,
+ UPDATE_STACKTIME,
+ NETWORK_STACKTIME,
+ IMAGE_STACKTIME,
+ REBUILD_STACKTIME,
+ RENDER_STACKTIME,
+ SIM_PING;
+}
class LLViewerStats : public LLSingleton<LLViewerStats>
{
public:
- LLStat mKBitStat;
- LLStat mLayersKBitStat;
- LLStat mObjectKBitStat;
- LLStat mAssetKBitStat;
- LLStat mTextureKBitStat;
- LLStat mVFSPendingOperations;
- LLStat mObjectsDrawnStat;
- LLStat mObjectsCulledStat;
- LLStat mObjectsTestedStat;
- LLStat mObjectsComparedStat;
- LLStat mObjectsOccludedStat;
- LLStat mFPSStat;
- LLStat mPacketsInStat;
- LLStat mPacketsLostStat;
- LLStat mPacketsOutStat;
- LLStat mPacketsLostPercentStat;
- LLStat mTexturePacketsStat;
- LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection)
- LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection)
- LLStat mTrianglesDrawnStat;
-
- // Simulator stats
- LLStat mSimTimeDilation;
-
- LLStat mSimFPS;
- LLStat mSimPhysicsFPS;
- LLStat mSimAgentUPS;
- LLStat mSimScriptEPS;
-
- LLStat mSimFrameMsec;
- LLStat mSimNetMsec;
- LLStat mSimSimOtherMsec;
- LLStat mSimSimPhysicsMsec;
-
- LLStat mSimSimPhysicsStepMsec;
- LLStat mSimSimPhysicsShapeUpdateMsec;
- LLStat mSimSimPhysicsOtherMsec;
-
- LLStat mSimSimAIStepMsec;
- LLStat mSimSimSkippedSilhouetteSteps;
- LLStat mSimSimPctSteppedCharacters;
-
- LLStat mSimAgentMsec;
- LLStat mSimImagesMsec;
- LLStat mSimScriptMsec;
- LLStat mSimSpareMsec;
- LLStat mSimSleepMsec;
- LLStat mSimPumpIOMsec;
-
- LLStat mSimMainAgents;
- LLStat mSimChildAgents;
- LLStat mSimObjects;
- LLStat mSimActiveObjects;
- LLStat mSimActiveScripts;
- LLStat mSimPctScriptsRun;
-
- LLStat mSimInPPS;
- LLStat mSimOutPPS;
- LLStat mSimPendingDownloads;
- LLStat mSimPendingUploads;
- LLStat mSimPendingLocalUploads;
- LLStat mSimTotalUnackedBytes;
-
- LLStat mPhysicsPinnedTasks;
- LLStat mPhysicsLODTasks;
- LLStat mPhysicsMemoryAllocated;
-
- LLStat mSimPingStat;
-
- LLStat mNumImagesStat;
- LLStat mNumRawImagesStat;
- LLStat mGLTexMemStat;
- LLStat mGLBoundMemStat;
- LLStat mRawMemStat;
- LLStat mFormattedMemStat;
-
- LLStat mNumObjectsStat;
- LLStat mNumActiveObjectsStat;
- LLStat mNumNewObjectsStat;
- LLStat mNumSizeCulledStat;
- LLStat mNumVisCulledStat;
-
void resetStats();
-public:
- // If you change this, please also add a corresponding text label
- // in statTypeToText in llviewerstats.cpp
- enum EStatType
- {
- ST_VERSION = 0,
- ST_AVATAR_EDIT_SECONDS = 1,
- ST_TOOLBOX_SECONDS = 2,
- ST_CHAT_COUNT = 3,
- ST_IM_COUNT = 4,
- ST_FULLSCREEN_BOOL = 5,
- ST_RELEASE_COUNT= 6,
- ST_CREATE_COUNT = 7,
- ST_REZ_COUNT = 8,
- ST_FPS_10_SECONDS = 9,
- ST_FPS_2_SECONDS = 10,
- ST_MOUSELOOK_SECONDS = 11,
- ST_FLY_COUNT = 12,
- ST_TELEPORT_COUNT = 13,
- ST_OBJECT_DELETE_COUNT = 14,
- ST_SNAPSHOT_COUNT = 15,
- ST_UPLOAD_SOUND_COUNT = 16,
- ST_UPLOAD_TEXTURE_COUNT = 17,
- ST_EDIT_TEXTURE_COUNT = 18,
- ST_KILLED_COUNT = 19,
- ST_FRAMETIME_JITTER = 20,
- ST_FRAMETIME_SLEW = 21,
- ST_INVENTORY_TOO_LONG = 22,
- ST_WEARABLES_TOO_LONG = 23,
- ST_LOGIN_SECONDS = 24,
- ST_LOGIN_TIMEOUT_COUNT = 25,
- ST_HAS_BAD_TIMER = 26,
- ST_DOWNLOAD_FAILED = 27,
- ST_LSL_SAVE_COUNT = 28,
- ST_UPLOAD_ANIM_COUNT = 29,
- ST_FPS_8_SECONDS = 30,
- ST_SIM_FPS_20_SECONDS = 31,
- ST_PHYS_FPS_20_SECONDS = 32,
- ST_LOSS_05_SECONDS = 33,
- ST_FPS_DROP_50_RATIO = 34,
- ST_ENABLE_VBO = 35,
- ST_DELTA_BANDWIDTH = 36,
- ST_MAX_BANDWIDTH = 37,
- ST_LIGHTING_DETAIL = 38,
- ST_VISIBLE_AVATARS = 39,
- ST_SHADER_OBJECTS = 40,
- ST_SHADER_ENVIRONMENT = 41,
- ST_DRAW_DIST = 42,
- ST_CHAT_BUBBLES = 43,
- ST_SHADER_AVATAR = 44,
- ST_FRAME_SECS = 45,
- ST_UPDATE_SECS = 46,
- ST_NETWORK_SECS = 47,
- ST_IMAGE_SECS = 48,
- ST_REBUILD_SECS = 49,
- ST_RENDER_SECS = 50,
- ST_CROSSING_AVG = 51,
- ST_CROSSING_MAX = 52,
- ST_LIBXUL_WIDGET_USED = 53, // Unused
- ST_WINDOW_WIDTH = 54,
- ST_WINDOW_HEIGHT = 55,
- ST_TEX_BAKES = 56,
- ST_TEX_REBAKES = 57,
-
- ST_COUNT = 58
- };
+public:
LLViewerStats();
~LLViewerStats();
- // all return latest value of given stat
- F64 getStat(EStatType type) const;
- F64 setStat(EStatType type, F64 value); // set the stat to value
- F64 incStat(EStatType type, F64 value = 1.f); // add value to the stat
-
void updateFrameStats(const F64 time_diff);
void addToMessage(LLSD &body) const;
@@ -206,7 +210,7 @@ public:
U32 mCountOfNextUpdatesToIgnore;
inline StatsAccumulator()
- {
+ {
reset();
}
@@ -266,7 +270,7 @@ public:
mCountOfNextUpdatesToIgnore = 0;
}
- inline LLSD getData() const
+ inline LLSD asLLSD() const
{
LLSD data;
data["mean"] = getMean();
@@ -278,8 +282,6 @@ public:
}
};
- StatsAccumulator mAgentPositionSnaps;
-
// Phase tracking (originally put in for avatar rezzing), tracking
// progress of active/completed phases for activities like outfit changing.
typedef std::map<std::string,LLFrameTimer> phase_map_t;
@@ -296,29 +298,28 @@ public:
void stopPhase(const std::string& phase_name);
void stopAllPhases();
void clearPhases();
- LLSD dumpPhases();
+ LLSD asLLSD();
static StatsAccumulator& getPhaseStats(const std::string& phase_name);
static void recordPhaseStat(const std::string& phase_name, F32 value);
};
+ LLTrace::Recording& getRecording() { return mRecording; }
+ const LLTrace::Recording& getRecording() const { return mRecording; }
+
private:
- F64 mStats[ST_COUNT];
+ LLTrace::Recording mRecording;
- F64 mLastTimeDiff; // used for time stat updates
+ F64 mLastTimeDiff; // used for time stat updates
};
static const F32 SEND_STATS_PERIOD = 300.0f;
// The following are from (older?) statistics code found in appviewer.
-void init_statistics();
-void reset_statistics();
-void output_statistics(void*);
-void update_statistics(U32 frame_count);
+void update_statistics();
void send_stats();
-extern std::map<S32,LLFrameTimer> gDebugTimers;
-extern std::map<S32,std::string> gDebugTimerLabel;
-extern U32 gTotalTextureBytes;
-extern U32 gTotalObjectBytes;
-extern U32 gTotalTextureBytesPerBoostLevel[] ;
+extern LLFrameTimer gTextureTimer;
+extern LLUnit<LLUnits::Bytes, U32> gTotalTextureData;
+extern LLUnit<LLUnits::Bytes, U32> gTotalObjectData;
+extern LLUnit<LLUnits::Bytes, U32> gTotalTextureBytesPerBoostLevel[] ;
#endif // LL_LLVIEWERSTATS_H
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index e9d21b4848..91e485d01b 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerstatsrecorder.h"
-#if LL_RECORD_VIEWER_STATS
#include "llfile.h"
#include "llviewerregion.h"
@@ -45,9 +44,8 @@ LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL;
LLViewerStatsRecorder::LLViewerStatsRecorder() :
mObjectCacheFile(NULL),
mTimer(),
- mRegionp(NULL),
- mStartTime(0.f),
- mProcessingTime(0.f)
+ mStartTime(0.0),
+ mLastSnapshotTime(0.0)
{
if (NULL != sInstance)
{
@@ -61,112 +59,77 @@ LLViewerStatsRecorder::~LLViewerStatsRecorder()
{
if (mObjectCacheFile != NULL)
{
+ // last chance snapshot
+ writeToLog(0.f);
LLFile::close(mObjectCacheFile);
mObjectCacheFile = NULL;
}
}
-// static
-void LLViewerStatsRecorder::initClass()
-{
- sInstance = new LLViewerStatsRecorder();
-}
-
-// static
-void LLViewerStatsRecorder::cleanupClass()
-{
- delete sInstance;
- sInstance = NULL;
-}
-
-
-void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp)
-{
- if (mObjectCacheFile == NULL)
- {
- mStartTime = LLTimer::getTotalTime();
- mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb");
- if (mObjectCacheFile)
- { // Write column headers
- std::ostringstream data_msg;
- data_msg << "EventTime, "
- << "ProcessingTime, "
- << "CacheHits, "
- << "CacheFullMisses, "
- << "CacheCrcMisses, "
- << "FullUpdates, "
- << "TerseUpdates, "
- << "CacheMissRequests, "
- << "CacheMissResponses, "
- << "CacheUpdateDupes, "
- << "CacheUpdateChanges, "
- << "CacheUpdateAdds, "
- << "CacheUpdateReplacements, "
- << "UpdateFailures"
- << "\n";
-
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
- }
- }
-}
-
-void LLViewerStatsRecorder::beginObjectUpdateEvents(LLViewerRegion *regionp)
-{
- initStatsRecorder(regionp);
- mRegionp = regionp;
- mProcessingTime = LLTimer::getTotalTime();
- clearStats();
-}
-
void LLViewerStatsRecorder::clearStats()
{
mObjectCacheHitCount = 0;
+ mObjectCacheHitSize = 0;
mObjectCacheMissFullCount = 0;
+ mObjectCacheMissFullSize = 0;
mObjectCacheMissCrcCount = 0;
+ mObjectCacheMissCrcSize = 0;
mObjectFullUpdates = 0;
+ mObjectFullUpdatesSize = 0;
mObjectTerseUpdates = 0;
+ mObjectTerseUpdatesSize = 0;
mObjectCacheMissRequests = 0;
mObjectCacheMissResponses = 0;
+ mObjectCacheMissResponsesSize = 0;
mObjectCacheUpdateDupes = 0;
mObjectCacheUpdateChanges = 0;
mObjectCacheUpdateAdds = 0;
mObjectCacheUpdateReplacements = 0;
mObjectUpdateFailures = 0;
+ mObjectUpdateFailuresSize = 0;
+ mTextureFetchSize = 0;
}
-void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type)
+void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size)
{
mObjectUpdateFailures++;
+ mObjectUpdateFailuresSize += msg_size;
}
-void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type)
+void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size)
{
if (LLViewerRegion::CACHE_MISS_TYPE_FULL == cache_miss_type)
{
mObjectCacheMissFullCount++;
+ mObjectCacheMissFullSize += msg_size;
}
else
{
mObjectCacheMissCrcCount++;
+ mObjectCacheMissCrcSize += msg_size;
}
}
-void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp)
+void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size)
{
switch (update_type)
{
case OUT_FULL:
mObjectFullUpdates++;
+ mObjectFullUpdatesSize += msg_size;
break;
case OUT_TERSE_IMPROVED:
mObjectTerseUpdates++;
+ mObjectTerseUpdatesSize += msg_size;
break;
case OUT_FULL_COMPRESSED:
mObjectCacheMissResponses++;
+ mObjectCacheMissResponsesSize += msg_size;
break;
case OUT_FULL_CACHED:
mObjectCacheHitCount++;
+ mObjectCacheHitSize += msg_size;
break;
default:
llwarns << "Unknown update_type" << llendl;
@@ -174,7 +137,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU
};
}
-void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp)
+void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size)
{
switch (update_result)
{
@@ -201,9 +164,15 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count)
mObjectCacheMissRequests += count;
}
-void LLViewerStatsRecorder::endObjectUpdateEvents()
+void LLViewerStatsRecorder::writeToLog( F32 interval )
{
- llinfos << "ILX: "
+ F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime;
+ S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
+
+ if ( delta_time < interval || total_objects == 0) return;
+
+ mLastSnapshotTime = LLTimer::getTotalSeconds();
+ lldebugs << "ILX: "
<< mObjectCacheHitCount << " hits, "
<< mObjectCacheMissFullCount << " full misses, "
<< mObjectCacheMissCrcCount << " crc misses, "
@@ -218,41 +187,81 @@ void LLViewerStatsRecorder::endObjectUpdateEvents()
<< mObjectUpdateFailures << " update failures"
<< llendl;
- S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
- if (mObjectCacheFile != NULL &&
- total_objects > 0)
+ if (mObjectCacheFile == NULL)
{
- std::ostringstream data_msg;
- F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0);
-
- data_msg << getTimeSinceStart()
- << ", " << processing32
- << ", " << mObjectCacheHitCount
- << ", " << mObjectCacheMissFullCount
- << ", " << mObjectCacheMissCrcCount
- << ", " << mObjectFullUpdates
- << ", " << mObjectTerseUpdates
- << ", " << mObjectCacheMissRequests
- << ", " << mObjectCacheMissResponses
- << ", " << mObjectCacheUpdateDupes
- << ", " << mObjectCacheUpdateChanges
- << ", " << mObjectCacheUpdateAdds
- << ", " << mObjectCacheUpdateReplacements
- << ", " << mObjectUpdateFailures
- << "\n";
+ mStartTime = LLTimer::getTotalSeconds();
+ mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb");
+ if (mObjectCacheFile)
+ { // Write column headers
+ std::ostringstream data_msg;
+ data_msg << "EventTime(ms)\t"
+ << "Cache Hits\t"
+ << "Cache Full Misses\t"
+ << "Cache Crc Misses\t"
+ << "Full Updates\t"
+ << "Terse Updates\t"
+ << "Cache Miss Requests\t"
+ << "Cache Miss Responses\t"
+ << "Cache Update Dupes\t"
+ << "Cache Update Changes\t"
+ << "Cache Update Adds\t"
+ << "Cache Update Replacements\t"
+ << "Update Failures\t"
+ << "Cache Hits bps\t"
+ << "Cache Full Misses bps\t"
+ << "Cache Crc Misses bps\t"
+ << "Full Updates bps\t"
+ << "Terse Updates bps\t"
+ << "Cache Miss Responses bps\t"
+ << "Texture Fetch bps\t"
+ << "\n";
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ }
+ else
+ {
+ llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl;
+ return;
+ }
}
+ std::ostringstream data_msg;
+
+ data_msg << getTimeSinceStart()
+ << "\t " << mObjectCacheHitCount
+ << "\t" << mObjectCacheMissFullCount
+ << "\t" << mObjectCacheMissCrcCount
+ << "\t" << mObjectFullUpdates
+ << "\t" << mObjectTerseUpdates
+ << "\t" << mObjectCacheMissRequests
+ << "\t" << mObjectCacheMissResponses
+ << "\t" << mObjectCacheUpdateDupes
+ << "\t" << mObjectCacheUpdateChanges
+ << "\t" << mObjectCacheUpdateAdds
+ << "\t" << mObjectCacheUpdateReplacements
+ << "\t" << mObjectUpdateFailures
+ << "\t" << (mObjectCacheHitSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissFullSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissCrcSize * 8 / delta_time)
+ << "\t" << (mObjectFullUpdatesSize * 8 / delta_time)
+ << "\t" << (mObjectTerseUpdatesSize * 8 / delta_time)
+ << "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time)
+ << "\t" << (mTextureFetchSize * 8 / delta_time)
+ << "\n";
+
+ fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
clearStats();
}
F32 LLViewerStatsRecorder::getTimeSinceStart()
{
- return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0);
+ return (F32) (LLTimer::getTotalSeconds() - mStartTime);
}
-#endif
+void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size )
+{
+ mTextureFetchSize += msg_size;
+}
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index 612ac380f7..d1744f4910 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -35,63 +35,111 @@
#define LL_RECORD_VIEWER_STATS 0
-#if LL_RECORD_VIEWER_STATS
#include "llframetimer.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
class LLMutex;
-class LLViewerRegion;
class LLViewerObject;
-class LLViewerStatsRecorder
+class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
{
public:
+ LOG_CLASS(LLViewerStatsRecorder);
LLViewerStatsRecorder();
~LLViewerStatsRecorder();
- static void initClass();
- static void cleanupClass();
- static LLViewerStatsRecorder* instance() {return sInstance; }
+ void objectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordObjectUpdateFailure(local_id, update_type, msg_size);
+#endif
+ }
- void initStatsRecorder(LLViewerRegion *regionp);
+ void cacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordCacheMissEvent(local_id, update_type, cache_miss_type, msg_size);
+#endif
+ }
- void beginObjectUpdateEvents(LLViewerRegion *regionp);
- void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type);
- void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type);
- void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp);
- void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp);
- void recordRequestCacheMissesEvent(S32 count);
- void endObjectUpdateEvents();
+ void objectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordObjectUpdateEvent(local_id, update_type, objectp, msg_size);
+#endif
+ }
+
+ void cacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordCacheFullUpdate(local_id, update_type, update_result, objectp, msg_size);
+#endif
+ }
+
+ void requestCacheMissesEvent(S32 count)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordRequestCacheMissesEvent(count);
+#endif
+ }
+
+ void textureFetch(S32 msg_size)
+ {
+#if LL_RECORD_VIEWER_STATS
+ recordTextureFetch(msg_size);
+#endif
+ }
+
+ void log(F32 interval)
+ {
+#if LL_RECORD_VIEWER_STATS
+ writeToLog(interval);
+#endif
+ }
F32 getTimeSinceStart();
private:
+ void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size);
+ void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size);
+ void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size);
+ void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size);
+ void recordRequestCacheMissesEvent(S32 count);
+ void recordTextureFetch(S32 msg_size);
+ void writeToLog(F32 interval);
+
static LLViewerStatsRecorder* sInstance;
LLFILE * mObjectCacheFile; // File to write data into
LLFrameTimer mTimer;
- LLViewerRegion* mRegionp;
F64 mStartTime;
- F64 mProcessingTime;
+ F64 mLastSnapshotTime;
S32 mObjectCacheHitCount;
+ S32 mObjectCacheHitSize;
S32 mObjectCacheMissFullCount;
+ S32 mObjectCacheMissFullSize;
S32 mObjectCacheMissCrcCount;
+ S32 mObjectCacheMissCrcSize;
S32 mObjectFullUpdates;
+ S32 mObjectFullUpdatesSize;
S32 mObjectTerseUpdates;
+ S32 mObjectTerseUpdatesSize;
S32 mObjectCacheMissRequests;
S32 mObjectCacheMissResponses;
+ S32 mObjectCacheMissResponsesSize;
S32 mObjectCacheUpdateDupes;
S32 mObjectCacheUpdateChanges;
S32 mObjectCacheUpdateAdds;
S32 mObjectCacheUpdateReplacements;
S32 mObjectUpdateFailures;
+ S32 mObjectUpdateFailuresSize;
+ S32 mTextureFetchSize;
void clearStats();
};
-#endif // LL_RECORD_VIEWER_STATS
#endif // LLVIEWERSTATSRECORDER_H
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 99102309a1..122d8f4a96 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -1144,6 +1144,14 @@ void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc
{
preview->setAuxItem( item );
preview->setNotecardInfo(mNotecardInventoryID, mObjectID);
+ if (preview->hasString("Title"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[NAME]"] = item->getName();
+ LLUIString title = preview->getString("Title", args);
+ preview->setTitle(title.getString());
+ }
+ preview->getChild<LLUICtrl>("desc")->setValue(item->getDescription());
}
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 32cf8cc1b3..fe9f8a2f9b 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -39,7 +39,6 @@
#include "llimagebmp.h"
#include "llimagej2c.h"
#include "llimagetga.h"
-#include "llmemtype.h"
#include "llstl.h"
#include "llvfile.h"
#include "llvfs.h"
@@ -65,6 +64,11 @@
#include "lltexturecache.h"
///////////////////////////////////////////////////////////////////////////////
+// extern
+const LLUnit<LLUnits::Megabytes, S32> gMinVideoRam = 32;
+const LLUnit<LLUnits::Megabytes, S32> gMaxVideoRam = 512;
+
+
// statics
LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL;
LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = NULL;
@@ -83,11 +87,11 @@ S32 LLViewerTexture::sAuxCount = 0;
LLFrameTimer LLViewerTexture::sEvaluationTimer;
F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
-S32 LLViewerTexture::sBoundTextureMemoryInBytes = 0;
-S32 LLViewerTexture::sTotalTextureMemoryInBytes = 0;
-S32 LLViewerTexture::sMaxBoundTextureMemInMegaBytes = 0;
-S32 LLViewerTexture::sMaxTotalTextureMemInMegaBytes = 0;
-S32 LLViewerTexture::sMaxDesiredTextureMemInBytes = 0 ;
+LLUnit<LLUnits::Bytes, S32> LLViewerTexture::sBoundTextureMemory = 0;
+LLUnit<LLUnits::Bytes, S32> LLViewerTexture::sTotalTextureMemory = 0;
+LLUnit<LLUnits::Megabytes, S32> LLViewerTexture::sMaxBoundTextureMem = 0;
+LLUnit<LLUnits::Megabytes, S32> LLViewerTexture::sMaxTotalTextureMem = 0;
+LLUnit<LLUnits::Bytes, S32> LLViewerTexture::sMaxDesiredTextureMem = 0 ;
S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ;
F32 LLViewerTexture::sCameraMovingBias = 0.0f ;
S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size
@@ -519,17 +523,17 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
LLViewerMediaTexture::updateClass() ;
}
- sBoundTextureMemoryInBytes = LLImageGL::sBoundTextureMemoryInBytes;//in bytes
- sTotalTextureMemoryInBytes = LLImageGL::sGlobalTextureMemoryInBytes;//in bytes
- sMaxBoundTextureMemInMegaBytes = gTextureList.getMaxResidentTexMem();//in MB
- sMaxTotalTextureMemInMegaBytes = gTextureList.getMaxTotalTextureMem() ;//in MB
- sMaxDesiredTextureMemInBytes = MEGA_BYTES_TO_BYTES(sMaxTotalTextureMemInMegaBytes) ; //in Bytes, by default and when total used texture memory is small.
+ sBoundTextureMemory = LLImageGL::sBoundTextureMemory;//in bytes
+ sTotalTextureMemory = LLImageGL::sGlobalTextureMemory;//in bytes
+ sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem();//in MB
+ sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem() ;//in MB
+ sMaxDesiredTextureMem = sMaxTotalTextureMem ; //in Bytes, by default and when total used texture memory is small.
- if (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) >= sMaxBoundTextureMemInMegaBytes ||
- BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) >= sMaxTotalTextureMemInMegaBytes)
+ if (sBoundTextureMemory >= sMaxBoundTextureMem ||
+ sTotalTextureMemory >= sMaxTotalTextureMem)
{
- //when texture memory overflows, lower down the threashold to release the textures more aggressively.
- sMaxDesiredTextureMemInBytes = llmin((S32)(sMaxDesiredTextureMemInBytes * 0.75f) , MEGA_BYTES_TO_BYTES(MAX_VIDEO_RAM_IN_MEGA_BYTES)) ;//512 MB
+ //when texture memory overflows, lower down the threshold to release the textures more aggressively.
+ sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<LLUnits::Bytes, S32>(gMaxVideoRam));
// If we are using more texture memory than we should,
// scale up the desired discard level
@@ -545,8 +549,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sEvaluationTimer.reset();
}
else if (sDesiredDiscardBias > 0.0f &&
- BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale &&
- BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale)
+ sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale &&
+ sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale)
{
// If we are using less texture memory than we should,
// scale down the desired discard level
@@ -564,8 +568,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1);
sCameraMovingDiscardBias = (S8)(sCameraMovingBias);
- LLViewerTexture::sFreezeImageScalingDown = (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < 0.75f * sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale) &&
- (BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < 0.75f * sMaxTotalTextureMemInMegaBytes * texmem_middle_bound_scale) ;
+ LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) &&
+ (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale) ;
}
//end of static functions
@@ -3302,13 +3306,13 @@ void LLViewerLODTexture::processTextureStats()
scaleDown() ;
}
// Limit the amount of GL memory bound each frame
- else if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale &&
+ else if ( sBoundTextureMemory > sMaxBoundTextureMem * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
scaleDown() ;
}
// Only allow GL to have 2x the video card memory
- else if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale &&
+ else if ( sTotalTextureMemory > sMaxTotalTextureMem * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
scaleDown() ;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 2ea9a07e9a..e9efb751f8 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -34,12 +34,13 @@
#include "llgltypes.h"
#include "llrender.h"
#include "llmetricperformancetester.h"
+#include "llunit.h"
#include <map>
#include <list>
-#define MIN_VIDEO_RAM_IN_MEGA_BYTES 32
-#define MAX_VIDEO_RAM_IN_MEGA_BYTES 512 // 512MB max for performance reasons.
+extern const LLUnit<LLUnits::Megabytes, S32> gMinVideoRam;
+extern const LLUnit<LLUnits::Megabytes, S32> gMaxVideoRam;
class LLFace;
class LLImageGL ;
@@ -322,11 +323,11 @@ public:
static LLFrameTimer sEvaluationTimer;
static F32 sDesiredDiscardBias;
static F32 sDesiredDiscardScale;
- static S32 sBoundTextureMemoryInBytes;
- static S32 sTotalTextureMemoryInBytes;
- static S32 sMaxBoundTextureMemInMegaBytes;
- static S32 sMaxTotalTextureMemInMegaBytes;
- static S32 sMaxDesiredTextureMemInBytes ;
+ static LLUnit<LLUnits::Bytes, S32> sBoundTextureMemory;
+ static LLUnit<LLUnits::Bytes, S32> sTotalTextureMemory;
+ static LLUnit<LLUnits::Megabytes, S32> sMaxBoundTextureMem;
+ static LLUnit<LLUnits::Megabytes, S32> sMaxTotalTextureMem;
+ static LLUnit<LLUnits::Bytes, S32> sMaxDesiredTextureMem ;
static S8 sCameraMovingDiscardBias;
static F32 sCameraMovingBias;
static S32 sMaxSculptRez ;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 49d7e8b842..3106a351e0 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -58,21 +58,14 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llxuiparser.h"
+#include "lltracerecording.h"
#include "llviewerdisplay.h"
////////////////////////////////////////////////////////////////////////////
void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
-U32 LLViewerTextureList::sTextureBits = 0;
-U32 LLViewerTextureList::sTexturePackets = 0;
S32 LLViewerTextureList::sNumImages = 0;
-LLStat LLViewerTextureList::sNumImagesStat(32, TRUE);
-LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE);
-LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE);
-LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE);
-LLStat LLViewerTextureList::sRawMemStat(32, TRUE);
-LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE);
LLViewerTextureList gTextureList;
static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
@@ -622,14 +615,19 @@ void LLViewerTextureList::updateImages(F32 max_time)
}
cleared = FALSE;
- LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
+ LLTrace::Recording& recording = LLTrace::get_frame_recording().getTotalRecording();
- LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages);
- LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
- LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
- LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
- LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
- LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
+ LLAppViewer::getTextureFetch()->setTextureBandwidth(recording.getPerSec(LLStatViewer::TEXTURE_KBIT).value());
+
+ {
+ using namespace LLStatViewer;
+ NUM_IMAGES.sample(sNumImages);
+ NUM_RAW_IMAGES.sample(LLImageRaw::sRawImageCount);
+ GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemory);
+ GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemory);
+ RAW_MEM.sample<LLTrace::Bytes>(LLImageRaw::sGlobalRawMemory);
+ FORMATTED_MEM.sample<LLTrace::Bytes>(LLImageFormatted::sGlobalFormattedMemory);
+ }
{
//loading from fast cache
@@ -711,7 +709,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
// Update the decode priority for N images each frame
{
static const S32 MAX_PRIO_UPDATES = gSavedSettings.getS32("TextureFetchUpdatePriorities"); // default: 32
- const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds) + 1, MAX_PRIO_UPDATES);
+ const size_t max_update_count = llmin((S32) (MAX_PRIO_UPDATES*MAX_PRIO_UPDATES*gFrameIntervalSeconds.value()) + 1, MAX_PRIO_UPDATES);
S32 update_counter = llmin(max_update_count, mUUIDMap.size());
uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID);
while ((update_counter-- > 0) && !mUUIDMap.empty())
@@ -945,11 +943,11 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
static const F32 MIN_PRIORITY_THRESHOLD = gSavedSettings.getF32("TextureFetchUpdatePriorityThreshold"); // default: 0.0
static const bool SKIP_LOW_PRIO = gSavedSettings.getBOOL("TextureFetchUpdateSkipLowPriority"); // default: false
- size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds)+1, MAX_HIGH_PRIO_COUNT);
+ size_t max_priority_count = llmin((S32) (MAX_HIGH_PRIO_COUNT*MAX_HIGH_PRIO_COUNT*gFrameIntervalSeconds.value())+1, MAX_HIGH_PRIO_COUNT);
max_priority_count = llmin(max_priority_count, mImageList.size());
size_t total_update_count = mUUIDMap.size();
- size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds)+1, MAX_UPDATE_COUNT);
+ size_t max_update_count = llmin((S32) (MAX_UPDATE_COUNT*MAX_UPDATE_COUNT*gFrameIntervalSeconds.value())+1, MAX_UPDATE_COUNT);
max_update_count = llmin(max_update_count, total_update_count);
// MAX_HIGH_PRIO_COUNT high priority entries
@@ -1006,14 +1004,6 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
break;
}
}
- //if (fetch_count == 0)
- //{
- // gDebugTimers[0].pause();
- //}
- //else
- //{
- // gDebugTimers[0].unpause();
- //}
return image_op_timer.getElapsedTimeF32();
}
@@ -1194,7 +1184,7 @@ S32 LLViewerTextureList::getMinVideoRamSetting()
{
S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped());
//min texture mem sets to 64M if total physical mem is more than 1.5GB
- return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ;
+ return (system_ram > 1500) ? 64 : gMinVideoRam.value() ;
}
//static
@@ -1244,7 +1234,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
else
max_texmem = llmin(max_texmem, (S32)(system_ram));
- max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES);
+ max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam.value());
return max_texmem;
}
@@ -1332,8 +1322,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
received_size = msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+ LLStatViewer::TEXTURE_KBIT.add<LLTrace::Bytes>(received_size);
+ LLStatViewer::TEXTURE_PACKETS.add(1);
U8 codec;
U16 packets;
@@ -1385,7 +1375,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
- LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
LLFastTimer t(FTM_PROCESS_IMAGES);
// Receives image packet, copy into image object,
@@ -1406,8 +1395,9 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
received_size = msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+
+ LLStatViewer::TEXTURE_KBIT.add<LLTrace::Bytes>(received_size);
+ LLStatViewer::TEXTURE_PACKETS.add(1);
//llprintline("Start decode, image header...");
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id);
@@ -1718,11 +1708,11 @@ bool LLUIImageList::initFromFile()
// add components defined in the rest of the skin paths
while (++pi != pend)
{
- LLXMLNodePtr update_root;
+ LLXMLNodePtr update_root;
if (LLXMLNode::parseFile(*pi, update_root, NULL))
- {
+ {
parser.readXUI(update_root, images, *pi);
- }
+ }
}
if (!images.validateBlock()) return false;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 3dda973d3f..e3df71cca2 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -1,5 +1,5 @@
/**
- * @file llviewertexturelist.h
+ * @file llviewertexturelinumimagest.h
* @brief Object for managing the list of images within a region
*
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
@@ -30,7 +30,6 @@
#include "lluuid.h"
//#include "message.h"
#include "llgl.h"
-#include "llstat.h"
#include "llviewertexture.h"
#include "llui.h"
#include <list>
@@ -200,17 +199,6 @@ private:
S32 mMaxTotalTextureMemInMegaBytes;
LLFrameTimer mForceDecodeTimer;
-public:
- static U32 sTextureBits;
- static U32 sTexturePackets;
-
- static LLStat sNumImagesStat;
- static LLStat sNumRawImagesStat;
- static LLStat sGLTexMemStat;
- static LLStat sGLBoundMemStat;
- static LLStat sRawMemStat;
- static LLStat sFormattedMemStat;
-
private:
static S32 sNumImages;
static void (*sUUIDCallback)(void**, const LLUUID &);
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index 5147272122..34f2c8f6e6 100644
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -304,7 +304,8 @@ void LLViewerThrottle::updateDynamicThrottle()
}
mUpdateTimer.reset();
- if (LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean() > TIGHTEN_THROTTLE_THRESHOLD)
+ F32 mean_packets_lost = LLViewerStats::instance().getRecording().getMean(LLStatViewer::PACKETS_LOST_PERCENT);
+ if (mean_packets_lost > TIGHTEN_THROTTLE_THRESHOLD)
{
if (mThrottleFrac <= MIN_FRACTIONAL || mCurrentBandwidth / 1024.0f <= MIN_BANDWIDTH)
{
@@ -317,7 +318,7 @@ void LLViewerThrottle::updateDynamicThrottle()
mCurrent.sendToSim();
llinfos << "Tightening network throttle to " << mCurrentBandwidth << llendl;
}
- else if (LLViewerStats::getInstance()->mPacketsLostPercentStat.getMean() <= EASE_THROTTLE_THRESHOLD)
+ else if (mean_packets_lost <= EASE_THROTTLE_THRESHOLD)
{
if (mThrottleFrac >= MAX_FRACTIONAL || mCurrentBandwidth / 1024.0f >= MAX_BANDWIDTH)
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 44e6d70546..637e4981d1 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -248,6 +248,9 @@ std::string LLViewerWindow::sSnapshotDir;
std::string LLViewerWindow::sMovieBaseName;
+LLTrace::Measurement<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
+
+
class RecordToChatConsole : public LLError::Recorder, public LLSingleton<RecordToChatConsole>
{
public:
@@ -334,27 +337,24 @@ public:
if (gSavedSettings.getBOOL("DebugShowTime"))
{
- const U32 y_inc2 = 15;
- for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin();
- iter != gDebugTimers.rend(); ++iter)
{
- S32 idx = iter->first;
- LLFrameTimer& timer = iter->second;
+ const U32 y_inc2 = 15;
+ LLFrameTimer& timer = gTextureTimer;
F32 time = timer.getElapsedTimeF32();
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
- std::string label = gDebugTimerLabel[idx];
- if (label.empty()) label = llformat("Debug: %d", idx);
- addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2;
+ addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2;
}
+ {
F32 time = gFrameTimeSeconds;
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc;
}
+ }
#if LL_WINDOWS
if (gSavedSettings.getBOOL("DebugShowMemory"))
@@ -736,7 +736,7 @@ public:
{
if(gTotalTextureBytesPerBoostLevel[i] > 0)
{
- addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, (F32)gTotalTextureBytesPerBoostLevel[i] / (1024 * 1024)));
+ addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit<LLUnits::Megabytes, F32>(gTotalTextureBytesPerBoostLevel[i]).value()));
ypos += y_inc;
}
}
@@ -1407,10 +1407,11 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
FillRect(hdc, &wnd_rect, CreateSolidBrush(RGB(255, 255, 255)));
std::string temp_str;
+ LLTrace::Recording& recording = LLViewerStats::instance().getRecording();
temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */
- LLViewerStats::getInstance()->mFPSStat.getMeanPerSec(),
- LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0),
- LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0));
+ recording.getPerSec(LLStatViewer::FPS), //mFPSStat.getMeanPerSec(),
+ recording.getLastValue(LLStatViewer::SIM_PHYSICS_FPS),
+ recording.getLastValue(LLStatViewer::SIM_TIME_DILATION));
S32 len = temp_str.length();
TextOutA(hdc, 0, 0, temp_str.c_str(), len);
@@ -2184,8 +2185,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
}
}
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height);
+ LLStatViewer::WINDOW_WIDTH.sample((F64)width);
+ LLStatViewer::WINDOW_HEIGHT.sample((F64)height);
LLLayoutStack::updateClass();
}
@@ -2761,11 +2762,12 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
}
}
+static LLFastTimer::DeclareTimer ftm("Update UI");
+
// Update UI based on stored mouse position from mouse-move
// event processing.
void LLViewerWindow::updateUI()
{
- static LLFastTimer::DeclareTimer ftm("Update UI");
LLFastTimer t(ftm);
static std::string last_handle_msg;
@@ -3235,8 +3237,8 @@ void LLViewerWindow::updateMouseDelta()
static F32 fdy = 0.f;
F32 amount = 16.f;
- fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
- fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
+ fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
+ fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
mCurrentMouseDelta.set(llround(fdx), llround(fdy));
mouse_vel.setVec(fdx,fdy);
@@ -3247,7 +3249,7 @@ void LLViewerWindow::updateMouseDelta()
mouse_vel.setVec((F32) dx, (F32) dy);
}
- mMouseVelocityStat.addValue(mouse_vel.magVec());
+ sMouseVelocityStat.sample(mouse_vel.magVec());
}
void LLViewerWindow::updateKeyboardFocus()
@@ -4236,15 +4238,49 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_height = llmin(image_height, window_height);
}
+ S32 original_width = 0;
+ S32 original_height = 0;
+ bool reset_deferred = false;
+
+ LLRenderTarget scratch_space;
+
F32 scale_factor = 1.0f ;
if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height))
{
+ if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
+ {
+ if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))
+ {
+ original_width = gPipeline.mDeferredScreen.getWidth();
+ original_height = gPipeline.mDeferredScreen.getHeight();
+
+ if (gPipeline.allocateScreenBuffer(image_width, image_height))
+ {
+ window_width = image_width;
+ window_height = image_height;
+ snapshot_width = image_width;
+ snapshot_height = image_height;
+ reset_deferred = true;
+ mWorldViewRectRaw.set(0, image_height, image_width, 0);
+ scratch_space.bindTarget();
+ }
+ else
+ {
+ scratch_space.release();
+ gPipeline.allocateScreenBuffer(original_width, original_height);
+ }
+ }
+ }
+
+ if (!reset_deferred)
+ {
// if image cropping or need to enlarge the scene, compute a scale_factor
F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
snapshot_width = (S32)(ratio * image_width) ;
snapshot_height = (S32)(ratio * image_height) ;
scale_factor = llmax(1.0f, 1.0f / ratio) ;
}
+ }
if (show_ui && scale_factor > 1.f)
{
@@ -4432,6 +4468,15 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
gPipeline.resetDrawOrders();
}
+ if (reset_deferred)
+ {
+ mWorldViewRectRaw = window_rect;
+ scratch_space.flush();
+ scratch_space.release();
+ gPipeline.allocateScreenBuffer(original_width, original_height);
+
+ }
+
if (high_res)
{
send_agent_resume();
@@ -4695,7 +4740,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
gGLManager.mIsDisabled = TRUE;
stop_glerror();
- llinfos << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemoryInBytes << " bytes" << llendl;
+ llinfos << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << llendl;
}
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 6efcaeaf18..be2d6d885e 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -41,16 +41,15 @@
#include "llcursortypes.h"
#include "llwindowcallbacks.h"
#include "lltimer.h"
-#include "llstat.h"
#include "llmousehandler.h"
#include "llhandle.h"
#include "llinitparam.h"
+#include "lltrace.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include <boost/scoped_ptr.hpp>
-
class LLView;
class LLViewerObject;
class LLUUID;
@@ -251,7 +250,7 @@ public:
S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; }
S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; }
LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
- LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; }
+ static LLTrace::Measurement<>* getMouseVelocityStat() { return &sMouseVelocityStat; }
BOOL getLeftMouseDown() const { return mLeftMouseDown; }
BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
BOOL getRightMouseDown() const { return mRightMouseDown; }
@@ -428,7 +427,6 @@ private:
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
LLCoordGL mLastMousePoint; // Mouse point at last frame.
LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
- LLStat mMouseVelocityStat;
BOOL mLeftMouseDown;
BOOL mMiddleMouseDown;
BOOL mRightMouseDown;
@@ -483,6 +481,8 @@ private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
+
+ static LLTrace::Measurement<> sMouseVelocityStat;
};
//
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index ec932501e5..abb5153480 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -457,8 +457,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
texturep->createGLTexture(0, raw);
}
texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin);
- LLSurface::sTextureUpdateTime += gen_timer.getElapsedTimeF32();
- LLSurface::sTexelsUpdated += (tex_x_end - tex_x_begin) * (tex_y_end - tex_y_begin);
for (S32 i = 0; i < 4; i++)
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 627238b0f5..f349714556 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -695,7 +695,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mLastRezzedStatus(-1)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
@@ -1739,8 +1738,6 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
@@ -1782,8 +1779,6 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
LLViewerJoint* joint = NULL;
if (info->mIsJoint)
@@ -1849,8 +1844,6 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// allocate joints
//-------------------------------------------------------------------------
@@ -1921,8 +1914,6 @@ void LLVOAvatar::startDefaultMotions()
//-----------------------------------------------------------------------------
void LLVOAvatar::buildCharacter()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//-------------------------------------------------------------------------
// remove all references to our existing skeleton
// so we can rebuild it
@@ -2072,8 +2063,6 @@ void LLVOAvatar::buildCharacter()
//-----------------------------------------------------------------------------
void LLVOAvatar::releaseMeshData()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy)
{
return;
@@ -2128,7 +2117,6 @@ void LLVOAvatar::releaseMeshData()
void LLVOAvatar::restoreMeshData()
{
llassert(!isSelf());
- LLMemType mt(LLMemType::MTYPE_AVATAR);
//llinfos << "Restoring" << llendl;
mMeshValid = TRUE;
@@ -2344,8 +2332,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
LLVector3 old_vel = getVelocity();
const BOOL has_name = !getNVPair("FirstName");
@@ -2425,7 +2411,6 @@ void LLVOAvatar::dumpAnimationState()
//------------------------------------------------------------------------
void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
LLFastTimer t(FTM_AVATAR_UPDATE);
if (isDead())
@@ -3463,8 +3448,6 @@ bool LLVOAvatar::isVisuallyMuted() const
//------------------------------------------------------------------------
BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// clear debug text
mDebugText.clear();
if (LLVOAvatar::sShowAnimationDebug)
@@ -4335,8 +4318,6 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
//--------------------------------------------------------------------
// render all geometry attached to the skeleton
//--------------------------------------------------------------------
- static LLStat render_stat;
-
LLViewerJointMesh::sRenderPass = pass;
if (pass == AVATAR_RENDER_PASS_SINGLE)
@@ -4389,10 +4370,6 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
LLViewerJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE;
- //llinfos << "Avatar render: " << render_timer.getElapsedTimeF32() << llendl;
-
- //render_stat.addValue(render_timer.getElapsedTimeF32()*1000.f);
-
return num_indices;
}
@@ -4808,8 +4785,6 @@ const LLUUID& LLVOAvatar::getStepSound() const
//-----------------------------------------------------------------------------
void LLVOAvatar::processAnimationStateChanges()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) )
{
startMotion(ANIM_AGENT_WALK_ADJUST);
@@ -4900,8 +4875,6 @@ void LLVOAvatar::processAnimationStateChanges()
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start )
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
BOOL result = FALSE;
if ( start ) // start animation
@@ -5036,8 +5009,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl;
LLUUID remap_id = remapMotionID(id);
@@ -5866,8 +5837,6 @@ BOOL LLVOAvatar::isActive() const
//-----------------------------------------------------------------------------
void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
if (mDrawable.isNull())
{
return;
@@ -7312,8 +7281,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
return;
}
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
mFirstAppearanceMessageReceived = TRUE;
@@ -7514,7 +7481,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
if (!userdata) return;
//llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl;
- const LLMemType mt(LLMemType::MTYPE_AVATAR);
const LLUUID id = src_vi->getID();
LLTextureMaskData* maskData = (LLTextureMaskData*) userdata;
@@ -7856,14 +7822,14 @@ void LLVOAvatar::cullAvatarsByPixelArea()
if (gFrameTimeSeconds != sUnbakedUpdateTime) // only update once per frame
{
sUnbakedUpdateTime = gFrameTimeSeconds;
- sUnbakedTime += gFrameIntervalSeconds;
+ sUnbakedTime += gFrameIntervalSeconds.value();
}
if (grey_avatars > 0)
{
if (gFrameTimeSeconds != sGreyUpdateTime) // only update once per frame
{
sGreyUpdateTime = gFrameTimeSeconds;
- sGreyTime += gFrameIntervalSeconds;
+ sGreyTime += gFrameIntervalSeconds.value();
}
}
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7a81063f83..7c20e8eae7 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -257,8 +257,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf()
BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// add special-purpose "screen" joint
mScreenp = new LLViewerJoint("mScreen", NULL);
// for now, put screen at origin, as it is only used during special
@@ -652,8 +650,6 @@ BOOL LLVOAvatarSelf::loadLayersets()
// virtual
BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
// update screen joint size
if (mScreenp)
{
@@ -914,17 +910,11 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
if (mLastRegionHandle != 0)
{
++mRegionCrossingCount;
- F64 delta = (F64)mRegionCrossingTimer.getElapsedTimeF32();
- F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG);
- F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount;
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_AVG, delta_avg);
-
- F64 max = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_MAX);
- max = llmax(delta, max);
- LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max);
+ LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32();
+ LLStatViewer::REGION_CROSSING_TIME.sample(delta);
// Diagnostics
- llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl;
+ llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl;
}
if (regionp)
{
@@ -1008,8 +998,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
// virtual
void LLVOAvatarSelf::restoreMeshData()
{
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
//llinfos << "Restoring" << llendl;
mMeshValid = TRUE;
updateJointLODs();
@@ -2144,7 +2132,7 @@ LLSD LLVOAvatarSelf::metricsData()
result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32();
result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32();
result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32();
- result["startup"] = LLStartUp::getPhases().dumpPhases();
+ result["startup"] = LLStartUp::getPhases().asLLSD();
return result;
}
@@ -2226,7 +2214,7 @@ void LLVOAvatarSelf::sendAppearanceChangeMetrics()
{
LLCurlRequest::headers_t headers;
LLHTTPClient::post(caps_url,
- msg,
+ msg,
new ViewerAppearanceChangeMetricsResponder(report_sequence,
report_sequence,
reporting_started));
@@ -2593,7 +2581,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**)
llinfos << "TAT: rebake - matched entry " << (S32)index << llendl;
gAgentAvatarp->invalidateComposite(layer_set, TRUE);
found = TRUE;
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES);
+ LLStatViewer::TEX_REBAKES.add(1);
}
}
}
@@ -2638,7 +2626,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
}
invalidateComposite(layer_set, TRUE);
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES);
+ LLStatViewer::TEX_REBAKES.add(1);
}
else
{
@@ -2793,7 +2781,7 @@ void LLVOAvatarSelf::deleteScratchTextures()
sScratchTexNames.deleteAllData();
sScratchTexLastBindTime.deleteAllData();
- LLImageGL::sGlobalTextureMemoryInBytes -= sScratchTexBytes;
+ LLImageGL::sGlobalTextureMemory -= sScratchTexBytes;
sScratchTexBytes = 0;
}
}
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 566c33c0af..4dca87652d 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -675,7 +675,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB");
void LLGrassPartition::getGeometry(LLSpatialGroup* group)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLFastTimer ftm(FTM_REBUILD_GRASS_VB);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index e4f9915e93..fa34a6f1f5 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -599,7 +599,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom");
void LLParticlePartition::getGeometry(LLSpatialGroup* group)
{
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 5d1c335078..88c7d471f4 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3983,7 +3983,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LLFastTimer t(FTM_REGISTER_FACE);
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
{
@@ -4910,11 +4909,19 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
facep->setTextureIndex(cur_tex);
texture_list.push_back(tex);
- //if (can_batch_texture(facep))
- {
+ if (can_batch_texture(facep))
+ { //populate texture_list with any textures that can be batched
+ //move i to the next unbatchable face
while (i != faces.end())
{
facep = *i;
+
+ if (!can_batch_texture(facep))
+ { //face is bump mapped or has an animated texture matrix -- can't
+ //batch more than 1 texture at a time
+ break;
+ }
+
if (facep->getTexture() != tex)
{
if (distance_sort)
@@ -4940,12 +4947,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
cur_tex++;
}
- if (!can_batch_texture(facep))
- { //face is bump mapped or has an animated texture matrix -- can't
- //batch more than 1 texture at a time
- break;
- }
-
if (cur_tex >= texture_index_channels)
{ //cut batches when index channels are depleted
break;
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index a33f42cf84..7f17fd3e56 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -301,7 +301,7 @@ void LLVOWLSky::restoreGL()
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
}
-static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry");
+static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry");
BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
{
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 6f6411ce3c..0eb00f7191 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -136,7 +136,6 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
{
LLFile::remove(std::string(filename));
}
- LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
LL_WARNS("Wearable") << "Wearable download failed: " << LLAssetStorage::getErrorString( status ) << " " << uuid << LL_ENDL;
switch( status )
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 78ee3e4fd9..126dc59929 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -138,7 +138,6 @@ void LLWorld::destroyClass()
LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
{
- LLMemType mt(LLMemType::MTYPE_REGIONS);
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
if (regionp)
@@ -644,7 +643,6 @@ void LLWorld::updateVisibilities()
void LLWorld::updateRegions(F32 max_update_time)
{
- LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS);
LLTimer update_timer;
BOOL did_one = FALSE;
@@ -694,8 +692,10 @@ void LLWorld::updateNetStats()
{
LLViewerRegion* regionp = *iter;
regionp->updateNetStats();
- bits += regionp->mBitStat.getCurrent();
- packets += llfloor( regionp->mPacketsStat.getCurrent() );
+ bits += regionp->mBitsReceived;
+ packets += llfloor( regionp->mPacketsReceived );
+ regionp->mBitsReceived = 0.f;
+ regionp->mPacketsReceived = 0.f;
}
S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn;
@@ -704,19 +704,16 @@ void LLWorld::updateNetStats()
S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits();
S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits();
- LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f);
- LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f);
- LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f);
- LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in);
- LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out);
- LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets);
+
+ LLStatViewer::ACTUAL_IN_KBIT.add<LLTrace::Bits>(actual_in_bits);
+ LLStatViewer::ACTUAL_OUT_KBIT.add<LLTrace::Bits>(actual_out_bits);
+ LLStatViewer::KBIT.add<LLTrace::Bits>(bits);
+ LLStatViewer::PACKETS_IN.add(packets_in);
+ LLStatViewer::PACKETS_OUT.add(packets_out);
+ LLStatViewer::PACKETS_LOST.add(packets_lost);
if (packets_in)
{
- LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in));
- }
- else
- {
- LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f);
+ LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in));
}
mLastPacketsIn = gMessageSystem->mPacketsIn;
@@ -1129,6 +1126,7 @@ void send_agent_pause()
}
gObjectList.mWasPaused = TRUE;
+ LLViewerStats::instance().getRecording().stop();
}
@@ -1158,8 +1156,8 @@ void send_agent_resume()
gMessageSystem->sendReliable(regionp->getHost());
}
- // Reset the FPS counter to avoid an invalid fps
- LLViewerStats::getInstance()->mFPSStat.start();
+ // Resume data collection to ignore invalid rates
+ LLViewerStats::instance().getRecording().resume();//getInstance()->mFPSStat.reset();
LLAppViewer::instance()->resumeMainloopTimeout();
}
@@ -1194,7 +1192,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
{
LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
- if (!pVOAvatar->isDead() && !pVOAvatar->isSelf())
+ if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy)
{
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
LLUUID uuid = pVOAvatar->getID();
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a3ccf87cfc..ccc513b80d 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1320,7 +1320,7 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- gGL.translatef((F32)x, (F32)y, 0.f);
+ gGL.translatef((F32)x * LLUI::sGLScaleFactor.mV[VX], (F32)y * LLUI::sGLScaleFactor.mV[VY], 0.f);
gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color);
gGL.popMatrix();
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 0da70d398b..583196fb7a 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -25,6 +25,8 @@
*/
#include "llviewerprecompiledheaders.h"
+// include this to get winsock2 because openssl attempts to include winsock1
+#include "llwin32headerslean.h"
#include <openssl/x509_vfy.h>
#include <openssl/ssl.h>
#include "llsecapi.h"
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index ea2dc60b07..813fc7db6a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -35,7 +35,6 @@
#include "llviewercontrol.h"
#include "llfasttimer.h"
#include "llfontgl.h"
-#include "llmemtype.h"
#include "llnamevalue.h"
#include "llpointer.h"
#include "llprimitive.h"
@@ -464,8 +463,6 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name)
void LLPipeline::init()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
-
refreshCachedSettings();
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
@@ -491,7 +488,6 @@ void LLPipeline::init()
getPool(LLDrawPool::POOL_BUMP);
getPool(LLDrawPool::POOL_GLOW);
- LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
resetFrameStats();
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
@@ -779,7 +775,7 @@ void LLPipeline::allocatePhysicsBuffer()
}
}
-void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
+bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
refreshCachedSettings();
U32 samples = RenderFSAASamples;
@@ -789,8 +785,13 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
+ bool ret = true;
+
if (!allocateScreenBuffer(resX, resY, samples))
{
+ //failed to allocate at requested specification, return false
+ ret = false;
+
releaseScreenBuffers();
//reduce number of samples
while (samples > 0)
@@ -798,7 +799,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
samples /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{ //success
- return;
+ return ret;
}
releaseScreenBuffers();
}
@@ -811,20 +812,22 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
resY /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{
- return;
+ return ret;
}
releaseScreenBuffers();
resX /= 2;
if (allocateScreenBuffer(resX, resY, samples))
{
- return;
+ return ret;
}
releaseScreenBuffers();
}
llwarns << "Unable to allocate screen buffer at any resolution!" << llendl;
}
+
+ return ret;
}
@@ -869,7 +872,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (!mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (samples > 0)
{
- if (!mFXAABuffer.allocate(nhpo2(resX), nhpo2(resY), GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
+ if (!mFXAABuffer.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
}
else
{
@@ -903,7 +906,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
}
}
- U32 width = nhpo2(U32(resX*scale))/2;
+ U32 width = (U32)(resX*scale);
U32 height = width;
if (shadow_detail > 1)
@@ -1129,7 +1132,6 @@ void LLPipeline::releaseScreenBuffers()
void LLPipeline::createGLBuffers()
{
stop_glerror();
- LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
assertInitialized();
updateRenderDeferred();
@@ -1266,7 +1268,6 @@ void LLPipeline::createLUTBuffers()
void LLPipeline::restoreGL()
{
- LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL);
assertInitialized();
if (mVertexShadersEnabled)
@@ -1328,7 +1329,6 @@ BOOL LLPipeline::canUseAntiAliasing() const
void LLPipeline::unloadShaders()
{
- LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS);
LLViewerShaderMgr::instance()->unloadShaders();
mVertexShadersLoaded = 0;
@@ -1360,7 +1360,6 @@ S32 LLPipeline::getMaxLightingDetail() const
S32 LLPipeline::setLightingDetail(S32 level)
{
- LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
refreshCachedSettings();
if (level < 0)
@@ -1522,7 +1521,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
LLDrawPool *poolp = findPool(type, tex0);
if (poolp)
{
@@ -1539,7 +1537,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
// static
LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
U32 type = getPoolTypeFromTE(te, imagep);
return gPipeline.getPool(type, imagep);
}
@@ -1547,8 +1544,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture*
//static
U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
- LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE);
-
if (!te || !imagep)
{
return 0;
@@ -1577,7 +1572,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
void LLPipeline::addPool(LLDrawPool *new_poolp)
{
- LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL);
assertInitialized();
mPools.insert(new_poolp);
addToQuickLookup( new_poolp );
@@ -1585,7 +1579,6 @@ void LLPipeline::addPool(LLDrawPool *new_poolp)
void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
- LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE);
LLDrawable *drawable = new LLDrawable();
vobj->mDrawable = drawable;
@@ -1699,8 +1692,6 @@ void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
U32 LLPipeline::addObject(LLViewerObject *vobj)
{
- LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
-
if (RenderDelayCreation)
{
mCreateQ.push_back(vobj);
@@ -1716,7 +1707,6 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
LLFastTimer ftm(FTM_PIPELINE_CREATE);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
LLTimer update_timer;
@@ -1779,7 +1769,7 @@ void LLPipeline::resetFrameStats()
{
assertInitialized();
- LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
+ LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn);
if (mBatchCount > 0)
{
@@ -1898,11 +1888,12 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree");
static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move");
+static LLFastTimer::DeclareTimer FTM_RETEXTURE("Retexture");
+static LLFastTimer::DeclareTimer FTM_MOVED_LIST("Moved List");
void LLPipeline::updateMove()
{
LLFastTimer t(FTM_UPDATE_MOVE);
- LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
if (FreezeTime)
{
@@ -1912,8 +1903,7 @@ void LLPipeline::updateMove()
assertInitialized();
{
- static LLFastTimer::DeclareTimer ftm("Retexture");
- LLFastTimer t(ftm);
+ LLFastTimer t(FTM_RETEXTURE);
for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
iter != mRetexturedList.end(); ++iter)
@@ -1928,8 +1918,7 @@ void LLPipeline::updateMove()
}
{
- static LLFastTimer::DeclareTimer ftm("Moved List");
- LLFastTimer t(ftm);
+ LLFastTimer t(FTM_MOVED_LIST);
updateMovedList(mMovedList);
}
@@ -2256,7 +2245,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling");
void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep)
{
LLFastTimer t(FTM_CULL);
- LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL);
grabReferences(result);
@@ -2331,7 +2319,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
bound_shader = true;
gOcclusionCubeProgram.bind();
}
-
+
if (sUseOcclusion > 1)
{
if (mCubeVB.isNull())
@@ -2509,7 +2497,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
{
gOcclusionCubeProgram.bind();
}
- }
+ }
if (mCubeVB.isNull())
{ //cube VB will be used for issuing occlusion queries
@@ -2595,8 +2583,8 @@ void LLPipeline::clearRebuildGroups()
// Else, no HUD objects so clear the build state
else
{
- group->clearState(LLSpatialGroup::IN_BUILD_Q1);
- }
+ group->clearState(LLSpatialGroup::IN_BUILD_Q1);
+ }
}
// Clear the group
@@ -2623,8 +2611,8 @@ void LLPipeline::clearRebuildGroups()
// Else, no HUD objects so clear the build state
else
{
- group->clearState(LLSpatialGroup::IN_BUILD_Q2);
- }
+ group->clearState(LLSpatialGroup::IN_BUILD_Q2);
+ }
}
// Clear the group
mGroupQ2.clear();
@@ -2638,7 +2626,6 @@ void LLPipeline::rebuildPriorityGroups()
{
LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
LLTimer update_timer;
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
assertInitialized();
gMeshRepo.notifyLoadedMeshes();
@@ -2710,7 +2697,6 @@ void LLPipeline::rebuildGroups()
void LLPipeline::updateGeom(F32 max_dtime)
{
LLTimer update_timer;
- LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM);
LLPointer<LLDrawable> drawablep;
LLFastTimer t(FTM_GEO_UPDATE);
@@ -2761,7 +2747,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
S32 count = 0;
- max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, max_dtime);
+ max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnit<LLUnits::Seconds, F32>(max_dtime));
LLSpatialGroup* last_group = NULL;
LLSpatialBridge* last_bridge = NULL;
@@ -2804,8 +2790,6 @@ void LLPipeline::updateGeom(F32 max_dtime)
void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
-
if(drawablep && !drawablep->isDead())
{
if (drawablep->isSpatialBridge())
@@ -2845,8 +2829,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
{
- LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED);
-
if (!drawablep)
{
//llerrs << "Sending null drawable to moved list!" << llendl;
@@ -2891,8 +2873,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT);
-
if (!drawablep || drawablep->isDead())
{
return;
@@ -2918,8 +2898,6 @@ static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
-
assertInitialized();
glClear(GL_DEPTH_BUFFER_BIT);
@@ -2973,8 +2951,6 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
void LLPipeline::markTextured(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED);
-
if (drawablep && !drawablep->isDead() && assertInitialized())
{
mRetexturedList.insert(drawablep);
@@ -3025,8 +3001,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
-
if (group && !group->isDead() && group->mSpatialPartition)
{
if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD)
@@ -3066,8 +3040,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD);
-
if (drawablep && !drawablep->isDead() && assertInitialized())
{
if (!drawablep->isState(LLDrawable::BUILT))
@@ -3114,7 +3086,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
LLFastTimer ftm(FTM_STATESORT);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
//LLVertexBuffer::unbind();
@@ -3215,7 +3186,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (group->changeLOD())
{
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
@@ -3234,7 +3204,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (bridge->getSpatialGroup()->changeLOD())
{
bool force_update = false;
@@ -3244,8 +3213,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
-
if (!drawablep
|| drawablep->isDead()
|| !hasRenderType(drawablep->getRenderType()))
@@ -3408,11 +3375,11 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
+ }
}
}
}
}
-}
void renderPhysicalBeacons(LLDrawable* drawablep)
{
@@ -3437,11 +3404,11 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
+ }
}
}
}
}
-}
void renderMOAPBeacons(LLDrawable* drawablep)
{
@@ -3477,11 +3444,11 @@ void renderMOAPBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
+ }
}
}
}
}
-}
void renderParticleBeacons(LLDrawable* drawablep)
{
@@ -3506,11 +3473,11 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
+ }
}
}
}
}
-}
void renderSoundHighlights(LLDrawable* drawablep)
{
@@ -3528,15 +3495,14 @@ void renderSoundHighlights(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
+ }
}
}
}
}
-}
void LLPipeline::postSort(LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
LLFastTimer ftm(FTM_STATESORT_POSTSORT);
assertInitialized();
@@ -3745,7 +3711,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (facep)
{
gPipeline.mSelectedFaces.push_back(facep);
- }
+ }
}
return true;
}
@@ -3754,33 +3720,6 @@ void LLPipeline::postSort(LLCamera& camera)
}
}
- /*static LLFastTimer::DeclareTimer FTM_TRANSFORM_WAIT("Transform Fence");
- static LLFastTimer::DeclareTimer FTM_TRANSFORM_DO_WORK("Transform Work");
- if (use_transform_feedback)
- { //using transform feedback, wait for transform feedback to complete
- LLFastTimer t(FTM_TRANSFORM_WAIT);
-
- S32 done = 0;
- //glGetQueryivARB(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_CURRENT_QUERY, &count);
-
- glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done);
-
- while (!done)
- {
- {
- LLFastTimer t(FTM_TRANSFORM_DO_WORK);
- F32 max_time = llmin(gFrameIntervalSeconds*10.f, 1.f);
- //do some useful work while we wait
- LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
- LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
- LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
- }
- glGetQueryObjectivARB(mMeshDirtyQueryObject, GL_QUERY_RESULT_AVAILABLE, &done);
- }
-
- mTransformFeedbackPrimitives = 0;
- }*/
-
//LLSpatialGroup::sNoDelete = FALSE;
llpushcallstacks ;
}
@@ -3788,7 +3727,6 @@ void LLPipeline::postSort(LLCamera& camera)
void render_hud_elements()
{
- LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS);
LLFastTimer t(FTM_RENDER_UI);
gPipeline.disableLights();
@@ -3843,8 +3781,6 @@ void render_hud_elements()
void LLPipeline::renderHighlights()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL);
-
assertInitialized();
// Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
@@ -4008,7 +3944,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ;
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM);
LLFastTimer t(FTM_RENDER_GEOMETRY);
assertInitialized();
@@ -4261,7 +4196,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
- LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
LLFastTimer t(FTM_RENDER_GEOMETRY);
LLFastTimer t2(FTM_DEFERRED_POOLS);
@@ -4358,7 +4292,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
{
- LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
LLFastTimer t(FTM_POST_DEFERRED_POOLS);
U32 cur_type = 0;
@@ -4454,7 +4387,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
void LLPipeline::renderGeomShadow(LLCamera& camera)
{
- LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@@ -4608,8 +4540,6 @@ void LLPipeline::renderPhysicsDisplay()
void LLPipeline::renderDebug()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
-
assertInitialized();
bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD);
@@ -4965,7 +4895,7 @@ void LLPipeline::renderDebug()
{
DebugBlip& blip = *iter;
- blip.mAge += gFrameIntervalSeconds;
+ blip.mAge += gFrameIntervalSeconds.value();
if (blip.mAge > 2.f)
{
mDebugBlips.erase(iter++);
@@ -4975,7 +4905,7 @@ void LLPipeline::renderDebug()
iter++;
}
- blip.mPosition.mV[2] += gFrameIntervalSeconds*2.f;
+ blip.mPosition.mV[2] += gFrameIntervalSeconds.value()*2.f;
gGL.color4fv(blip.mColor.mV);
gGL.vertex3fv(blip.mPosition.mV);
@@ -5262,7 +5192,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
void LLPipeline::rebuildPools()
{
LLFastTimer t(FTM_REBUILD_POOLS);
- LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
assertInitialized();
@@ -5302,8 +5231,6 @@ void LLPipeline::rebuildPools()
void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP);
-
assertInitialized();
switch( new_poolp->getType() )
@@ -5469,7 +5396,6 @@ void LLPipeline::removePool( LLDrawPool* poolp )
void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
{
assertInitialized();
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
switch( poolp->getType() )
{
case LLDrawPool::POOL_SIMPLE:
@@ -5790,7 +5716,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
{
if (farthest_light->fade >= 0.f)
{
- farthest_light->fade = -gFrameIntervalSeconds;
+ farthest_light->fade = -(gFrameIntervalSeconds.value());
}
}
else
@@ -5886,12 +5812,12 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
if (fade >= 0.f)
{
fade = fade / LIGHT_FADE_TIME;
- ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds;
+ ((Light*) (&(*iter)))->fade += gFrameIntervalSeconds.value();
}
else
{
fade = 1.f + fade / LIGHT_FADE_TIME;
- ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds;
+ ((Light*) (&(*iter)))->fade -= gFrameIntervalSeconds.value();
}
fade = llclamp(fade,0.f,1.f);
light_color *= fade;
@@ -6892,7 +6818,6 @@ void LLPipeline::doResetVertexBuffers()
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
{
- LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
@@ -6965,7 +6890,6 @@ static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom");
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
- LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
if (!(gPipeline.canUseVertexShaders() &&
sRenderGlow))
{
@@ -7117,11 +7041,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGlowProgram.unbind();
- if (LLRenderTarget::sUseFBO)
+ /*if (LLRenderTarget::sUseFBO)
{
LLFastTimer ftm(FTM_RENDER_BLOOM_FBO);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
- }
+ }*/
gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
@@ -7208,7 +7132,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
else if (transition_time < 1.f)
{ //currently in a transition, continue interpolating
- transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds.value();
transition_time = llmin(transition_time, 1.f);
F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
@@ -7997,10 +7921,6 @@ void LLPipeline::renderDeferredLighting()
gGL.popMatrix();
stop_glerror();
- //copy depth and stencil from deferred screen
- //mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
- // 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
-
mScreen.bindTarget();
// clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
glClearColor(0,0,0,0);
@@ -8772,8 +8692,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
- LLRenderTarget::unbindTarget();
-
LLPipeline::sReflectionRender = FALSE;
if (!LLRenderTarget::sUseFBO)
@@ -9206,7 +9124,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
if (!mHighlightSet.empty())
{
- F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime;
+ F32 transition = gFrameIntervalSeconds.value()/RenderHighlightFadeTime;
LLGLDisable test(GL_ALPHA_TEST);
LLGLDepthTest depth(GL_FALSE);
@@ -9841,7 +9759,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
if (gen_shadow)
{
- F32 fade_amt = gFrameIntervalSeconds * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f);
+ LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat();
+ F32 fade_amt = gFrameIntervalSeconds.value()
+ * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecordingPeriod().getDuration().value(), 1.0);
//update shadow targets
for (U32 i = 0; i < 2; i++)
@@ -10031,7 +9951,6 @@ static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
- LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
LLGLState::checkStates();
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 7a0ca86231..c38e7fbdc1 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -119,8 +119,14 @@ public:
void createGLBuffers();
void createLUTBuffers();
- void allocateScreenBuffer(U32 resX, U32 resY);
+ //allocate the largest screen buffer possible up to resX, resY
+ //returns true if full size buffer allocated, false if some other size is allocated
+ bool allocateScreenBuffer(U32 resX, U32 resY);
+
+ //attempt to allocate screen buffers at resX, resY
+ //returns true if allocation successful, false otherwise
bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
+
void allocatePhysicsBuffer();
void resetVertexBuffers(LLDrawable* drawable);
diff --git a/indra/newview/skins/default/xui/da/floater_lagmeter.xml b/indra/newview/skins/default/xui/da/floater_lagmeter.xml
deleted file mode 100644
index 149d174c34..0000000000
--- a/indra/newview/skins/default/xui/da/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG METER">
- <floater.string name="max_title_msg">
- Lag måler
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Klient
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, vindue i baggrund
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Klients billeder/sek under [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Klients billeder/sek mellem [CLIENT_FRAME_RATE_CRITICAL] og [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Mulig årsag: &apos;Vis afstand&apos; sat for højt i grafik indstillinger
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Mulig årsag: Billeder hentes
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Mulig årsag: For mange billeder i hukommelse
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Mulig årsag: For mange komplekse objekter i scenariet
- </floater.string>
- <floater.string name="network_text_msg">
- Netværk
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Forbindelsen mister over [NETWORK_PACKET_LOSS_CRITICAL]% pakker
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Forbindelsen mister [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% pakker
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Forbindelsens ping tider er over [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Forbindelsens ping tider er [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Muligvis dårlig forbindelse eller &apos;båndbredde&apos; sat for højt i netværksopsætning.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Muligvis dårlig forbindelse eller fil delings program.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simulator framerate er under [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simulator framerate er mellem [SERVER_FRAME_RATE_CRITICAL] og [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Mulig årsag: For mange fysiske objekter
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Mulig årsag: For mange objekter med script
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Mulig årsag: For meget netværks trafik
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Mulig årsag: For mange avatarer i bevægelse i regionen
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Mulig årsag: For mange billed udregninger
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Mulig årsag: Simulator belastning for stor
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status for klient lag"/>
- <text name="client">
- Klient
- </text>
- <text name="client_text">
- Normal
- </text>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Network lag status"/>
- <text name="network">
- Netværk
- </text>
- <text name="network_text">
- Normal
- </text>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Status for server lag"/>
- <text name="server">
- Server
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Ændre størrelse"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/floater_lagmeter.xml b/indra/newview/skins/default/xui/de/floater_lagmeter.xml
deleted file mode 100644
index 45ff37c147..0000000000
--- a/indra/newview/skins/default/xui/de/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG METER">
- <floater.string name="max_title_msg">
- Lag-Anzeige
- </floater.string>
- <floater.string name="max_width_px">
- 350
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Client
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, Fenster im Hintergrund
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Client-Frame-Rate unter [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Client-Frame-Rate zwischen [CLIENT_FRAME_RATE_CRITICAL] und [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Mögliche Ursache: Sichtweite zu groß
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Mögliche Ursache: Bilder werden geladen
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Mögliche Ursache: Zu viele Bilder im Speicher
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Mögliche Ursache: Zu viele komplexe Objekte in der Szene
- </floater.string>
- <floater.string name="network_text_msg">
- Netzwerk
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Paketverlust der Verbindung übersteigt [NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Paketverlust der Verbindung liegt bei [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Ping-Zeit der Verbindung übersteigt [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Ping-Zeit der Verbindung liegt bei [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Möglicherweise schlechte Verbindung oder zu hoher Wert für „Bandbreite“.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Möglicherweise schlechte Verbindung oder File-Sharing-Anwendung.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simulator-Frame-Rate liegt unter [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simulator-Frame-Rate liegt zwischen [SERVER_FRAME_RATE_CRITICAL] und [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Mögliche Ursache: Zu viele physische Objekte
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Mögliche Ursache: Zu viele geskriptete Objekte
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Mögliche Ursache: Zu viel Netzwerktraffic
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Mögliche Ursache: Zu viele Personen in Bewegung in der Region
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Mögliche Ursache: Zu viele Bildberechnungen
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Mögliche Ursache: Zu hohe Simulator-Last
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Client-Lag-Status"/>
- <text name="client">
- Client
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Netzwerk-Lag-Status"/>
- <text name="network">
- Netzwerk
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Server-Lag-Status"/>
- <text name="server">
- Server
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt; " name="minimize" tool_tip="Fenstergröße ändern"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
deleted file mode 100644
index b24c745bdd..0000000000
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ /dev/null
@@ -1,336 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="170"
- layout="topleft"
- name="floater_lagmeter"
- help_topic="floater_lagmeter"
- save_rect="true"
- title="LAG METER"
- width="350">
- <floater.string
- name="max_title_msg">
- Lag Meter
- </floater.string>
- <floater.string
- name="max_width_px">
- 360
- </floater.string>
- <floater.string
- name="min_title_msg">
- Lag
- </floater.string>
- <floater.string
- name="min_width_px">
- 90
- </floater.string>
- <floater.string
- name="client_text_msg">
- Client
- </floater.string>
- <floater.string
- name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string
- name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string
- name="client_frame_time_window_bg_msg">
- Normal, window in background
- </floater.string>
- <floater.string
- name="client_frame_time_critical_msg">
- Client frame rate below [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string
- name="client_frame_time_warning_msg">
- Client frame rate between [CLIENT_FRAME_RATE_CRITICAL] and [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string
- name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="client_draw_distance_cause_msg">
- Possible cause: Draw distance set too high
- </floater.string>
- <floater.string
- name="client_texture_loading_cause_msg">
- Possible cause: Images loading
- </floater.string>
- <floater.string
- name="client_texture_memory_cause_msg">
- Possible cause: Too many images in memory
- </floater.string>
- <floater.string
- name="client_complex_objects_cause_msg">
- Possible cause: Too many complex objects in scene
- </floater.string>
- <floater.string
- name="network_text_msg">
- Network
- </floater.string>
- <floater.string
- name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string
- name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string
- name="network_packet_loss_critical_msg">
- Connection is dropping over [NETWORK_PACKET_LOSS_CRITICAL]% of packets
- </floater.string>
- <floater.string
- name="network_packet_loss_warning_msg">
- Connection is dropping [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% of packets
- </floater.string>
- <floater.string
- name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string
- name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string
- name="network_ping_critical_msg">
- Connection ping time is over [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string
- name="network_ping_warning_msg">
- Connection ping time is [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string
- name="network_packet_loss_cause_msg">
- Possible bad connection or &apos;Bandwidth&apos; pref too high.
- </floater.string>
- <floater.string
- name="network_ping_cause_msg">
- Possible bad connection or file-sharing app.
- </floater.string>
- <floater.string
- name="server_text_msg">
- Server
- </floater.string>
- <floater.string
- name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string
- name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string
- name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string
- name="server_frame_time_critical_msg">
- Simulator framerate below [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string
- name="server_frame_time_warning_msg">
- Simulator framerate between [SERVER_FRAME_RATE_CRITICAL] and [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string
- name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string
- name="server_physics_cause_msg">
- Possible Cause: Too many physical objects
- </floater.string>
- <floater.string
- name="server_scripts_cause_msg">
- Possible Cause: Too many scripted objects
- </floater.string>
- <floater.string
- name="server_net_cause_msg">
- Possible Cause: Too much network traffic
- </floater.string>
- <floater.string
- name="server_agent_cause_msg">
- Possible Cause: Too many moving people in region
- </floater.string>
- <floater.string
- name="server_images_cause_msg">
- Possible Cause: Too many image calculations
- </floater.string>
- <floater.string
- name="server_generic_cause_msg">
- Possible Cause: Simulator load too heavy
- </floater.string>
- <floater.string
- name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string
- name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="client_lagmeter"
- tab_stop="false"
- tool_tip="Client lag status"
- top="24"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="client"
- top_delta="0"
- width="128">
- Client
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="40"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="client_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="56"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="client_lag_cause"
- right="-32" />
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="network_lagmeter"
- tab_stop="false"
- tool_tip="Network lag status"
- top="64"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="network"
- top_delta="0"
- width="128">
- Network
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="80"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="network_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="96"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="network_lag_cause"
- right="-32" />
- <button
- follows="top|left"
- height="16"
- image_selected="lag_status_good.tga"
- image_unselected="lag_status_good.tga"
- layout="topleft"
- left="8"
- name="server_lagmeter"
- tab_stop="false"
- tool_tip="Server lag status"
- top="104"
- width="16" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="3"
- name="server"
- top_delta="0"
- width="60">
- Server
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- type="string"
- length="1"
- bottom="120"
- follows="left|top"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="110"
- name="server_text"
- right="-10">
- Normal
- </text>
- <text
- invisiblity_control="LagMeterShrunk"
- bottom="136"
- follows="left|top"
- height="16"
- layout="topleft"
- left="40"
- name="server_lag_cause"
- right="-32" />
- <button
- follows="left|top"
- height="20"
- label="&gt;&gt;"
- layout="topleft"
- left="10"
- name="minimize"
- tool_tip="Toggle floater size"
- top_delta="24"
- width="40">
- <button.commit_callback
- function="LagMeter.ClickShrink" />
- </button>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index f9eb16d224..273954ee3e 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -104,6 +104,7 @@
label="KTris Drawn per Frame"
unit_label="/fr"
stat="trianglesdrawnstat"
+ unit_scale="0.001"
bar_min="0"
bar_max="10000"
tick_spacing="1000"
@@ -116,6 +117,7 @@
name="ktrissec"
label="KTris Drawn per Sec"
unit_label="/sec"
+ unit_scale="0.001"
stat="trianglesdrawnstat"
bar_min="0"
bar_max="200000"
@@ -222,6 +224,8 @@
name="gltexmemstat"
label="GL Mem"
stat="gltexmemstat"
+ unit_label="MB"
+ unit_scale="0.000001"
bar_min="0.f"
bar_max="400.f"
tick_spacing="100.f"
@@ -235,11 +239,13 @@
name="formattedmemstat"
label="Formatted Mem"
stat="formattedmemstat"
+ unit_label="MB"
+ unit_scale="0.000001"
bar_min="0.f"
bar_max="400.f"
tick_spacing="100.f"
label_spacing="200.f"
- precision="1"
+ precision="3"
show_per_sec="false"
show_bar="false">
</stat_bar>
@@ -247,12 +253,14 @@
<stat_bar
name="rawmemstat"
label="Raw Mem"
+ unit_label="MB"
+ unit_scale="0.000001"
stat="rawmemstat"
bar_min="0.f"
bar_max="400.f"
tick_spacing="100.f"
label_spacing="200.f"
- precision="1"
+ precision="3"
show_per_sec="false"
show_bar="false">
</stat_bar>
@@ -261,11 +269,13 @@
name="glboundmemstat"
label="Bound Mem"
stat="glboundmemstat"
+ unit_label="MB"
+ unit_scale="0.000001"
bar_min="0.f"
bar_max="400.f"
tick_spacing="100.f"
label_spacing="200.f"
- precision="1"
+ precision="3"
show_per_sec="false"
show_bar="false">
</stat_bar>
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 5204efbf65..436e9f8fed 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2994,7 +2994,7 @@ even though the user gets a free copy.
use_ellipses="true"
read_only="true"
name="media_info"
- width="280" />
+ width="180" />
<web_browser
visible="false"
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index 06d4327293..eb01294831 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -5,7 +5,7 @@
height="640"
layout="topleft"
min_height="230"
- min_width="650"
+ min_width="750"
name="gui_preview_tool"
help_topic="gui_preview_tool"
single_instance="true"
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index fc7272b904..3b8ace6308 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -195,6 +195,20 @@
<menu_item_separator name="sepatator2" />
<menu_item_call
+ label="Expand all folders"
+ layout="topleft"
+ name="expand">
+ <on_click
+ function="Gear.Expand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Collapse all folders"
+ layout="topleft"
+ name="collapse">
+ <on_click
+ function="Gear.Collapse" />
+ </menu_item_call>
+ <menu_item_call
label="Rename Outfit"
layout="topleft"
name="rename">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 1aa55acf2d..c6d9f9ef8f 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -276,30 +276,39 @@
parameter="gestures" />
</menu_item_check>
<menu_item_separator/>
- <menu_item_call
+ <menu_item_check
label="Friends"
name="My Friends"
shortcut="control|shift|F">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="friends_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
+ </menu_item_check>
+ <menu_item_check
label="Groups"
name="My Groups"
shortcut="control|shift|G">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="groups_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="groups_panel" />
- </menu_item_call>
- <menu_item_call
+ </menu_item_check>
+ <menu_item_check
label="Nearby people"
name="Active Speakers"
shortcut="control|shift|A">
- <menu_item_call.on_click
+ <menu_item_check.on_check
+ function="SideTray.CheckPanelPeopleTab"
+ parameter="nearby_panel" />
+ <menu_item_check.on_click
function="SideTray.PanelPeopleTab"
parameter="nearby_panel" />
- </menu_item_call>
+ </menu_item_check>
<menu_item_call
label="Block List"
name="Block List">
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index eea2606125..df91ad8b5e 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -254,7 +254,7 @@ things in this group. There&apos;s a broad variety of Abilities.
column_padding="0"
draw_stripes="true"
height="200"
- follows="left|top"
+ follows="left|top|right"
layout="topleft"
left="0"
right="-1"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index cdf14572fe..e844a15118 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -30,7 +30,7 @@
(This page does not pass the specified whitelist)
</text>
<line_editor
- max_length="1024"
+ max_length_bytes="1024"
bottom_delta="-24"
enabled="true"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index f6a8af0973..765b07ed8b 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -158,6 +158,7 @@
text_readonly_color="DkGray"
width="487"
show_line_numbers="true"
+ enable_tooltip_paste="true"
word_wrap="true">
Loading...
</text_editor>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index e69a17e037..f1ae14809f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- height="570"
- layout="topleft"
- name="object properties"
- help_topic="object_properties"
- title="Object Profile"
- width="333">
- <panel.string
- name="text deed continued">
- Deed
- </panel.string>
- <panel.string
- name="text deed">
- Deed
- </panel.string>
- <panel.string
- name="text modify info 1">
- You can modify this object
- </panel.string>
- <panel.string
- name="text modify info 2">
- You can modify these objects
- </panel.string>
- <panel.string
- name="text modify info 3">
- You can't modify this object
- </panel.string>
- <panel.string
- name="text modify info 4">
- You can't modify these objects
- </panel.string>
- <panel.string
+ height="570"
+ layout="topleft"
+ name="object properties"
+ help_topic="object_properties"
+ title="Object Profile"
+ width="333">
+ <panel.string
+ name="text deed continued">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text deed">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text modify info 1">
+ You can modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 2">
+ You can modify these objects
+ </panel.string>
+ <panel.string
+ name="text modify info 3">
+ You can't modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 4">
+ You can't modify these objects
+ </panel.string>
+ <panel.string
name="text modify info 5">
You can't modify this object across a region boundary
</panel.string>
@@ -39,399 +39,403 @@
You can't modify these objects across a region boundary
</panel.string>
<panel.string
- name="text modify warning">
- This object has linked parts
- </panel.string>
- <panel.string
- name="Cost Default">
- Price: L$
- </panel.string>
- <panel.string
- name="Cost Total">
- Total Price: L$
- </panel.string>
- <panel.string
- name="Cost Per Unit">
- Price Per: L$
- </panel.string>
- <panel.string
- name="Cost Mixed">
- Mixed Price
- </panel.string>
- <panel.string
- name="Sale Mixed">
- Mixed Sale
- </panel.string>
+ name="text modify warning">
+ This object has linked parts
+ </panel.string>
+ <panel.string
+ name="Cost Default">
+ Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Total">
+ Total Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Per Unit">
+ Price Per: L$
+ </panel.string>
+ <panel.string
+ name="Cost Mixed">
+ Mixed Price
+ </panel.string>
+ <panel.string
+ name="Sale Mixed">
+ Mixed Sale
+ </panel.string>
+ <button
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ left="8"
+ name="back_btn"
+ tab_stop="false"
+ top="0"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHuge"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ use_ellipses="true"
+ value="Object Profile"
+ width="290" />
+ <text
+ follows="top|left"
+ height="13"
+ layout="topleft"
+ left="45"
+ name="where"
+ text_color="LtGray_50"
+ value="(Inworld)"
+ width="150" />
+ <panel
+ follows="all"
+ height="490"
+ label=""
+ layout="topleft"
+ left="10"
+ help_topic=""
+ name="properties_panel"
+ top="45"
+ width="313"
+ background_visible="true"
+ bg_alpha_color="DkGray2">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Name:"
+ top="10"
+ width="78">
+ Name:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="20"
+ layout="topleft"
+ left_delta="78"
+ max_length_bytes="63"
+ name="Object Name"
+ top_delta="0"
+ width="225" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Description:"
+ top_pad="10"
+ width="78">
+ Description:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ name="Object Description"
+ select_on_focus="true"
+ left_delta="78"
+ max_length_bytes="127"
+ top_delta="-5"
+ width="225"/>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="CreatorNameLabel"
+ top_pad="12"
+ width="78">
+ Creator:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Creator Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Owner:"
+ top_pad="15"
+ width="78">
+ Owner:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Owner Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Group_label"
+ top_pad="15"
+ width="78">
+ Group:
+ </text>
<button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- left="8"
- name="back_btn"
- tab_stop="false"
- top="0"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHuge"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- use_ellipses="true"
- value="Object Profile"
- width="290" />
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="where"
- text_color="LtGray_50"
- value="(Inworld)"
- width="150" />
- <panel
- follows="all"
- height="490"
- label=""
- layout="topleft"
- left="10"
- help_topic=""
- name="properties_panel"
- top="45"
- width="313"
- background_visible="true"
- bg_alpha_color="DkGray2">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Name:"
- top="10"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="20"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="Object Name"
- top_delta="0"
- width="225" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Description:"
- top_pad="10"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="23"
- layout="topleft"
- name="Object Description"
- select_on_focus="true"
- left_delta="78"
- max_length_bytes="127"
- top_delta="-5"
- width="225"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="CreatorNameLabel"
- top_pad="12"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Creator Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Owner:"
- top_pad="15"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Owner Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Group_label"
- top_pad="15"
- width="78">
- Group:
- </text>
- <button
- follows="top|left"
- height="10"
- image_disabled="Activate_Checkmark"
- image_selected="Activate_Checkmark"
- image_unselected="Activate_Checkmark"
- image_color="White_50"
- layout="topleft"
- left_pad="0"
- top_delta="0"
- name="button set group"
- tab_stop="false"
- tool_tip="Choose a group to share this object's permissions"
- width="10" />
- <name_box
- follows="left|top"
- height="18"
- initial_value="Loading..."
- layout="topleft"
- left_pad="5"
- top_delta="-1"
- name="Group Name Proxy"
- width="150" />
- <button
- follows="top|left"
- height="23"
- label="Deed"
- label_selected="Deed"
- layout="topleft"
- name="button deed"
- top_pad="0"
- left="81"
- tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="9"
- layout="topleft"
- top_pad="5"
- left="5"
- name="label click action"
- width="280">
- Click to:
- </text>
- <combo_box
- follows="left|top"
- height="23"
- layout="topleft"
- name="clickaction"
- width="168"
- left="81">
- <combo_box.item
- label="Touch (default)"
- name="Touch/grab(default)"
+ follows="top|left"
+ height="10"
+ image_disabled="Activate_Checkmark"
+ image_selected="Activate_Checkmark"
+ image_unselected="Activate_Checkmark"
+ image_color="White_50"
+ layout="topleft"
+ left_pad="0"
+ top_delta="0"
+ name="button set group"
+ tab_stop="false"
+ tool_tip="Choose a group to share this object's permissions"
+ width="10" />
+ <name_box
+ follows="left|top"
+ height="18"
+ initial_value="Loading..."
+ layout="topleft"
+ left_pad="5"
+ top_delta="-1"
+ name="Group Name Proxy"
+ width="150" />
+ <button
+ follows="top|left"
+ height="23"
+ label="Deed"
+ label_selected="Deed"
+ layout="topleft"
+ name="button deed"
+ top_pad="0"
+ left="81"
+ tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="9"
+ layout="topleft"
+ top_pad="5"
+ left="5"
+ name="label click action"
+ width="280">
+ Click to:
+ </text>
+ <combo_box
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ name="clickaction"
+ width="168"
+ left="81">
+ <combo_box.item
+ label="Touch (default)"
+ name="Touch/grab(default)"
value="Touch" />
- <combo_box.item
- label="Sit on object"
- name="Sitonobject"
+ <combo_box.item
+ label="Sit on object"
+ name="Sitonobject"
value="Sit" />
- <combo_box.item
- label="Buy object"
- name="Buyobject"
+ <combo_box.item
+ label="Buy object"
+ name="Buyobject"
value="Buy" />
- <combo_box.item
- label="Pay object"
- name="Payobject"
+ <combo_box.item
+ label="Pay object"
+ name="Payobject"
value="Pay" />
- <combo_box.item
- label="Open"
- name="Open"
- value="Open" />
- </combo_box>
- <panel
- border="false"
- follows="left|top"
- layout="topleft"
- mouse_opaque="false"
- background_visible="true"
- bg_alpha_color="DkGray"
- name="perms_inv"
- left="0"
- top_pad="15"
- height="135"
- width="313">
- <text
- type="string"
- length="1"
+ <combo_box.item
+ label="Open"
+ name="Open"
+ value="Open" />
+ <combo_box.item
+ label="Zoom"
+ name="Zoom"
+ value="Zoom" />
+ </combo_box>
+ <panel
+ border="false"
+ follows="left|top"
+ layout="topleft"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ name="perms_inv"
+ left="0"
+ top_pad="15"
+ height="135"
+ width="313">
+ <text
+ type="string"
+ length="1"
left="5"
- top_pad="15"
- text_color="EmphasisColor"
- height="15"
- follows="left|top|right"
- layout="topleft"
- name="perm_modify"
- width="310">
- You can modify this object
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Anyone can:"
- top_pad="8"
- width="100">
- Anyone:
- </text>
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox allow everyone copy"
- top_delta="-2"
- width="90" />
- <check_box
- height="18"
- label="Move"
- layout="topleft"
- name="checkbox allow everyone move"
- left_pad="0"
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="8"
- width="100">
- Group:
- </text>
- <check_box
- height="18"
- label="Share"
- layout="topleft"
- left_pad="90"
- top_delta="-2"
- name="checkbox share with group"
- tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="8"
- width="200"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="18"
- label="Modify"
- layout="topleft"
- left="20"
- top_pad="0"
- name="checkbox next owner can modify"
- width="90" />
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can copy"
- width="90" />
- <check_box
- height="18"
- label="Transfer"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can transfer"
- tool_tip="Next owner can give away or resell this object"
- width="106" />
- </panel>
- <check_box
- height="23"
- label="For Sale"
- layout="topleft"
- left="20"
- name="checkbox for sale"
- top_pad="10"
- width="100" />
- <combo_box
- height="23"
- left_pad="0"
- layout="topleft"
- follows="left|top"
- name="sale type"
- width="170">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
+ top_pad="15"
+ text_color="EmphasisColor"
+ height="15"
+ follows="left|top|right"
+ layout="topleft"
+ name="perm_modify"
+ width="310">
+ You can modify this object
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="Anyone can:"
+ top_pad="8"
+ width="100">
+ Anyone:
+ </text>
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox allow everyone copy"
+ top_delta="-2"
+ width="90" />
+ <check_box
+ height="18"
+ label="Move"
+ layout="topleft"
+ name="checkbox allow everyone move"
+ left_pad="0"
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="GroupLabel"
+ top_pad="8"
+ width="100">
+ Group:
+ </text>
+ <check_box
+ height="18"
+ label="Share"
+ layout="topleft"
+ left_pad="90"
+ top_delta="-2"
+ name="checkbox share with group"
+ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="NextOwnerLabel"
+ top_pad="8"
+ width="200"
+ word_wrap="true">
+ Next owner:
+ </text>
+ <check_box
+ height="18"
+ label="Modify"
+ layout="topleft"
+ left="20"
+ top_pad="0"
+ name="checkbox next owner can modify"
+ width="90" />
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can copy"
+ width="90" />
+ <check_box
+ height="18"
+ label="Transfer"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can transfer"
+ tool_tip="Next owner can give away or resell this object"
+ width="106" />
+ </panel>
+ <check_box
+ height="23"
+ label="For Sale"
+ layout="topleft"
+ left="20"
+ name="checkbox for sale"
+ top_pad="10"
+ width="100" />
+ <combo_box
+ height="23"
+ left_pad="0"
+ layout="topleft"
+ follows="left|top"
+ name="sale type"
+ width="170">
+ <combo_box.item
+ name="Copy"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
+ name="Original"
+ label="Original"
+ value="1" />
+ </combo_box>
+ <spinner
follows="left|top"
decimal_digits="0"
increment="1"
@@ -445,17 +449,17 @@
min_val="1"
height="20"
max_val="999999999" />
- <check_box
- height="20"
- width="110"
- top_pad="6"
- label="Show in search"
- layout="topleft"
- left="120"
- name="search_check"
- tool_tip="Let people see this object in search results" />
- <text
- type="string"
+ <check_box
+ height="20"
+ width="110"
+ top_pad="6"
+ label="Show in search"
+ layout="topleft"
+ left="120"
+ name="search_check"
+ tool_tip="Let people see this object in search results" />
+ <text
+ type="string"
follows="left|top"
name="pathfinding_attributes_label"
top_pad="6"
@@ -466,7 +470,7 @@
<text
type="string"
follows="left|top"
- text_color="EmphasisColor"
+ text_color="EmphasisColor"
name="pathfinding_attributes_value"
width="130"
word_wrap="false"
@@ -475,120 +479,120 @@
<text
type="string"
text_color="EmphasisColor"
- length="1"
+ length="1"
top_pad="10"
- follows="left|top"
- layout="topleft"
- left="10"
- name="B:"
- height="10"
- width="50">
- B:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="O:"
- height="10"
- width="50">
- O:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="G:"
- height="10"
- width="50">
- G:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- left_pad="0"
- layout="topleft"
- name="E:"
- height="10"
- width="50">
- E:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="N:"
- height="10"
- width="50">
- N:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="F:"
- height="10"
- width="50">
- F:
- </text>
- </panel>
- <panel
- height="25"
- layout="bottomright"
- name="button_panel"
- left="5"
- bottom="5"
- width="313">
- <button
- follows="bottom|left"
- height="23"
- label="Open"
- layout="topleft"
- left="5"
- name="open_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Pay"
- layout="topleft"
- left_pad="5"
- name="pay_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Buy"
- layout="topleft"
- left_pad="5"
- name="buy_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Details"
- layout="topleft"
- left_pad="5"
- name="details_btn"
- top="0"
- width="74" />
+ follows="left|top"
+ layout="topleft"
+ left="10"
+ name="B:"
+ height="10"
+ width="50">
+ B:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="O:"
+ height="10"
+ width="50">
+ O:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="G:"
+ height="10"
+ width="50">
+ G:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ left_pad="0"
+ layout="topleft"
+ name="E:"
+ height="10"
+ width="50">
+ E:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="N:"
+ height="10"
+ width="50">
+ N:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="F:"
+ height="10"
+ width="50">
+ F:
+ </text>
+ </panel>
+ <panel
+ height="25"
+ layout="bottomright"
+ name="button_panel"
+ left="5"
+ bottom="5"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Open"
+ layout="topleft"
+ left="5"
+ name="open_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Pay"
+ layout="topleft"
+ left_pad="5"
+ name="pay_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Buy"
+ layout="topleft"
+ left_pad="5"
+ name="buy_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Details"
+ layout="topleft"
+ left_pad="5"
+ name="details_btn"
+ top="0"
+ width="74" />
- </panel>
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 2157a05bbf..18d1854f67 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1447,7 +1447,7 @@ integer llScriptDanger(vector pos)
Returns TRUE if pos is over public land, sandbox land, land that doesn&apos;t allow everyone to edit and build, or land that doesn&apos;t allow outside scripts
</string>
<string name="LSLTipText_llDialog" translate="false">
-llDialog(key avatar, string message, list buttons, integer chat_channel
+llDialog(key avatar, string message, list buttons, integer chat_channel)
Shows a dialog box on the avatar&apos;s screen with a message and up to 12 buttons.
If a button is pressed, the avatar says the text of the button label on chat_channel.
</string>
diff --git a/indra/newview/skins/default/xui/es/floater_lagmeter.xml b/indra/newview/skins/default/xui/es/floater_lagmeter.xml
deleted file mode 100644
index 227689a194..0000000000
--- a/indra/newview/skins/default/xui/es/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MEDIDOR DEL LAG">
- <floater.string name="max_title_msg">
- Medidor del lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Cliente
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, ventana en segundo plano
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Frames del cliente valorados por debajo de [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Frames del cliente valorados entre [CLIENT_FRAME_RATE_CRITICAL] y [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Posible causa: distancia de dibujo fijada muy alta
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Posible causa: imágenes cargándose
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Posible causa: demasiadas imágenes en la memoria
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Posible causa: demasiados objetos complejos en la escena
- </floater.string>
- <floater.string name="network_text_msg">
- Red
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La conexión deja caer más del [NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La conexión deja caer [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de los paquetes
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- El tiempo de conexión -ping- supera los [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- El tiempo de conexión -ping- es de [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Quizá una mala conexión o un ancho de banda fijado demasiado alto.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Quizá una mala conexión o una aplicación de archivos compartidos.
- </floater.string>
- <floater.string name="server_text_msg">
- Servidor
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Frecuencia (framerate) por debajo de [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Frecuencia (framerate) entre [SERVER_FRAME_RATE_CRITICAL] y [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Posible causa: demasiados objetos físicos
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Posible causa: demasiados objetos con script
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Posible causa: demasiado tráfico en la red
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Posible causa: demasiada gente moviéndose en la región
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Posible causa: demasiados cálculos de imáganes
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Posible causa: carga del simulador muy pesada
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Estado del lag del cliente"/>
- <text name="client">
- Cliente
- </text>
- <text font="SansSerifSmall" name="client_text">
- Normal
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Estado del lag de la red"/>
- <text name="network">
- Red
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normal
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Estado del lag del servidor"/>
- <text name="server">
- Servidor
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normal
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Cambia el tamaño de la ventana"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml b/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
deleted file mode 100644
index 39a861d8bd..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MESURE DU LAG">
- <floater.string name="max_title_msg">
- Mesure du lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Client
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, fenêtre en arrière-plan
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Taux de défilement [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Taux de défilement entre [CLIENT_FRAME_RATE_CRITICAL] et [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Cause possible : limite d&apos;affichage trop élevée
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Cause possible : images en cours de chargement
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Cause possible : trop d&apos;images en mémoire
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Cause possible : trop d&apos;objets complexes
- </floater.string>
- <floater.string name="network_text_msg">
- Réseau
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La connexion perd plus de [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La connexion perd entre [NETWORK_PACKET_LOSS_WARNING] % et [NETWORK_PACKET_LOSS_CRITICAL] % de paquets
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Connexion ping > [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Connexion ping entre [NETWORK_PING_WARNING] et [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Mauvaise connexion possible ou réglage de la bande passante trop élevé.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Mauvaise connexion possible ou app. de partage des fichiers
- </floater.string>
- <floater.string name="server_text_msg">
- Serveur
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Défilement du simulateur &lt; [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Défilement simulateur entre [SERVER_FRAME_RATE_CRITICAL] et [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Cause possible : trop d&apos;objets physiques
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Cause possible : trop d&apos;objets scriptés
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Cause possible : trop de trafic réseau
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Cause possible : trop de personnes en mouvement
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Cause possible : trop de calculs d&apos;images
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Cause possible : charge simulateur trop lourde
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Statut du lag client"/>
- <text name="client">
- Client
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Statut du lag réseau"/>
- <text name="network">
- Réseau
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Statut du lag serveur"/>
- <text name="server">
- Serveur
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Activer/désactiver la taille du floater"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/floater_lagmeter.xml b/indra/newview/skins/default/xui/it/floater_lagmeter.xml
deleted file mode 100644
index f7b2b1ab4a..0000000000
--- a/indra/newview/skins/default/xui/it/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="MISURATORE LAG">
- <floater.string name="max_title_msg">
- Misuratore del lag
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Programma in locale
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normale, finestra sullo sfondo
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Velocità dei frame al di sotto di [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Velocità dei frame tra [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normale
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Possibile causa: Campo visivo impostato troppo alto
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Possibile causa: Caricamento immagini
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Possibile causa: Troppe immagini in memoria
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Possibile causa: Troppi oggetti complessi intorno
- </floater.string>
- <floater.string name="network_text_msg">
- Network
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- La connessione sta calando al di sotto del [NETWORK_PACKET_LOSS_CRITICAL]% di pacchetti
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- La connessione sta calando tra il [NETWORK_PACKET_LOSS_WARNING]% e il [NETWORK_PACKET_LOSS_CRITICAL]% di pacchetti
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normale
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Il tempo di ping della connessione è al di sopra di [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Il tempo di ping della connessione è tra [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Possibile cattiva connessione o la larghezza di banda impostata nelle preferenze troppo alta.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Possibile cattiva connessione o l&apos;apertura di un programma di scambio files.
- </floater.string>
- <floater.string name="server_text_msg">
- Server
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Velocità dei frame al di sotto di [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Velocità dei frame tra [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normale
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Possibile causa: troppi oggetti fisici
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Possibile causa: troppi oggetti scriptati
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Possibile causa: eccessivo traffico sulla rete
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Possibile causa: troppi residenti in movimento nella regione
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Possibile causa: troppe elaborazioni di immagini
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Possibile causa: carico eccessivo del simulatore
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Stato del lag del programma in locale"/>
- <text name="client">
- Client
- </text>
- <text font="SansSerifSmall" left="145" name="client_text">
- Normale
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Stato del lag del network"/>
- <text name="network">
- Rete
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normale
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Stato del lag del server"/>
- <text name="server">
- Server
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normale
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Cambia dimensioni floater"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml b/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
deleted file mode 100644
index e3546cd837..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="ラグメーター">
- <floater.string name="max_title_msg">
- ラグ メーター
- </floater.string>
- <floater.string name="max_width_px">
- 350
- </floater.string>
- <floater.string name="min_title_msg">
- ラグ
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- クライアント
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- ノーマル、ウィンドウは背景に
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- クライアント フレームレート < [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- クライアント フレームレート: [CLIENT_FRAME_RATE_CRITICAL] ~ [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- 考えられる原因: 描画距離の設定が大きすぎる
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- 考えられる原因: 画像のロード中
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- 考えられる原因: メモリ内の画像数が多すぎる
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- 考えられる原因: 画面に含まれる複雑なオブジェクトが多すぎる
- </floater.string>
- <floater.string name="network_text_msg">
- ネットワーク
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- 接続でドロップされるパケットの割合: > [NETWORK_PACKET_LOSS_CRITICAL]
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- 接続でドロップされるパケットの割合:[NETWORK_PACKET_LOSS_WARNING] ~ [NETWORK_PACKET_LOSS_CRITICAL]
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- 接続の ping 時間: > [NETWORK_PING_CRITICAL] ミリ秒
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- 接続の ping 時間: [NETWORK_PING_WARNING] ~ [NETWORK_PING_CRITICAL] ミリ秒
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- 接続不良になっているか、帯域幅設定が高すぎます。
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- 接続不良になっているか、ファイル共有アプリケーションに問題があります。
- </floater.string>
- <floater.string name="server_text_msg">
- サーバー
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- シミュレーターのフレームレート: < [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- シミュレーターのフレームレート: [SERVER_FRAME_RATE_CRITICAL] ~ [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- ノーマル
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- 考えられる原因: 物理的オブジェクトが多すぎる
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- 考えられる原因: スクリプトを含むオブジェクトが多すぎる
- </floater.string>
- <floater.string name="server_net_cause_msg">
- 考えられる原因: ネットワーク トラフィック過大
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- 考えられる原因: 地域内にて動いているアバターが多すぎる
- </floater.string>
- <floater.string name="server_images_cause_msg">
- 考えられる原因: 画像計算が多すぎる
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- 考えられる原因: シミュレーターの過負荷
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="クライアント ラグ ステータス"/>
- <text name="client">
- クライアント
- </text>
- <text name="client_text">
- ノーマル
- </text>
- <button name="network_lagmeter" tool_tip="ネットワーク ラグ ステータス"/>
- <text name="network">
- ネットワーク
- </text>
- <text name="network_text">
- ノーマル
- </text>
- <button name="server_lagmeter" tool_tip="サーバー ラグ ステータス"/>
- <text name="server">
- サーバー
- </text>
- <text name="server_text">
- ノーマル
- </text>
- <button label="&gt;&gt; " name="minimize" tool_tip="フローターのサイズをトグル"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml b/indra/newview/skins/default/xui/pl/floater_lagmeter.xml
deleted file mode 100644
index 8038550bcb..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="POMIAR LAGÓW">
- <floater.string name="max_title_msg">
- Pomiar lagów
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Lag
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Klient
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- W normie, okno w tle
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Ilość klatek na sekundę klienta poniżej [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Ilość klatek na sekundę pomiędzy [CLIENT_FRAME_RATE_CRITICAL] i [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- W normie
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Przyczyna: dystans rysowania jest za wysoki
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Przyczyna: ładowanie obrazu
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Przyczyna: za dużo obrazów w pamięci
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Przyczyna: za dużo złożonych obiektów
- </floater.string>
- <floater.string name="network_text_msg">
- Sieć
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Utrata pakietów przekracza [NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Utrata pakietów przekracza [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]%
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- W normie
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Fatalny ping - [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Wolny ping - [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Złe połączenie lub przepustowość.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Złe połączenie lub aplikacja współdzieląca pliki.
- </floater.string>
- <floater.string name="server_text_msg">
- Serwer
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Ilość klatek na sekundę poniżej [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Ilość klatek na sekundę pomiędzy [SERVER_FRAME_RATE_CRITICAL] i [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- W normie
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Przyczyna: za dużo obiektów fizycznych
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Przyczyna: za dużo obieków skryptowanych
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Przyczyna: za duży ruch w sieci
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Przyczyna: za dużo poruszających się awatarów w regionie
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Przyczyna: za dużo kalkulacji obrazu
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Przyczyna: symulator ładuje się zbyt powoli
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status lagów klienta"/>
- <text name="client">
- Klient
- </text>
- <text name="client_text">
- W normie
- </text>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Network lag status"/>
- <text name="network">
- Sieć
- </text>
- <text name="network_text">
- W normie
- </text>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Server lag status"/>
- <text name="server">
- Serwer
- </text>
- <text name="server_text">
- W normie
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Złącz rozmiar pliku xml"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml b/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
deleted file mode 100644
index 9932318293..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_lagmeter.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG - Índice">
- <floater.string name="max_title_msg">
- Medidor de Atraso
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Atraso
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Cliente
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, janela por baixo
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Taxa de quadros do Cliente abaixo de [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Taxa de quadros do Cliente entre [CLIENT_FRAME_RATE_CRITICAL] e [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Causa possível: Distância de desenho ajustada muito alta
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Causa possível: Carregamento de Imagens
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Causa possível: Muitas imagens na memória
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Causa possível: Muitos objetos complexos na cena
- </floater.string>
- <floater.string name="network_text_msg">
- Rede
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Conexão está caindo para cerca de [NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Conexão está caindo [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% de pacotes
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Tempo de conexão de ping é cerca de [NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Tempo de conexão de ping é [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Possível conexão ruim ou &apos;Largura de Banda&apos; escolhida muito alta.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Possível conexão ruim ou aplicativos compartilhando arquivos.
- </floater.string>
- <floater.string name="server_text_msg">
- Servidor
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Taxa de quadros abaixo de [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Taxa de quadros entre [SERVER_FRAME_RATE_CRITICAL] e [SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Causa possível: Muitos objetos físicos
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Causa possível: Muitos objetos com scripts
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Causa possível: Muito tráfego na rede
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Causa possível: Muitas pessoas se movendo na região
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Causa possível: Muitos cálculos de imagem
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Causa possível: Carga no simulador muito pesada
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button label="" label_selected="" name="client_lagmeter" tool_tip="Status de atraso no Cliente"/>
- <text name="client">
- Cliente
- </text>
- <text font="SansSerifSmall" name="client_text">
- Normal
- </text>
- <text left="30" name="client_lag_cause" right="-10"/>
- <button label="" label_selected="" name="network_lagmeter" tool_tip="Status de atraso na rede"/>
- <text name="network">
- Rede
- </text>
- <text font="SansSerifSmall" name="network_text">
- Normal
- </text>
- <text left="30" name="network_lag_cause" right="-10"/>
- <button label="" label_selected="" name="server_lagmeter" tool_tip="Status de atraso no servidor"/>
- <text name="server">
- Servidor
- </text>
- <text font="SansSerifSmall" name="server_text">
- Normal
- </text>
- <text left="30" name="server_lag_cause" right="-32"/>
- <button label="&gt;&gt;" name="minimize" tool_tip="Alternar o tamanho da janela"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/ru/floater_lagmeter.xml b/indra/newview/skins/default/xui/ru/floater_lagmeter.xml
deleted file mode 100644
index c420006a03..0000000000
--- a/indra/newview/skins/default/xui/ru/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="УРОВЕНЬ ЛАГОВ">
- <floater.string name="max_title_msg">
- Уровень лагов
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Лаг
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- Клиент
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Нормально, окно в фоне
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- Частота кадров клиента ниже [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- Частота кадров клиента от [CLIENT_FRAME_RATE_CRITICAL] до [CLIENT_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Возможная причина: дальность отрисовки слишком велика
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Возможная причина: загрузка изображений
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Возможная причина: слишком много изображений в памяти
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Возможная причина: слишком много сложных объектов в сцене
- </floater.string>
- <floater.string name="network_text_msg">
- Сеть
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Сеть теряет более [NETWORK_PACKET_LOSS_CRITICAL]% пакетов
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Сеть теряет [NETWORK_PACKET_LOSS_WARNING]–[NETWORK_PACKET_LOSS_CRITICAL]% пакетов
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Пинг соединения более [NETWORK_PING_CRITICAL] мс
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Пинг соединения [NETWORK_PING_WARNING]–[NETWORK_PING_CRITICAL] мс
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Возможно, плохое соединение, или параметр «Ширина канала» слишком велик.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Возможно, плохое соединение или есть работающие файлообменные программы.
- </floater.string>
- <floater.string name="server_text_msg">
- Сервер
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Частота кадров сервера ниже [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Частота кадров сервера [SERVER_FRAME_RATE_CRITICAL]–[SERVER_FRAME_RATE_WARNING]
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Нормально
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Возможная причина: слишком много физических объектов
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Возможная причина: слишком много скриптовых объектов
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Возможная причина: слишком большой сетевой трафик
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Возможная причина: слишком много людей в регионе
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Возможная причина: слишком много изображений
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Возможная причина: сервер сильно загружен
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="Уровень лагов клиента"/>
- <text name="client">
- Клиент
- </text>
- <text name="client_text">
- Нормально
- </text>
- <button name="network_lagmeter" tool_tip="Уровень лагов сети"/>
- <text name="network">
- Сеть
- </text>
- <text name="network_text">
- Нормально
- </text>
- <button name="server_lagmeter" tool_tip="Уровень лагов сервера"/>
- <text name="server">
- Сервер
- </text>
- <text name="server_text">
- Нормально
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Переключение размера"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/tr/floater_lagmeter.xml b/indra/newview/skins/default/xui/tr/floater_lagmeter.xml
deleted file mode 100644
index 736c50be90..0000000000
--- a/indra/newview/skins/default/xui/tr/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="GECİKME ÖLÇER">
- <floater.string name="max_title_msg">
- Gecikme Ölçer
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- Gecikme
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- İstemci
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- Normal, pencere alt zeminde
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- İstemci kare hızı [CLIENT_FRAME_RATE_CRITICAL] altında
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- İstemci kare hızı [CLIENT_FRAME_RATE_CRITICAL] ile [CLIENT_FRAME_RATE_WARNING] arasınad
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- Muhtemel neden: Çizme mesafesi çok yüksek
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- Muhtemel neden: Görüntüler yükleniyor
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- Muhtemel neden: Bellekte çok fazla görüntü
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- Muhtemel neden: Sahnede çok fazla karmaşık nesne
- </floater.string>
- <floater.string name="network_text_msg">
- Ağ
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- Bağlantı paketlerin % [NETWORK_PACKET_LOSS_CRITICAL]&apos;sinden fazlasını bırakıyor
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- Bağlantı paketlerin % [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]&apos;sini bırakıyor
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- Normal
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- Bağlantı ping süresi [NETWORK_PING_CRITICAL] ms.den fazla
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- Bağlantı ping süresi [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] ms
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- Muhtemel yetersiz bağlantı veya &apos;Bant Genişliği&apos; tercihi çok yüksek.
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- Muhtemel yetersiz bağlantı veya dosya paylaşım uygulaması.
- </floater.string>
- <floater.string name="server_text_msg">
- Sunucu
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- Simülatör kare hızı [SERVER_FRAME_RATE_CRITICAL] altında
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- Simülatör kare hızı [SERVER_FRAME_RATE_CRITICAL] ve [SERVER_FRAME_RATE_WARNING] arasında
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- Normal
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- Muhtemel Neden: Çok fazla fiziki nesne
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- Muhtemel Neden: Çok fazla komut dosyalı nesne
- </floater.string>
- <floater.string name="server_net_cause_msg">
- Muhtemel Neden: Çok fazla ağ trafiği
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- Muhtemel Neden: Bölgede hareket eden çok fazla insan var
- </floater.string>
- <floater.string name="server_images_cause_msg">
- Muhtemel Neden: Çok fazla görüntü hesabı
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- Muhtemel Neden: Simülatör yükü çok ağır
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="İstemci gecikme durumu"/>
- <text name="client">
- İstemci
- </text>
- <text name="client_text">
- Normal
- </text>
- <button name="network_lagmeter" tool_tip="Ağ gecikme durumu"/>
- <text name="network">
- Ağ
- </text>
- <text name="network_text">
- Normal
- </text>
- <button name="server_lagmeter" tool_tip="Sunucu gecikme durumu"/>
- <text name="server">
- Sunucu
- </text>
- <text name="server_text">
- Normal
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="Gezdirici büyüklüğünü değiştir"/>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml b/indra/newview/skins/default/xui/zh/floater_lagmeter.xml
deleted file mode 100644
index e9a082288a..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_lagmeter.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_lagmeter" title="LAG 測量器">
- <floater.string name="max_title_msg">
- Lag 測量器
- </floater.string>
- <floater.string name="max_width_px">
- 360
- </floater.string>
- <floater.string name="min_title_msg">
- 延遲
- </floater.string>
- <floater.string name="min_width_px">
- 90
- </floater.string>
- <floater.string name="client_text_msg">
- 客戶端
- </floater.string>
- <floater.string name="client_frame_rate_critical_fps">
- 10
- </floater.string>
- <floater.string name="client_frame_rate_warning_fps">
- 15
- </floater.string>
- <floater.string name="client_frame_time_window_bg_msg">
- 正常,視窗位於背景
- </floater.string>
- <floater.string name="client_frame_time_critical_msg">
- 客戶端幀率低於 [CLIENT_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="client_frame_time_warning_msg">
- 客戶端幀率介於 [CLIENT_FRAME_RATE_CRITICAL] 和 [CLIENT_FRAME_RATE_WARNING] 之間
- </floater.string>
- <floater.string name="client_frame_time_normal_msg">
- 正常
- </floater.string>
- <floater.string name="client_draw_distance_cause_msg">
- 可能原因:可視距離設得太遠
- </floater.string>
- <floater.string name="client_texture_loading_cause_msg">
- 可能原因:正在載入圖像
- </floater.string>
- <floater.string name="client_texture_memory_cause_msg">
- 可能原因:記憶體裡圖像太多
- </floater.string>
- <floater.string name="client_complex_objects_cause_msg">
- 可能原因:場景內複雜物件太多
- </floater.string>
- <floater.string name="network_text_msg">
- 網路
- </floater.string>
- <floater.string name="network_packet_loss_critical_pct">
- 10
- </floater.string>
- <floater.string name="network_packet_loss_warning_pct">
- 5
- </floater.string>
- <floater.string name="network_packet_loss_critical_msg">
- 這次連通丟失了至少 [NETWORK_PACKET_LOSS_CRITICAL]% 的封包
- </floater.string>
- <floater.string name="network_packet_loss_warning_msg">
- 這次連通丟失了 [NETWORK_PACKET_LOSS_WARNING]%-[NETWORK_PACKET_LOSS_CRITICAL]% 的封包
- </floater.string>
- <floater.string name="network_performance_normal_msg">
- 正常
- </floater.string>
- <floater.string name="network_ping_critical_ms">
- 600
- </floater.string>
- <floater.string name="network_ping_warning_ms">
- 300
- </floater.string>
- <floater.string name="network_ping_critical_msg">
- 探測連通回應時間超過 [NETWORK_PING_CRITICAL] 毫秒
- </floater.string>
- <floater.string name="network_ping_warning_msg">
- 探測連通回應時間為 [NETWORK_PING_WARNING]-[NETWORK_PING_CRITICAL] 毫秒
- </floater.string>
- <floater.string name="network_packet_loss_cause_msg">
- 可能連通不良,或所設的偏好連通頻寬過高。
- </floater.string>
- <floater.string name="network_ping_cause_msg">
- 可能連通不良,或使用檔案分享應用程式。
- </floater.string>
- <floater.string name="server_text_msg">
- 伺服器
- </floater.string>
- <floater.string name="server_frame_rate_critical_fps">
- 20
- </floater.string>
- <floater.string name="server_frame_rate_warning_fps">
- 30
- </floater.string>
- <floater.string name="server_single_process_max_time_ms">
- 20
- </floater.string>
- <floater.string name="server_frame_time_critical_msg">
- 模擬器 framerate 低於 [SERVER_FRAME_RATE_CRITICAL]
- </floater.string>
- <floater.string name="server_frame_time_warning_msg">
- 模擬器 framerate 介於 [SERVER_FRAME_RATE_CRITICAL] 與 [SERVER_FRAME_RATE_WARNING] 之間
- </floater.string>
- <floater.string name="server_frame_time_normal_msg">
- 正常
- </floater.string>
- <floater.string name="server_physics_cause_msg">
- 可能原因:太多物理物件
- </floater.string>
- <floater.string name="server_scripts_cause_msg">
- 可能原因:太多腳本物件
- </floater.string>
- <floater.string name="server_net_cause_msg">
- 可能原因:太多網路流量
- </floater.string>
- <floater.string name="server_agent_cause_msg">
- 可能原因:地區有太多移動的人
- </floater.string>
- <floater.string name="server_images_cause_msg">
- 可能原因:太多圖像計算
- </floater.string>
- <floater.string name="server_generic_cause_msg">
- 可能原因:模擬器負載過重
- </floater.string>
- <floater.string name="smaller_label">
- &gt;&gt;
- </floater.string>
- <floater.string name="bigger_label">
- &lt;&lt;
- </floater.string>
- <button name="client_lagmeter" tool_tip="客戶端 lag 狀態"/>
- <text name="client">
- 客戶端
- </text>
- <text name="client_text">
- 正常
- </text>
- <button name="network_lagmeter" tool_tip="網路 lag 狀態"/>
- <text name="network">
- 網路
- </text>
- <text name="network_text">
- 正常
- </text>
- <button name="server_lagmeter" tool_tip="伺服器 lag 狀態"/>
- <text name="server">
- 伺服器
- </text>
- <text name="server_text">
- 正常
- </text>
- <button label="&gt;&gt;" name="minimize" tool_tip="切換浮動視窗尺寸"/>
-</floater>
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index f8923b9868..ecdd78a1da 100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -37,6 +37,11 @@
#include "llregionhandle.h"
#include "../llvoavatar.h"
+namespace LLStatViewer
+{
+ LLTrace::Measurement<> FPS_SAMPLE("fpssample");
+}
+
void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
{
counts.resize(3);
@@ -220,7 +225,18 @@ get_region(const LLSD & sd, U64 region_handle1)
namespace tut
{
struct tst_viewerassetstats_index
- {};
+ {
+ tst_viewerassetstats_index()
+ {
+ LLTrace::init();
+ }
+
+ ~tst_viewerassetstats_index()
+ {
+ LLTrace::cleanup();
+ }
+
+ };
typedef test_group<tst_viewerassetstats_index> tst_viewerassetstats_index_t;
typedef tst_viewerassetstats_index_t::object tst_viewerassetstats_index_object_t;
tut::tst_viewerassetstats_index_t tut_tst_viewerassetstats_index("tst_viewerassetstats_test");
@@ -230,24 +246,24 @@ namespace tut
void tst_viewerassetstats_index_object_t::test<1>()
{
// Check that helpers aren't bothered by missing global stats
- ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should be NULL", (NULL == gViewerAssetStats));
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_response_main(LLViewerAssetType::AT_GESTURE, false, false, 12300000ULL);
+ LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_GESTURE, false, false, 12300000ULL);
}
// Create a non-global instance and check the structure
template<> template<>
void tst_viewerassetstats_index_object_t::test<2>()
{
- ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should be NULL", (NULL == gViewerAssetStats));
LLViewerAssetStats * it = new LLViewerAssetStats();
- ensure("Global gViewerAssetStatsMain should still be NULL", (NULL == gViewerAssetStatsMain));
+ ensure("Global gViewerAssetStats should still be NULL", (NULL == gViewerAssetStats));
LLSD sd_full = it->asLLSD(false);
@@ -314,16 +330,17 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<4>()
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->updateStats();
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd["regions"][0];
@@ -337,11 +354,11 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false)["regions"][region1_handle_str];
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false)["regions"][region1_handle_str];
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
@@ -351,19 +368,17 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<5>()
{
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
- ensure("Other collector is empty", is_no_stats_map(sd));
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->updateStats();
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = sd["regions"][0];
@@ -377,13 +392,11 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false)["regions"][0];
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false)["regions"][0];
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
@@ -393,24 +406,25 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<6>()
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
+ gViewerAssetStats = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->updateStats();
+ LLSD sd = gViewerAssetStats->asLLSD(false);
// std::cout << sd << std::endl;
@@ -435,14 +449,14 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = sd["regions"][0];
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure("sd2[get_texture_non_temp_udp][enqueued] is reset", (0 == sd2["get_texture_non_temp_udp"]["enqueued"].asInteger()));
ensure("sd2[get_gesture_udp][enqueued] is reset", (0 == sd2["get_gesture_udp"]["enqueued"].asInteger()));
@@ -452,39 +466,40 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<7>()
{
- gViewerAssetStatsMain = new LLViewerAssetStats();
+ gViewerAssetStats = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, true, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, true, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, true, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::set_region_main(region2_handle);
+ LLViewerAssetStatsFF::set_region(region2_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_GESTURE, false, false);
- LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->updateStats();
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct double-key LLSD map root", is_triple_key_map(sd, "duration", "regions", "avatar"));
ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
@@ -507,15 +522,15 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->reset();
+ sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "duration", "regions", "avatar"));
ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
sd2 = get_region(sd, region2_handle);
ensure("Region2 is present in results", sd2.isMap());
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure_equals("sd2[get_texture_non_temp_udp][enqueued] is reset", sd2["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
ensure_equals("sd2[get_gesture_udp][enqueued] is reset", sd2["get_gesture_udp"]["enqueued"].asInteger(), 0);
@@ -525,36 +540,34 @@ namespace tut
template<> template<>
void tst_viewerassetstats_index_object_t::test<8>()
{
- gViewerAssetStatsThread1 = new LLViewerAssetStats();
- gViewerAssetStatsMain = new LLViewerAssetStats();
- LLViewerAssetStatsFF::set_region_main(region1_handle);
+ gViewerAssetStats = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region(region1_handle);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, false, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, false, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, false);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, true, false);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, true, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, true);
- LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_BODYPART, true, true);
+ LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_BODYPART, true, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, false, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, false, true);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, false);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, true, false);
- LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ LLViewerAssetStatsFF::record_enqueue(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
- ensure("Other collector is empty", is_no_stats_map(sd));
- sd = gViewerAssetStatsMain->asLLSD(false);
+ gViewerAssetStats->updateStats();
+ LLSD sd = gViewerAssetStats->asLLSD(false);
ensure("Correct single-key LLSD map root", is_triple_key_map(sd, "regions", "duration", "avatar"));
ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
sd = get_region(sd, region1_handle);
@@ -572,445 +585,14 @@ namespace tut
// Reset and check zeros...
// Reset leaves current region in place
- gViewerAssetStatsMain->reset();
- sd = get_region(gViewerAssetStatsMain->asLLSD(false), region1_handle);
+ gViewerAssetStats->reset();
+ sd = get_region(gViewerAssetStats->asLLSD(false), region1_handle);
ensure("Region1 is present in results", sd.isMap());
- delete gViewerAssetStatsMain;
- gViewerAssetStatsMain = NULL;
- delete gViewerAssetStatsThread1;
- gViewerAssetStatsThread1 = NULL;
+ delete gViewerAssetStats;
+ gViewerAssetStats = NULL;
ensure_equals("sd[get_texture_non_temp_udp][enqueued] is reset", sd["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
ensure_equals("sd[get_gesture_udp][dequeued] is reset", sd["get_gesture_udp"]["dequeued"].asInteger(), 0);
}
-
-
- // LLViewerAssetStats::merge() basic functions work
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<9>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
-
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 5000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 6000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 8000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 7000000);
- s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 9000000);
-
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 2000000);
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 3000000);
- s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 4000000);
-
- s2.merge(s1);
-
- LLSD s2_llsd = get_region(s2.asLLSD(false), region1_handle);
- ensure("Region1 is present in results", s2_llsd.isMap());
-
- ensure_equals("count after merge", s2_llsd["get_texture_temp_http"]["resp_count"].asInteger(), 8);
- ensure_approximately_equals("min after merge", s2_llsd["get_texture_temp_http"]["resp_min"].asReal(), 2.0, 22);
- ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_max"].asReal(), 9.0, 22);
- ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_mean"].asReal(), 5.5, 22);
- }
-
- // LLViewerAssetStats::merge() basic functions work without corrupting source data
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<10>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
-
-
- s2.setRegion(region2_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has dual regions", dst["regions"].size(), 2);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
- dst["regions"][1].erase("duration");
-
- LLSD s1_llsd = get_region(src, region1_handle);
- ensure("Region1 is present in src", s1_llsd.isMap());
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure("result from src is in dst", llsd_equals(s1_llsd, s2_llsd));
- }
-
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
-
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
- s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region (p2)", src["regions"].size(), 1);
- ensure_equals("merge dst has single region (p2)", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s1_llsd = get_region(src, region1_handle);
- ensure("Region1 is present in src", s1_llsd.isMap());
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("src counts okay (enq)", s1_llsd["get_other"]["enqueued"].asInteger(), 4);
- ensure_equals("src counts okay (deq)", s1_llsd["get_other"]["dequeued"].asInteger(), 4);
- ensure_equals("src resp counts okay", s1_llsd["get_other"]["resp_count"].asInteger(), 2);
- ensure_approximately_equals("src respmin okay", s1_llsd["get_other"]["resp_min"].asReal(), 0.2829, 20);
- ensure_approximately_equals("src respmax okay", s1_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
-
- ensure_equals("dst counts okay (enq)", s2_llsd["get_other"]["enqueued"].asInteger(), 12);
- ensure_equals("src counts okay (deq)", s2_llsd["get_other"]["dequeued"].asInteger(), 11);
- ensure_equals("dst resp counts okay", s2_llsd["get_other"]["resp_count"].asInteger(), 4);
- ensure_approximately_equals("dst respmin okay", s2_llsd["get_other"]["resp_min"].asReal(), 0.010, 20);
- ensure_approximately_equals("dst respmax okay", s2_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
- }
- }
-
-
- // Maximum merges are interesting when one side contributes nothing
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<11>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- // Want to test negative numbers here but have to work in U64
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum",
- s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
- }
-
- // Other way around
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- // Want to test negative numbers here but have to work in U64
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
-
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s1.merge(s2);
-
- LLSD src = s2.asLLSD(false);
- LLSD dst = s1.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum (flipped)",
- s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
- }
- }
-
- // Minimum merges are interesting when one side contributes nothing
- template<> template<>
- void tst_viewerassetstats_index_object_t::test<12>()
- {
- LLViewerAssetStats s1;
- LLViewerAssetStats s2;
-
- s1.setRegion(region1_handle);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
-
- s2.setRegion(region1_handle);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s2.merge(s1);
-
- LLSD src = s1.asLLSD(false);
- LLSD dst = s2.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum",
- s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
- }
-
- // Other way around
- s1.setRegion(region1_handle);
- s2.setRegion(region1_handle);
- s1.reset();
- s2.reset();
-
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
- s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
-
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
- s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
-
- {
- s1.merge(s2);
-
- LLSD src = s2.asLLSD(false);
- LLSD dst = s1.asLLSD(false);
-
- ensure_equals("merge src has single region", src["regions"].size(), 1);
- ensure_equals("merge dst has single region", dst["regions"].size(), 1);
-
- // Remove time stamps, they're a problem
- src.erase("duration");
- src["regions"][0].erase("duration");
- dst.erase("duration");
- dst["regions"][0].erase("duration");
-
- LLSD s2_llsd = get_region(dst, region1_handle);
- ensure("Region1 is present in dst", s2_llsd.isMap());
-
- ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
-
- ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum (flipped)",
- s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
- }
- }
-
}