summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstat.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-09-08 18:56:43 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-09-08 18:56:43 -0400
commit4091e47cf206a41cac7ee440b8fd2e2898006685 (patch)
tree61de24d7aa90171a5fb6481189567fe408d03786 /indra/llcommon/llstat.cpp
parent81b9e29a1fe227c8f51c6a644b4e2e1afa6bcfb2 (diff)
parent09cd2a4b1a9f1ddf046fb0ce5d12988b968269a3 (diff)
DRTVWR-209 Merge of viewer-development with SH-3316 drano-http code.
cmake and other files didn't get moved over, do it by hand.
Diffstat (limited to 'indra/llcommon/llstat.cpp')
-rw-r--r--indra/llcommon/llstat.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp
index 057257057f..b82d52797e 100644
--- a/indra/llcommon/llstat.cpp
+++ b/indra/llcommon/llstat.cpp
@@ -40,7 +40,6 @@
S32 LLPerfBlock::sStatsFlags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS; // Control what is being recorded
LLPerfBlock::stat_map_t LLPerfBlock::sStatMap; // Map full path string to LLStatTime objects, tracks all active objects
std::string LLPerfBlock::sCurrentStatPath = ""; // Something like "/total_time/physics/physics step"
-LLStat::stat_map_t LLStat::sStatList;
//------------------------------------------------------------------------
// Live config file to trigger stats logging
@@ -771,13 +770,19 @@ void LLStat::init()
if (!mName.empty())
{
- stat_map_t::iterator iter = sStatList.find(mName);
- if (iter != sStatList.end())
+ stat_map_t::iterator iter = getStatList().find(mName);
+ if (iter != getStatList().end())
llwarns << "LLStat with duplicate name: " << mName << llendl;
- sStatList.insert(std::make_pair(mName, this));
+ getStatList().insert(std::make_pair(mName, this));
}
}
+LLStat::stat_map_t& LLStat::getStatList()
+{
+ static LLStat::stat_map_t stat_list;
+ return stat_list;
+}
+
LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)
: mUseFrameTimer(use_frame_timer),
mNumBins(num_bins)
@@ -803,10 +808,10 @@ LLStat::~LLStat()
if (!mName.empty())
{
// handle multiple entries with the same name
- stat_map_t::iterator iter = sStatList.find(mName);
- while (iter != sStatList.end() && iter->second != this)
+ stat_map_t::iterator iter = getStatList().find(mName);
+ while (iter != getStatList().end() && iter->second != this)
++iter;
- sStatList.erase(iter);
+ getStatList().erase(iter);
}
}