summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcommon/llthread.cpp39
-rw-r--r--indra/llcommon/lltraceaccumulators.h1
-rw-r--r--indra/llcommon/lltracerecording.cpp15
-rw-r--r--indra/llcommon/lltracerecording.h143
-rw-r--r--indra/llcommon/lltracethreadrecorder.cpp7
-rw-r--r--indra/llcommon/lltracethreadrecorder.h2
-rwxr-xr-xindra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/llscenemonitor.cpp36
-rw-r--r--indra/newview/llscenemonitor.h2
-rwxr-xr-xindra/newview/llstatusbar.cpp2
-rwxr-xr-xindra/newview/lltexturefetch.cpp4
-rwxr-xr-xindra/newview/lltexturefetch.h8
-rwxr-xr-xindra/newview/lltextureview.cpp4
-rwxr-xr-xindra/newview/llviewerassetstats.cpp47
-rwxr-xr-xindra/newview/llviewerstats.cpp52
-rwxr-xr-xindra/newview/llviewerstats.h14
-rwxr-xr-xindra/newview/llviewertexturelist.cpp6
-rwxr-xr-xindra/newview/llviewerwindow.cpp2
-rwxr-xr-xindra/newview/llworld.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/floater_scene_load_stats.xml28
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml32
21 files changed, 298 insertions, 157 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 166a4eb26d..e0f53fb9c4 100755
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -39,6 +39,39 @@
#include <sched.h>
#endif
+
+#ifdef LL_WINDOWS
+const DWORD MS_VC_EXCEPTION=0x406D1388;
+
+#pragma pack(push,8)
+typedef struct tagTHREADNAME_INFO
+{
+ DWORD dwType; // Must be 0x1000.
+ const char* szName; // Pointer to name (in user addr space).
+ DWORD dwThreadID; // Thread ID (-1=caller thread).
+ DWORD dwFlags; // Reserved for future use, must be zero.
+} THREADNAME_INFO;
+#pragma pack(pop)
+
+void SetThreadName( DWORD dwThreadID, const char* threadName)
+{
+ THREADNAME_INFO info;
+ info.dwType = 0x1000;
+ info.szName = threadName;
+ info.dwThreadID = dwThreadID;
+ info.dwFlags = 0;
+
+ __try
+ {
+ RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&info );
+ }
+ __except(EXCEPTION_CONTINUE_EXECUTION)
+ {
+ }
+}
+#endif
+
+
//----------------------------------------------------------------------------
// Usage:
// void run_func(LLThread* thread)
@@ -93,6 +126,11 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
{
LLThread *threadp = (LLThread *)datap;
+#ifdef LL_WINDOWS
+ SetThreadName(-1, threadp->mName.c_str());
+#endif
+
+
LLTrace::ThreadRecorder thread_recorder(*LLTrace::get_master_thread_recorder());
#if !LL_DARWIN
@@ -224,6 +262,7 @@ void LLThread::start()
llwarns << "failed to start thread " << mName << llendl;
ll_apr_warn_status(status);
}
+
}
//============================================================================
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index fac6347ff9..a2f9f4c090 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -37,7 +37,6 @@
namespace LLTrace
{
-
template<typename ACCUMULATOR>
class AccumulatorBuffer : public LLRefCount
{
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index f1388e7935..875c371068 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -38,10 +38,13 @@ namespace LLTrace
// Recording
///////////////////////////////////////////////////////////////////////
-Recording::Recording()
-: mElapsedSeconds(0)
+Recording::Recording(EPlayState state)
+: mElapsedSeconds(0),
+ mInHandOff(false)
+
{
mBuffers = new AccumulatorBufferGroup();
+ setPlayState(state);
}
Recording::Recording( const Recording& other )
@@ -101,7 +104,8 @@ void Recording::handleStart()
{
mSamplingTimer.reset();
mBuffers.setStayUnique(true);
- LLTrace::get_thread_recorder()->activate(mBuffers.write());
+ LLTrace::get_thread_recorder()->activate(mBuffers.write(), mInHandOff);
+ mInHandOff = false;
}
void Recording::handleStop()
@@ -113,6 +117,7 @@ void Recording::handleStop()
void Recording::handleSplitTo(Recording& other)
{
+ other.mInHandOff = true;
mBuffers.write()->handOffTo(*other.mBuffers.write());
}
@@ -485,6 +490,8 @@ void PeriodicRecording::handleStop()
void PeriodicRecording::handleReset()
{
+ getCurRecording().stop();
+
if (mAutoResize)
{
mRecordingPeriods.clear();
@@ -500,6 +507,7 @@ void PeriodicRecording::handleReset()
}
}
mCurPeriod = 0;
+ mNumPeriods = 0;
getCurRecording().setPlayState(getPlayState());
}
@@ -719,7 +727,6 @@ void LLStopWatchControlsMixinCommon::start()
handleStart();
break;
case STARTED:
- handleReset();
break;
default:
llassert(false);
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index 7b0970ffdf..31616a52cc 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -124,11 +124,32 @@ namespace LLTrace
template<typename T>
class EventStatHandle;
+ template<typename T>
+ struct RelatedTypes
+ {
+ typedef F64 fractional_t;
+ typedef T sum_t;
+ };
+
+ template<typename T, typename UNIT_T>
+ struct RelatedTypes<LLUnit<T, UNIT_T> >
+ {
+ typedef LLUnit<typename RelatedTypes<T>::fractional_t, UNIT_T> fractional_t;
+ typedef LLUnit<typename RelatedTypes<T>::sum_t, UNIT_T> sum_t;
+ };
+
+ template<>
+ struct RelatedTypes<bool>
+ {
+ typedef F64 fractional_t;
+ typedef U32 sum_t;
+ };
+
class Recording
: public LLStopWatchControlsMixin<Recording>
{
public:
- Recording();
+ Recording(EPlayState state = LLStopWatchControlsMixinCommon::STOPPED);
Recording(const Recording& other);
~Recording();
@@ -172,16 +193,16 @@ namespace LLTrace
// CountStatHandle accessors
F64 getSum(const TraceType<CountAccumulator>& stat);
template <typename T>
- T getSum(const CountStatHandle<T>& stat)
+ typename RelatedTypes<T>::sum_t getSum(const CountStatHandle<T>& stat)
{
- return (T)getSum(static_cast<const TraceType<CountAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::sum_t)getSum(static_cast<const TraceType<CountAccumulator>&> (stat));
}
F64 getPerSec(const TraceType<CountAccumulator>& stat);
template <typename T>
- T getPerSec(const CountStatHandle<T>& stat)
+ typename RelatedTypes<T>::fractional_t getPerSec(const CountStatHandle<T>& stat)
{
- return (T)getPerSec(static_cast<const TraceType<CountAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::fractional_t)getPerSec(static_cast<const TraceType<CountAccumulator>&> (stat));
}
U32 getSampleCount(const TraceType<CountAccumulator>& stat);
@@ -197,9 +218,9 @@ namespace LLTrace
F64 getMean(const TraceType<SampleAccumulator>& stat);
template <typename T>
- T getMean(SampleStatHandle<T>& stat)
+ typename RelatedTypes<T>::fractional_t getMean(SampleStatHandle<T>& stat)
{
- return (T)getMean(static_cast<const TraceType<SampleAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::fractional_t)getMean(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getMax(const TraceType<SampleAccumulator>& stat);
@@ -211,9 +232,9 @@ namespace LLTrace
F64 getStandardDeviation(const TraceType<SampleAccumulator>& stat);
template <typename T>
- T getStandardDeviation(const SampleStatHandle<T>& stat)
+ typename RelatedTypes<T>::fractional_t getStandardDeviation(const SampleStatHandle<T>& stat)
{
- return (T)getStandardDeviation(static_cast<const TraceType<SampleAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::fractional_t)getStandardDeviation(static_cast<const TraceType<SampleAccumulator>&> (stat));
}
F64 getLastValue(const TraceType<SampleAccumulator>& stat);
@@ -228,9 +249,9 @@ namespace LLTrace
// EventStatHandle accessors
F64 getSum(const TraceType<EventAccumulator>& stat);
template <typename T>
- T getSum(const EventStatHandle<T>& stat)
+ typename RelatedTypes<T>::sum_t getSum(const EventStatHandle<T>& stat)
{
- return (T)getSum(static_cast<const TraceType<EventAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::sum_t)getSum(static_cast<const TraceType<EventAccumulator>&> (stat));
}
F64 getMin(const TraceType<EventAccumulator>& stat);
@@ -249,16 +270,16 @@ namespace LLTrace
F64 getMean(const TraceType<EventAccumulator>& stat);
template <typename T>
- T getMean(EventStatHandle<T>& stat)
+ typename RelatedTypes<T>::fractional_t getMean(EventStatHandle<T>& stat)
{
- return (T)getMean(static_cast<const TraceType<EventAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::fractional_t)getMean(static_cast<const TraceType<EventAccumulator>&> (stat));
}
F64 getStandardDeviation(const TraceType<EventAccumulator>& stat);
template <typename T>
- T getStandardDeviation(const EventStatHandle<T>& stat)
+ typename RelatedTypes<T>::fractional_t getStandardDeviation(const EventStatHandle<T>& stat)
{
- return (T)getStandardDeviation(static_cast<const TraceType<EventAccumulator>&> (stat));
+ return (typename RelatedTypes<T>::fractional_t)getStandardDeviation(static_cast<const TraceType<EventAccumulator>&> (stat));
}
F64 getLastValue(const TraceType<EventAccumulator>& stat);
@@ -284,9 +305,11 @@ namespace LLTrace
// returns data for current thread
class ThreadRecorder* getThreadRecorder();
- LLTimer mSamplingTimer;
- LLUnit<F64, LLUnits::Seconds> mElapsedSeconds;
+ LLTimer mSamplingTimer;
+ LLUnit<F64, LLUnits::Seconds> mElapsedSeconds;
LLCopyOnWritePointer<AccumulatorBufferGroup> mBuffers;
+ bool mInHandOff;
+
};
class LL_COMMON_API PeriodicRecording
@@ -310,11 +333,15 @@ namespace LLTrace
const Recording& getPrevRecording(U32 offset) const;
Recording snapshotCurRecording() const;
+ //
+ // PERIODIC MIN
+ //
+
// catch all for stats that have a defined sum
template <typename T>
typename T::value_t getPeriodMin(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::value_t min_val = std::numeric_limits<typename T::value_t>::max();
@@ -326,6 +353,12 @@ namespace LLTrace
return min_val;
}
+ template<typename T>
+ T getPeriodMin(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return T(getPeriodMin(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
+ }
+
F64 getPeriodMin(const TraceType<SampleAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
T getPeriodMin(const SampleStatHandle<T>& stat, size_t num_periods = U32_MAX)
@@ -341,9 +374,9 @@ namespace LLTrace
}
template <typename T>
- F64 getPeriodMinPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
+ typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 min_val = std::numeric_limits<F64>::max();
@@ -352,14 +385,24 @@ namespace LLTrace
S32 index = (mCurPeriod + total_periods - i) % total_periods;
min_val = llmin(min_val, mRecordingPeriods[index].getPerSec(stat));
}
- return min_val;
+ return (typename RelatedTypes<typename T::value_t>::fractional_t) min_val;
+ }
+
+ template<typename T>
+ typename RelatedTypes<T>::fractional_t getPeriodMinPerSec(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return typename RelatedTypes<T>::fractional_t(getPeriodMinPerSec(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
}
+ //
+ // PERIODIC MAX
+ //
+
// catch all for stats that have a defined sum
template <typename T>
typename T::value_t getPeriodMax(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::value_t max_val = std::numeric_limits<typename T::value_t>::min();
@@ -371,6 +414,12 @@ namespace LLTrace
return max_val;
}
+ template<typename T>
+ T getPeriodMax(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return T(getPeriodMax(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
+ }
+
F64 getPeriodMax(const TraceType<SampleAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
T getPeriodMax(const SampleStatHandle<T>& stat, size_t num_periods = U32_MAX)
@@ -386,9 +435,9 @@ namespace LLTrace
}
template <typename T>
- F64 getPeriodMaxPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
+ typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
F64 max_val = std::numeric_limits<F64>::min();
@@ -397,14 +446,24 @@ namespace LLTrace
S32 index = (mCurPeriod + total_periods - i) % total_periods;
max_val = llmax(max_val, mRecordingPeriods[index].getPerSec(stat));
}
- return max_val;
+ return (typename RelatedTypes<typename T::value_t>::fractional_t)max_val;
+ }
+
+ template<typename T>
+ typename RelatedTypes<T>::fractional_t getPeriodMaxPerSec(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return typename RelatedTypes<T>::fractional_t(getPeriodMaxPerSec(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
}
+ //
+ // PERIODIC MEAN
+ //
+
// catch all for stats that have a defined sum
template <typename T>
typename T::mean_t getPeriodMean(const TraceType<T >& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::mean_t mean = 0;
@@ -422,24 +481,29 @@ namespace LLTrace
return mean;
}
+ template<typename T>
+ typename RelatedTypes<T>::fractional_t getPeriodMean(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
+ }
F64 getPeriodMean(const TraceType<SampleAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
- T getPeriodMean(const SampleStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ typename RelatedTypes<T>::fractional_t getPeriodMean(const SampleStatHandle<T>& stat, size_t num_periods = U32_MAX)
{
- return T(getPeriodMean(static_cast<const TraceType<SampleAccumulator>&>(stat), num_periods));
+ return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const TraceType<SampleAccumulator>&>(stat), num_periods));
}
F64 getPeriodMean(const TraceType<EventAccumulator>& stat, size_t num_periods = U32_MAX);
template<typename T>
- T getPeriodMean(const EventStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ typename RelatedTypes<T>::fractional_t getPeriodMean(const EventStatHandle<T>& stat, size_t num_periods = U32_MAX)
{
- return T(getPeriodMean(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods));
+ return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const TraceType<EventAccumulator>&>(stat), num_periods));
}
template <typename T>
- typename T::mean_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
+ typename RelatedTypes<typename T::mean_t>::fractional_t getPeriodMeanPerSec(const TraceType<T>& stat, size_t num_periods = U32_MAX)
{
- size_t total_periods = mRecordingPeriods.size();
+ size_t total_periods = mNumPeriods;
num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods);
typename T::mean_t mean = 0;
@@ -454,7 +518,13 @@ namespace LLTrace
}
}
mean = mean / num_periods;
- return mean;
+ return (typename RelatedTypes<typename T::mean_t>::fractional_t)mean;
+ }
+
+ template<typename T>
+ typename RelatedTypes<T>::fractional_t getPeriodMeanPerSec(const CountStatHandle<T>& stat, size_t num_periods = U32_MAX)
+ {
+ return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const TraceType<CountAccumulator>&>(stat), num_periods));
}
private:
@@ -504,11 +574,10 @@ namespace LLTrace
ExtendablePeriodicRecording();
void extend();
- PeriodicRecording& getAcceptedRecording() { return mAcceptedRecording; }
- const PeriodicRecording& getAcceptedRecording() const {return mAcceptedRecording;}
+ PeriodicRecording& getResults() { return mAcceptedRecording; }
+ const PeriodicRecording& getResults() const {return mAcceptedRecording;}
- PeriodicRecording& getPotentialRecording() { return mPotentialRecording; }
- const PeriodicRecording& getPotentialRecording() const {return mPotentialRecording;}
+ void nextPeriod() { mPotentialRecording.nextPeriod(); }
private:
// implementation for LLStopWatchControlsMixin
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 7ac0e75154..e20d8b63de 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -120,13 +120,17 @@ TimeBlockTreeNode* ThreadRecorder::getTimeBlockTreeNode( S32 index )
}
-void ThreadRecorder::activate( AccumulatorBufferGroup* recording )
+void ThreadRecorder::activate( AccumulatorBufferGroup* recording, bool from_handoff )
{
ActiveRecording* active_recording = new ActiveRecording(recording);
if (!mActiveRecordings.empty())
{
AccumulatorBufferGroup& prev_active_recording = mActiveRecordings.back()->mPartialRecording;
prev_active_recording.sync();
+ if (!from_handoff)
+ {
+ TimeBlock::updateTimes();
+ }
prev_active_recording.handOffTo(active_recording->mPartialRecording);
}
mActiveRecordings.push_back(active_recording);
@@ -240,6 +244,7 @@ void ThreadRecorder::pushToParent()
{ LLMutexLock lock(&mSharedRecordingMutex);
LLTrace::get_thread_recorder()->bringUpToDate(&mThreadRecordingBuffers);
mSharedRecordingBuffers.append(mThreadRecordingBuffers);
+ mThreadRecordingBuffers.reset();
}
}
diff --git a/indra/llcommon/lltracethreadrecorder.h b/indra/llcommon/lltracethreadrecorder.h
index 535f855200..c40228785e 100644
--- a/indra/llcommon/lltracethreadrecorder.h
+++ b/indra/llcommon/lltracethreadrecorder.h
@@ -47,7 +47,7 @@ namespace LLTrace
~ThreadRecorder();
- void activate(AccumulatorBufferGroup* recording);
+ void activate(AccumulatorBufferGroup* recording, bool from_handoff = false);
void deactivate(AccumulatorBufferGroup* recording);
active_recording_list_t::reverse_iterator bringUpToDate(AccumulatorBufferGroup* recording);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5f6b183fcc..47492aaa31 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1294,6 +1294,7 @@ bool LLAppViewer::mainLoop()
{
LLFastTimer _(FTM_FRAME);
LLTrace::TimeBlock::processTimes();
+ llassert(LLStatViewer::FPS.getPrimaryAccumulator()->getSampleCount() <= 1);
LLTrace::get_frame_recording().nextPeriod();
LLTrace::TimeBlock::logStats();
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 342b45863a..eec4a703a1 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -256,7 +256,7 @@ void LLSceneMonitor::unfreezeScene()
void LLSceneMonitor::capture()
{
- static U32 last_capture_time = 0;
+ static U32 last_capture_frame = 0;
static LLCachedControl<bool> monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled");
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
static LLFrameTimer timer;
@@ -268,11 +268,11 @@ void LLSceneMonitor::capture()
if(mEnabled)
{
unfreezeScene();
+ reset();
force_capture = true;
}
else
{
- reset();
freezeScene();
}
@@ -280,8 +280,8 @@ void LLSceneMonitor::capture()
}
if (mEnabled
- && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f
- || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f))
+ && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f
+ || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f))
{
reset();
freezeScene();
@@ -290,9 +290,10 @@ void LLSceneMonitor::capture()
if((timer.getElapsedTimeF32() > scene_load_sample_time()
|| force_capture)
+ && mDiffState == WAITING_FOR_NEXT_DIFF
&& mEnabled
&& LLGLSLShader::sNoFixedFunction
- && last_capture_time != gFrameCount)
+ && last_capture_frame != gFrameCount)
{
force_capture = false;
@@ -301,7 +302,7 @@ void LLSceneMonitor::capture()
timer.reset();
- last_capture_time = gFrameCount;
+ last_capture_frame = gFrameCount;
LLRenderTarget& cur_target = getCaptureTarget();
@@ -465,7 +466,11 @@ void LLSceneMonitor::fetchQueryResult()
{
LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF);
- if(mDiffState == WAIT_ON_RESULT)
+ // also throttle timing here, to avoid going below sample time due to phasing with frame capture
+ static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
+ static LLFrameTimer timer;
+
+ if(mDiffState == WAIT_ON_RESULT && timer.getElapsedTimeF32() > scene_load_sample_time)
{
mDiffState = WAITING_FOR_NEXT_DIFF;
@@ -479,7 +484,7 @@ void LLSceneMonitor::fetchQueryResult()
mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face)
LL_DEBUGS("SceneMonitor") << "Frame difference: " << std::setprecision(4) << mDiffResult << LL_ENDL;
- record(sFramePixelDiff, mDiffResult);
+ record(sFramePixelDiff, sqrtf(mDiffResult));
static LLCachedControl<F32> diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold");
if(mDiffResult > diff_threshold())
@@ -488,7 +493,7 @@ void LLSceneMonitor::fetchQueryResult()
}
else
{
- mSceneLoadRecording.getPotentialRecording().nextPeriod();
+ mSceneLoadRecording.nextPeriod();
}
}
}
@@ -506,7 +511,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
os << std::setprecision(10);
- PeriodicRecording& scene_load_recording = mSceneLoadRecording.getAcceptedRecording();
+ PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults();
const U32 frame_count = scene_load_recording.getNumRecordedPeriods();
LLUnit<F64, LLUnits::Seconds> frame_time;
@@ -519,6 +524,15 @@ void LLSceneMonitor::dumpToFile(std::string file_name)
}
os << '\n';
+ os << "Sample period(s)";
+ for (S32 frame = 1; frame <= frame_count; frame++)
+ {
+ frame_time = scene_load_recording.getPrevRecording(frame_count - frame).getDuration();
+ os << ", " << frame_time.value();
+ }
+ os << '\n';
+
+
typedef TraceType<CountAccumulator> trace_count;
for (trace_count::instance_iter it = trace_count::beginInstances(), end_it = trace_count::endInstances();
it != end_it;
@@ -697,7 +711,7 @@ void LLSceneMonitorView::draw()
LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
lines++;
- num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getAcceptedRecording().getDuration().value());
+ num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getResults().getDuration().value());
LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP);
lines++;
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 9717310da4..7088d529d6 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -62,7 +62,7 @@ public:
const LLTrace::ExtendablePeriodicRecording* getRecording() const {return &mSceneLoadRecording;}
void dumpToFile(std::string file_name);
- bool hasResults() const { return mSceneLoadRecording.getAcceptedRecording().getDuration() != 0;}
+ bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != 0;}
private:
void freezeScene();
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index f3406d9f8d..b385d5cdfa 100755
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -198,7 +198,7 @@ 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.stat.count_stat_float(&LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED);
sgp.units("Kbps");
sgp.precision(0);
mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp);
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 6716391f41..d85247c4ec 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1483,7 +1483,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mGetReason.clear();
LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << mRequestedOffset
<< " Bytes: " << mRequestedSize
- << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
+ << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth().value() << "/" << mFetcher->mMaxBandwidth
<< LL_ENDL;
// Will call callbackHttpGet when curl request completes
@@ -2891,7 +2891,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
mNetworkQueueMutex.lock(); // +Mfnq
mMaxBandwidth = band_width;
- add(LLStatViewer::TEXTURE_KBIT, mHTTPTextureBits);
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits);
mHTTPTextureBits = 0;
mNetworkQueueMutex.unlock(); // -Mfnq
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 109f2bd401..38272b40dc 100755
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -107,10 +107,10 @@ public:
bool receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data);
// Threads: T* (but not safe)
- void setTextureBandwidth(F32 bandwidth) { mTextureBandwidth = bandwidth; }
+ void setTextureBandwidth(LLUnit<F32, LLUnits::Kibibits> bandwidth) { mTextureBandwidth = bandwidth; }
// Threads: T* (but not safe)
- F32 getTextureBandwidth() { return mTextureBandwidth; }
+ LLUnit<F32, LLUnits::Kibibits> getTextureBandwidth() { return mTextureBandwidth; }
// Threads: T*
BOOL isFromLocalCache(const LLUUID& id);
@@ -325,8 +325,8 @@ private:
queue_t mHTTPTextureQueue; // Mfnq
typedef std::map<LLHost,std::set<LLUUID> > cancel_queue_t;
cancel_queue_t mCancelQueue; // Mfnq
- F32 mTextureBandwidth; // <none>
- F32 mMaxBandwidth; // Mfnq
+ LLUnit<F32, LLUnits::Kibibits> mTextureBandwidth; // <none>
+ LLUnit<F32, LLUnits::Kibibits> mMaxBandwidth; // Mfnq
LLTextureInfo mTextureInfo;
// XXX possible delete
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 72ed3d4485..20e8a522cd 100755
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -586,8 +586,8 @@ void LLGLTexMemBar::draw()
left = 550;
- F32 bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth();
- F32 max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
+ LLUnit<F32, LLUnits::Kibibits> bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth();
+ LLUnit<F32, LLUnits::Kibibits> max_bandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;
color[VALPHA] = text_color[VALPHA];
text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth);
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index 80412c215f..5f11a2b519 100755
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -153,29 +153,29 @@ namespace LLViewerAssetStatsFF
};
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,
+ EVACTextureNonTempHTTPGet,
},
{
EVACTextureTempUDPGet,
- EVACTextureTempHTTPGet,
- }
+ EVACTextureTempHTTPGet,
+ }
};
ret = texture_bin_map[is_temp][with_http];
}
return ret;
-}
+ }
static LLTrace::CountStatHandle<> sEnqueueAssetRequestsTempTextureHTTP ("enqueuedassetrequeststemptexturehttp",
"Number of temporary texture asset http requests enqueued"),
@@ -384,50 +384,50 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output)
.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((S32)rec.getSum(*sEnqueued[EVACTextureTempUDPGet]))
.dequeued((S32)rec.getSum(*sDequeued[EVACTextureTempUDPGet]))
.resp_count((S32)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((S32)rec.getSum(*sEnqueued[EVACTextureNonTempHTTPGet]))
.dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempHTTPGet]))
.resp_count((S32)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());
-}
+ }
if (!compact_output
|| rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet])
|| rec.getSum(*sDequeued[EVACTextureNonTempUDPGet])
|| rec.getSum(*sResponse[EVACTextureNonTempUDPGet]).value())
-{
+ {
r.get_texture_non_temp_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACTextureNonTempUDPGet]))
.dequeued((S32)rec.getSum(*sDequeued[EVACTextureNonTempUDPGet]))
.resp_count((S32)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());
-}
+ }
if (!compact_output
|| rec.getSum(*sEnqueued[EVACWearableUDPGet])
|| rec.getSum(*sDequeued[EVACWearableUDPGet])
|| rec.getSum(*sResponse[EVACWearableUDPGet]).value())
-{
+ {
r.get_wearable_udp .enqueued((S32)rec.getSum(*sEnqueued[EVACWearableUDPGet]))
.dequeued((S32)rec.getSum(*sDequeued[EVACWearableUDPGet]))
.resp_count((S32)rec.getSum(*sResponse[EVACWearableUDPGet]).value())
@@ -478,16 +478,16 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output)
S32 fps = (S32)rec.getLastValue(LLStatViewer::FPS_SAMPLE);
if (!compact_output || fps != 0)
{
- 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));
+ r.fps .count(fps)
+ .min(rec.getMin(LLStatViewer::FPS_SAMPLE))
+ .max(rec.getMax(LLStatViewer::FPS_SAMPLE))
+ .mean(rec.getMean(LLStatViewer::FPS_SAMPLE));
}
U32 grid_x(0), grid_y(0);
grid_from_region_handle(it->first, &grid_x, &grid_y);
- r.grid_x(grid_x);
- r.grid_y(grid_y);
- r.duration(LLUnit<F64, LLUnits::Microseconds>(rec.getDuration()).value());
+ r .grid_x(grid_x)
+ .grid_y(grid_y)
+ .duration(LLUnit<F64, LLUnits::Microseconds>(rec.getDuration()).value());
}
stats.duration(mCurRecording ? LLUnit<F64, LLUnits::Microseconds>(mCurRecording->getDuration()).value() : 0.0);
@@ -526,6 +526,7 @@ void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
{
const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
+ llinfos << "enqueue " << int(eac) << llendl;
add(*sEnqueued[int(eac)], 1);
}
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d753619daa..69a6c00a8f 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -89,19 +89,22 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
TEX_REBAKES("texrebakes", "Number of times avatar textures have been forced to rebake"),
NUM_NEW_OBJECTS("numnewobjectsstat", "Number of objects in scene that were not previously in cache");
-LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > TRIANGLES_DRAWN("trianglesdrawnstat");
-
-LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibits> > KBIT("Bandwidth", "Network data received"),
- LAYERS_KBIT("layerskbitstat", "Network data received for layer data (terrain)"),
- OBJECT_KBIT("objectkbitstat", "Network data received for objects"),
- ASSET_KBIT("assetkbitstat", "Network data received for assets (animations, sounds)"),
- TEXTURE_KBIT("texturekbitstat", "Network data received for textures"),
- ACTUAL_IN_KBIT("actualinkbitstat", "Incoming network data"),
- ACTUAL_OUT_KBIT("actualoutkbitstat", "Outgoing network data");
-
-LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Seconds> > 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%");
+LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> >
+ TRIANGLES_DRAWN("trianglesdrawnstat");
+
+LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> >
+ ACTIVE_MESSAGE_DATA_RECEIVED("activemessagedatareceived", "Message system data received on all active regions"),
+ LAYERS_NETWORK_DATA_RECEIVED("layersdatareceived", "Network data received for layer data (terrain)"),
+ OBJECT_NETWORK_DATA_RECEIVED("objectdatareceived", "Network data received for objects"),
+ ASSET_UDP_DATA_RECEIVED("assetudpdatareceived", "Network data received for assets (animations, sounds) over UDP message system"),
+ TEXTURE_NETWORK_DATA_RECEIVED("texturedatareceived", "Network data received for textures"),
+ MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"),
+ MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data");
+
+LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Seconds> >
+ 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", "Simulator time scale", LL_SIM_STAT_TIME_DILATION),
SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS),
@@ -122,8 +125,9 @@ SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "Simulator time scale",
SIM_PHYSICS_PINNED_TASKS("physicspinnedtasks", "", LL_SIM_STAT_PHYSICS_PINNED_TASKS),
SIM_PHYSICS_LOD_TASKS("physicslodtasks", "", LL_SIM_STAT_PHYSICS_LOD_TASKS);
-SimMeasurement<LLUnit<F64, LLUnits::Percent> > SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN),
- SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS);
+SimMeasurement<LLUnit<F64, LLUnits::Percent> >
+ SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun", "", LL_SIM_STAT_PCTSCRIPTSRUN),
+ SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters", "", LL_SIM_STAT_PCTSTEPPEDCHARACTERS);
LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"),
NUM_IMAGES("numimagesstat"),
@@ -139,9 +143,11 @@ LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"),
WINDOW_WIDTH("windowwidth", "Window width"),
WINDOW_HEIGHT("windowheight", "Window height");
-LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > PACKETS_LOST_PERCENT("packetslostpercentstat");
+LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> >
+ PACKETS_LOST_PERCENT("packetslostpercentstat");
-static LLTrace::SampleStatHandle<S64> CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled");
+static LLTrace::SampleStatHandle<bool>
+ CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled");
LLTrace::SampleStatHandle<LLUnit<F64, LLUnits::Megabytes> > GL_TEX_MEM("gltexmemstat"),
GL_BOUND_MEM("glboundmemstat"),
@@ -197,12 +203,10 @@ LLViewerStats::LLViewerStats()
: mLastTimeDiff(0.0)
{
mRecording.start();
- LLTrace::get_frame_recording().start();
}
LLViewerStats::~LLViewerStats()
-{
-}
+{}
void LLViewerStats::resetStats()
{
@@ -363,10 +367,10 @@ void update_statistics()
add(LLStatViewer::FPS, 1);
F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
- add(LLStatViewer::LAYERS_KBIT, LLUnit<F64, LLUnits::Bits>(layer_bits));
- add(LLStatViewer::OBJECT_KBIT, gObjectData);
+ add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bits>(layer_bits));
+ add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData);
sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending());
- add(LLStatViewer::ASSET_KBIT, LLUnit<F64, LLUnits::Bits>(gTransferManager.getTransferBitsIn(LLTCT_ASSET)));
+ add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, LLUnit<F64, LLUnits::Bits>(gTransferManager.getTransferBitsIn(LLTCT_ASSET)));
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
if (LLAppViewer::getTextureFetch()->getNumRequests() == 0)
@@ -393,7 +397,7 @@ void update_statistics()
static LLFrameTimer texture_stats_timer;
if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
{
- gTotalTextureData = LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT);
+ gTotalTextureData = LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED);
texture_stats_timer.reset();
}
}
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 59d4df124b..3b7079ae4b 100755
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -94,13 +94,13 @@ extern LLTrace::CountStatHandle<> FPS,
extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kilotriangles> > TRIANGLES_DRAWN;
-extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibits> > KBIT,
- LAYERS_KBIT,
- OBJECT_KBIT,
- ASSET_KBIT,
- TEXTURE_KBIT,
- ACTUAL_IN_KBIT,
- ACTUAL_OUT_KBIT;
+extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Kibibytes> > ACTIVE_MESSAGE_DATA_RECEIVED,
+ LAYERS_NETWORK_DATA_RECEIVED,
+ OBJECT_NETWORK_DATA_RECEIVED,
+ ASSET_UDP_DATA_RECEIVED,
+ TEXTURE_NETWORK_DATA_RECEIVED,
+ MESSAGE_SYSTEM_DATA_IN,
+ MESSAGE_SYSTEM_DATA_OUT;
extern LLTrace::CountStatHandle<LLUnit<F64, LLUnits::Seconds> > SIM_20_FPS_TIME,
SIM_PHYSICS_20_FPS_TIME,
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 431a3b330c..dfd7ac983d 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -663,7 +663,7 @@ void LLViewerTextureList::updateImages(F32 max_time)
}
cleared = FALSE;
- LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT));
+ LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED));
{
using namespace LLStatViewer;
@@ -1374,7 +1374,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
received_size = msg->getReceiveSize() ;
}
- add(LLStatViewer::TEXTURE_KBIT, LLUnit<F64, LLUnits::Bytes>(received_size));
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bytes>(received_size));
add(LLStatViewer::TEXTURE_PACKETS, 1);
U8 codec;
@@ -1448,7 +1448,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
received_size = msg->getReceiveSize() ;
}
- add(LLStatViewer::TEXTURE_KBIT, LLUnit<F64, LLUnits::Bytes>(received_size));
+ add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit<F64, LLUnits::Bytes>(received_size));
add(LLStatViewer::TEXTURE_PACKETS, 1);
//llprintline("Start decode, image header...");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 85e4e6bc08..10e354f2e3 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -215,6 +215,7 @@
// Globals
//
void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
+void swap();
extern BOOL gDebugClicks;
extern BOOL gDisplaySwapBuffers;
@@ -4405,6 +4406,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// Required for showing the GUI in snapshots and performing bloom composite overlay
// Call even if show_ui is FALSE
render_ui(scale_factor, subfield);
+ swap();
}
for (U32 out_y = 0; out_y < read_height ; out_y++)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index d45a62b223..3dfe4c5e5f 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -732,9 +732,9 @@ void LLWorld::updateNetStats()
LLUnit<F64, LLUnits::Bits> actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits();
LLUnit<F64, LLUnits::Bits> actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits();
- add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits);
- add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits);
- add(LLStatViewer::KBIT, bits);
+ add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits);
+ add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits);
+ add(LLStatViewer::ACTIVE_MESSAGE_DATA_RECEIVED, bits);
add(LLStatViewer::PACKETS_IN, packets_in);
add(LLStatViewer::PACKETS_OUT, packets_out);
add(LLStatViewer::PACKETS_LOST, packets_lost);
@@ -743,8 +743,8 @@ void LLWorld::updateNetStats()
sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in));
}
- mLastPacketsIn = gMessageSystem->mPacketsIn;
- mLastPacketsOut = gMessageSystem->mPacketsOut;
+ mLastPacketsIn = gMessageSystem->mPacketsIn;
+ mLastPacketsOut = gMessageSystem->mPacketsOut;
mLastPacketsLost = gMessageSystem->mDroppedPackets;
}
diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
index 246e8bb256..71ff961c59 100644
--- a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
@@ -45,10 +45,10 @@
unit_scale="100"
precision="0"/>
<stat_bar name="bandwidth"
- label="Bandwidth"
+ label="UDP Data Received"
orientation="horizontal"
unit_label="kbps"
- stat="kbitstat"
+ stat="activemessagedatareceived"
bar_max="5000"
tick_spacing="500"
precision="0"/>
@@ -159,55 +159,55 @@
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="objectkbitstat"
+ <stat_bar name="objectdatareceived"
label="Objects"
orientation="horizontal"
- stat="objectkbitstat"
+ stat="objectdatareceived"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="texturekbitstat"
+ <stat_bar name="texturedatareceived"
label="Texture"
orientation="horizontal"
- stat="texturekbitstat"
+ stat="texturedatareceived"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="assetkbitstat"
+ <stat_bar name="assetudpdatareceived"
label="Asset"
orientation="horizontal"
- stat="assetkbitstat"
+ stat="assetudpdatareceived"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="layerskbitstat"
+ <stat_bar name="layersdatareceived"
label="Layers"
orientation="horizontal"
- stat="layerskbitstat"
+ stat="layersdatareceived"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="actualinkbitstat"
+ <stat_bar name="messagedatain"
label="Actual In"
orientation="horizontal"
- stat="actualinkbitstat"
+ stat="messagedatain"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
precision="1"
show_bar="false"/>
- <stat_bar name="actualoutkbitstat"
+ <stat_bar name="messagedataout"
label="Actual Out"
orientation="horizontal"
- stat="actualoutkbitstat"
+ stat="messagedataout"
unit_label="kbps"
bar_max="1024.f"
tick_spacing="128.f"
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index ad7094c6d8..ba43c24ad3 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -37,9 +37,9 @@
decimal_digits="1"
show_bar="true"
show_history="true"/>
- <!-- <stat_bar name="bandwidth"
- label="Bandwidth"
- stat="Bandwidth"
+ <stat_bar name="bandwidth"
+ label="UDP Data Received"
+ stat="activemessagedatareceived"
show_bar="true"/>
<stat_bar name="packet_loss"
label="Packet Loss"
@@ -135,29 +135,29 @@
label="Packets Out"
stat="packetsoutstat"
decimal_digits="1"/>
- <stat_bar name="objectkbitstat"
+ <stat_bar name="objectdatareceived"
label="Objects"
- stat="objectkbitstat"
+ stat="objectdatareceived"
decimal_digits="1"/>
- <stat_bar name="texturekbitstat"
+ <stat_bar name="texturedatareceived"
label="Texture"
- stat="texturekbitstat"
+ stat="texturedatareceived"
decimal_digits="1"/>
- <stat_bar name="assetkbitstat"
+ <stat_bar name="assetudpdatareceived"
label="Asset"
- stat="assetkbitstat"
+ stat="assetudpdatareceived"
decimal_digits="1"/>
- <stat_bar name="layerskbitstat"
+ <stat_bar name="layersdatareceived"
label="Layers"
- stat="layerskbitstat"
+ stat="layersdatareceived"
decimal_digits="1"/>
- <stat_bar name="actualinkbitstat"
+ <stat_bar name="messagedatain"
label="Actual In"
- stat="actualinkbitstat"
+ stat="messagedatain"
decimal_digits="1"/>
- <stat_bar name="actualoutkbitstat"
+ <stat_bar name="messagedataout"
label="Actual Out"
- stat="actualoutkbitstat"
+ stat="messagedataout"
decimal_digits="1"
show_history="false"/>
<stat_bar name="vfspendingoperations"
@@ -336,7 +336,7 @@
stat="simpumpiomsec"
decimal_digits="3"/>
</stat_view>
- </stat_view>-->
+ </stat_view>
</stat_view>
</container_view>
</scroll_container>