summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llviewerstatsrecorder.cpp10
-rw-r--r--indra/newview/llviewerstatsrecorder.h9
4 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 36fe5a953f..ca7a300403 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1284,6 +1284,7 @@ bool LLAppViewer::init()
//LLSimpleton creations
LLEnvironment::createInstance();
LLWorld::createInstance();
+ LLViewerStatsRecorder::createInstance();
LLSelectMgr::createInstance();
LLViewerCamera::createInstance();
LL::GLTFSceneManager::createInstance();
@@ -2166,6 +2167,7 @@ bool LLAppViewer::cleanup()
LL::GLTFSceneManager::deleteSingleton();
LLEnvironment::deleteSingleton();
LLSelectMgr::deleteSingleton();
+ LLViewerStatsRecorder::deleteSingleton();
LLViewerEventRecorder::deleteSingleton();
LLWorld::deleteSingleton();
LLVoiceClient::deleteSingleton();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index b993ba16d5..7cefa21125 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1285,7 +1285,6 @@ bool idle_startup()
//
// Initialize classes w/graphics stuff.
//
- LLViewerStatsRecorder::instance(); // Since textures work in threads
LLSurface::initClasses();
display_startup();
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index 88edb96fbb..58065ecce5 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -27,16 +27,13 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerstatsrecorder.h"
-
#include "llcontrol.h"
#include "llfile.h"
+#include "llviewercontrol.h"
#include "llviewerregion.h"
#include "llviewerobject.h"
#include "llworld.h"
-extern LLControlGroup gSavedSettings;
-
-LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL;
LLViewerStatsRecorder::LLViewerStatsRecorder() :
mStatsFile(NULL),
mTimer(),
@@ -48,11 +45,6 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() :
mMaxDuration(300.f),
mSkipSaveIfZeros(false)
{
- if (NULL != sInstance)
- {
- LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL;
- }
- sInstance = this;
clearStats();
}
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index ecc321c0a8..2108f49dc3 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -38,13 +38,12 @@
class LLMutex;
class LLViewerObject;
-class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
+class LLViewerStatsRecorder : public LLSimpleton<LLViewerStatsRecorder>
{
- LLSINGLETON(LLViewerStatsRecorder);
+public:
+ LLViewerStatsRecorder();
LOG_CLASS(LLViewerStatsRecorder);
~LLViewerStatsRecorder();
-
- public:
// Enable/disable stats recording. This is broken down into two
// flags so we can record stats without writing them to the log
// file. This is useful to analyzing updates for scene loading.
@@ -140,8 +139,6 @@ private:
void closeStatsFile();
void makeStatsFileName();
- static LLViewerStatsRecorder* sInstance;
-
LLFILE * mStatsFile; // File to write data into
std::string mStatsFileName;