summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-11-27 17:26:12 -0800
committerRichard Linden <none@none>2012-11-27 17:26:12 -0800
commit1c894c05c10ef37be6507ee4bc4e9173506adfb6 (patch)
treee8136ca59f5e18ad18ed974fb0c7f722b62cd8c2 /indra/newview
parent5d51175cd79b15cf036cd7e6bd646a1a0777eb7f (diff)
SH-3406 WIP convert fast timers to lltrace system
hunting down bad values and crashes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/logcontrol.xml1
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llviewerassetstats.cpp25
-rw-r--r--indra/newview/llviewerassetstats.h7
4 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 92a241857e..b9ae7ebf0b 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -42,6 +42,7 @@
</array>
<key>tags</key>
<array>
+ <string>FastTimers</string>
<!-- sample entry for debugging specific items
<string>Avatar</string>
<string>Voice</string>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f73fc4b990..839094fc47 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -438,7 +438,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
//----------------------------------------------------------------------------
// Metrics logging control constants
//----------------------------------------------------------------------------
-static const F32 METRICS_INTERVAL_DEFAULT = 600.0;
+static const F32 METRICS_INTERVAL_DEFAULT = 30.0;
static const F32 METRICS_INTERVAL_QA = 30.0;
static F32 app_metrics_interval = METRICS_INTERVAL_DEFAULT;
static bool app_metrics_qa_mode = false;
@@ -5308,6 +5308,7 @@ 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(*gViewerAssetStats));
+ main_stats->stop();
main_stats->updateStats();
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 73a2e24424..d79d98aaaf 100644
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -239,7 +239,7 @@ LLViewerAssetStats::LLViewerAssetStats()
: mRegionHandle(U64(0)),
mCurRecording(NULL)
{
- reset();
+ start();
}
@@ -252,6 +252,29 @@ LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
mRegionRecordings = src.mRegionRecordings;
mCurRecording = &mRegionRecordings[mRegionHandle];
+ mCurRecording->stop();
+ LLStopWatchControlsMixin::initTo(src.getPlayState());
+}
+
+void LLViewerAssetStats::handleStart()
+{
+ if (mCurRecording)
+ {
+ mCurRecording->start();
+ }
+}
+
+void LLViewerAssetStats::handleStop()
+{
+ if (mCurRecording)
+ {
+ mCurRecording->stop();
+ }
+}
+
+void LLViewerAssetStats::handleReset()
+{
+ reset();
}
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index 835df89149..5b25d791a9 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -74,7 +74,7 @@
* LLViewerAssetStatsFF is provided for conditional test-and-call
* operations.
*/
-class LLViewerAssetStats
+class LLViewerAssetStats : public LLStopWatchControlsMixin<LLViewerAssetStats>
{
public:
/**
@@ -177,6 +177,7 @@ public:
public:
LLViewerAssetStats();
LLViewerAssetStats(const LLViewerAssetStats &);
+
// Default destructor is correct.
LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
@@ -202,6 +203,10 @@ public:
LLSD asLLSD(bool compact_output);
protected:
+ void handleStart();
+ void handleStop();
+ void handleReset();
+
typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer;
// Region of the currently-active region. Always valid but may