From 74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Oct 2012 19:25:56 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace --- indra/newview/llviewermessage.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 85ea543838..79ed093382 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4756,18 +4756,23 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) switch (stat_id) { case LL_SIM_STAT_TIME_DILATION: - LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value); + LLStatViewer::SIM_TIME_DILATION.sample(stat_value); + //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value); break; case LL_SIM_STAT_FPS: - LLViewerStats::getInstance()->mSimFPS.addValue(stat_value); + LLStatViewer::SIM_FPS.sample(stat_value); + //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value); break; case LL_SIM_STAT_PHYSFPS: - LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value); + LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value); + //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value); break; case LL_SIM_STAT_AGENTUPS: - LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value); + LLStatViewer::SIM_AGENT_UPS.sample(stat_value); + //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value); break; case LL_SIM_STAT_FRAMEMS: + //LLStatViewer::SIM_.sample(stat_value); LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value); break; case LL_SIM_STAT_NETMS: -- cgit v1.3 From 041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 12 Oct 2012 20:17:52 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system default to double precision now fixed unit conversion logic for LLUnit renamed LLTrace::Rate to LLTrace::Count and got rid of the old count as it was confusing some const correctness changes --- indra/llcommon/llpointer.h | 2 + indra/llcommon/lltrace.h | 93 ++++++++-------------- indra/llcommon/lltracerecording.cpp | 18 ++--- indra/llcommon/lltracerecording.h | 69 +++------------- indra/llcommon/lltracethreadrecorder.cpp | 4 +- indra/llcommon/llunit.h | 130 +++++++++++++++---------------- indra/llui/llstatbar.cpp | 25 +++--- indra/llui/llstatbar.h | 2 +- indra/llui/llstatgraph.cpp | 8 +- indra/llui/llstatgraph.h | 5 +- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/llviewermessage.cpp | 1 - indra/newview/llviewerstats.cpp | 98 ++++++++++++----------- indra/newview/llviewerstats.h | 86 ++++++++++---------- indra/newview/llviewertexturelist.cpp | 4 +- indra/newview/llworld.cpp | 6 +- 16 files changed, 243 insertions(+), 310 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index 0fee4f0990..6a3bbeb768 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -207,7 +207,9 @@ public: using LLPointer::operator >; + operator Type*() { return mPointer; } operator const Type*() const { return mPointer; } + Type* operator->() { return mPointer; } const Type* operator->() const { return mPointer; } }; diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 0c618a2f4b..221c226ad1 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -91,6 +91,11 @@ namespace LLTrace return mStorage[index]; } + LL_FORCE_INLINE const ACCUMULATOR& operator[](size_t index) const + { + return mStorage[index]; + } + void addSamples(const AccumulatorBuffer& other) { llassert(mNextStorageSlot == other.mNextStorageSlot); @@ -178,7 +183,7 @@ namespace LLTrace } ACCUMULATOR& getAccumulator(AccumulatorBuffer* buffer) { return (*buffer)[mAccumulatorIndex]; } - const ACCUMULATOR& getAccumulator(AccumulatorBuffer* buffer) const { return (*buffer)[mAccumulatorIndex]; } + const ACCUMULATOR& getAccumulator(const AccumulatorBuffer* buffer) const { return (*buffer)[mAccumulatorIndex]; } protected: std::string mName; @@ -213,9 +218,9 @@ namespace LLTrace { mMax = value; } - F32 old_mean = mMean; - mMean += ((F32)value - old_mean) / (F32)mNumSamples; - mVarianceSum += ((F32)value - old_mean) * ((F32)value - mMean); + F64 old_mean = mMean; + mMean += ((F64)value - old_mean) / (F64)mNumSamples; + mVarianceSum += ((F64)value - old_mean) * ((F64)value - mMean); mLastValue = value; } @@ -231,14 +236,14 @@ namespace LLTrace mMax = other.mMax; } mNumSamples += other.mNumSamples; - F32 weight = (F32)mNumSamples / (F32)(mNumSamples + other.mNumSamples); + F64 weight = (F64)mNumSamples / (F64)(mNumSamples + other.mNumSamples); mMean = mMean * weight + other.mMean * (1.f - weight); - F32 n_1 = (F32)mNumSamples, - n_2 = (F32)other.mNumSamples; - F32 m_1 = mMean, + F64 n_1 = (F64)mNumSamples, + n_2 = (F64)other.mNumSamples; + F64 m_1 = mMean, m_2 = other.mMean; - F32 sd_1 = getStandardDeviation(), + F64 sd_1 = getStandardDeviation(), sd_2 = other.getStandardDeviation(); // combine variance (and hence standard deviation) of 2 different sized sample groups using // the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm @@ -275,8 +280,8 @@ namespace LLTrace T getMin() const { return mMin; } T getMax() const { return mMax; } T getLastValue() const { return mLastValue; } - F32 getMean() const { return mMean; } - F32 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } + F64 getMean() const { return mMean; } + F64 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } private: T mSum, @@ -284,17 +289,17 @@ namespace LLTrace mMax, mLastValue; - F32 mMean, + F64 mMean, mVarianceSum; U32 mNumSamples; }; template - class LL_COMMON_API RateAccumulator + class LL_COMMON_API CountAccumulator { public: - RateAccumulator() + CountAccumulator() : mSum(0), mNumSamples(0) {} @@ -305,7 +310,7 @@ namespace LLTrace mSum += value; } - void addSamples(const RateAccumulator& other) + void addSamples(const CountAccumulator& other) { mSum += other.mSum; mNumSamples += other.mNumSamples; @@ -325,7 +330,7 @@ namespace LLTrace U32 mNumSamples; }; - template + template class LL_COMMON_API Measurement : public TraceType >, public LLInstanceTracker, std::string> @@ -352,8 +357,8 @@ namespace LLTrace public: typedef typename T::storage_t storage_t; typedef typename T::base_unit_t base_unit_t; - typedef Measurement base_measurement_t; + Measurement(const char* name, const char* description = NULL) : Measurement(name) {} @@ -361,20 +366,20 @@ namespace LLTrace template void sample(UNIT_T value) { - base_measurement_t::sample(value.value()); + base_measurement_t::sample(((T)value).value()); } }; - template - class LL_COMMON_API Rate - : public TraceType >, - public LLInstanceTracker, std::string> + template + class LL_COMMON_API Count + : public TraceType >, + public LLInstanceTracker, std::string> { public: typedef T storage_t; typedef T base_unit_t; - Rate(const char* name, const char* description = NULL) + Count(const char* name, const char* description = NULL) : TraceType(name), LLInstanceTracker(name) {} @@ -386,53 +391,23 @@ namespace LLTrace }; template - class LL_COMMON_API Rate - : public Rate + class LL_COMMON_API Count + : public Count { public: typedef typename T::storage_t storage_t; typedef typename T::base_unit_t base_unit_t; + typedef Count base_count_t; - Rate(const char* name, const char* description = NULL) - : Rate(name) + Count(const char* name, const char* description = NULL) + : Count(name) {} template void add(UNIT_T value) { - getPrimaryAccumulator().add(value.value()); - } - }; - - template - class LL_COMMON_API Count - { - public: - typedef typename Rate::base_unit_t base_unit_t; - - Count(const char* name) - : mIncrease(name + "_increase"), - mDecrease(name + "_decrease"), - mTotal(name) - {} - - void count(T value) - { - if (value < 0) - { - mDecrease.add(value * -1); - } - else - { - mIncrease.add(value); - } - mTotal.add(value); + base_count_t::add(((T)value).value()); } - private: - friend LLTrace::Recording; - Rate mIncrease; - Rate mDecrease; - Rate mTotal; }; class LL_COMMON_API TimerAccumulator diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 5d7b231b7d..9a769ff344 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -39,8 +39,8 @@ namespace LLTrace Recording::Recording() : mElapsedSeconds(0), - mRates(new AccumulatorBuffer >()), - mMeasurements(new AccumulatorBuffer >()), + mCounts(new AccumulatorBuffer >()), + mMeasurements(new AccumulatorBuffer >()), mStackTimers(new AccumulatorBuffer()) {} @@ -59,7 +59,7 @@ void Recording::update() void Recording::handleReset() { - mRates.write()->reset(); + mCounts.write()->reset(); mMeasurements.write()->reset(); mStackTimers.write()->reset(); @@ -88,21 +88,22 @@ void Recording::handleSplitTo(Recording& other) void Recording::makePrimary() { - mRates.write()->makePrimary(); + mCounts.write()->makePrimary(); mMeasurements.write()->makePrimary(); mStackTimers.write()->makePrimary(); } bool Recording::isPrimary() const { - return mRates->isPrimary(); + return mCounts->isPrimary(); } void Recording::mergeRecording( const Recording& other ) { - mRates.write()->addSamples(*other.mRates); + mCounts.write()->addSamples(*other.mCounts); mMeasurements.write()->addSamples(*other.mMeasurements); mStackTimers.write()->addSamples(*other.mStackTimers); + mElapsedSeconds += other.mElapsedSeconds; } /////////////////////////////////////////////////////////////////////// @@ -149,9 +150,9 @@ Recording& PeriodicRecording::getTotalRecording() if (!mTotalValid) { mTotalRecording.reset(); - for (S32 i = (mCurPeriod + 1) % mNumPeriods; i < mCurPeriod; i++) + for (S32 i = mCurPeriod + 1; i < mCurPeriod + mNumPeriods; i++) { - mTotalRecording.mergeRecording(mRecordingPeriods[i]); + mTotalRecording.mergeRecording(mRecordingPeriods[i % mNumPeriods]); } } mTotalValid = true; @@ -212,7 +213,6 @@ void ExtendableRecording::handleSplitTo( ExtendableRecording& other ) PeriodicRecording& get_frame_recording() { static PeriodicRecording sRecording(64); - sRecording.start(); return sRecording; } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 924a7bffd5..d9ac8c327a 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -111,17 +111,17 @@ namespace LLTrace void update(); - // Rate accessors + // Count accessors template - typename Rate::base_unit_t getSum(const Rate& stat) const + typename Count::base_unit_t getSum(const Count& stat) const { - return (typename Rate::base_unit_t)stat.getAccumulator(mRates).getSum(); + return (typename Count::base_unit_t)stat.getAccumulator(mCounts).getSum(); } template - typename Rate::base_unit_t getPerSec(const Rate& stat) const + typename Count::base_unit_t getPerSec(const Count& stat) const { - return (typename Rate::base_unit_t)stat.getAccumulator(mRates).getSum() / mElapsedSeconds; + return (typename Count::base_unit_t)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; } // Measurement accessors @@ -135,7 +135,7 @@ namespace LLTrace template typename Measurement::base_unit_t getPerSec(const Measurement& stat) const { - return (typename Rate::base_unit_t)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; + return (typename Count::base_unit_t)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; } template @@ -151,7 +151,7 @@ namespace LLTrace } template - typename Measurement::base_unit_t getMean(const Measurement& stat) const + typename Measurement::base_unit_t getMean(Measurement& stat) const { return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getMean(); } @@ -168,56 +168,7 @@ namespace LLTrace return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getLastValue(); } - // Count accessors - template - typename Count::base_unit_t getSum(const Count& stat) const - { - return getSum(stat.mTotal); - } - - template - typename Count::base_unit_t getPerSec(const Count& stat) const - { - return getPerSec(stat.mTotal); - } - - template - typename Count::base_unit_t getIncrease(const Count& stat) const - { - return getPerSec(stat.mTotal); - } - - template - typename Count::base_unit_t getIncreasePerSec(const Count& stat) const - { - return getPerSec(stat.mIncrease); - } - - template - typename Count::base_unit_t getDecrease(const Count& stat) const - { - return getPerSec(stat.mDecrease); - } - - template - typename Count::base_unit_t getDecreasePerSec(const Count& stat) const - { - return getPerSec(stat.mDecrease); - } - - template - typename Count::base_unit_t getChurn(const Count& stat) const - { - return getIncrease(stat) + getDecrease(stat); - } - - template - typename Count::base_unit_t getChurnPerSec(const Count& stat) const - { - return getIncreasePerSec(stat) + getDecreasePerSec(stat); - } - - F64 getSampleTime() const { return mElapsedSeconds; } + F64 getDuration() const { return mElapsedSeconds; } // implementation for LLVCRControlsMixin /*virtual*/ void handleStart(); @@ -230,8 +181,8 @@ namespace LLTrace // returns data for current thread class ThreadRecorder* getThreadRecorder(); - LLCopyOnWritePointer > > mRates; - LLCopyOnWritePointer > > mMeasurements; + LLCopyOnWritePointer > > mCounts; + LLCopyOnWritePointer > > mMeasurements; LLCopyOnWritePointer > mStackTimers; LLTimer mSamplingTimer; diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index 48aa1a42f2..02dc55771b 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -114,10 +114,10 @@ ThreadRecorder::ActiveRecording::ActiveRecording( Recording* target ) void ThreadRecorder::ActiveRecording::moveBaselineToTarget() { mTargetRecording->mMeasurements.write()->addSamples(*mBaseline.mMeasurements); - mTargetRecording->mRates.write()->addSamples(*mBaseline.mRates); + mTargetRecording->mCounts.write()->addSamples(*mBaseline.mCounts); mTargetRecording->mStackTimers.write()->addSamples(*mBaseline.mStackTimers); mBaseline.mMeasurements.write()->reset(); - mBaseline.mRates.write()->reset(); + mBaseline.mCounts.write()->reset(); mBaseline.mStackTimers.write()->reset(); } diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 2664bd77e9..090e42607e 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -51,7 +51,7 @@ struct LLUnitType : public BASE_UNIT value_t value() const { - return convertToDerived(mValue); + return convertToDerived(mBaseValue); } template @@ -72,22 +72,22 @@ struct LLUnitType : public BASE_UNIT unit_t operator + (const unit_t other) const { - return unit_t(mValue + other.mValue); + return unit_t(mBaseValue + other.mBaseValue); } unit_t operator - (const unit_t other) const { - return unit_t(mValue - other.mValue); + return unit_t(mBaseValue - other.mBaseValue); } unit_t operator * (value_t multiplicand) const { - return unit_t(mValue * multiplicand); + return unit_t(mBaseValue * multiplicand); } unit_t operator / (value_t divisor) const { - return unit_t(mValue / divisor); + return unit_t(mBaseValue / divisor); } }; @@ -100,11 +100,11 @@ struct LLUnitType typedef void is_unit_t; LLUnitType() - : mValue() + : mBaseValue() {} explicit LLUnitType(value_t value) - : mValue(value) + : mBaseValue(value) {} unit_t& operator=(value_t value) @@ -118,7 +118,7 @@ struct LLUnitType return static_cast(*this); } - value_t value() { return mValue; } + value_t value() const { return mBaseValue; } static value_t convertToBase(value_t derived_value) { @@ -132,73 +132,73 @@ struct LLUnitType unit_t operator + (const unit_t other) const { - return unit_t(mValue + other.mValue); + return unit_t(mBaseValue + other.mBaseValue); } void operator += (const unit_t other) { - mValue += other.mValue; + mBaseValue += other.mBaseValue; } unit_t operator - (const unit_t other) const { - return unit_t(mValue - other.mValue); + return unit_t(mBaseValue - other.mBaseValue); } void operator -= (const unit_t other) { - mValue -= other.mValue; + mBaseValue -= other.mBaseValue; } unit_t operator * (value_t multiplicand) const { - return unit_t(mValue * multiplicand); + return unit_t(mBaseValue * multiplicand); } void operator *= (value_t multiplicand) { - mValue *= multiplicand; + mBaseValue *= multiplicand; } unit_t operator / (value_t divisor) const { - return unit_t(mValue / divisor); + return unit_t(mBaseValue / divisor); } void operator /= (value_t divisor) { - mValue /= divisor; + mBaseValue /= divisor; } protected: void setBaseValue(value_t value) { - mValue = value; + mBaseValue = value; } - value_t mValue; + value_t mBaseValue; }; -#define LL_DECLARE_BASE_UNIT(unit_name) \ - template \ - struct unit_name : public LLUnitType > \ - { \ - typedef unit_name base_unit_t; \ - typedef STORAGE_TYPE storage_t; \ +#define LL_DECLARE_BASE_UNIT(unit_name) \ + struct unit_name : public LLUnitType \ + { \ + typedef unit_name base_unit_t; \ + typedef LLUnitType unit_t; \ + typedef F64 storage_t; \ \ - unit_name(STORAGE_TYPE value) \ + unit_name(F64 value) \ : LLUnitType(value) \ - {} \ - \ - unit_name() \ - {} \ - \ + {} \ + \ + unit_name() \ + {} \ + \ template \ unit_name(const LLUnitType& source) \ - { \ - setBaseValue(source.unit_t::value()); \ - } \ - \ + { \ + setBaseValue((F64)source.unit_name::unit_t::value()); \ + } \ + \ using LLUnitType::operator +; \ using LLUnitType::operator +=; \ using LLUnitType::operator -; \ @@ -209,36 +209,36 @@ protected: using LLUnitType::operator /=; \ }; -#define LL_DECLARE_DERIVED_UNIT(base_unit, derived_unit, conversion_factor) \ - template \ - struct derived_unit : public LLUnitType, derived_unit > \ - { \ - typedef base_unit base_unit_t; \ - typedef STORAGE_TYPE storage_t; \ - \ - derived_unit(value_t value) \ - : LLUnitType(value) \ - {} \ - \ - derived_unit() \ - {} \ - \ - template \ - derived_unit(const LLUnitType, SOURCE_TYPE>& source) \ - { \ - setBaseValue(source.base_unit_t::value()); \ - } \ - \ - static F32 conversionToBaseFactor() { return (F32)(conversion_factor); } \ - \ - using LLUnitType::operator +; \ - using LLUnitType::operator +=; \ - using LLUnitType::operator -; \ - using LLUnitType::operator -=; \ - using LLUnitType::operator *; \ - using LLUnitType::operator *=; \ - using LLUnitType::operator /; \ - using LLUnitType::operator /=; \ +#define LL_DECLARE_DERIVED_UNIT(base_unit, derived_unit, conversion_factor) \ + struct derived_unit : public LLUnitType \ + { \ + typedef base_unit base_unit_t; \ + typedef LLUnitType unit_t; \ + typedef F64 storage_t; \ + \ + derived_unit(value_t value) \ + : LLUnitType(value) \ + {} \ + \ + derived_unit() \ + {} \ + \ + template \ + derived_unit(const LLUnitType& source) \ + { \ + setBaseValue((F64)source.base_unit::unit_t::value()); \ + } \ + \ + static F32 conversionToBaseFactor() { return (F32)(conversion_factor); } \ + \ + using LLUnitType::operator +; \ + using LLUnitType::operator +=; \ + using LLUnitType::operator -; \ + using LLUnitType::operator -=; \ + using LLUnitType::operator *; \ + using LLUnitType::operator *=; \ + using LLUnitType::operator /; \ + using LLUnitType::operator /=; \ }; namespace LLUnits @@ -248,7 +248,7 @@ namespace LLUnits LL_DECLARE_DERIVED_UNIT(Bytes, Megabytes, 1024 * 1024); LL_DECLARE_DERIVED_UNIT(Bytes, Gigabytes, 1024 * 1024 * 1024); LL_DECLARE_DERIVED_UNIT(Bytes, Bits, (1.f / 8.f)); - LL_DECLARE_DERIVED_UNIT(Bytes, Kilobit, (1024 / 8)); + LL_DECLARE_DERIVED_UNIT(Bytes, Kilobits, (1024 / 8)); LL_DECLARE_DERIVED_UNIT(Bytes, Megabits, (1024 / 8)); LL_DECLARE_DERIVED_UNIT(Bytes, Gigabits, (1024 * 1024 * 1024 / 8)); diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index b73007e107..c60e5431ae 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -47,7 +47,7 @@ LLStatBar::LLStatBar(const Params& p) mMinBar(p.bar_min), mMaxBar(p.bar_max), mStatp(LLStat::getInstance(p.stat)), - mFloatStatp(LLTrace::Rate::getInstance(p.stat)), + mNewStatp(LLTrace::Count<>::getInstance(p.stat)), mTickSpacing(p.tick_spacing), mLabelSpacing(p.label_spacing), mPrecision(p.precision), @@ -109,22 +109,25 @@ void LLStatBar::draw() mean = mStatp->getMean(); } } - else if (mFloatStatp) + else if (mNewStatp) { - LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); + LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + LLTrace::Recording& last_frame_recording = frame_recording.getLastRecordingPeriod(); + LLTrace::Recording& windowed_frame_recording = frame_recording.getTotalRecording(); + if (mPerSec) { - current = recording.getPerSec(*mFloatStatp); - //min = recording->getMin(*mFloatStatp) / recording->getSampleTime(); - //max = recording->getMax(*mFloatStatp) / recording->getSampleTime(); - //mean = recording->getMean(*mFloatStatp) / recording->getSampleTime(); + current = last_frame_recording.getPerSec(*mNewStatp); + //min = frame_window_recording.getMin(*mNewStatp) / frame_window_recording.getDuration(); + //max = frame_window_recording.getMax(*mNewStatp) / frame_window_recording.getDuration(); + mean = windowed_frame_recording.getPerSec(*mNewStatp);//frame_window_recording.getMean(*mNewStatp) / frame_window_recording.getDuration(); } else { - current = recording.getSum(*mFloatStatp); - //min = recording->getMin(*mFloatStatp); - //max = recording->getMax(*mFloatStatp); - //mean = recording->getMean(*mFloatStatp); + current = last_frame_recording.getSum(*mNewStatp); + //min = last_frame_recording.getMin(*mNewStatp); + //max = last_frame_recording.getMax(*mNewStatp); + mean = windowed_frame_recording.getSum(*mNewStatp); } } diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index bfc49b9204..e4b0c61c42 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -99,7 +99,7 @@ private: LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; - LLTrace::Rate* mFloatStatp; + LLTrace::Count<>* mNewStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 21b55c7c5a..be3baeea76 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -49,7 +49,7 @@ LLStatGraph::LLStatGraph(const Params& p) mPrecision(p.precision), mValue(p.value), mStatp(p.stat.legacy_stat), - mF32Statp(p.stat.rate_stat) + mNewStatp(p.stat.rate_stat) { setToolTip(p.name()); @@ -84,17 +84,17 @@ void LLStatGraph::draw() mValue = mStatp->getMean(); } } - else if (mF32Statp) + else if (mNewStatp) { LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); if (mPerSec) { - mValue = recording.getPerSec(*mF32Statp); + mValue = recording.getPerSec(*mNewStatp); } else { - mValue = recording.getSum(*mF32Statp); + mValue = recording.getSum(*mNewStatp); } } diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index 69fc36ea52..54a959f49e 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -60,7 +60,7 @@ public: struct StatParams : public LLInitParam::ChoiceBlock { Alternative legacy_stat; - Alternative* > rate_stat; + Alternative* > rate_stat; }; struct Params : public LLInitParam::Block @@ -106,8 +106,7 @@ public: private: LLStat* mStatp; - LLTrace::Rate* mF32Statp; - LLTrace::Rate* mS32Statp; + LLTrace::Count<>* mNewStatp; BOOL mPerSec; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2ce5f95b54..f2caa01644 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2316,7 +2316,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) if(mCurlGetRequest) { - LLStatViewer::TEXTURE_KBIT.add >(mCurlGetRequest->getTotalReceivedBits()); + LLStatViewer::TEXTURE_KBIT.add(mCurlGetRequest->getTotalReceivedBits()); //gTextureList.sTextureBits += mCurlGetRequest->getTotalReceivedBits(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 79ed093382..ec7d91ec4f 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4772,7 +4772,6 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value); break; case LL_SIM_STAT_FRAMEMS: - //LLStatViewer::SIM_.sample(stat_value); LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value); break; case LL_SIM_STAT_NETMS: diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index bed2dffb14..a3d04d655a 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -64,7 +64,7 @@ namespace LLStatViewer { -LLTrace::Rate FPS("fpsstat"), +LLTrace::Count<> FPS("fpsstat"), PACKETS_IN("packetsinstat"), PACKETS_LOST("packetsloststat"), PACKETS_OUT("packetsoutstat"), @@ -90,7 +90,7 @@ LLTrace::Rate FPS("fpsstat"), FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"), TEX_BAKES("texbakes"), TEX_REBAKES("texrebakes"); -LLTrace::Rate > KBIT("kbitstat"), +LLTrace::Count KBIT("kbitstat"), LAYERS_KBIT("layerskbitstat"), OBJECT_KBIT("objectkbitstat"), ASSET_KBIT("assetkbitstat"), @@ -98,17 +98,17 @@ LLTrace::Rate > KBIT("kbitstat"), ACTUAL_IN_KBIT("actualinkbit"), ACTUAL_OUT_KBIT("actualoutkbit"); -LLTrace::Rate > 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%"); - -LLTrace::Measurement SIM_TIME_DILATION("simtimedilation"), +LLTrace::Count 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%"); + +LLTrace::Measurement<> SIM_TIME_DILATION("simtimedilation"), SIM_FPS("simfps"), SIM_PHYSICS_FPS("simphysicsfps"), SIM_AGENT_UPS("simagentups"), @@ -147,36 +147,36 @@ LLTrace::Measurement SIM_TIME_DILATION("simtimedilation"), WINDOW_WIDTH("windowwidth", "Window width"), WINDOW_HEIGHT("windowheight", "Window height"); -LLTrace::Measurement > SIM_UNACKED_BYTES("simtotalunackedbytes"), - SIM_PHYSICS_MEM("physicsmemoryallocated"), - GL_TEX_MEM("gltexmemstat"), - GL_BOUND_MEM("glboundmemstat"), - RAW_MEM("rawmemstat"), - FORMATTED_MEM("formattedmemstat"); - - -LLTrace::Measurement > SIM_PHYSICS_TIME("simsimphysicsmsec"), - SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec"), - SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec"), - SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec"), - SIM_AI_TIME("simsimaistepmsec"), - SIM_AGENTS_TIME("simagentmsec"), - SIM_IMAGES_TIME("simimagesmsec"), - SIM_SCRIPTS_TIME("simscriptmsec"), - SIM_SPARE_TIME("simsparemsec"), - SIM_SLEEP_TIME("simsleepmsec"), - SIM_PUMP_IO_TIME("simpumpiomsec"), - SIM_PING("simpingstat"), - 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"); +LLTrace::Measurement SIM_UNACKED_BYTES("simtotalunackedbytes"), + SIM_PHYSICS_MEM("physicsmemoryallocated"), + GL_TEX_MEM("gltexmemstat"), + GL_BOUND_MEM("glboundmemstat"), + RAW_MEM("rawmemstat"), + FORMATTED_MEM("formattedmemstat"); + + +LLTrace::Measurement SIM_PHYSICS_TIME("simsimphysicsmsec"), + SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec"), + SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec"), + SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec"), + SIM_AI_TIME("simsimaistepmsec"), + SIM_AGENTS_TIME("simagentmsec"), + SIM_IMAGES_TIME("simimagesmsec"), + SIM_SCRIPTS_TIME("simscriptmsec"), + SIM_SPARE_TIME("simsparemsec"), + SIM_SLEEP_TIME("simsleepmsec"), + SIM_PUMP_IO_TIME("simpumpiomsec"), + SIM_PING("simpingstat"), + 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"); } class StatAttributes @@ -266,6 +266,7 @@ LLViewerStats::LLViewerStats() : mAgentPositionSnaps.reset(); mRecording.start(); + LLTrace::get_frame_recording().start(); } LLViewerStats::~LLViewerStats() @@ -437,25 +438,28 @@ void update_statistics() LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { + LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); stats.mSimPingStat.addValue(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { + LLUnits::Seconds i(10000); + LLStatViewer::SIM_PING.sample(i);// >(10000); stats.mSimPingStat.addValue(10000); } //stats.mFPSStat.addValue(1); LLStatViewer::FPS.add(1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - LLStatViewer::LAYERS_KBIT.add >(layer_bits); + LLStatViewer::LAYERS_KBIT.add(layer_bits); //stats.mLayersKBitStat.addValue(layer_bits/1024.f); - LLStatViewer::OBJECT_KBIT.add >(gObjectBits); + LLStatViewer::OBJECT_KBIT.add(gObjectBits); //stats.mObjectKBitStat.addValue(gObjectBits/1024.f); //stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); LLStatViewer::SIM_PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending()); - LLStatViewer::ASSET_KBIT.add >(gTransferManager.getTransferBitsIn(LLTCT_ASSET)); + LLStatViewer::ASSET_KBIT.add(gTransferManager.getTransferBitsIn(LLTCT_ASSET)); //stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); @@ -493,7 +497,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - gTotalTextureBytes = LLUnits::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); + gTotalTextureBytes = LLUnits::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); texture_stats_timer.reset(); } } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index a164a28a59..5412294cf2 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -34,7 +34,7 @@ namespace LLStatViewer { -extern LLTrace::Rate FPS, +extern LLTrace::Count<> FPS, PACKETS_IN, PACKETS_LOST, PACKETS_OUT, @@ -62,7 +62,7 @@ extern LLTrace::Rate FPS, TEX_REBAKES; -extern LLTrace::Rate > KBIT, +extern LLTrace::Count KBIT, LAYERS_KBIT, OBJECT_KBIT, ASSET_KBIT, @@ -70,17 +70,17 @@ extern LLTrace::Rate > KBIT, ACTUAL_IN_KBIT, ACTUAL_OUT_KBIT; -extern LLTrace::Rate > 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 LLTrace::Measurement SIM_TIME_DILATION, +extern LLTrace::Count 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 LLTrace::Measurement<> SIM_TIME_DILATION, SIM_FPS, SIM_PHYSICS_FPS, SIM_AGENT_UPS, @@ -119,36 +119,36 @@ extern LLTrace::Measurement SIM_TIME_DILATION, WINDOW_WIDTH, WINDOW_HEIGHT; -extern LLTrace::Measurement > SIM_UNACKED_BYTES, - SIM_PHYSICS_MEM, - GL_TEX_MEM, - GL_BOUND_MEM, - RAW_MEM, - FORMATTED_MEM; - - -extern LLTrace::Measurement > 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, - SIM_PING, - FRAMETIME_JITTER, - FRAMETIME_SLEW, - LOGIN_SECONDS, - REGION_CROSSING_TIME, - FRAME_STACKTIME, - UPDATE_STACKTIME, - NETWORK_STACKTIME, - IMAGE_STACKTIME, - REBUILD_STACKTIME, - RENDER_STACKTIME; +extern LLTrace::Measurement SIM_UNACKED_BYTES, + SIM_PHYSICS_MEM, + GL_TEX_MEM, + GL_BOUND_MEM, + RAW_MEM, + FORMATTED_MEM; + + +extern LLTrace::Measurement 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, + SIM_PING, + FRAMETIME_JITTER, + FRAMETIME_SLEW, + LOGIN_SECONDS, + REGION_CROSSING_TIME, + FRAME_STACKTIME, + UPDATE_STACKTIME, + NETWORK_STACKTIME, + IMAGE_STACKTIME, + REBUILD_STACKTIME, + RENDER_STACKTIME; } class LLViewerStats : public LLSingleton diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index af28ea36eb..ccfedd8881 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1325,7 +1325,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); U8 codec; @@ -1399,7 +1399,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add >(received_size); + LLStatViewer::TEXTURE_KBIT.add(received_size); LLStatViewer::TEXTURE_PACKETS.add(1); //llprintline("Start decode, image header..."); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 056132c165..9e495c46b1 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -703,11 +703,11 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLStatViewer::ACTUAL_IN_KBIT.add >(actual_in_bits); - LLStatViewer::ACTUAL_OUT_KBIT.add >(actual_out_bits); + LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); + LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - LLStatViewer::KBIT.add >(bits); + LLStatViewer::KBIT.add(bits); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); -- cgit v1.3 From 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 15 Oct 2012 19:43:35 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system converted all remaining LLViewerStats to lltrace --- indra/llcommon/llstatenums.h | 2 +- indra/llcommon/lltrace.h | 1 + indra/llcommon/lltracerecording.h | 15 +- indra/llcommon/llunit.h | 4 + indra/llmessage/llassetstorage.cpp | 27 +++ indra/llui/llstatgraph.cpp | 2 +- indra/llui/llstatgraph.h | 3 +- indra/newview/llagent.cpp | 8 +- indra/newview/llappviewer.cpp | 3 +- indra/newview/llchatbar.cpp | 18 -- indra/newview/llcompilequeue.cpp | 2 +- indra/newview/llfloaterabout.cpp | 3 +- indra/newview/llfloaterregioninfo.cpp | 2 +- indra/newview/llfloatersnapshot.cpp | 3 +- indra/newview/llgesturemgr.cpp | 2 +- indra/newview/lllandmarklist.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 3 +- indra/newview/llpanelface.cpp | 3 +- indra/newview/llpreviewgesture.cpp | 2 +- indra/newview/llpreviewnotecard.cpp | 2 +- indra/newview/llpreviewscript.cpp | 11 +- indra/newview/llselectmgr.cpp | 7 +- indra/newview/llstartup.cpp | 3 +- indra/newview/llstatusbar.cpp | 4 +- indra/newview/lltexlayer.cpp | 3 +- indra/newview/lltooldraganddrop.cpp | 9 +- indra/newview/lltoolplacer.cpp | 3 +- indra/newview/llviewermenu.cpp | 66 ------- indra/newview/llviewermenufile.cpp | 24 ++- indra/newview/llviewermessage.cpp | 264 ++++++++++++++------------ indra/newview/llviewerobject.cpp | 3 +- indra/newview/llviewerobjectlist.cpp | 12 +- indra/newview/llviewerstats.cpp | 344 +++++++++++++--------------------- indra/newview/llviewerstats.h | 221 ++++++---------------- indra/newview/llviewertexturelist.cpp | 21 +-- indra/newview/llviewertexturelist.h | 10 +- indra/newview/llviewerthrottle.cpp | 5 +- indra/newview/llviewerwindow.cpp | 6 +- indra/newview/llvoavatarself.cpp | 21 ++- indra/newview/llwearablelist.cpp | 2 +- indra/newview/llworld.cpp | 8 +- 41 files changed, 488 insertions(+), 666 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/llstatenums.h b/indra/llcommon/llstatenums.h index 81c4085d16..ab9b6709e8 100644 --- a/indra/llcommon/llstatenums.h +++ b/indra/llcommon/llstatenums.h @@ -26,7 +26,7 @@ #ifndef LL_LLSTATENUMS_H #define LL_LLSTATENUMS_H -enum +enum ESimStatID { LL_SIM_STAT_TIME_DILATION = 0, LL_SIM_STAT_FPS = 1, diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 221c226ad1..3e19c83bd7 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -282,6 +282,7 @@ namespace LLTrace T getLastValue() const { return mLastValue; } F64 getMean() const { return mMean; } F64 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } + U32 getSampleCount() const { return mNumSamples; } private: T mSum, diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index d9ac8c327a..bd4b944e5a 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -168,6 +168,12 @@ namespace LLTrace return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getLastValue(); } + template + U32 getSampleCount(const Measurement& stat) const + { + return stat.getAccumulator(mMeasurements).getSampleCount(); + } + F64 getDuration() const { return mElapsedSeconds; } // implementation for LLVCRControlsMixin @@ -208,7 +214,7 @@ namespace LLTrace return mRecordingPeriods[(mCurPeriod + mNumPeriods - 1) % mNumPeriods]; } - Recording& getCurRecordingPeriod() + Recording getCurRecordingPeriod() { return mRecordingPeriods[mCurPeriod]; } @@ -218,6 +224,13 @@ namespace LLTrace return mRecordingPeriods[mCurPeriod]; } + Recording snapshotCurRecordingPeriod() const + { + Recording recording_copy(getCurRecordingPeriod()); + recording_copy.stop(); + return recording_copy; + } + Recording& getTotalRecording(); private: diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 090e42607e..e8f6b2b2ba 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -261,6 +261,10 @@ namespace LLUnits LL_DECLARE_DERIVED_UNIT(Seconds, Microseconds, (1.f / (1000000.f))); LL_DECLARE_DERIVED_UNIT(Seconds, Nanoseconds, (1.f / (1000000000.f))); + LL_DECLARE_BASE_UNIT(Meters); + LL_DECLARE_DERIVED_UNIT(Meters, Kilometers, 1000); + LL_DECLARE_DERIVED_UNIT(Meters, Centimeters, 1 / 100); + LL_DECLARE_DERIVED_UNIT(Meters, Millimeters, 1 / 1000); } #endif // LL_LLUNIT_H diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 9b86daebe5..328d15b4bc 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -50,10 +50,14 @@ #include "lltransfertargetvfile.h" // For debugging #include "llmetrics.h" +#include "lltrace.h" LLAssetStorage *gAssetStorage = NULL; LLMetrics *LLAssetStorage::metric_recipient = NULL; +static LLTrace::Count<> sFailedDownloadCount("faileddownloads", "Number of times LLAssetStorage::getAssetData() has failed"); + + const LLUUID CATEGORIZE_LOST_AND_FOUND_ID(std::string("00000000-0000-0000-0000-000000000010")); const U64 TOXIC_ASSET_LIFETIME = (120 * 1000000); // microseconds @@ -450,6 +454,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_NONE); } return; @@ -460,6 +465,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // Special case early out for NULL uuid and for shutting down if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); } return; @@ -572,6 +578,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -649,6 +656,10 @@ void LLAssetStorage::downloadCompleteCallback( LLAssetRequest* tmp = *curiter; if (tmp->mDownCallback) { + if (result != LL_ERR_NOERR) + { + sFailedDownloadCount.add(1); + } tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status); } delete tmp; @@ -669,6 +680,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen // Special case early out for NULL uuid if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); } return; @@ -741,6 +753,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -783,6 +796,10 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( } } + if (result != LL_ERR_NOERR) + { + sFailedDownloadCount.add(1); + } req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status); } @@ -883,6 +900,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { + sFailedDownloadCount.add(1); callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -925,6 +943,10 @@ void LLAssetStorage::downloadInvItemCompleteCallback( } } + if (result != LL_ERR_NOERR) + { + sFailedDownloadCount.add(1); + } req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status); } @@ -1237,6 +1259,7 @@ bool LLAssetStorage::deletePendingRequestImpl(LLAssetStorage::request_list_t* re } if (req->mDownCallback) { + sFailedDownloadCount.add(1); req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED); } if (req->mInfoCallback) @@ -1363,6 +1386,10 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAss } } + if (status != LL_ERR_NOERR) + { + sFailedDownloadCount.add(1); + } legacy->mDownCallback(filename.c_str(), uuid, legacy->mUserData, status, ext_status); delete legacy; } diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index be3baeea76..e961e7d3c0 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -49,7 +49,7 @@ LLStatGraph::LLStatGraph(const Params& p) mPrecision(p.precision), mValue(p.value), mStatp(p.stat.legacy_stat), - mNewStatp(p.stat.rate_stat) + mNewStatp(p.stat.count_stat) { setToolTip(p.name()); diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index 54a959f49e..5bbd9e9d24 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -60,7 +60,8 @@ public: struct StatParams : public LLInitParam::ChoiceBlock { Alternative legacy_stat; - Alternative* > rate_stat; + Alternative* > count_stat; + Alternative* > measurement_stat; }; struct Params : public LLInitParam::Block diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 447836910d..a41efbe0b2 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -753,7 +753,8 @@ void LLAgent::setFlying(BOOL fly) } if( !was_flying ) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); + LLStatViewer::FLY.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3809,7 +3810,8 @@ bool LLAgent::teleportCore(bool is_local) gAgentCamera.resetView(FALSE); // local logic - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); + LLStatViewer::TELEPORT.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); @@ -4120,7 +4122,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/llappviewer.cpp b/indra/newview/llappviewer.cpp index a43776912c..6e0b298b2a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4810,7 +4810,8 @@ void LLAppViewer::idleNetwork() gPrintMessagesThisFrame = FALSE; } } - LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects); + LLStatViewer::NUM_NEW_OBJECTS.sample(gObjectList.mNumNewObjects); + //LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects); // Retransmit unacknowledged packets. gXferManager->retransmitUnackedPackets(); 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..6739910c38 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -436,7 +436,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) { 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/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index fe29bb38c7..8234841966 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2491,7 +2491,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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..4a58e0186c 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -992,7 +992,8 @@ void LLSnapshotLivePreview::saveTexture() llwarns << "Error encoding snapshot" << llendl; } - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT ); + LLStatViewer::SNAPSHOT.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT ); mDataSize = 0; } diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 66ca76bfb0..63ef8c3d21 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -1137,7 +1137,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index dd402de394..1666425cbe 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -141,7 +141,7 @@ void LLLandmarkList::processGetAssetReply( } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index c00dc4bc89..0aced5c575 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -638,7 +638,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); } class LLChatCommandHandler : public LLCommandHandler diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 202be9671b..52ed24f06d 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1049,7 +1049,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); sendTexture(); } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index f47928b131..4082d272f2 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -883,7 +883,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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..b93b97f1e0 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -339,7 +339,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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 88727bf59b..059d5d4061 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -942,7 +942,8 @@ 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); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); if( mSaveCallback ) { @@ -1146,8 +1147,8 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { - - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); + LLStatViewer::LSL_SAVES.add(1); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); LLScriptEdCore* self = (LLScriptEdCore*) userdata; @@ -1670,7 +1671,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) @@ -1902,7 +1903,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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..fd03d7c0be 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1550,7 +1550,8 @@ void LLObjectSelection::applyNoCopyTextureToTEs(LLViewerInventoryItem* item) } // apply texture for the selected faces - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); + LLStatViewer::EDIT_TEXTURE.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); object->setTEImage(te, image); dialog_refresh_all(); @@ -3424,9 +3425,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/llstartup.cpp b/indra/newview/llstartup.cpp index 1e7c325d30..cb3c90ea2a 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2071,7 +2071,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); LLStartUp::setStartupState( STATE_CLEANUP ); return TRUE; } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6f2a0de894..5720395d05 100644 --- 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.rate_stat(&LLStatViewer::KBIT); + sgp.stat.count_stat(&LLStatViewer::KBIT); sgp.units("Kbps"); sgp.precision(0); mSGBandwidth = LLUICtrlFactory::create(sgp); @@ -212,7 +212,7 @@ BOOL LLStatusBar::postBuild() pgp.rect(r); pgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); pgp.mouse_opaque(false); - pgp.stat.legacy_stat(&LLViewerStats::getInstance()->mPacketsLostPercentStat); + pgp.stat.measurement_stat(&LLStatViewer::PACKETS_LOST_PERCENT); pgp.units("%"); pgp.min(0.f); pgp.max(5.f); diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 467115c928..e354a5c59d 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -460,7 +460,8 @@ BOOL LLTexLayerSetBuffer::requestUpdateImmediate() void LLTexLayerSetBuffer::doUpload() { llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl; - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); + LLStatViewer::TEX_BAKES.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); // 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/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c69999981c..791da59a1a 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1062,7 +1062,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); S32 num_faces = hit_obj->getNumTEs(); for( S32 face = 0; face < num_faces; face++ ) { @@ -1130,7 +1131,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); hit_obj->setTEImage(hit_face, image); dialog_refresh_all(); @@ -1354,7 +1356,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT); } void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 93ba3b2558..cf5a6e3762 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -433,7 +433,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CREATE_COUNT); return TRUE; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4ec498dc33..219e01fe81 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -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 > 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 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. diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index be78603e2d..7ce8cdcfd8 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -1096,17 +1096,20 @@ void upload_new_resource( if( LLAssetType::AT_SOUND == asset_type ) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT ); + LLStatViewer::UPLOAD_SOUND.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT ); } else if( LLAssetType::AT_TEXTURE == asset_type ) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); + LLStatViewer::UPLOAD_TEXTURE.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); } else if( LLAssetType::AT_ANIMATION == asset_type) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT ); + LLStatViewer::ANIMATION_UPLOADS.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT ); } if(LLInventoryType::IT_NONE == inv_type) @@ -1231,18 +1234,21 @@ 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); + //LLViewerStats::getInstance()->incStat( + // LLViewerStats::ST_UPLOAD_SOUND_COUNT ); } else if ( LLAssetType::AT_TEXTURE == asset_type ) { - LLViewerStats::getInstance()->incStat( - LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); + LLStatViewer::UPLOAD_TEXTURE.add(1); + //LLViewerStats::getInstance()->incStat( + // LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); } else if ( LLAssetType::AT_ANIMATION == asset_type ) { - LLViewerStats::getInstance()->incStat( - LLViewerStats::ST_UPLOAD_ANIM_COUNT ); + LLStatViewer::ANIMATION_UPLOADS.add(1); + //LLViewerStats::getInstance()->incStat( + // LLViewerStats::ST_UPLOAD_ANIM_COUNT ); } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ec7d91ec4f..b3e1c9bdbe 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4753,125 +4753,150 @@ 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: - LLStatViewer::SIM_TIME_DILATION.sample(stat_value); - //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value); - break; - case LL_SIM_STAT_FPS: - LLStatViewer::SIM_FPS.sample(stat_value); - //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value); - break; - case LL_SIM_STAT_PHYSFPS: - LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value); - //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value); - break; - case LL_SIM_STAT_AGENTUPS: - LLStatViewer::SIM_AGENT_UPS.sample(stat_value); - //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; + } + //switch (stat_id) + //{ + //case LL_SIM_STAT_TIME_DILATION: + // LLStatViewer::SIM_TIME_DILATION.sample(stat_value); + // //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value); + // break; + //case LL_SIM_STAT_FPS: + // LLStatViewer::SIM_FPS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value); + // break; + //case LL_SIM_STAT_PHYSFPS: + // LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value); + // break; + //case LL_SIM_STAT_AGENTUPS: + // LLStatViewer::SIM_AGENT_UPS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value); + // break; + //case LL_SIM_STAT_FRAMEMS: + // LLStatViewer::SIM_FRAME_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_NETMS: + // LLStatViewer::SIM_NET_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_SIMOTHERMS: + // LLStatViewer::SIM_PHYSICS_OTHER_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_SIMPHYSICSMS: + // LLStatViewer::SIM_PHYSICS_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_AGENTMS: + // LLStatViewer::SIM_AGENTS_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_IMAGESMS: + // LLStatViewer::SIM_IMAGES_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_SCRIPTMS: + // LLStatViewer::SIM_SCRIPTS_TIME.sample(stat_value); + // //LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value); + // break; + //case LL_SIM_STAT_NUMTASKS: + // LLStatViewer::SIM_OBJECTS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimObjects.addValue(stat_value); + // break; + //case LL_SIM_STAT_NUMTASKSACTIVE: + // LLStatViewer::SIM_ACTIVE_OBJECTS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value); + // break; + //case LL_SIM_STAT_NUMAGENTMAIN: + // LLStatViewer::SIM_MAIN_AGENTS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value); + // break; + //case LL_SIM_STAT_NUMAGENTCHILD: + // LLStatViewer::SIM_CHILD_AGENTS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value); + // break; + //case LL_SIM_STAT_NUMSCRIPTSACTIVE: + // LLStatViewer::SIM_ACTIVE_SCRIPTS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value); + // break; + //case LL_SIM_STAT_SCRIPT_EPS: + // LLStatViewer::SIM_SCRIPT_EPS.sample(stat_value); + // //LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value); + // break; + //case LL_SIM_STAT_INPPS: + // LLStatViewer::SIM_IN_PACKETS_PER_SEC.sample(stat_value); + // //LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value); + // break; + //case LL_SIM_STAT_OUTPPS: + // LLStatViewer::SIM_OUT_PACKETS_PER_SEC.sample(stat_value); + // //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; + //} } /* @@ -5942,7 +5967,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT); } else if( message == "Home position set." ) { @@ -7369,7 +7395,7 @@ void onCovenantLoadComplete(LLVFS *vfs, } else { - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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 aba1d131e1..989a1c4e5a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2033,7 +2033,8 @@ 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(diff.length()); + //LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() ); } } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 88bb087742..2f171f89d7 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1029,10 +1029,14 @@ 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); + //LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); + //LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); + //LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); + //LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a3d04d655a..f0ad04e0ba 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -76,7 +76,6 @@ LLTrace::Count<> FPS("fpsstat"), 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"), - FAILED_DOWNLOADS("faileddownloads", "Number of times LLAssetStorage::getAssetData() has failed"), LSL_SAVES("lslsaves", "Number of times user has saved a script"), ANIMATION_UPLOADS("animationuploads", "Animations uploaded"), FLY("fly", "Fly count"), @@ -108,28 +107,28 @@ LLTrace::Count AVATAR_EDIT_TIME("avataredittime", "Seconds in SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"), LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%"); -LLTrace::Measurement<> SIM_TIME_DILATION("simtimedilation"), - SIM_FPS("simfps"), - SIM_PHYSICS_FPS("simphysicsfps"), - SIM_AGENT_UPS("simagentups"), - SIM_SCRIPT_EPS("simscripteps"), - SIM_SKIPPED_SILHOUETTE("simsimskippedsilhouettesteps"), - SIM_SKIPPED_CHARACTERS_PERCENTAGE("simsimpctsteppedcharacters"), - SIM_MAIN_AGENTS("simmainagents"), - SIM_CHILD_AGENTS("simchildagents"), - SIM_OBJECTS("simobjects"), - SIM_ACTIVE_OBJECTS("simactiveobjects"), - SIM_ACTIVE_SCRIPTS("simactivescripts"), - SIM_PERCENTAGE_SCRIPTS_RUN("simpctscriptsrun"), - SIM_IN_PACKETS_PER_SEC("siminpps"), - SIM_OUT_PACKETS_PER_SEC("simoutpps"), - SIM_PENDING_DOWNLOADS("simpendingdownloads"), - SIM_PENDING_UPLOADS("simpendinguploads"), - SIM_PENDING_LOCAL_UPLOADS("simpendinglocaluploads"), - SIM_PENDING_VFS_OPERATIONS("vfspendingoperations"), - SIM_PHYSICS_PINNED_TASKS("physicspinnedtasks"), - SIM_PHYSICS_LOD_TASKS("physicslodtasks"), - NUM_IMAGES("numimagesstat"), +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<> NUM_IMAGES("numimagesstat"), NUM_RAW_IMAGES("numrawimagesstat"), NUM_OBJECTS("numobjectsstat"), NUM_ACTIVE_OBJECTS("numactiveobjectsstat"), @@ -137,134 +136,61 @@ LLTrace::Measurement<> SIM_TIME_DILATION("simtimedilation"), NUM_SIZE_CULLED("numsizeculledstat"), NUM_VIS_CULLED("numvisculledstat"), ENABLE_VBO("enablevbo", "Vertex Buffers Enabled"), - DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), - MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting"), 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"); +LLTrace::Measurement AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections"); + + LLTrace::Measurement SIM_UNACKED_BYTES("simtotalunackedbytes"), SIM_PHYSICS_MEM("physicsmemoryallocated"), GL_TEX_MEM("gltexmemstat"), GL_BOUND_MEM("glboundmemstat"), RAW_MEM("rawmemstat"), - FORMATTED_MEM("formattedmemstat"); - - -LLTrace::Measurement SIM_PHYSICS_TIME("simsimphysicsmsec"), - SIM_PHYSICS_STEP_TIME("simsimphysicsstepmsec"), - SIM_PHYSICS_SHAPE_UPDATE_TIME("simsimphysicsshapeupdatemsec"), - SIM_PHYSICS_OTHER_TIME("simsimphysicsothermsec"), - SIM_AI_TIME("simsimaistepmsec"), - SIM_AGENTS_TIME("simagentmsec"), - SIM_IMAGES_TIME("simimagesmsec"), - SIM_SCRIPTS_TIME("simscriptmsec"), - SIM_SPARE_TIME("simsparemsec"), - SIM_SLEEP_TIME("simsleepmsec"), - SIM_PUMP_IO_TIME("simpumpiomsec"), - SIM_PING("simpingstat"), - 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"); -} + FORMATTED_MEM("formattedmemstat"), + DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), + MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting"); + + +SimMeasurement 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); + +LLTrace::Measurement 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"); -class StatAttributes -{ -public: - StatAttributes(const char* name, - const BOOL enabled) - : mName(name), - mEnabled(enabled) - { - } - - std::string mName; - BOOL mEnabled; -}; +} -LLViewerStats::LLViewerStats() : - //mVFSPendingOperations("vfspendingoperations"), - //mFPSStat("fpsstat"), - //mPacketsInStat("packetsinstat"), - //mPacketsLostStat("packetsloststat"), - //mPacketsOutStat("packetsoutstat"), - //mPacketsLostPercentStat("packetslostpercentstat"), - //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", TRUE), - mNumRawImagesStat("numrawimagesstat", TRUE), - mGLTexMemStat("gltexmemstat", TRUE), - mGLBoundMemStat("glboundmemstat", TRUE), - mRawMemStat("rawmemstat", TRUE), - mFormattedMemStat("formattedmemstat", TRUE), - mNumObjectsStat("numobjectsstat"), - mNumActiveObjectsStat("numactiveobjectsstat"), - mNumNewObjectsStat("numnewobjectsstat"), - mNumSizeCulledStat("numsizeculledstat"), - mNumVisCulledStat("numvisculledstat"), - mLastTimeDiff(0.0) +LLViewerStats::LLViewerStats() +: 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; - } - - mAgentPositionSnaps.reset(); mRecording.start(); LLTrace::get_frame_recording().start(); } @@ -275,93 +201,80 @@ LLViewerStats::~LLViewerStats() void LLViewerStats::resetStats() { - LLViewerStats& stats = LLViewerStats::instance(); - stats.mRecording.reset(); - //stats.mVFSPendingOperations.reset(); - //stats.mPacketsInStat.reset(); - //stats.mPacketsLostStat.reset(); - //stats.mPacketsOutStat.reset(); - //stats.mFPSStat.reset(); - //stats.mTexturePacketsStat.reset(); - //stats.mAgentPositionSnaps.reset(); -} - - -F64 LLViewerStats::getStat(EStatType type) const -{ - return mStats[type]; -} - -F64 LLViewerStats::setStat(EStatType type, F64 value) -{ - mStats[type] = value; - return mStats[type]; -} - -F64 LLViewerStats::incStat(EStatType type, F64 value) -{ - mStats[type] += value; - return mStats[type]; + LLViewerStats::instance().mRecording.reset(); } void LLViewerStats::updateFrameStats(const F64 time_diff) { - if (mPacketsLostPercentStat.getCurrent() > 5.0) + if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) { - incStat(ST_LOSS_05_SECONDS, time_diff); + LLStatViewer::LOSS_5_PERCENT_TIME.add(time_diff); + //incStat(ST_LOSS_05_SECONDS, time_diff); } - 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(ST_SIM_FPS_20_SECONDS, time_diff); + LLStatViewer::SIM_20_FPS_TIME.add(time_diff); + //incStat(ST_SIM_FPS_20_SECONDS, time_diff); } - 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(ST_PHYS_FPS_20_SECONDS, time_diff); + LLStatViewer::SIM_PHYSICS_20_FPS_TIME.add(time_diff); + //incStat(ST_PHYS_FPS_20_SECONDS, time_diff); } if (time_diff >= 0.5) { - incStat(ST_FPS_2_SECONDS, time_diff); + LLStatViewer::FPS_2_TIME.add(time_diff); + //incStat(ST_FPS_2_SECONDS, time_diff); } if (time_diff >= 0.125) { - incStat(ST_FPS_8_SECONDS, time_diff); + LLStatViewer::FPS_8_TIME.add(time_diff); + //incStat(ST_FPS_8_SECONDS, time_diff); } if (time_diff >= 0.1) { - incStat(ST_FPS_10_SECONDS, time_diff); + LLStatViewer::FPS_10_TIME.add(time_diff); + //incStat(ST_FPS_10_SECONDS, time_diff); } if (gFrameCount && mLastTimeDiff > 0.0) { // new "stutter" meter - setStat(ST_FPS_DROP_50_RATIO, - (getStat(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); + //setStat(ST_FPS_DROP_50_RATIO, + // (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + + // (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount); // old stats that were never really used - setStat(ST_FRAMETIME_JITTER, - (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) + - fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount); + LLStatViewer::FRAMETIME_JITTER.sample(mLastTimeDiff - time_diff); + //setStat(ST_FRAMETIME_JITTER, + // (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) + + // fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - setStat(ST_FRAMETIME_SLEW, - (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) + - fabs(average_frametime - time_diff) / average_frametime) / gFrameCount); + LLStatViewer::FRAMETIME_SLEW.sample(average_frametime - time_diff); + //setStat(ST_FRAMETIME_SLEW, + // (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) + + // fabs(average_frametime - time_diff) / average_frametime) / gFrameCount); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); + LLStatViewer::DELTA_BANDWIDTH.sample(delta_bandwidth); + //setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); - setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); + LLStatViewer::MAX_BANDWIDTH.sample(max_bandwidth); + //setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); } mLastTimeDiff = time_diff; - } void LLViewerStats::addToMessage(LLSD &body) const @@ -370,11 +283,11 @@ void LLViewerStats::addToMessage(LLSD &body) const misc["Version"] = TRUE; //TODO RN: get last value, not mean - misc["Vertex Buffers Enabled"] = mRecording.getMean(LLStatViewer::ENABLE_VBO); + misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO); - body["AgentPositionSnaps"] = mAgentPositionSnaps.asLLSD(); - 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; } // *NOTE:Mani The following methods used to exist in viewer.cpp @@ -386,8 +299,6 @@ 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; F32 gAvgSimPing = 0.f; @@ -403,51 +314,61 @@ void update_statistics() gTotalWorldBytes += gVLManager.getTotalBytes(); gTotalObjectBytes += gObjectBits / 8; - LLViewerStats& stats = LLViewerStats::instance(); - // 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_MOUSELOOK_SECONDS, gFrameIntervalSeconds); } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds); + LLStatViewer::AVATAR_EDIT_TIME.add(gFrameIntervalSeconds); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds); } else if (LLFloaterReg::instanceVisible("build")) { - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds); + LLStatViewer::TOOLBOX_TIME.add(gFrameIntervalSeconds); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds); } } - stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); - stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); - stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); - stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); - - stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); + LLStatViewer::ENABLE_VBO.sample((F64)gSavedSettings.getBOOL("RenderVBOEnable")); + //stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); + LLStatViewer::LIGHTING_DETAIL.sample((F64)gPipeline.getLightingDetail()); + //stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); + LLStatViewer::DRAW_DISTANCE.sample((F64)gSavedSettings.getF32("RenderFarClip")); + //stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); + LLStatViewer::CHAT_BUBBLES.sample((F64)gSavedSettings.getBOOL("UseChatBubbles")); + //stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); + + LLStatViewer::FRAME_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Frame")); + //stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle"); F64 network_secs = gDebugView->mFastTimerView->getTime("Network"); - stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); - stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); - stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); - stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); - stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); + LLStatViewer::UPDATE_STACKTIME.sample(idle_secs - network_secs); + //stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); + LLStatViewer::NETWORK_STACKTIME.sample(network_secs); + //stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); + LLStatViewer::IMAGE_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Update Images")); + //stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); + LLStatViewer::REBUILD_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Sort Draw State")); + //stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); + LLStatViewer::RENDER_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Geometry")); + //stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); - stats.mSimPingStat.addValue(cdp->getPingDelay()); + //stats.mSimPingStat.addValue(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - LLUnits::Seconds i(10000); - LLStatViewer::SIM_PING.sample(i);// >(10000); - stats.mSimPingStat.addValue(10000); + LLStatViewer::SIM_PING.sample(10000); + //stats.mSimPingStat.addValue(10000); } //stats.mFPSStat.addValue(1); @@ -458,7 +379,7 @@ void update_statistics() LLStatViewer::OBJECT_KBIT.add(gObjectBits); //stats.mObjectKBitStat.addValue(gObjectBits/1024.f); //stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); - LLStatViewer::SIM_PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending()); + LLStatViewer::PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending()); LLStatViewer::ASSET_KBIT.add(gTransferManager.getTransferBitsIn(LLTCT_ASSET)); //stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); @@ -481,7 +402,8 @@ void update_statistics() visible_avatar_frames = 1.f; avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; } - stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); + LLStatViewer::VISIBLE_AVATARS.sample((F64)avg_visible_avatars); + //stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); } LLWorld::getInstance()->updateNetStats(); LLWorld::getInstance()->requestCacheMisses(); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 5412294cf2..40109bcea3 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -28,12 +28,39 @@ #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 id) + : LLInstanceTracker(id) + {} + virtual ~SimMeasurementSampler() {} + virtual void sample(F64 value) = 0; +}; + +template +struct SimMeasurement : public LLTrace::Measurement, public SimMeasurementSampler +{ + SimMeasurement(const char* name, const char* description, ESimStatID stat_id) + : LLTrace::Measurement(name, description), + SimMeasurementSampler(stat_id) + {} + + using SimMeasurementSampler::getInstance; + + /*virtual*/ void sample(F64 value) + { + LLTrace::Measurement::sample(value); + } +}; + extern LLTrace::Count<> FPS, PACKETS_IN, PACKETS_LOST, @@ -46,7 +73,6 @@ extern LLTrace::Count<> FPS, OBJECT_REZ, LOADING_WEARABLES_LONG_DELAY, LOGIN_TIMEOUTS, - FAILED_DOWNLOADS, LSL_SAVES, ANIMATION_UPLOADS, FLY, @@ -80,7 +106,7 @@ extern LLTrace::Count AVATAR_EDIT_TIME, SIM_PHYSICS_20_FPS_TIME, LOSS_5_PERCENT_TIME; -extern LLTrace::Measurement<> SIM_TIME_DILATION, +extern SimMeasurement<> SIM_TIME_DILATION, SIM_FPS, SIM_PHYSICS_FPS, SIM_AGENT_UPS, @@ -98,10 +124,10 @@ extern LLTrace::Measurement<> SIM_TIME_DILATION, SIM_PENDING_DOWNLOADS, SIM_PENDING_UPLOADS, SIM_PENDING_LOCAL_UPLOADS, - SIM_PENDING_VFS_OPERATIONS, SIM_PHYSICS_PINNED_TASKS, - SIM_PHYSICS_LOD_TASKS, - NUM_IMAGES, + SIM_PHYSICS_LOD_TASKS; + +extern LLTrace::Measurement<> NUM_IMAGES, NUM_RAW_IMAGES, NUM_OBJECTS, NUM_ACTIVE_OBJECTS, @@ -109,25 +135,31 @@ extern LLTrace::Measurement<> SIM_TIME_DILATION, NUM_SIZE_CULLED, NUM_VIS_CULLED, ENABLE_VBO, - DELTA_BANDWIDTH, - MAX_BANDWIDTH, LIGHTING_DETAIL, VISIBLE_AVATARS, SHADER_OBJECTS, DRAW_DISTANCE, CHAT_BUBBLES, + PENDING_VFS_OPERATIONS, + PACKETS_LOST_PERCENT, WINDOW_WIDTH, WINDOW_HEIGHT; +extern LLTrace::Measurement AGENT_POSITION_SNAP; + extern LLTrace::Measurement SIM_UNACKED_BYTES, + DELTA_BANDWIDTH, + MAX_BANDWIDTH, SIM_PHYSICS_MEM, GL_TEX_MEM, GL_BOUND_MEM, RAW_MEM, FORMATTED_MEM; - -extern LLTrace::Measurement SIM_PHYSICS_TIME, +extern SimMeasurement 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, @@ -137,171 +169,32 @@ extern LLTrace::Measurement SIM_PHYSICS_TIME, SIM_SCRIPTS_TIME, SIM_SPARE_TIME, SIM_SLEEP_TIME, - SIM_PUMP_IO_TIME, - SIM_PING, - FRAMETIME_JITTER, - FRAMETIME_SLEW, - LOGIN_SECONDS, - REGION_CROSSING_TIME, - FRAME_STACKTIME, - UPDATE_STACKTIME, - NETWORK_STACKTIME, - IMAGE_STACKTIME, - REBUILD_STACKTIME, - RENDER_STACKTIME; + SIM_PUMP_IO_TIME; + + +extern LLTrace::Measurement 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 { public: - LLStat mVFSPendingOperations, - mFPSStat, - mPacketsInStat, - mPacketsLostStat, - mPacketsOutStat, - mPacketsLostPercentStat, - mTexturePacketsStat, - mActualInKBitStat, // From the packet ring (when faking a bad connection) - mActualOutKBitStat, // From the packet ring (when faking a bad connection) - mTrianglesDrawnStat; - - // Simulator stats - LLStat mSimTimeDilation; - - LLStat mSimFPS, - mSimPhysicsFPS, - mSimAgentUPS, - mSimScriptEPS; - - LLStat mSimFrameMsec, - mSimNetMsec, - mSimSimOtherMsec, - mSimSimPhysicsMsec; - - LLStat mSimSimPhysicsStepMsec, - mSimSimPhysicsShapeUpdateMsec, - mSimSimPhysicsOtherMsec, - mSimSimAIStepMsec, - mSimSimSkippedSilhouetteSteps, - mSimSimPctSteppedCharacters; - - LLStat mSimAgentMsec, - mSimImagesMsec, - mSimScriptMsec, - mSimSpareMsec, - mSimSleepMsec, - mSimPumpIOMsec; - - LLStat mSimMainAgents, - mSimChildAgents, - mSimObjects, - mSimActiveObjects, - mSimActiveScripts, - mSimPctScriptsRun; - - LLStat mSimInPPS, - mSimOutPPS, - mSimPendingDownloads, - mSimPendingUploads, - mSimPendingLocalUploads, - mSimTotalUnackedBytes; - - LLStat mPhysicsPinnedTasks, - mPhysicsLODTasks, - mPhysicsMemoryAllocated; - - LLStat mSimPingStat; - - LLStat mNumImagesStat, - mNumRawImagesStat, - mGLTexMemStat, - mGLBoundMemStat, - mRawMemStat, - mFormattedMemStat; - - LLStat mNumObjectsStat, - mNumActiveObjectsStat, - mNumNewObjectsStat, - mNumSizeCulledStat, - mNumVisCulledStat; - void resetStats(); public: - // If you change this, please also add a corresponding text label 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 - }; - 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; @@ -388,8 +281,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 phase_map_t; @@ -412,9 +303,9 @@ public: }; 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 diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ccfedd8881..56ccf3b1f0 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -66,12 +66,6 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE); -LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", TRUE); -LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", TRUE); -LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); @@ -625,12 +619,15 @@ void LLViewerTextureList::updateImages(F32 max_time) LLAppViewer::getTextureFetch()->setTextureBandwidth(recording.getPerSec(LLStatViewer::TEXTURE_KBIT).value()); - 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)); + { + using namespace LLStatViewer; + NUM_IMAGES.sample(sNumImages); + NUM_RAW_IMAGES.sample(LLImageRaw::sRawImageCount); + GL_TEX_MEM.sample(LLImageGL::sGlobalTextureMemoryInBytes); + GL_BOUND_MEM.sample(LLImageGL::sBoundTextureMemoryInBytes); + RAW_MEM.sample(LLImageRaw::sGlobalRawMemory); + FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); + } { //loading from fast cache diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index ab6f009e28..a00f48b5a2 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$ @@ -200,14 +200,6 @@ private: S32 mMaxTotalTextureMemInMegaBytes; LLFrameTimer mForceDecodeTimer; -public: - 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 4ad7c49d4b..8161caf5e4 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2184,8 +2184,10 @@ 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); + //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); + LLStatViewer::WINDOW_HEIGHT.sample((F64)height); + //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height); LLLayoutStack::updateClass(); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fd892db3d3..3e8b07b6dc 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -911,13 +911,14 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { ++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); + //F64 avg = (mRegionCrossingCount == 1) ? 0 : LLViewerStats::getInstance()->getStat(LLViewerStats::ST_CROSSING_AVG); + //F64 delta_avg = (delta + avg*(mRegionCrossingCount-1)) / mRegionCrossingCount; + LLStatViewer::REGION_CROSSING_TIME.sample(delta); + //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); // Diagnostics llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl; @@ -2587,7 +2588,8 @@ 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); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } } } @@ -2632,7 +2634,8 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } invalidateComposite(layer_set, TRUE); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); + LLStatViewer::TEX_REBAKES.add(1); + //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else { diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 6f6411ce3c..20033d6fe4 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -136,7 +136,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID { LLFile::remove(std::string(filename)); } - LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); + //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 9e495c46b1..604741ff27 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -712,13 +712,15 @@ void LLWorld::updateNetStats() LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); LLStatViewer::PACKETS_LOST.add(packets_lost); + LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); //LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); //LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); //LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); - //if (packets_in) - //{ + if (packets_in) + { + LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); - //} + } //else //{ // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); -- cgit v1.3 From c0ba626c8009b22310b3923e8170e5db2a021253 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 15 Oct 2012 21:34:29 -0600 Subject: For SH-3333: Design and implement a new object cache system on viewer side --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/settings.xml | 11 + indra/newview/llappviewer.cpp | 2 +- indra/newview/lldrawable.cpp | 349 +++++++------- indra/newview/lldrawable.h | 62 +-- indra/newview/llspatialpartition.cpp | 787 +++++++++++--------------------- indra/newview/llspatialpartition.h | 128 +++--- indra/newview/lltextureview.cpp | 9 +- indra/newview/llviewermessage.cpp | 25 +- indra/newview/llviewerobject.cpp | 105 +++-- indra/newview/llviewerobjectlist.cpp | 145 +++++- indra/newview/llviewerobjectlist.h | 6 +- indra/newview/llvieweroctree.cpp | 704 ++++++++++++++++++++++++++++ indra/newview/llvieweroctree.h | 274 +++++++++++ indra/newview/llviewerpartsim.cpp | 4 +- indra/newview/llviewerregion.cpp | 478 +++++++++++++++++-- indra/newview/llviewerregion.h | 38 +- indra/newview/llviewerstatsrecorder.cpp | 2 +- indra/newview/llvoavatarself.cpp | 6 +- indra/newview/llvocache.cpp | 78 +++- indra/newview/llvocache.h | 36 +- indra/newview/llvograss.cpp | 14 +- indra/newview/llvopartgroup.cpp | 20 +- indra/newview/llvosurfacepatch.cpp | 4 +- indra/newview/llvotree.cpp | 4 +- indra/newview/llvovolume.cpp | 44 +- indra/newview/llvowater.cpp | 6 +- indra/newview/llworld.cpp | 20 +- indra/newview/llworld.h | 3 +- indra/newview/pipeline.cpp | 50 +- 30 files changed, 2429 insertions(+), 987 deletions(-) create mode 100644 indra/newview/llvieweroctree.cpp create mode 100644 indra/newview/llvieweroctree.h (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 04ea646100..c81ade6937 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -583,6 +583,7 @@ set(viewer_SOURCE_FILES llviewernetwork.cpp llviewerobject.cpp llviewerobjectlist.cpp + llvieweroctree.cpp llviewerparcelmedia.cpp llviewerparcelmediaautoplay.cpp llviewerparcelmgr.cpp @@ -1148,6 +1149,7 @@ set(viewer_HEADER_FILES llviewernetwork.h llviewerobject.h llviewerobjectlist.h + llvieweroctree.h llviewerparcelmedia.h llviewerparcelmediaautoplay.h llviewerparcelmgr.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7497a273ea..13c95c2381 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6400,6 +6400,17 @@ Value 1 + ObjectCacheViewCullingEnabled + + Comment + Enable the object cache view culling. Needs to restart viewer. + Persist + 1 + Type + Boolean + Value + 1 + OpenDebugStatAdvanced Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a43776912c..bffa1708ec 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3685,7 +3685,7 @@ U32 LLAppViewer::getObjectCacheVersion() { // Viewer object cache version, change if object update // format changes. JC - const U32 INDRA_OBJECT_CACHE_VERSION = 14; + const U32 INDRA_OBJECT_CACHE_VERSION = 15; return INDRA_OBJECT_CACHE_VERSION; } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 46ec1abec1..e29551e83c 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -49,6 +49,7 @@ #include "llspatialpartition.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" +#include "llvocache.h" const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; @@ -75,7 +76,6 @@ extern bool gShiftFrame; // // static -U32 LLDrawable::sCurVisible = 0; U32 LLDrawable::sNumZombieDrawables = 0; F32 LLDrawable::sCurPixelAngle = 0; LLDynamicArrayPtr > LLDrawable::sDeadList; @@ -85,33 +85,59 @@ LLDynamicArrayPtr > LLDrawable::sDeadList; // static void LLDrawable::incrementVisible() { - sCurVisible++; + LLViewerOctreeEntryData::incrementVisible(); sCurPixelAngle = (F32) gViewerWindow->getWindowHeightRaw()/LLViewerCamera::getInstance()->getView(); } -void LLDrawable::init() +LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry) + : LLViewerOctreeEntryData(LLViewerOctreeEntry::LLDRAWABLE), + mVObjp(vobj) +{ + init(new_entry); +} + +void LLDrawable::init(bool new_entry) { // mXform mParent = NULL; mRenderType = 0; mCurrentScale = LLVector3(1,1,1); - mDistanceWRTCamera = 0.0f; - mPositionGroup.clear(); - mExtents[0].clear(); - mExtents[1].clear(); - + mDistanceWRTCamera = 0.0f; mState = 0; - mVObjp = NULL; - // mFaces - mSpatialGroupp = NULL; - mVisible = sCurVisible - 2;//invisible for the current frame and the last frame. - mRadius = 0.f; - mGeneration = -1; - mBinRadius = 1.f; - mBinIndex = -1; - + // mFaces + mRadius = 0.f; + mGeneration = -1; mSpatialBridge = NULL; + + LLViewerOctreeEntry* entry = NULL; + LLVOCacheEntry* vo_entry = NULL; + if(!new_entry && mVObjp && getRegion() != NULL) + { + vo_entry = getRegion()->getCacheEntryForOctree(mVObjp->getLocalID()); + if(vo_entry) + { + entry = vo_entry->getEntry(); + } + } + setOctreeEntry(entry); + if(vo_entry) + { + if(!entry) + { + vo_entry->setOctreeEntry(mEntry); + } + else if(vo_entry->getNumOfChildren() > 0) + { + getRegion()->addVisibleCacheEntry(vo_entry); //to load all children. + } + + getRegion()->addActiveCacheEntry(vo_entry); + } + + llassert(!vo_entry || vo_entry->getEntry() == mEntry); + + initVisible(sCurVisible - 2);//invisible for the current frame and the last frame. } // static @@ -155,6 +181,7 @@ void LLDrawable::markDead() llwarns << "Warning! Marking dead multiple times!" << llendl; return; } + setState(DEAD); if (mSpatialBridge) { @@ -164,8 +191,7 @@ void LLDrawable::markDead() sNumZombieDrawables++; - // We're dead. Free up all of our references to other objects - setState(DEAD); + // We're dead. Free up all of our references to other objects cleanupReferences(); // sDeadList.put(this); } @@ -219,6 +245,8 @@ void LLDrawable::cleanupReferences() gPipeline.unlinkDrawable(this); + removeFromOctree(); + { LLFastTimer t(FTM_DEREF_DRAWABLE); // Cleanup references to other objects @@ -227,6 +255,21 @@ void LLDrawable::cleanupReferences() } } +void LLDrawable::removeFromOctree() +{ + if(!mEntry) + { + return; + } + + mEntry->removeData(this); + if(mEntry->hasVOCacheEntry()) + { + getRegion()->removeActiveCacheEntry((LLVOCacheEntry*)mEntry->getVOCacheEntry(), this); + } + mEntry = NULL; +} + void LLDrawable::cleanupDeadDrawables() { /* @@ -715,7 +758,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVOVolume* volume = getVOVolume(); if (volume) { - if (getSpatialGroup()) + if (getGroup()) { pos.set(getPositionGroup().getF32ptr()); } @@ -833,9 +876,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) } } - mExtents[0].add(shift_vector); - mExtents[1].add(shift_vector); - mPositionGroup.add(shift_vector); + shift(shift_vector); } else if (mSpatialBridge) { @@ -843,9 +884,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) } else if (isAvatar()) { - mExtents[0].add(shift_vector); - mExtents[1].add(shift_vector); - mPositionGroup.add(shift_vector); + shift(shift_vector); } mVObjp->onShift(shift_vector); @@ -857,40 +896,24 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const return mXform.getPositionW(); } -const LLVector4a* LLDrawable::getSpatialExtents() const -{ - return mExtents; -} - -void LLDrawable::setSpatialExtents(const LLVector3& min, const LLVector3& max) -{ - mExtents[0].load3(min.mV); - mExtents[1].load3(max.mV); -} - -void LLDrawable::setSpatialExtents(const LLVector4a& min, const LLVector4a& max) -{ - mExtents[0] = min; - mExtents[1] = max; -} - -void LLDrawable::setPositionGroup(const LLVector4a& pos) -{ - mPositionGroup = pos; -} - void LLDrawable::updateSpatialExtents() { if (mVObjp) { - mVObjp->updateSpatialExtents(mExtents[0], mExtents[1]); + const LLVector4a* exts = getSpatialExtents(); + LLVector4a extents[2]; + extents[0] = exts[0]; + extents[1] = exts[1]; + + mVObjp->updateSpatialExtents(extents[0], extents[1]); + setSpatialExtents(extents[0], extents[1]); } updateBinRadius(); if (mSpatialBridge.notNull()) { - mPositionGroup.splat(0.f); + getGroupPosition().splat(0.f); } } @@ -899,11 +922,11 @@ void LLDrawable::updateBinRadius() { if (mVObjp.notNull()) { - mBinRadius = llmin(mVObjp->getBinRadius(), 256.f); + setBinRadius(llmin(mVObjp->getBinRadius(), 256.f)); } else { - mBinRadius = llmin(getRadius()*4.f, 256.f); + setBinRadius(llmin(getRadius()*4.f, 256.f)); } } @@ -937,20 +960,48 @@ void LLDrawable::updateUVMinMax() { } -LLSpatialGroup* LLDrawable::getSpatialGroup() const -{ - llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1); - return mSpatialGroupp; +//virtual +bool LLDrawable::isVisible() const +{ + if (LLViewerOctreeEntryData::isVisible()) + { + return true; + } + + { + LLviewerOctreeGroup* group = mEntry->getGroup(); + if (group && group->isVisible()) + { + LLViewerOctreeEntryData::setVisible(); + return true; + } + } + + return false; } -void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) +//virtual +bool LLDrawable::isRecentlyVisible() const { -/*if (mSpatialGroupp && (groupp != mSpatialGroupp)) + //currently visible or visible in the previous frame. + bool vis = LLViewerOctreeEntryData::isRecentlyVisible(); + + if(!vis) { - mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); - }*/ + LLviewerOctreeGroup* group = getGroup(); + if (group && group->isRecentlyVisible()) + { + LLViewerOctreeEntryData::setVisible(); + vis = TRUE ; + } + } + + return vis ; +} - if (mSpatialGroupp != groupp && getVOVolume()) +void LLDrawable::setGroup(LLviewerOctreeGroup *groupp) +{ + if (getGroup() != groupp && getVOVolume()) { //NULL out vertex buffer references for volumes on spatial group change to maintain //requirement that every face vertex buffer is either NULL or points to a vertex buffer //contained by its drawable's spatial group @@ -964,9 +1015,7 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) } } - mSpatialGroupp = groupp; - - llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1); + LLViewerOctreeEntryData::setGroup(groupp); } LLSpatialPartition* LLDrawable::getSpatialPartition() @@ -985,11 +1034,11 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() { if (mVObjp->isHUDAttachment()) { - setSpatialBridge(new LLHUDBridge(this)); + setSpatialBridge(new LLHUDBridge(this, getRegion())); } else { - setSpatialBridge(new LLVolumeBridge(this)); + setSpatialBridge(new LLVolumeBridge(this, getRegion())); } } return mSpatialBridge->asPartition(); @@ -1008,89 +1057,26 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() return retval; } -const S32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one. -//static -S32 LLDrawable::getMinVisFrameRange() +//virtual +S32 LLDrawable::getMinVisFrameRange() const { - return MIN_VIS_FRAME_RANGE ; -} - -BOOL LLDrawable::isRecentlyVisible() const -{ - //currently visible or visible in the previous frame. - BOOL vis = isVisible() || (sCurVisible - mVisible < MIN_VIS_FRAME_RANGE) ; - - if(!vis) - { - LLSpatialGroup* group = getSpatialGroup(); - if (group && group->isRecentlyVisible()) - { - mVisible = sCurVisible; - vis = TRUE ; - } - } - - return vis ; -} - -BOOL LLDrawable::isVisible() const -{ - if (mVisible == sCurVisible) - { - return TRUE; - } - -#if 0 - //disabling this code fixes DEV-20105. Leaving in place in case some other bug pops up as a a result. - //should be safe to just always ask the spatial group for visibility. - if (isActive()) - { - if (isRoot()) - { - LLSpatialGroup* group = mSpatialBridge.notNull() ? mSpatialBridge->getSpatialGroup() : - getSpatialGroup(); - if (group && group->isVisible()) - { - mVisible = sCurVisible; - return TRUE; - } - } - else - { - if (getParent()->isVisible()) - { - mVisible = sCurVisible; - return TRUE; - } - } - } - else -#endif - { - LLSpatialGroup* group = getSpatialGroup(); - if (group && group->isVisible()) - { - mVisible = sCurVisible; - return TRUE; - } - } + const S32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one. - return FALSE; + return MIN_VIS_FRAME_RANGE ; } //======================================= // Spatial Partition Bridging Drawable //======================================= -LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask) -: LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB) +LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) : + LLDrawable(root->getVObj(), true), + LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp) { mBridge = this; mDrawable = root; root->setSpatialBridge(this); - mBinIndex = -1; - mRenderType = mDrawable->mRenderType; mDrawableType = mDrawable->mRenderType; @@ -1111,10 +1097,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat LLSpatialBridge::~LLSpatialBridge() { - LLSpatialGroup* group = getSpatialGroup(); - if (group) + if(mEntry) { - group->mSpatialPartition->remove(this, group); + LLSpatialGroup* group = getSpatialGroup(); + if (group) + { + group->mSpatialPartition->remove(this, group); + } } //delete octree here so listeners will still be able to access bridge specific state @@ -1136,8 +1125,9 @@ void LLSpatialBridge::updateSpatialExtents() root->rebound(); } + const LLVector4a* root_bounds = root->getBounds(); LLVector4a offset; - LLVector4a size = root->mBounds[1]; + LLVector4a size = root_bounds[1]; //VECTORIZE THIS LLMatrix4a mat; @@ -1149,7 +1139,7 @@ void LLSpatialBridge::updateSpatialExtents() LLVector4a center; mat.affineTransform(t, center); - mat.rotate(root->mBounds[0], offset); + mat.rotate(root_bounds[0], offset); center.add(offset); LLVector4a v[4]; @@ -1171,12 +1161,9 @@ void LLSpatialBridge::updateSpatialExtents() scale.mul(size); mat.rotate(scale, v[3]); - - LLVector4a& newMin = mExtents[0]; - LLVector4a& newMax = mExtents[1]; - - newMin = newMax = center; - + LLVector4a newMin; + LLVector4a newMax; + newMin = newMax = center; for (U32 i = 0; i < 4; i++) { LLVector4a delta; @@ -1189,19 +1176,21 @@ void LLSpatialBridge::updateSpatialExtents() newMin.setMin(newMin, min); newMax.setMax(newMax, max); } - + setSpatialExtents(newMin, newMax); + LLVector4a diagonal; diagonal.setSub(newMax, newMin); mRadius = diagonal.getLength3().getF32() * 0.5f; - mPositionGroup.setAdd(newMin,newMax); - mPositionGroup.mul(0.5f); + LLVector4a& pos = getGroupPosition(); + pos.setAdd(newMin,newMax); + pos.mul(0.5f); updateBinRadius(); } void LLSpatialBridge::updateBinRadius() { - mBinRadius = llmin( mOctree->getSize()[0]*0.5f, 256.f); + setBinRadius(llmin( mOctree->getSize()[0]*0.5f, 256.f)); } LLCamera LLSpatialBridge::transformCamera(LLCamera& camera) @@ -1236,7 +1225,7 @@ LLCamera LLSpatialBridge::transformCamera(LLCamera& camera) void LLDrawable::setVisible(LLCamera& camera, std::vector* results, BOOL for_select) { - mVisible = sCurVisible; + LLViewerOctreeEntryData::setVisible(); #if 0 && !LL_RELEASE_FOR_DOWNLOAD //crazy paranoid rules checking @@ -1271,21 +1260,21 @@ void LLDrawable::setVisible(LLCamera& camera, std::vector* results, #endif } -class LLOctreeMarkNotCulled: public LLOctreeTraveler +class LLOctreeMarkNotCulled: public OctreeTraveler { public: LLCamera* mCamera; LLOctreeMarkNotCulled(LLCamera* camera_in) : mCamera(camera_in) { } - virtual void traverse(const LLOctreeNode* node) + virtual void traverse(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); group->setVisible(); - LLOctreeTraveler::traverse(node); + OctreeTraveler::traverse(node); } - void visit(const LLOctreeNode* branch) + void visit(const OctreeNode* branch) { gPipeline.markNotCulled((LLSpatialGroup*) branch->getListener(0), *mCamera); } @@ -1329,7 +1318,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* } if (!group || - LLDrawable::getCurrentFrame() - av->mVisible > 1 || + LLDrawable::getCurrentFrame() - av->getVisible() > 1 || impostor || !loaded) { @@ -1343,16 +1332,17 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* group->rebound(); LLVector4a center; - center.setAdd(mExtents[0], mExtents[1]); + const LLVector4a* exts = getSpatialExtents(); + center.setAdd(exts[0], exts[1]); center.mul(0.5f); LLVector4a size; - size.setSub(mExtents[1], mExtents[0]); + size.setSub(exts[1], exts[0]); size.mul(0.5f); if ((LLPipeline::sShadowRender && camera_in.AABBInFrustum(center, size)) || LLPipeline::sImpostorRender || (camera_in.AABBInFrustumNoFarClip(center, size) && - AABBSphereIntersect(mExtents[0], mExtents[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist))) + AABBSphereIntersect(exts[0], exts[1], camera_in.getOrigin(), camera_in.mFrustumCornerDist))) { if (!LLPipeline::sImpostorRender && !LLPipeline::sShadowRender && @@ -1467,22 +1457,28 @@ BOOL LLSpatialBridge::updateMove() void LLSpatialBridge::shiftPos(const LLVector4a& vec) { - mExtents[0].add(vec); - mExtents[1].add(vec); - mPositionGroup.add(vec); + LLDrawable::shift(vec); } void LLSpatialBridge::cleanupReferences() { + LLPointer dummy_entry; + if (mDrawable && mDrawable->isDead() && mDrawable->getEntry()->hasVOCacheEntry()) + { + //create a dummy entry to insert the entire LLSpatialBridge to the vo_cache partition so it can be reloaded. + + dummy_entry = new LLVOCacheEntry(); + dummy_entry->setOctreeEntry(mEntry); + dummy_entry->addChild((LLVOCacheEntry*)mDrawable->getEntry()->getVOCacheEntry()); + llassert(!mDrawable->getParent()); + + mDrawable->mParent = this; + } + LLDrawable::cleanupReferences(); if (mDrawable) { - LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) - { - group->mOctreeNode->remove(mDrawable); - mDrawable->setSpatialGroup(NULL); - } + mDrawable->setGroup(NULL); if (mDrawable->getVObj()) { @@ -1494,12 +1490,7 @@ void LLSpatialBridge::cleanupReferences() LLDrawable* drawable = child->mDrawable; if (drawable) { - LLSpatialGroup* group = drawable->getSpatialGroup(); - if (group) - { - group->mOctreeNode->remove(drawable); - drawable->setSpatialGroup(NULL); - } + drawable->setGroup(NULL); } } } @@ -1571,8 +1562,8 @@ void LLDrawable::updateFaceSize(S32 idx) } } -LLBridgePartition::LLBridgePartition() -: LLSpatialPartition(0, FALSE, 0) +LLBridgePartition::LLBridgePartition(LLViewerRegion* regionp) +: LLSpatialPartition(0, FALSE, 0, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_AVATAR; mPartitionType = LLViewerRegion::PARTITION_BRIDGE; @@ -1580,8 +1571,8 @@ LLBridgePartition::LLBridgePartition() mSlopRatio = 0.25f; } -LLHUDBridge::LLHUDBridge(LLDrawable* drawablep) -: LLVolumeBridge(drawablep) +LLHUDBridge::LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp) +: LLVolumeBridge(drawablep, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_HUD; mPartitionType = LLViewerRegion::PARTITION_HUD; diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 4608d16fec..8e193a02bd 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -42,6 +42,7 @@ #include "llviewerobject.h" #include "llrect.h" #include "llappviewer.h" // for gFrameTimeSeconds +#include "llvieweroctree.h" class LLCamera; class LLDrawPool; @@ -59,10 +60,10 @@ const U32 SILHOUETTE_HIGHLIGHT = 0; // All data for new renderer goes into this class. LL_ALIGN_PREFIX(16) -class LLDrawable : public LLRefCount +class LLDrawable : public LLViewerOctreeEntryData { public: - LLDrawable(const LLDrawable& rhs) + LLDrawable(const LLDrawable& rhs) : LLViewerOctreeEntryData(rhs) { *this = rhs; } @@ -85,19 +86,17 @@ public: ll_aligned_free_16(ptr); } - LLDrawable() { init(); } + LLDrawable(LLViewerObject *vobj, bool new_entry = false); void markDead(); // Mark this drawable as dead BOOL isDead() const { return isState(DEAD); } BOOL isNew() const { return !isState(BUILT); } BOOL isLight() const; - - BOOL isVisible() const; - BOOL isRecentlyVisible() const; + virtual void setVisible(LLCamera& camera_in, std::vector* results = NULL, BOOL for_select = FALSE); - + LLSpatialGroup* getSpatialGroup()const {return (LLSpatialGroup*)getGroup();} LLViewerRegion* getRegion() const { return mVObjp->getRegion(); } const LLTextureEntry* getTextureEntry(U8 which) const { return mVObjp->getTE(which); } LLPointer& getVObj() { return mVObjp; } @@ -110,17 +109,13 @@ public: const LLVector3& getPosition() const { return mXform.getPosition(); } const LLVector3& getWorldPosition() const { return mXform.getPositionW(); } const LLVector3 getPositionAgent() const; - const LLVector4a& getPositionGroup() const { return mPositionGroup; } const LLVector3& getScale() const { return mCurrentScale; } void setScale(const LLVector3& scale) { mCurrentScale = scale; } const LLQuaternion& getWorldRotation() const { return mXform.getWorldRotation(); } const LLQuaternion& getRotation() const { return mXform.getRotation(); } F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); } S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; } - F32 getBinRadius() const { return mBinRadius; } - S32 getBinIndex() const { return mBinIndex; } - void setBinIndex(S32 index) const { mBinIndex = index; } - + void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); } LLXformMatrix* getXform() { return &mXform; } @@ -150,7 +145,7 @@ public: void setNumFacesFast(const S32 numFaces, LLFacePool *poolp, LLViewerTexture *texturep); void mergeFaces(LLDrawable* src); - void init(); + void init(bool new_entry); void destroy(); void update(); @@ -181,8 +176,12 @@ public: BOOL getLit() const { return isState(UNLIT) ? FALSE : TRUE; } void setLit(BOOL lit) { lit ? clearState(UNLIT) : setState(UNLIT); } + bool isVisible() const; + bool isRecentlyVisible() const; + virtual void cleanupReferences(); + void setGroup(LLviewerOctreeGroup* group); void setRadius(const F32 radius); F32 getRadius() const { return mRadius; } F32 getVisibilityRadius() const; @@ -192,11 +191,6 @@ public: const LLVector3& getBounds(LLVector3& min, LLVector3& max) const; virtual void updateSpatialExtents(); virtual void updateBinRadius(); - const LLVector4a* getSpatialExtents() const; - void setSpatialExtents(const LLVector3& min, const LLVector3& max); - void setSpatialExtents(const LLVector4a& min, const LLVector4a& max); - - void setPositionGroup(const LLVector4a& pos); void setRenderType(S32 type) { mRenderType = type; } BOOL isRenderType(S32 type) { return mRenderType == type; } @@ -205,10 +199,14 @@ public: // Debugging methods S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators... - void setSpatialGroup(LLSpatialGroup *groupp); - LLSpatialGroup *getSpatialGroup() const; LLSpatialPartition* getSpatialPartition(); + virtual S32 getMinVisFrameRange()const; + void removeFromOctree(); + + void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; } + LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; } + // Statics static void incrementVisible(); static void cleanupDeadDrawables(); @@ -292,10 +290,6 @@ public: ANIMATED_CHILD = 0x20000000, ACTIVE_CHILD = 0x40000000, } EDrawableFlags; - -private: //aligned members - LL_ALIGN_16(LLVector4a mExtents[2]); - LL_ALIGN_16(LLVector4a mPositionGroup); public: LLXformMatrix mXform; @@ -303,35 +297,23 @@ public: // vis data LLPointer mParent; - F32 mDistanceWRTCamera; - - static S32 getCurrentFrame() { return sCurVisible; } - static S32 getMinVisFrameRange(); - - void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; } - LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; } + F32 mDistanceWRTCamera; static F32 sCurPixelAngle; //current pixels per radian private: typedef std::vector face_list_t; - U32 mState; + U32 mState; S32 mRenderType; LLPointer mVObjp; face_list_t mFaces; - LLSpatialGroup* mSpatialGroupp; LLPointer mSpatialBridge; - - mutable U32 mVisible; + F32 mRadius; - F32 mBinRadius; - mutable S32 mBinIndex; S32 mGeneration; - LLVector3 mCurrentScale; - - static U32 sCurVisible; // Counter for what value of mVisible means currently visible + LLVector3 mCurrentScale; static U32 sNumZombieDrawables; static LLDynamicArrayPtr > sDeadList; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5083478392..debb790c58 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -138,94 +138,6 @@ void sg_assert(BOOL expr) #endif } -S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) -{ - return AABBSphereIntersectR2(min, max, origin, rad*rad); -} - -S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r) -{ - F32 d = 0.f; - F32 t; - - if ((min-origin).magVecSquared() < r && - (max-origin).magVecSquared() < r) - { - return 2; - } - - for (U32 i = 0; i < 3; i++) - { - if (origin.mV[i] < min.mV[i]) - { - t = min.mV[i] - origin.mV[i]; - d += t*t; - } - else if (origin.mV[i] > max.mV[i]) - { - t = origin.mV[i] - max.mV[i]; - d += t*t; - } - - if (d > r) - { - return 0; - } - } - - return 1; -} - - -S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad) -{ - return AABBSphereIntersectR2(min, max, origin, rad*rad); -} - -S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &r) -{ - F32 d = 0.f; - F32 t; - - LLVector4a origina; - origina.load3(origin.mV); - - LLVector4a v; - v.setSub(min, origina); - - if (v.dot3(v) < r) - { - v.setSub(max, origina); - if (v.dot3(v) < r) - { - return 2; - } - } - - - for (U32 i = 0; i < 3; i++) - { - if (origin.mV[i] < min[i]) - { - t = min[i] - origin.mV[i]; - d += t*t; - } - else if (origin.mV[i] > max[i]) - { - t = origin.mV[i] - max[i]; - d += t*t; - } - - if (d > r) - { - return 0; - } - } - - return 1; -} - - typedef enum { b000 = 0x00, @@ -352,13 +264,17 @@ LLSpatialGroup::~LLSpatialGroup() { llerrs << "Illegal deletion of LLSpatialGroup!" << llendl; }*/ + if(isVisible()) + { + mSpatialPartition->mRegionp->clearVisibleGroup(this); + } if (gDebugGL) { gPipeline.checkReferences(this); } - if (isState(DEAD)) + if (hasState(DEAD)) { sZombieGroups--; } @@ -514,7 +430,8 @@ BOOL LLSpatialGroup::isHUDGroup() BOOL LLSpatialGroup::isRecentlyVisible() const { - return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ; + const S32 MIN_VIS_FRAME_RANGE = 2; + return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ; } BOOL LLSpatialGroup::isVisible() const @@ -619,7 +536,7 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) OctreeNode* parent = mOctreeNode->getOctParent(); if (mOctreeNode->isInside(drawablep->getPositionGroup()) && - (mOctreeNode->contains(drawablep) || + (mOctreeNode->contains(drawablep->getEntry()) || (drawablep->getBinRadius() > mOctreeNode->getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity))) { @@ -633,15 +550,14 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) } -BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree) +BOOL LLSpatialGroup::addObject(LLDrawable *drawablep) { - if (!from_octree) + if(!drawablep) { - mOctreeNode->insert(drawablep); + return FALSE; } - else { - drawablep->setSpatialGroup(this); + drawablep->setGroup(this); setState(OBJECT_DIRTY | GEOM_DIRTY); setOcclusionState(LLSpatialGroup::DISCARD_QUERY, LLSpatialGroup::STATE_MODE_ALL_CAMERAS); gPipeline.markRebuild(this, TRUE); @@ -664,7 +580,7 @@ void LLSpatialGroup::rebuildGeom() { mSpatialPartition->rebuildGeom(this); - if (isState(LLSpatialGroup::MESH_DIRTY)) + if (hasState(LLSpatialGroup::MESH_DIRTY)) { gPipeline.markMeshDirty(this); } @@ -686,7 +602,7 @@ static LLFastTimer::DeclareTimer FTM_GET_GEOMETRY("Get Geometry"); void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) { - if (group->isDead() || !group->isState(LLSpatialGroup::GEOM_DIRTY)) + if (group->isDead() || !group->hasState(LLSpatialGroup::GEOM_DIRTY)) { return; } @@ -751,103 +667,6 @@ void LLSpatialPartition::rebuildMesh(LLSpatialGroup* group) } -BOOL LLSpatialGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut) -{ - const OctreeNode* node = mOctreeNode; - - if (node->isEmpty()) - { //don't do anything if there are no objects - if (empty && mOctreeNode->getParent()) - { //only root is allowed to be empty - OCT_ERRS << "Empty leaf found in octree." << llendl; - } - return FALSE; - } - - LLVector4a& newMin = mObjectExtents[0]; - LLVector4a& newMax = mObjectExtents[1]; - - if (isState(OBJECT_DIRTY)) - { //calculate new bounding box - clearState(OBJECT_DIRTY); - - //initialize bounding box to first element - OctreeNode::const_element_iter i = node->getDataBegin(); - LLDrawable* drawablep = *i; - const LLVector4a* minMax = drawablep->getSpatialExtents(); - - newMin = minMax[0]; - newMax = minMax[1]; - - for (++i; i != node->getDataEnd(); ++i) - { - drawablep = *i; - minMax = drawablep->getSpatialExtents(); - - update_min_max(newMin, newMax, minMax[0]); - update_min_max(newMin, newMax, minMax[1]); - - //bin up the object - /*for (U32 i = 0; i < 3; i++) - { - if (minMax[0].mV[i] < newMin.mV[i]) - { - newMin.mV[i] = minMax[0].mV[i]; - } - if (minMax[1].mV[i] > newMax.mV[i]) - { - newMax.mV[i] = minMax[1].mV[i]; - } - }*/ - } - - mObjectBounds[0].setAdd(newMin, newMax); - mObjectBounds[0].mul(0.5f); - mObjectBounds[1].setSub(newMax, newMin); - mObjectBounds[1].mul(0.5f); - } - - if (empty) - { - minOut = newMin; - maxOut = newMax; - } - else - { - minOut.setMin(minOut, newMin); - maxOut.setMax(maxOut, newMax); - } - - return TRUE; -} - -void LLSpatialGroup::unbound() -{ - if (isState(DIRTY)) - { - return; - } - - setState(DIRTY); - - //all the parent nodes need to rebound this child - if (mOctreeNode) - { - OctreeNode* parent = (OctreeNode*) mOctreeNode->getParent(); - while (parent != NULL) - { - LLSpatialGroup* group = (LLSpatialGroup*) parent->getListener(0); - if (group->isState(DIRTY)) - { - return; - } - - group->setState(DIRTY); - parent = (OctreeNode*) parent->getParent(); - } - } -} - LLSpatialGroup* LLSpatialGroup::getParent() { if (isDead()) @@ -871,17 +690,19 @@ LLSpatialGroup* LLSpatialGroup::getParent() BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) { + if(!drawablep) + { + return FALSE; + } + unbound(); if (mOctreeNode && !from_octree) { - if (!mOctreeNode->remove(drawablep)) - { - OCT_ERRS << "Could not remove drawable from spatial group" << llendl; - } + drawablep->setGroup(NULL); } else { - drawablep->setSpatialGroup(NULL); + drawablep->setGroup(NULL); setState(GEOM_DIRTY); gPipeline.markRebuild(this, TRUE); @@ -928,12 +749,12 @@ void LLSpatialGroup::shift(const LLVector4a &offset) } } -class LLSpatialSetState : public LLSpatialGroup::OctreeTraveler +class LLSpatialSetState : public OctreeTraveler { public: U32 mState; LLSpatialSetState(U32 state) : mState(state) { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setState(mState); } + virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setState(mState); } }; class LLSpatialSetStateDiff : public LLSpatialSetState @@ -941,24 +762,17 @@ class LLSpatialSetStateDiff : public LLSpatialSetState public: LLSpatialSetStateDiff(U32 state) : LLSpatialSetState(state) { } - virtual void traverse(const LLSpatialGroup::OctreeNode* n) + virtual void traverse(const OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); - if (!group->isState(mState)) + if (!group->hasState(mState)) { - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } } }; -void LLSpatialGroup::setState(U32 state) -{ - mState |= state; - - llassert(state <= LLSpatialGroup::STATE_MASK); -} - void LLSpatialGroup::setState(U32 state, S32 mode) { llassert(state <= LLSpatialGroup::STATE_MASK); @@ -982,12 +796,12 @@ void LLSpatialGroup::setState(U32 state, S32 mode) } } -class LLSpatialClearState : public LLSpatialGroup::OctreeTraveler +class LLSpatialClearState : public OctreeTraveler { public: U32 mState; LLSpatialClearState(U32 state) : mState(state) { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearState(mState); } + virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearState(mState); } }; class LLSpatialClearStateDiff : public LLSpatialClearState @@ -995,24 +809,17 @@ class LLSpatialClearStateDiff : public LLSpatialClearState public: LLSpatialClearStateDiff(U32 state) : LLSpatialClearState(state) { } - virtual void traverse(const LLSpatialGroup::OctreeNode* n) + virtual void traverse(const OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); - if (group->isState(mState)) + if (group->hasState(mState)) { - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } } }; -void LLSpatialGroup::clearState(U32 state) -{ - llassert(state <= LLSpatialGroup::STATE_MASK); - - mState &= ~state; -} - void LLSpatialGroup::clearState(U32 state, S32 mode) { llassert(state <= LLSpatialGroup::STATE_MASK); @@ -1036,22 +843,15 @@ void LLSpatialGroup::clearState(U32 state, S32 mode) } } -BOOL LLSpatialGroup::isState(U32 state) const -{ - llassert(state <= LLSpatialGroup::STATE_MASK); - - return mState & state ? TRUE : FALSE; -} - //===================================== // Occlusion State Set/Clear //===================================== -class LLSpatialSetOcclusionState : public LLSpatialGroup::OctreeTraveler +class LLSpatialSetOcclusionState : public OctreeTraveler { public: U32 mState; LLSpatialSetOcclusionState(U32 state) : mState(state) { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->setOcclusionState(mState); } }; class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState @@ -1059,13 +859,13 @@ class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState public: LLSpatialSetOcclusionStateDiff(U32 state) : LLSpatialSetOcclusionState(state) { } - virtual void traverse(const LLSpatialGroup::OctreeNode* n) + virtual void traverse(const OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); if (!group->isOcclusionState(mState)) { - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } } }; @@ -1110,13 +910,13 @@ void LLSpatialGroup::setOcclusionState(U32 state, S32 mode) } } -class LLSpatialClearOcclusionState : public LLSpatialGroup::OctreeTraveler +class LLSpatialClearOcclusionState : public OctreeTraveler { public: U32 mState; LLSpatialClearOcclusionState(U32 state) : mState(state) { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->clearOcclusionState(mState); } }; class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState @@ -1124,13 +924,13 @@ class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState public: LLSpatialClearOcclusionStateDiff(U32 state) : LLSpatialClearOcclusionState(state) { } - virtual void traverse(const LLSpatialGroup::OctreeNode* n) + virtual void traverse(const OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); if (group->isOcclusionState(mState)) { - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } } }; @@ -1166,13 +966,11 @@ void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode) // Octree Listener Implementation //====================================== -LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : +LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : LLviewerOctreeGroup(node), mObjectBoxSize(1.f), - mState(0), mGeometryBytes(0), mSurfaceArea(0.f), mBuilt(0.f), - mOctreeNode(node), mSpatialPartition(part), mVertexBuffer(NULL), mBufferUsage(part->mBufferUsage), @@ -1191,17 +989,11 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : mViewAngle.splat(0.f); mLastUpdateViewAngle.splat(-1.f); - mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] = - mObjectExtents[0] = mObjectExtents[1] = mViewAngle; - + sg_assert(mOctreeNode->getListenerCount() == 0); - mOctreeNode->addListener(this); setState(SG_INITIAL_STATE_MASK); gPipeline.markRebuild(this, TRUE); - mBounds[0] = node->getCenter(); - mBounds[1] = node->getSize(); - part->mLODSeed = (part->mLODSeed+1)%part->mLODPeriod; mLODHash = part->mLODSeed; @@ -1235,7 +1027,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera) } #if !LL_RELEASE_FOR_DOWNLOAD - if (isState(LLSpatialGroup::OBJECT_DIRTY)) + if (hasState(LLSpatialGroup::OBJECT_DIRTY)) { llerrs << "Spatial group dirty on distance update." << llendl; } @@ -1266,7 +1058,7 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera) dist = eye.getLength3().getF32(); eye.normalize3fast(); - if (!group->isState(LLSpatialGroup::ALPHA_DIRTY)) + if (!group->hasState(LLSpatialGroup::ALPHA_DIRTY)) { if (!group->mSpatialPartition->isBridge()) { @@ -1343,7 +1135,7 @@ BOOL LLSpatialGroup::needsUpdate() BOOL LLSpatialGroup::changeLOD() { - if (isState(ALPHA_DIRTY | OBJECT_DIRTY)) + if (hasState(ALPHA_DIRTY | OBJECT_DIRTY)) { ///a rebuild is going to happen, update distance and LoD return TRUE; } @@ -1371,29 +1163,51 @@ BOOL LLSpatialGroup::changeLOD() return FALSE; } -void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep) +void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* entry) { - addObject(drawablep, FALSE, TRUE); + if(mSpatialPartition->isVOCachePartition()) + { + LLviewerOctreeGroup::handleInsertion(node, entry); + return; + } + + addObject((LLDrawable*)entry->getDrawable()); unbound(); setState(OBJECT_DIRTY); } -void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable) +void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* entry) { - removeObject(drawable, TRUE); - setState(OBJECT_DIRTY); + if(!mSpatialPartition->isVOCachePartition()) + { + removeObject((LLDrawable*)entry->getDrawable(), TRUE); + } + LLviewerOctreeGroup::handleRemoval(node, entry); } void LLSpatialGroup::handleDestruction(const TreeNode* node) { setState(DEAD); - + + if(mSpatialPartition->isVOCachePartition()) + { + LLviewerOctreeGroup::handleDestruction(node); + return; + } + for (element_iter i = getDataBegin(); i != getDataEnd(); ++i) { - LLDrawable* drawable = *i; - if (drawable->getSpatialGroup() == this) + LLViewerOctreeEntry* entry = *i; + if (entry->getGroup() == this) { - drawable->setSpatialGroup(NULL); + if(entry->hasDrawable()) + { + ((LLDrawable*)entry->getDrawable())->setGroup(NULL); + } + else + { + llerrs << "No Drawable found in the entry." << llendl; + } } } @@ -1415,16 +1229,6 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) mOctreeNode = NULL; } -void LLSpatialGroup::handleStateChange(const TreeNode* node) -{ - //drop bounding box upon state change - if (mOctreeNode != node) - { - mOctreeNode = (OctreeNode*) node; - } - unbound(); -} - void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) { if (child->getListenerCount() == 0) @@ -1441,11 +1245,6 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c assert_states_valid(this); } -void LLSpatialGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child) -{ - unbound(); -} - void LLSpatialGroup::destroyGL(bool keep_occlusion) { setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY); @@ -1476,7 +1275,11 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) for (LLSpatialGroup::element_iter i = getDataBegin(); i != getDataEnd(); ++i) { - LLDrawable* drawable = *i; + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } for (S32 j = 0; j < drawable->getNumFaces(); j++) { LLFace* facep = drawable->getFace(j); @@ -1488,69 +1291,6 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) } } -BOOL LLSpatialGroup::rebound() -{ - if (!isState(DIRTY)) - { //return TRUE if we're not empty - return TRUE; - } - - if (mOctreeNode->getChildCount() == 1 && mOctreeNode->getElementCount() == 0) - { - LLSpatialGroup* group = (LLSpatialGroup*) mOctreeNode->getChild(0)->getListener(0); - group->rebound(); - - //copy single child's bounding box - mBounds[0] = group->mBounds[0]; - mBounds[1] = group->mBounds[1]; - mExtents[0] = group->mExtents[0]; - mExtents[1] = group->mExtents[1]; - - group->setState(SKIP_FRUSTUM_CHECK); - } - else if (mOctreeNode->isLeaf()) - { //copy object bounding box if this is a leaf - boundObjects(TRUE, mExtents[0], mExtents[1]); - mBounds[0] = mObjectBounds[0]; - mBounds[1] = mObjectBounds[1]; - } - else - { - LLVector4a& newMin = mExtents[0]; - LLVector4a& newMax = mExtents[1]; - LLSpatialGroup* group = (LLSpatialGroup*) mOctreeNode->getChild(0)->getListener(0); - group->clearState(SKIP_FRUSTUM_CHECK); - group->rebound(); - //initialize to first child - newMin = group->mExtents[0]; - newMax = group->mExtents[1]; - - //first, rebound children - for (U32 i = 1; i < mOctreeNode->getChildCount(); i++) - { - group = (LLSpatialGroup*) mOctreeNode->getChild(i)->getListener(0); - group->clearState(SKIP_FRUSTUM_CHECK); - group->rebound(); - const LLVector4a& max = group->mExtents[1]; - const LLVector4a& min = group->mExtents[0]; - - newMax.setMax(newMax, max); - newMin.setMin(newMin, min); - } - - boundObjects(FALSE, newMin, newMax); - - mBounds[0].setAdd(newMin, newMax); - mBounds[0].mul(0.5f); - mBounds[1].setSub(newMax, newMin); - mBounds[1].mul(0.5f); - } - - clearState(DIRTY); - - return TRUE; -} - static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); static LLFastTimer::DeclareTimer FTM_OCCLUSION_WAIT("Occlusion Wait"); @@ -1769,8 +1509,8 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) //============================================== -LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage) -: mRenderByGroup(render_by_group), mBridge(NULL) +LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage, LLViewerRegion* regionp) +: mRenderByGroup(render_by_group), mBridge(NULL), mRegionp(regionp) { mOcclusionEnabled = TRUE; mDrawableType = 0; @@ -1782,13 +1522,13 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mDepthMask = FALSE; mSlopRatio = 0.25f; mInfiniteFarClip = FALSE; + mVisitedTime = 0; LLVector4a center, size; center.splat(0.f); size.splat(1.f); - mOctree = new LLSpatialGroup::OctreeRoot(center,size, - NULL); + mOctree = new OctreeRoot(center,size, NULL); new LLSpatialGroup(mOctree, this); } @@ -1799,6 +1539,10 @@ LLSpatialPartition::~LLSpatialPartition() mOctree = NULL; } +BOOL LLSpatialPartition::isVOCachePartition() const +{ + return mPartitionType == LLViewerRegion::PARTITION_VO_CACHE; +} LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) { @@ -1806,12 +1550,16 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) //keep drawable from being garbage collected LLPointer ptr = drawablep; - - assert_octree_valid(mOctree); - mOctree->insert(drawablep); - assert_octree_valid(mOctree); + + if(!drawablep->getGroup()) + { + assert_octree_valid(mOctree); + mOctree->insert(drawablep->getEntry()); + assert_octree_valid(mOctree); + } LLSpatialGroup* group = drawablep->getSpatialGroup(); + llassert(group != NULL); if (group && was_visible && group->isOcclusionState(LLSpatialGroup::QUERY_PENDING)) { @@ -1829,7 +1577,7 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) } else { - drawablep->setSpatialGroup(NULL); + drawablep->setGroup(NULL); } assert_octree_valid(mOctree); @@ -1881,13 +1629,13 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL put(drawablep, was_visible); } -class LLSpatialShift : public LLSpatialGroup::OctreeTraveler +class LLSpatialShift : public OctreeTraveler { public: const LLVector4a& mOffset; LLSpatialShift(const LLVector4a& offset) : mOffset(offset) { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) + virtual void visit(const OctreeNode* branch) { ((LLSpatialGroup*) branch->getListener(0))->shift(mOffset); } @@ -1899,17 +1647,17 @@ void LLSpatialPartition::shift(const LLVector4a &offset) shifter.traverse(mOctree); } -class LLOctreeCull : public LLSpatialGroup::OctreeTraveler +class LLOctreeCull : public LLViewerOctreeCull { public: - LLOctreeCull(LLCamera* camera) - : mCamera(camera), mRes(0) { } + LLOctreeCull(LLCamera* camera) : LLViewerOctreeCull(camera) {} - virtual bool earlyFail(LLSpatialGroup* group) + virtual bool earlyFail(LLviewerOctreeGroup* base_group) { + LLSpatialGroup* group = (LLSpatialGroup*)base_group; group->checkOcclusion(); - if (group->mOctreeNode->getParent() && //never occlusion cull the root node + if (group->getOctreeNode()->getParent() && //never occlusion cull the root node LLPipeline::sUseOcclusion && //ignore occlusion if disabled group->isOcclusionState(LLSpatialGroup::OCCLUDED)) { @@ -1919,79 +1667,30 @@ public: return false; } - - virtual void traverse(const LLSpatialGroup::OctreeNode* n) - { - LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); - - if (earlyFail(group)) - { - return; - } - if (mRes == 2 || - (mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK))) - { //fully in, just add everything - LLSpatialGroup::OctreeTraveler::traverse(n); - } - else - { - mRes = frustumCheck(group); - - if (mRes) - { //at least partially in, run on down - LLSpatialGroup::OctreeTraveler::traverse(n); - } - - mRes = 0; - } - } - - virtual S32 frustumCheck(const LLSpatialGroup* group) + virtual S32 frustumCheck(const LLviewerOctreeGroup* group) { - S32 res = mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]); + S32 res = AABBInFrustumNoFarClipGroupBounds(group); if (res != 0) { - res = llmin(res, AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist)); + res = llmin(res, AABBSphereIntersectGroupExtents(group)); } return res; } - virtual S32 frustumCheckObjects(const LLSpatialGroup* group) + virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group) { - S32 res = mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]); + S32 res = AABBInFrustumNoFarClipObjectBounds(group); if (res != 0) { - res = llmin(res, AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist)); + res = llmin(res, AABBSphereIntersectObjectExtents(group)); } return res; } - virtual bool checkObjects(const LLSpatialGroup::OctreeNode* branch, const LLSpatialGroup* group) - { - if (branch->getElementCount() == 0) //no elements - { - return false; - } - else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box - { - return true; - } - else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum - { - return false; - } - - return true; - } - - virtual void preprocess(LLSpatialGroup* group) - { - - } - - virtual void processGroup(LLSpatialGroup* group) + virtual void processGroup(LLviewerOctreeGroup* base_group) { + LLSpatialGroup* group = (LLSpatialGroup*)base_group; if (group->needsUpdate() || group->mVisible[LLViewerCamera::sCurCameraID] < LLDrawable::getCurrentFrame() - 1) { @@ -1999,21 +1698,6 @@ public: } gPipeline.markNotCulled(group, *mCamera); } - - virtual void visit(const LLSpatialGroup::OctreeNode* branch) - { - LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0); - - preprocess(group); - - if (checkObjects(branch, group)) - { - processGroup(group); - } - } - - LLCamera *mCamera; - S32 mRes; }; class LLOctreeCullNoFarClip : public LLOctreeCull @@ -2022,14 +1706,14 @@ public: LLOctreeCullNoFarClip(LLCamera* camera) : LLOctreeCull(camera) { } - virtual S32 frustumCheck(const LLSpatialGroup* group) + virtual S32 frustumCheck(const LLviewerOctreeGroup* group) { - return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]); + return AABBInFrustumNoFarClipGroupBounds(group); } - virtual S32 frustumCheckObjects(const LLSpatialGroup* group) + virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group) { - S32 res = mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]); + S32 res = AABBInFrustumNoFarClipObjectBounds(group); return res; } }; @@ -2040,14 +1724,14 @@ public: LLOctreeCullShadow(LLCamera* camera) : LLOctreeCull(camera) { } - virtual S32 frustumCheck(const LLSpatialGroup* group) + virtual S32 frustumCheck(const LLviewerOctreeGroup* group) { - return mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]); + return AABBInFrustumGroupBounds(group); } - virtual S32 frustumCheckObjects(const LLSpatialGroup* group) + virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group) { - return mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]); + return AABBInFrustumObjectBounds(group); } }; @@ -2057,9 +1741,11 @@ public: LLOctreeCullVisExtents(LLCamera* camera, LLVector4a& min, LLVector4a& max) : LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(TRUE) { } - virtual bool earlyFail(LLSpatialGroup* group) + virtual bool earlyFail(LLviewerOctreeGroup* base_group) { - if (group->mOctreeNode->getParent() && //never occlusion cull the root node + LLSpatialGroup* group = (LLSpatialGroup*)base_group; + + if (group->getOctreeNode()->getParent() && //never occlusion cull the root node LLPipeline::sUseOcclusion && //ignore occlusion if disabled group->isOcclusionState(LLSpatialGroup::OCCLUDED)) { @@ -2069,7 +1755,7 @@ public: return false; } - virtual void traverse(const LLSpatialGroup::OctreeNode* n) + virtual void traverse(const OctreeNode* n) { LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0); @@ -2078,10 +1764,10 @@ public: return; } - if ((mRes && group->isState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) || + if ((mRes && group->hasState(LLSpatialGroup::SKIP_FRUSTUM_CHECK)) || mRes == 2) { //don't need to do frustum check - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } else { @@ -2089,31 +1775,35 @@ public: if (mRes) { //at least partially in, run on down - LLSpatialGroup::OctreeTraveler::traverse(n); + OctreeTraveler::traverse(n); } mRes = 0; } } - virtual void processGroup(LLSpatialGroup* group) + virtual void processGroup(LLviewerOctreeGroup* base_group) { - llassert(!group->isState(LLSpatialGroup::DIRTY) && !group->isEmpty()) + LLSpatialGroup* group = (LLSpatialGroup*)base_group; + + llassert(!group->hasState(LLSpatialGroup::DIRTY) && !group->isEmpty()) if (mRes < 2) { - if (mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]) > 0) + if (AABBInFrustumObjectBounds(group) > 0) { mEmpty = FALSE; - update_min_max(mMin, mMax, group->mObjectExtents[0]); - update_min_max(mMin, mMax, group->mObjectExtents[1]); + const LLVector4a* exts = group->getObjectExtents(); + update_min_max(mMin, mMax, exts[0]); + update_min_max(mMin, mMax, exts[1]); } } else { mEmpty = FALSE; - update_min_max(mMin, mMax, group->mExtents[0]); - update_min_max(mMin, mMax, group->mExtents[1]); + const LLVector4a* exts = group->getExtents(); + update_min_max(mMin, mMax, exts[0]); + update_min_max(mMin, mMax, exts[1]); } } @@ -2128,10 +1818,12 @@ public: LLOctreeCullDetectVisible(LLCamera* camera) : LLOctreeCullShadow(camera), mResult(FALSE) { } - virtual bool earlyFail(LLSpatialGroup* group) + virtual bool earlyFail(LLviewerOctreeGroup* base_group) { + LLSpatialGroup* group = (LLSpatialGroup*)base_group; + if (mResult || //already found a node, don't check any more - (group->mOctreeNode->getParent() && //never occlusion cull the root node + (group->getOctreeNode()->getParent() && //never occlusion cull the root node LLPipeline::sUseOcclusion && //ignore occlusion if disabled group->isOcclusionState(LLSpatialGroup::OCCLUDED))) { @@ -2141,9 +1833,9 @@ public: return false; } - virtual void processGroup(LLSpatialGroup* group) + virtual void processGroup(LLviewerOctreeGroup* base_group) { - if (group->isVisible()) + if (base_group->isVisible()) { mResult = TRUE; } @@ -2158,17 +1850,21 @@ public: LLOctreeSelect(LLCamera* camera, std::vector* results) : LLOctreeCull(camera), mResults(results) { } - virtual bool earlyFail(LLSpatialGroup* group) { return false; } - virtual void preprocess(LLSpatialGroup* group) { } + virtual bool earlyFail(LLviewerOctreeGroup* group) { return false; } + virtual void preprocess(LLviewerOctreeGroup* group) { } - virtual void processGroup(LLSpatialGroup* group) + virtual void processGroup(LLviewerOctreeGroup* base_group) { - LLSpatialGroup::OctreeNode* branch = group->mOctreeNode; + LLSpatialGroup* group = (LLSpatialGroup*)base_group; + OctreeNode* branch = group->getOctreeNode(); - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) + for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { - LLDrawable* drawable = *i; - + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } if (!drawable->isDead()) { if (drawable->isSpatialBridge()) @@ -2281,17 +1977,21 @@ void drawBoxOutline(const LLVector4a& pos, const LLVector4a& size) drawBoxOutline(reinterpret_cast(pos), reinterpret_cast(size)); } -class LLOctreeDirty : public LLOctreeTraveler +class LLOctreeDirty : public OctreeTraveler { public: - virtual void visit(const LLOctreeNode* state) + virtual void visit(const OctreeNode* state) { LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); group->destroyGL(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawable = *i; + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } if (drawable->getVObj().notNull() && !group->mSpatialPartition->mRenderByGroup) { gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE); @@ -2350,6 +2050,13 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* results, BOOL for_select) { + bool is_vo_cache_part = (mPartitionType == LLViewerRegion::PARTITION_VO_CACHE); + + if(is_vo_cache_part && mVisitedTime == LLViewerOctreeEntryData::getCurrentFrame()) + { + return 0; //no need to visit more than once per frame + } + #if LL_OCTREE_PARANOIA_CHECK ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif @@ -2364,18 +2071,18 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* result #endif - if (for_select) + if (for_select && !is_vo_cache_part) { LLOctreeSelect selecter(&camera, results); selecter.traverse(mOctree); } - else if (LLPipeline::sShadowRender) + else if (LLPipeline::sShadowRender && !is_vo_cache_part) { LLFastTimer ftm(FTM_FRUSTUM_CULL); LLOctreeCullShadow culler(&camera); culler.traverse(mOctree); } - else if (mInfiniteFarClip || !LLPipeline::sUseFarClip) + else if ((mInfiniteFarClip || !LLPipeline::sUseFarClip) && !is_vo_cache_part) { LLFastTimer ftm(FTM_FRUSTUM_CULL); LLOctreeCullNoFarClip culler(&camera); @@ -2383,6 +2090,11 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* result } else { + if(is_vo_cache_part) + { + mVisitedTime = LLViewerOctreeEntryData::getCurrentFrame(); + } + LLFastTimer ftm(FTM_FRUSTUM_CULL); LLOctreeCull culler(&camera); culler.traverse(mOctree); @@ -2402,9 +2114,10 @@ BOOL earlyFail(LLCamera* camera, LLSpatialGroup* group) LLVector4a fudge; fudge.splat(vel); - const LLVector4a& c = group->mBounds[0]; + const LLVector4a* bounds = group->getBounds(); + const LLVector4a& c = bounds[0]; LLVector4a r; - r.setAdd(group->mBounds[1], fudge); + r.setAdd(bounds[1], fudge); /*if (r.magVecSquared() > 1024.0*1024.0) { @@ -2529,7 +2242,8 @@ void pushBufferVerts(LLSpatialGroup* group, U32 mask) } else { - drawBox(group->mBounds[0], group->mBounds[1]); + const LLVector4a* bounds = group->getBounds(); + drawBox(bounds[0], bounds[1]); } } @@ -2593,13 +2307,19 @@ void renderOctree(LLSpatialGroup* group) gGL.diffuseColor4f(1,0,0,group->mBuilt); gGL.flush(); glLineWidth(5.f); - drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]); + + const LLVector4a* bounds = group->getObjectBounds(); + drawBoxOutline(bounds[0], bounds[1]); gGL.flush(); glLineWidth(1.f); gGL.flush(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawable = *i; + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } if (!group->mSpatialPartition->isBridge()) { gGL.pushMatrix(); @@ -2657,9 +2377,10 @@ void renderOctree(LLSpatialGroup* group) gGL.diffuseColor4fv(col.mV); LLVector4a fudge; fudge.splat(0.001f); - LLVector4a size = group->mObjectBounds[1]; - size.mul(1.01f); - size.add(fudge); + + //LLVector4a size = group->mObjectBounds[1]; + //size.mul(1.01f); + //size.add(fudge); //{ // LLGLDepthTest depth(GL_TRUE, GL_FALSE); @@ -2675,7 +2396,9 @@ void renderOctree(LLSpatialGroup* group) //drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]); gGL.diffuseColor4f(0,1,1,1); - drawBoxOutline(group->mBounds[0],group->mBounds[1]); + + const LLVector4a* bounds = group->getBounds(); + drawBoxOutline(bounds[0], bounds[1]); //draw bounding box for draw info /*if (group->mSpatialPartition->mRenderByGroup) @@ -3442,9 +3165,13 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) void renderPhysicsShapes(LLSpatialGroup* group) { - for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) + for (OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawable = *i; + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } LLVOVolume* volume = drawable->getVOVolume(); if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE ) { @@ -4001,17 +3728,18 @@ void renderAgentTarget(LLVOAvatar* avatar) } } -class LLOctreeRenderNonOccluded : public LLOctreeTraveler +class LLOctreeRenderNonOccluded : public OctreeTraveler { public: LLCamera* mCamera; LLOctreeRenderNonOccluded(LLCamera* camera): mCamera(camera) {} - virtual void traverse(const LLSpatialGroup::OctreeNode* node) + virtual void traverse(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!mCamera || mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (!mCamera || mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1])) { node->accept(this); stop_glerror(); @@ -4051,17 +3779,17 @@ public: } } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) + virtual void visit(const OctreeNode* branch) { LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0); - - if (group->isState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))) + const LLVector4a* bounds = group->getBounds(); + if (group->hasState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1]))) { return; } - LLVector4a nodeCenter = group->mBounds[0]; - LLVector4a octCenter = group->mOctreeNode->getCenter(); + LLVector4a nodeCenter = bounds[0]; + LLVector4a octCenter = group->getOctreeNode()->getCenter(); group->rebuildGeom(); group->rebuildMesh(); @@ -4071,15 +3799,20 @@ public: if (!group->isEmpty()) { gGL.diffuseColor3f(0,0,1); - drawBoxOutline(group->mObjectBounds[0], - group->mObjectBounds[1]); + + const LLVector4a* obj_bounds = group->getObjectBounds(); + drawBoxOutline(obj_bounds[0], obj_bounds[1]); } } - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) + for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { - LLDrawable* drawable = *i; - + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES)) { renderBoundingBox(drawable); @@ -4201,17 +3934,18 @@ public: }; -class LLOctreeRenderPhysicsShapes : public LLOctreeTraveler +class LLOctreeRenderPhysicsShapes : public OctreeTraveler { public: LLCamera* mCamera; LLOctreeRenderPhysicsShapes(LLCamera* camera): mCamera(camera) {} - virtual void traverse(const LLSpatialGroup::OctreeNode* node) + virtual void traverse(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!mCamera || mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (!mCamera || mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1])) { node->accept(this); stop_glerror(); @@ -4229,23 +3963,24 @@ public: } } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) + virtual void visit(const OctreeNode* branch) { } }; -class LLOctreePushBBoxVerts : public LLOctreeTraveler +class LLOctreePushBBoxVerts : public OctreeTraveler { public: LLCamera* mCamera; LLOctreePushBBoxVerts(LLCamera* camera): mCamera(camera) {} - virtual void traverse(const LLSpatialGroup::OctreeNode* node) + virtual void traverse(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!mCamera || mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (!mCamera || mCamera->AABBInFrustum(bounds[0], bounds[1])) { node->accept(this); @@ -4256,19 +3991,23 @@ public: } } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) + virtual void visit(const OctreeNode* branch) { LLSpatialGroup* group = (LLSpatialGroup*) branch->getListener(0); - if (group->isState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]))) + const LLVector4a* bounds = group->getBounds(); + if (group->hasState(LLSpatialGroup::GEOM_DIRTY) || (mCamera && !mCamera->AABBInFrustumNoFarClip(bounds[0], bounds[1]))) { return; } - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) + for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { - LLDrawable* drawable = *i; - + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(!drawable) + { + continue; + } renderBoundingBox(drawable, FALSE); } } @@ -4280,7 +4019,7 @@ void LLSpatialPartition::renderIntersectingBBoxes(LLCamera* camera) pusher.traverse(mOctree); } -class LLOctreeStateCheck : public LLOctreeTraveler +class LLOctreeStateCheck : public OctreeTraveler { public: U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS]; @@ -4293,7 +4032,7 @@ public: } } - virtual void traverse(const LLSpatialGroup::OctreeNode* node) + virtual void traverse(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); @@ -4320,7 +4059,7 @@ public: } - virtual void visit(const LLOctreeNode* state) + virtual void visit(const OctreeNode* state) { LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); @@ -4332,7 +4071,7 @@ public: } } - if (group->isState(LLSpatialGroup::DIRTY)) + if (group->hasState(LLSpatialGroup::DIRTY)) { assert_parent_state(group, LLSpatialGroup::DIRTY); } @@ -4343,7 +4082,7 @@ public: LLSpatialGroup* parent = group->getParent(); while (parent) { - if (!parent->isState(state)) + if (!parent->hasState(state)) { llerrs << "Spatial group failed parent state check." << llendl; } @@ -4458,7 +4197,7 @@ BOOL LLSpatialPartition::isVisible(const LLVector3& v) return TRUE; } -class LLOctreeIntersect : public LLSpatialGroup::OctreeTraveler +class LLOctreeIntersect : public OctreeTraveler { public: LLVector3 mStart; @@ -4485,21 +4224,21 @@ public: { } - virtual void visit(const LLSpatialGroup::OctreeNode* branch) + virtual void visit(const OctreeNode* branch) { - for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) + for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { check(*i); } } - virtual LLDrawable* check(const LLSpatialGroup::OctreeNode* node) + virtual LLDrawable* check(const OctreeNode* node) { node->accept(this); for (U32 i = 0; i < node->getChildCount(); i++) { - const LLSpatialGroup::OctreeNode* child = node->getChild(i); + const OctreeNode* child = node->getChild(i); LLVector3 res; LLSpatialGroup* group = (LLSpatialGroup*) child->getListener(0); @@ -4507,8 +4246,9 @@ public: LLVector4a size; LLVector4a center; - size = group->mBounds[1]; - center = group->mBounds[0]; + const LLVector4a* bounds = group->getBounds(); + size = bounds[1]; + center = bounds[0]; LLVector3 local_start = mStart; LLVector3 local_end = mEnd; @@ -4535,8 +4275,9 @@ public: return mHit; } - virtual bool check(LLDrawable* drawable) + virtual bool check(LLViewerOctreeEntry* entry) { + LLDrawable* drawable = (LLDrawable*)entry->getDrawable(); LLVector3 local_start = mStart; LLVector3 local_end = mEnd; @@ -4922,5 +4663,21 @@ void LLCullResult::assertDrawMapsEmpty() } } +LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp) : LLSpatialPartition(0, FALSE, 0, regionp) +{ + mPartitionType = LLViewerRegion::PARTITION_VO_CACHE; +} + +void LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry) +{ + llassert(entry->hasVOCacheEntry()); + mOctree->insert(entry); +} + +void LLVOCachePartition::removeEntry(LLViewerOctreeEntry* entry) +{ + entry->getVOCacheEntry()->setGroup(NULL); + llassert(!entry->getGroup()); +} diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index f050df2b39..dd189d751d 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -50,12 +50,8 @@ class LLSpatialBridge; class LLSpatialGroup; class LLTextureAtlas; class LLTextureAtlasSlot; +class LLViewerRegion; -S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad); -S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &radius_squared); - -S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad); -S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared); void pushVerts(LLFace* face, U32 mask); // get index buffer for binary encoded axis vertex buffer given a box at center being viewed by given camera @@ -192,13 +188,13 @@ public: }; LL_ALIGN_PREFIX(16) -class LLSpatialGroup : public LLOctreeListener +class LLSpatialGroup : public LLviewerOctreeGroup { friend class LLSpatialPartition; friend class LLOctreeStateCheck; public: - LLSpatialGroup(const LLSpatialGroup& rhs) + LLSpatialGroup(const LLSpatialGroup& rhs) : LLviewerOctreeGroup(rhs) { *this = rhs; } @@ -231,14 +227,8 @@ public: typedef std::map buffer_texture_map_t; typedef std::map buffer_map_t; - typedef LLOctreeListener BaseType; - typedef LLOctreeListener OctreeListener; - typedef LLTreeNode TreeNode; - typedef LLOctreeNode OctreeNode; - typedef LLOctreeRoot OctreeRoot; - typedef LLOctreeTraveler OctreeTraveler; - typedef LLOctreeNode::element_iter element_iter; - typedef LLOctreeNode::element_list element_list; + typedef LLOctreeNode::element_iter element_iter; + typedef LLOctreeNode::element_list element_list; struct CompareDistanceGreater { @@ -275,18 +265,15 @@ public: typedef enum { - DEAD = 0x00000001, - DIRTY = 0x00000002, - OBJECT_DIRTY = 0x00000004, - GEOM_DIRTY = 0x00000008, - ALPHA_DIRTY = 0x00000010, - SKIP_FRUSTUM_CHECK = 0x00000020, - IN_IMAGE_QUEUE = 0x00000040, - IMAGE_DIRTY = 0x00000080, - MESH_DIRTY = 0x00000100, - NEW_DRAWINFO = 0x00000200, - IN_BUILD_Q1 = 0x00000400, - IN_BUILD_Q2 = 0x00000800, + DEAD = LLviewerOctreeGroup::INVALID_STATE, + GEOM_DIRTY = (DEAD << 1), + ALPHA_DIRTY = (GEOM_DIRTY << 1), + IN_IMAGE_QUEUE = (ALPHA_DIRTY << 1), + IMAGE_DIRTY = (IN_IMAGE_QUEUE << 1), + MESH_DIRTY = (IMAGE_DIRTY << 1), + NEW_DRAWINFO = (MESH_DIRTY << 1), + IN_BUILD_Q1 = (NEW_DRAWINFO << 1), + IN_BUILD_Q2 = (IN_BUILD_Q1 << 1), STATE_MASK = 0x0000FFFF, } eSpatialState; @@ -301,12 +288,8 @@ public: LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part); BOOL isHUDGroup() ; - BOOL isDead() { return isState(DEAD); } - BOOL isState(U32 state) const; + BOOL isDead() { return hasState(DEAD); } BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; } - U32 getState() { return mState; } - void setState(U32 state); - void clearState(U32 state); void clearDrawMap(); void validate(); @@ -315,23 +298,20 @@ public: void setState(U32 state, S32 mode); void clearState(U32 state, S32 mode); + void clearState(U32 state) {mState &= ~state;} void setOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE); void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE); LLSpatialGroup* getParent(); - - BOOL addObject(LLDrawable *drawablep, BOOL add_all = FALSE, BOOL from_octree = FALSE); + BOOL addObject(LLDrawable *drawablep); BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE); BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group BOOL isVisible() const; BOOL isRecentlyVisible() const; void setVisible(); void shift(const LLVector4a &offset); - BOOL boundObjects(BOOL empty, LLVector4a& newMin, LLVector4a& newMax); - void unbound(); - BOOL rebound(); void checkOcclusion(); //read back last occlusion query (if any) void doOcclusion(LLCamera* camera); //issue occlusion query void destroyGL(bool keep_occlusion = false); @@ -343,6 +323,7 @@ public: void rebuildGeom(); void rebuildMesh(); + void setState(U32 state) {mState |= state;} void dirtyGeom() { setState(GEOM_DIRTY); } void dirtyMesh() { setState(MESH_DIRTY); } @@ -356,13 +337,11 @@ public: void drawObjectBox(LLColor4 col); //LISTENER FUNCTIONS - virtual void handleInsertion(const TreeNode* node, LLDrawable* face); - virtual void handleRemoval(const TreeNode* node, LLDrawable* face); + virtual void handleInsertion(const TreeNode* node, LLViewerOctreeEntry* face); + virtual void handleRemoval(const TreeNode* node, LLViewerOctreeEntry* face); virtual void handleDestruction(const TreeNode* node); - virtual void handleStateChange(const TreeNode* node); virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child); - virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child); - + //------------------- //for atlas use //------------------- @@ -384,21 +363,6 @@ public: public: - typedef enum - { - BOUNDS = 0, - EXTENTS = 2, - OBJECT_BOUNDS = 4, - OBJECT_EXTENTS = 6, - VIEW_ANGLE = 8, - LAST_VIEW_ANGLE = 9, - V4_COUNT = 10 - } eV4Index; - - LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects) - LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children - LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node - LL_ALIGN_16(LLVector4a mObjectBounds[2]); // bounding box (center, size) of objects in this node LL_ALIGN_16(LLVector4a mViewAngle); LL_ALIGN_16(LLVector4a mLastUpdateViewAngle); @@ -419,7 +383,6 @@ private: protected: virtual ~LLSpatialGroup(); - U32 mState; U32 mOcclusionState[LLViewerCamera::NUM_CAMERAS]; U32 mOcclusionIssued[LLViewerCamera::NUM_CAMERAS]; @@ -434,7 +397,6 @@ public: F32 mSurfaceArea; //used by volumes to track estimated surface area of geometry in this node F32 mBuilt; - OctreeNode* mOctreeNode; LLSpatialPartition* mSpatialPartition; LLPointer mVertexBuffer; @@ -469,7 +431,7 @@ public: class LLSpatialPartition: public LLGeometryManager { public: - LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage); + LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage, LLViewerRegion* regionp); virtual ~LLSpatialPartition(); LLSpatialGroup *put(LLDrawable *drawablep, BOOL was_visible = FALSE); @@ -511,9 +473,10 @@ public: void resetVertexBuffers(); BOOL isOcclusionEnabled(); BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax); + BOOL isVOCachePartition() const; public: - LLSpatialGroup::OctreeNode* mOctree; + OctreeNode* mOctree; LLSpatialBridge* mBridge; // NULL for non-LLSpatialBridge instances, otherwise, mBridge == this // use a pointer instead of making "isBridge" and "asBridge" virtual so it's safe // to call asBridge() from the destructor @@ -528,6 +491,8 @@ public: BOOL mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering U32 mDrawableType; U32 mPartitionType; + U32 mVisitedTime; + LLViewerRegion* mRegionp; // the region this partition belongs to. }; // class for creating bridges between spatial partitions @@ -539,7 +504,7 @@ protected: public: typedef std::vector > bridge_vector_t; - LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask); + LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp); void destroyTree(); @@ -562,7 +527,7 @@ public: }; -class LLCullResult +class LLCullResult { public: LLCullResult(); @@ -661,7 +626,7 @@ private: class LLWaterPartition : public LLSpatialPartition { public: - LLWaterPartition(); + LLWaterPartition(LLViewerRegion* regionp); virtual void getGeometry(LLSpatialGroup* group) { } virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } }; @@ -670,14 +635,27 @@ public: class LLVoidWaterPartition : public LLWaterPartition { public: - LLVoidWaterPartition(); + LLVoidWaterPartition(LLViewerRegion* regionp); +}; + +//spatial partition for hole and edge water (implemented in LLVOWater.cpp) +class LLVOCachePartition : public LLSpatialPartition +{ +public: + LLVOCachePartition(LLViewerRegion* regionp); + + void addEntry(LLViewerOctreeEntry* entry); + void removeEntry(LLViewerOctreeEntry* entry); + + virtual void getGeometry(LLSpatialGroup* group) { } + virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } }; //spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp) class LLTerrainPartition : public LLSpatialPartition { public: - LLTerrainPartition(); + LLTerrainPartition(LLViewerRegion* regionp); virtual void getGeometry(LLSpatialGroup* group); virtual LLVertexBuffer* createVertexBuffer(U32 type_mask, U32 usage); }; @@ -686,7 +664,7 @@ public: class LLTreePartition : public LLSpatialPartition { public: - LLTreePartition(); + LLTreePartition(LLViewerRegion* regionp); virtual void getGeometry(LLSpatialGroup* group) { } virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } @@ -696,7 +674,7 @@ public: class LLParticlePartition : public LLSpatialPartition { public: - LLParticlePartition(); + LLParticlePartition(LLViewerRegion* regionp); virtual void rebuildGeom(LLSpatialGroup* group); virtual void getGeometry(LLSpatialGroup* group); virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count); @@ -708,14 +686,14 @@ protected: class LLHUDParticlePartition : public LLParticlePartition { public: - LLHUDParticlePartition(); + LLHUDParticlePartition(LLViewerRegion* regionp); }; //spatial partition for grass (implemented in LLVOGrass.cpp) class LLGrassPartition : public LLSpatialPartition { public: - LLGrassPartition(); + LLGrassPartition(LLViewerRegion* regionp); virtual void getGeometry(LLSpatialGroup* group); virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count); protected: @@ -745,7 +723,7 @@ class LLVolumeGeometryManager: public LLGeometryManager class LLVolumePartition : public LLSpatialPartition, public LLVolumeGeometryManager { public: - LLVolumePartition(); + LLVolumePartition(LLViewerRegion* regionp); virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); } virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); } virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); } @@ -756,7 +734,7 @@ public: class LLVolumeBridge : public LLSpatialBridge, public LLVolumeGeometryManager { public: - LLVolumeBridge(LLDrawable* drawable); + LLVolumeBridge(LLDrawable* drawable, LLViewerRegion* regionp); virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); } virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); } virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); } @@ -766,7 +744,7 @@ public: class LLHUDBridge : public LLVolumeBridge { public: - LLHUDBridge(LLDrawable* drawablep); + LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp); virtual void shiftPos(const LLVector4a& vec); virtual F32 calcPixelArea(LLSpatialGroup* group, LLCamera& camera); }; @@ -775,7 +753,7 @@ public: class LLBridgePartition : public LLSpatialPartition { public: - LLBridgePartition(); + LLBridgePartition(LLViewerRegion* regionp); virtual void getGeometry(LLSpatialGroup* group) { } virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { } }; @@ -783,7 +761,7 @@ public: class LLHUDPartition : public LLBridgePartition { public: - LLHUDPartition(); + LLHUDPartition(LLViewerRegion* regionp); virtual void shift(const LLVector4a &offset); }; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c60b4155a0..a5ccf97d1e 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -49,6 +49,8 @@ #include "llviewertexturelist.h" #include "llvovolume.h" #include "llviewerstats.h" +#include "llworld.h" +#include "llviewerobjectlist.h" // For avatar texture view #include "llvoavatarself.h" @@ -515,6 +517,9 @@ void LLGLTexMemBar::draw() F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; + U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); + U32 total_objects = gObjectList.getNumObjects(); + //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; LLColor4 text_color(1.f, 1.f, 1.f, 0.75f); @@ -536,8 +541,8 @@ void LLGLTexMemBar::draw() LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*4, text_color, LLFontGL::LEFT, LLFontGL::TOP); - text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", - total_texture_downloaded, total_object_downloaded, total_http_requests); + text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB #Objs/#cached: %d/%d Tot Htp: %d", + total_texture_downloaded, total_object_downloaded, total_objects, total_active_cached_objects, total_http_requests); //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ec7d91ec4f..67d400af2d 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4490,12 +4490,22 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) LLUUID id; U32 local_id; - S32 i; + S32 i = 0; S32 num_objects; num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); - for (i = 0; i < num_objects; i++) + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + LLViewerRegion* regionp = NULL; + bool remove_from_cache = !local_id; //if the first local id is 0, physically remove all objects from VO cache. + if(remove_from_cache) + { + i++; + + LLHost host(gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); + regionp = LLWorld::getInstance()->getRegion(host); + } + for (; i < num_objects; i++) { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); @@ -4530,10 +4540,15 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) // Do the kill gObjectList.killObject(objectp); } - else + //else + //{ + // LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; + // gObjectList.mNumUnknownKills++; + //} + + if(remove_from_cache) { - LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; - gObjectList.mNumUnknownKills++; + regionp->killCacheEntry(local_id); } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index aba1d131e1..dbccb2a4d9 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,6 +100,7 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" +#include "llvocache.h" //#define DEBUG_UPDATE_TYPE @@ -344,7 +345,7 @@ void LLViewerObject::markDead() childp = mChildList.back(); if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR) { - //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl; + //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl; childp->setParent(NULL); // LLViewerObject::markDead 1 childp->markDead(); } @@ -885,10 +886,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } // Coordinates of objects on simulators are region-local. - U64 region_handle; - mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); + U64 region_handle = 0; + if(mesgsys != NULL) { + mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); if(regionp != mRegionp && regionp && mRegionp)//region cross { @@ -914,11 +916,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, return retval; } - U16 time_dilation16; - mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16); - F32 time_dilation = ((F32) time_dilation16) / 65535.f; - mTimeDilation = time_dilation; - mRegionp->setTimeDilation(time_dilation); + if(mesgsys != NULL) + { + U16 time_dilation16; + mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16); + F32 time_dilation = ((F32) time_dilation16) / 65535.f; + mTimeDilation = time_dilation; + mRegionp->setTimeDilation(time_dilation); + } // this will be used to determine if we've really changed position // Use getPosition, not getPositionRegion, since this is what we're comparing directly against. @@ -1692,13 +1697,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Preload these five flags for every object. // Finer shades require the object to be selected, and the selection manager // stores the extended permission info. - U32 flags; - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, block_num); - // keep local flags and overwrite remote-controlled flags - mFlags = (mFlags & FLAGS_LOCAL) | flags; + if(mesgsys != NULL) + { + U32 flags; + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, block_num); + // keep local flags and overwrite remote-controlled flags + mFlags = (mFlags & FLAGS_LOCAL) | flags; // ...new objects that should come in selected need to be added to the selected list - mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0); + mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0); + } } break; @@ -1726,10 +1734,21 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { // No parent now, new parent in message -> attach to that parent if possible LLUUID parent_uuid; - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + + if(mesgsys != NULL) + { + LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort()); + } + else + { + LLViewerObjectList::getUUIDFromLocal(parent_uuid, + parent_id, + mRegionp->getHost().getAddress(), + mRegionp->getHost().getPort()); + } LLViewerObject *sent_parentp = gObjectList.findObject(parent_uuid); @@ -1805,9 +1824,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // //parent_id - U32 ip = mesgsys->getSenderIP(); - U32 port = mesgsys->getSenderPort(); + U32 ip, port; + if(mesgsys != NULL) + { + ip = mesgsys->getSenderIP(); + port = mesgsys->getSenderPort(); + } + else + { + ip = mRegionp->getHost().getAddress(); + port = mRegionp->getHost().getPort(); + } gObjectList.orphanize(this, parent_id, ip, port); // Hide particles, icon and HUD @@ -1845,10 +1873,21 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, else { LLUUID parent_uuid; - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + + if(mesgsys != NULL) + { + LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); + } + else + { + LLViewerObjectList::getUUIDFromLocal(parent_uuid, + parent_id, + mRegionp->getHost().getAddress(), + mRegionp->getHost().getPort()); + } sent_parentp = gObjectList.findObject(parent_uuid); if (isAvatar()) @@ -1869,8 +1908,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // // Switching parents, but we don't know the new parent. // - U32 ip = mesgsys->getSenderIP(); - U32 port = mesgsys->getSenderPort(); + U32 ip, port; + + if(mesgsys != NULL) + { + ip = mesgsys->getSenderIP(); + port = mesgsys->getSenderPort(); + } + else + { + ip = mRegionp->getHost().getAddress(); + port = mRegionp->getHost().getPort(); + } // We're an orphan, flag things appropriately. gObjectList.orphanize(this, parent_id, ip, port); @@ -1954,7 +2003,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, new_rot.normQuat(); - if (sPingInterpolate) + if (sPingInterpolate && mesgsys != NULL) { LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender()); if (cdp) @@ -1977,16 +2026,18 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // If we're going to skip this message, why are we // doing all the parenting, etc above? - U32 packet_id = mesgsys->getCurrentRecvPacketID(); - if (packet_id < mLatestRecvPacketID && - mLatestRecvPacketID - packet_id < 65536) + if(mesgsys != NULL) { - //skip application of this message, it's old - return retval; + U32 packet_id = mesgsys->getCurrentRecvPacketID(); + if (packet_id < mLatestRecvPacketID && + mLatestRecvPacketID - packet_id < 65536) + { + //skip application of this message, it's old + return retval; + } + mLatestRecvPacketID = packet_id; } - mLatestRecvPacketID = packet_id; - // Set the change flags for scale if (new_scale != getScale()) { diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 88bb087742..a1db1f7237 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -76,6 +76,7 @@ #include "object_flags.h" #include "llappviewer.h" +#include "llvocache.h" extern F32 gMinObjectDistance; extern BOOL gAnimateTextures; @@ -228,9 +229,15 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, U32 i, const EObjectUpdateType update_type, LLDataPacker* dpp, - BOOL just_created) + bool just_created, + bool from_cache) { - LLMessageSystem* msg = gMessageSystem; + LLMessageSystem* msg = NULL; + + if(!from_cache) + { + msg = gMessageSystem; + } // ignore returned flags objectp->processUpdateMessage(msg, user_data, i, update_type, dpp); @@ -254,7 +261,18 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // RN: this must be called after we have a drawable // (from gPipeline.addObject) // so that the drawable parent is set properly - findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); + if(msg != NULL) + { + findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); + } + else + { + LLViewerRegion* regionp = objectp->getRegion(); + if(regionp != NULL) + { + findOrphans(objectp, regionp->getHost().getAddress(), regionp->getHost().getPort()); + } + } // If we're just wandering around, don't create new objects selected. if (just_created @@ -277,6 +295,82 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) +{ + LLDataPacker *cached_dpp = entry->getDP(); + + if (!cached_dpp) + { + return NULL; //nothing cached. + } + + LLViewerObject *objectp; + U32 local_id; + LLPCode pcode = 0; + LLUUID fullid; + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + + // Cache Hit. + cached_dpp->reset(); + cached_dpp->unpackUUID(fullid, "ID"); + cached_dpp->unpackU32(local_id, "LocalID"); + cached_dpp->unpackU8(pcode, "PCode"); + + objectp = findObject(fullid); + + if (objectp) + { + if(!objectp->isDead() && (objectp->mLocalID != entry->getLocalID() || + objectp->getRegion() != regionp)) + { + removeFromLocalIDTable(objectp); + setUUIDAndLocal(fullid, entry->getLocalID(), + regionp->getHost().getAddress(), + regionp->getHost().getPort()); + + if (objectp->mLocalID != entry->getLocalID()) + { // Update local ID in object with the one sent from the region + objectp->mLocalID = entry->getLocalID(); + } + + if (objectp->getRegion() != regionp) + { // Object changed region, so update it + objectp->updateRegion(regionp); // for LLVOAvatar + } + } + + //return TRUE; //already loaded. + } + + bool justCreated = false; + if (!objectp) + { + objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID()); + + if (!objectp) + { + llinfos << "createObject failure for object: " << fullid << llendl; + recorder.objectUpdateFailure(entry->getLocalID(), OUT_FULL_CACHED, 0); + return NULL; + } + justCreated = true; + mNumNewObjects++; + sCacheHitRate.addValue(100.f); + } + + if (objectp->isDead()) + { + llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + } + + processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); + + recorder.log(0.2f); + LLVOAvatar::cullAvatarsByPixelArea(); + + return objectp; +} + void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, const EObjectUpdateType update_type, @@ -382,14 +476,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } else if (compressed) { - S32 uncompressed_length = 2048; - compressed_dp.reset(); - - U32 flags = 0; - if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? - { - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); - } + S32 uncompressed_length = 2048; + compressed_dp.reset(); uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i); @@ -540,9 +628,15 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, processUpdateCore(objectp, user_data, i, update_type, &compressed_dp, justCreated); if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { - bCached = true; - LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + U32 flags = 0; + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i); + + if(!(flags & FLAGS_TEMPORARY_ON_REZ)) + { + bCached = true; + LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); + recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); + } } } else if (cached) // Cache hit only? @@ -1887,7 +1981,30 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi return objectp; } +LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id) +{ + llassert_always(uuid.notNull()); + LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp); + if (!objectp) + { +// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; + return NULL; + } + + objectp->mLocalID = local_id; + mUUIDObjectMap[uuid] = objectp; + setUUIDAndLocal(uuid, + local_id, + regionp->getHost().getAddress(), + regionp->getHost().getPort()); + mObjects.push_back(objectp); + + updateActive(objectp); + + return objectp; +} + LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 9936432a71..1476f44215 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -40,6 +40,7 @@ class LLCamera; class LLNetMap; class LLDebugBeacon; +class LLVOCacheEntry; const U32 CLOSE_BIN_SIZE = 10; const U32 NUM_BINS = 128; @@ -65,6 +66,7 @@ public: inline LLViewerObject *findObject(const LLUUID &id); LLViewerObject *createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp); // Create a viewer-side object + LLViewerObject *createObjectFromCache(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id); LLViewerObject *createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender); @@ -78,7 +80,9 @@ public: void cleanDeadObjects(const BOOL use_timer = TRUE); // Clean up the dead object list. // Simulator and viewer side object updates... - void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type, LLDataPacker* dpp, BOOL justCreated); + void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type, + LLDataPacker* dpp, bool justCreated, bool from_cache = false); + LLViewerObject* processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp); void processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type, bool cached=false, bool compressed=false); void processCompressedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type); void processCachedObjectUpdate(LLMessageSystem *mesgsys, void **user_data, EObjectUpdateType update_type); diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp new file mode 100644 index 0000000000..05f977036c --- /dev/null +++ b/indra/newview/llvieweroctree.cpp @@ -0,0 +1,704 @@ +/** + * @file llvieweroctree.cpp + * @brief LLViewerOctreeGroup class implementation and supporting functions + * + * $LicenseInfo:firstyear=2003&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 "llvieweroctree.h" + +//----------------------------------------------------------------------------------- +//static variables definitions +//----------------------------------------------------------------------------------- +U32 LLViewerOctreeEntryData::sCurVisible = 0; + +//----------------------------------------------------------------------------------- +//some global functions definitions +//----------------------------------------------------------------------------------- +S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) +{ + return AABBSphereIntersectR2(min, max, origin, rad*rad); +} + +S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r) +{ + F32 d = 0.f; + F32 t; + + if ((min-origin).magVecSquared() < r && + (max-origin).magVecSquared() < r) + { + return 2; + } + + for (U32 i = 0; i < 3; i++) + { + if (origin.mV[i] < min.mV[i]) + { + t = min.mV[i] - origin.mV[i]; + d += t*t; + } + else if (origin.mV[i] > max.mV[i]) + { + t = origin.mV[i] - max.mV[i]; + d += t*t; + } + + if (d > r) + { + return 0; + } + } + + return 1; +} + + +S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad) +{ + return AABBSphereIntersectR2(min, max, origin, rad*rad); +} + +S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &r) +{ + F32 d = 0.f; + F32 t; + + LLVector4a origina; + origina.load3(origin.mV); + + LLVector4a v; + v.setSub(min, origina); + + if (v.dot3(v) < r) + { + v.setSub(max, origina); + if (v.dot3(v) < r) + { + return 2; + } + } + + + for (U32 i = 0; i < 3; i++) + { + if (origin.mV[i] < min[i]) + { + t = min[i] - origin.mV[i]; + d += t*t; + } + else if (origin.mV[i] > max[i]) + { + t = origin.mV[i] - max[i]; + d += t*t; + } + + if (d > r) + { + return 0; + } + } + + return 1; +} + +//----------------------------------------------------------------------------------- +//class LLViewerOctreeEntry definitions +//----------------------------------------------------------------------------------- +LLViewerOctreeEntry::LLViewerOctreeEntry() : mGroup(NULL) +{ + mPositionGroup.clear(); + mExtents[0].clear(); + mExtents[1].clear(); + mBinRadius = 0.f; + mBinIndex = -1; + + for(S32 i = 0; i < NUM_DATA_TYPE; i++) + { + mData[i] = NULL; + } +} + +LLViewerOctreeEntry::~LLViewerOctreeEntry() +{ + llassert(!mGroup); +} + +void LLViewerOctreeEntry::addData(LLViewerOctreeEntryData* data) +{ + //llassert(mData[data->getDataType()] == NULL); + llassert(data != NULL); + + mData[data->getDataType()] = data; +} + +void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data) +{ + //llassert(data->getDataType() != LLVOCACHEENTRY); //can not remove VOCache entry + + if(!mData[data->getDataType()]) + { + return; + } + + mData[data->getDataType()] = NULL; + + if(mGroup != NULL && !mData[LLDRAWABLE]) + { + LLviewerOctreeGroup* group = mGroup; + mGroup = NULL; + group->removeFromGroup(data); + + llassert(mBinIndex == -1); + } +} + +//called by group handleDestruction() ONLY when group is destroyed by octree. +void LLViewerOctreeEntry::nullGroup() +{ + mGroup = NULL; +} + +void LLViewerOctreeEntry::setGroup(LLviewerOctreeGroup* group) +{ + if(mGroup == group) + { + return; + } + + if(mGroup) + { + LLviewerOctreeGroup* group = mGroup; + mGroup = NULL; + group->removeFromGroup(this); + + llassert(mBinIndex == -1); + } + + mGroup = group; +} + +//----------------------------------------------------------------------------------- +//class LLViewerOctreeEntryData definitions +//----------------------------------------------------------------------------------- +LLViewerOctreeEntryData::~LLViewerOctreeEntryData() +{ + if(mEntry) + { + mEntry->removeData(this); + } +} + +LLViewerOctreeEntryData::LLViewerOctreeEntryData(LLViewerOctreeEntry::eEntryDataType_t data_type) + : mDataType(data_type), + mEntry(NULL) +{ +} + +//virtual +void LLViewerOctreeEntryData::setOctreeEntry(LLViewerOctreeEntry* entry) +{ + if(mEntry.notNull()) + { + return; + } + + if(!entry) + { + mEntry = new LLViewerOctreeEntry(); + } + else + { + mEntry = entry; + } + mEntry->addData(this); +} + +void LLViewerOctreeEntryData::setSpatialExtents(const LLVector3& min, const LLVector3& max) +{ + mEntry->mExtents[0].load3(min.mV); + mEntry->mExtents[1].load3(max.mV); +} + +void LLViewerOctreeEntryData::setSpatialExtents(const LLVector4a& min, const LLVector4a& max) +{ + mEntry->mExtents[0] = min; + mEntry->mExtents[1] = max; +} + +void LLViewerOctreeEntryData::setPositionGroup(const LLVector4a& pos) +{ + mEntry->mPositionGroup = pos; +} + +const LLVector4a* LLViewerOctreeEntryData::getSpatialExtents() const +{ + return mEntry->getSpatialExtents(); +} + +//virtual +void LLViewerOctreeEntryData::setGroup(LLviewerOctreeGroup* group) +{ + mEntry->setGroup(group); +} + +void LLViewerOctreeEntryData::shift(const LLVector4a &shift_vector) +{ + mEntry->mExtents[0].add(shift_vector); + mEntry->mExtents[1].add(shift_vector); + mEntry->mPositionGroup.add(shift_vector); +} + +LLviewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const +{ + return mEntry.notNull() ? mEntry->mGroup : NULL; +} + +const LLVector4a& LLViewerOctreeEntryData::getPositionGroup() const +{ + return mEntry->getPositionGroup(); +} + +//virtual +bool LLViewerOctreeEntryData::isVisible() const +{ + if(mEntry) + { + return mEntry->mVisible == sCurVisible; + } + return false; +} + +//virtual +bool LLViewerOctreeEntryData::isRecentlyVisible() const +{ + if(!mEntry) + { + return false; + } + + if(isVisible()) + { + return true; + } + if(getGroup() && getGroup()->isRecentlyVisible()) + { + setVisible(); + return true; + } + + return (sCurVisible - mEntry->mVisible < getMinVisFrameRange()); +} + +void LLViewerOctreeEntryData::setVisible() const +{ + if(mEntry) + { + mEntry->mVisible = sCurVisible; + } +} + +//----------------------------------------------------------------------------------- +//class LLviewerOctreeGroup definitions +//----------------------------------------------------------------------------------- + +LLviewerOctreeGroup::~LLviewerOctreeGroup() +{ +} + +LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) : + mOctreeNode(node), + mState(CLEAN) +{ + LLVector4a tmp; + tmp.splat(0.f); + mExtents[0] = mExtents[1] = mObjectBounds[0] = mObjectBounds[0] = mObjectBounds[1] = + mObjectExtents[0] = mObjectExtents[1] = tmp; + + mBounds[0] = node->getCenter(); + mBounds[1] = node->getSize(); + + mOctreeNode->addListener(this); +} + +bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntryData* data) +{ + return removeFromGroup(data->getEntry()); +} + +bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry) +{ + llassert(entry != NULL); + llassert(!entry->getGroup()); + + unbound(); + if (mOctreeNode) + { + if (!mOctreeNode->remove(entry)) + { + OCT_ERRS << "Could not remove LLVOCacheEntry from LLVOCacheOctreeGroup" << llendl; + return false; + } + } + setState(OBJECT_DIRTY); + + return true; +} + +//virtual +void LLviewerOctreeGroup::unbound() +{ + if (isDirty()) + { + return; + } + + setState(DIRTY); + + //all the parent nodes need to rebound this child + if (mOctreeNode) + { + OctreeNode* parent = (OctreeNode*) mOctreeNode->getParent(); + while (parent != NULL) + { + LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) parent->getListener(0); + if (!group || group->isDirty()) + { + return; + } + + group->setState(DIRTY); + parent = (OctreeNode*) parent->getParent(); + } + } +} + +//virtual +void LLviewerOctreeGroup::rebound() +{ + if (!isDirty()) + { + return; + } + + if (mOctreeNode->getChildCount() == 1 && mOctreeNode->getElementCount() == 0) + { + LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0); + group->rebound(); + + //copy single child's bounding box + mBounds[0] = group->mBounds[0]; + mBounds[1] = group->mBounds[1]; + mExtents[0] = group->mExtents[0]; + mExtents[1] = group->mExtents[1]; + + group->setState(SKIP_FRUSTUM_CHECK); + } + else if (mOctreeNode->isLeaf()) + { //copy object bounding box if this is a leaf + boundObjects(TRUE, mExtents[0], mExtents[1]); + mBounds[0] = mObjectBounds[0]; + mBounds[1] = mObjectBounds[1]; + } + else + { + LLVector4a& newMin = mExtents[0]; + LLVector4a& newMax = mExtents[1]; + LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) mOctreeNode->getChild(0)->getListener(0); + group->clearState(SKIP_FRUSTUM_CHECK); + group->rebound(); + //initialize to first child + newMin = group->mExtents[0]; + newMax = group->mExtents[1]; + + //first, rebound children + for (U32 i = 1; i < mOctreeNode->getChildCount(); i++) + { + group = (LLviewerOctreeGroup*) mOctreeNode->getChild(i)->getListener(0); + group->clearState(SKIP_FRUSTUM_CHECK); + group->rebound(); + const LLVector4a& max = group->mExtents[1]; + const LLVector4a& min = group->mExtents[0]; + + newMax.setMax(newMax, max); + newMin.setMin(newMin, min); + } + + boundObjects(FALSE, newMin, newMax); + + mBounds[0].setAdd(newMin, newMax); + mBounds[0].mul(0.5f); + mBounds[1].setSub(newMax, newMin); + mBounds[1].mul(0.5f); + } + + clearState(DIRTY); + + return; +} + +//virtual +void LLviewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj) +{ + obj->setGroup(this); + unbound(); + setState(OBJECT_DIRTY); +} + +//virtual +void LLviewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj) +{ + obj->setGroup(NULL); + unbound(); + setState(OBJECT_DIRTY); +} + +//virtual +void LLviewerOctreeGroup::handleDestruction(const TreeNode* node) +{ + for (OctreeNode::element_iter i = mOctreeNode->getDataBegin(); i != mOctreeNode->getDataEnd(); ++i) + { + LLViewerOctreeEntry* obj = *i; + if (obj && obj->getGroup() == this) + { + obj->nullGroup(); + } + } +} + +//virtual +void LLviewerOctreeGroup::handleStateChange(const TreeNode* node) +{ + //drop bounding box upon state change + if (mOctreeNode != node) + { + mOctreeNode = (OctreeNode*) node; + } + unbound(); +} + +//virtual +void LLviewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) +{ + llerrs << "can not access here. It is an abstract class." << llendl; + + //((LLviewerOctreeGroup*)child->getListener(0))->unbound(); +} + +//virtual +void LLviewerOctreeGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNode* child) +{ + unbound(); +} + +LLviewerOctreeGroup* LLviewerOctreeGroup::getParent() +{ + if(!mOctreeNode) + { + return NULL; + } + + OctreeNode* parent = mOctreeNode->getOctParent(); + + if (parent) + { + return (LLviewerOctreeGroup*) parent->getListener(0); + } + + return NULL; +} + +//virtual +bool LLviewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut) +{ + const OctreeNode* node = mOctreeNode; + + if (node->isEmpty()) + { //don't do anything if there are no objects + if (empty && mOctreeNode->getParent()) + { //only root is allowed to be empty + OCT_ERRS << "Empty leaf found in octree." << llendl; + } + return false; + } + + LLVector4a& newMin = mObjectExtents[0]; + LLVector4a& newMax = mObjectExtents[1]; + + if (hasState(OBJECT_DIRTY)) + { //calculate new bounding box + clearState(OBJECT_DIRTY); + + //initialize bounding box to first element + OctreeNode::const_element_iter i = node->getDataBegin(); + LLViewerOctreeEntry* entry = *i; + const LLVector4a* minMax = entry->getSpatialExtents(); + + newMin = minMax[0]; + newMax = minMax[1]; + + for (++i; i != node->getDataEnd(); ++i) + { + entry = *i; + minMax = entry->getSpatialExtents(); + + update_min_max(newMin, newMax, minMax[0]); + update_min_max(newMin, newMax, minMax[1]); + } + + mObjectBounds[0].setAdd(newMin, newMax); + mObjectBounds[0].mul(0.5f); + mObjectBounds[1].setSub(newMax, newMin); + mObjectBounds[1].mul(0.5f); + } + + if (empty) + { + minOut = newMin; + maxOut = newMax; + } + else + { + minOut.setMin(minOut, newMin); + maxOut.setMax(maxOut, newMax); + } + + return TRUE; +} + +//virtual +BOOL LLviewerOctreeGroup::isVisible() const +{ + return TRUE; +} + +//----------------------------------------------------------------------------------- +//class LLViewerOctreeCull definitions +//----------------------------------------------------------------------------------- + +//virtual +bool LLViewerOctreeCull::earlyFail(LLviewerOctreeGroup* group) +{ + return false; +} + +//virtual +void LLViewerOctreeCull::traverse(const OctreeNode* n) +{ + LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) n->getListener(0); + + if (earlyFail(group)) + { + return; + } + + if (mRes == 2 || + (mRes && group->hasState(LLviewerOctreeGroup::SKIP_FRUSTUM_CHECK))) + { //fully in, just add everything + OctreeTraveler::traverse(n); + } + else + { + mRes = frustumCheck(group); + + if (mRes) + { //at least partially in, run on down + OctreeTraveler::traverse(n); + } + + mRes = 0; + } +} + +S32 LLViewerOctreeCull::AABBInFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group) +{ + return mCamera->AABBInFrustumNoFarClip(group->mBounds[0], group->mBounds[1]); +} + +S32 LLViewerOctreeCull::AABBSphereIntersectGroupExtents(const LLviewerOctreeGroup* group) +{ + return AABBSphereIntersect(group->mExtents[0], group->mExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist); +} + +S32 LLViewerOctreeCull::AABBInFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group) +{ + return mCamera->AABBInFrustumNoFarClip(group->mObjectBounds[0], group->mObjectBounds[1]); +} + +S32 LLViewerOctreeCull::AABBSphereIntersectObjectExtents(const LLviewerOctreeGroup* group) +{ + return AABBSphereIntersect(group->mObjectExtents[0], group->mObjectExtents[1], mCamera->getOrigin(), mCamera->mFrustumCornerDist); +} + +S32 LLViewerOctreeCull::AABBInFrustumGroupBounds(const LLviewerOctreeGroup* group) +{ + return mCamera->AABBInFrustum(group->mBounds[0], group->mBounds[1]); +} + +S32 LLViewerOctreeCull::AABBInFrustumObjectBounds(const LLviewerOctreeGroup* group) +{ + return mCamera->AABBInFrustum(group->mObjectBounds[0], group->mObjectBounds[1]); +} + +//virtual +bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLviewerOctreeGroup* group) +{ + if (branch->getElementCount() == 0) //no elements + { + return false; + } + else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box + { + return true; + } + else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum + { + return false; + } + + return true; +} + +//virtual +void LLViewerOctreeCull::preprocess(LLviewerOctreeGroup* group) +{ +} + +//virtual +void LLViewerOctreeCull::processGroup(LLviewerOctreeGroup* group) +{ +} + +//virtual +void LLViewerOctreeCull::visit(const OctreeNode* branch) +{ + LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0); + + preprocess(group); + + if (checkObjects(branch, group)) + { + processGroup(group); + } +} + diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h new file mode 100644 index 0000000000..c063e96ea5 --- /dev/null +++ b/indra/newview/llvieweroctree.h @@ -0,0 +1,274 @@ +/** + * @file llvieweroctree.h + * @brief LLViewerObjectOctree.cpp header file, defining all supporting classes. + * + * $LicenseInfo:firstyear=2002&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_VIEWEROCTREE_H +#define LL_VIEWEROCTREE_H + +#include +#include + +#include "v2math.h" +#include "v3math.h" +#include "v4math.h" +#include "m4math.h" +#include "llvector4a.h" +#include "llquaternion.h" +#include "lloctree.h" +#include "llcamera.h" + +class LLViewerOctreeEntryData; +class LLviewerOctreeGroup; +class LLViewerOctreeEntry; + +typedef LLOctreeListener OctreeListener; +typedef LLTreeNode TreeNode; +typedef LLOctreeNode OctreeNode; +typedef LLOctreeRoot OctreeRoot; +typedef LLOctreeTraveler OctreeTraveler; + +S32 AABBSphereIntersect(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &rad); +S32 AABBSphereIntersectR2(const LLVector4a& min, const LLVector4a& max, const LLVector3 &origin, const F32 &radius_squared); + +S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad); +S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &radius_squared); + +//defines data needed for octree of an entry +LL_ALIGN_PREFIX(16) +class LLViewerOctreeEntry : public LLRefCount +{ + friend class LLViewerOctreeEntryData; + +public: + typedef enum + { + LLDRAWABLE = 0, + LLVOCACHEENTRY, + NUM_DATA_TYPE + }eEntryDataType_t; + + ~LLViewerOctreeEntry(); +public: + LLViewerOctreeEntry(); + + void nullGroup(); //called by group handleDestruction() only + void setGroup(LLviewerOctreeGroup* group); + void removeData(LLViewerOctreeEntryData* data); + + LLViewerOctreeEntryData* getData(U32 data_type)const {return mData[data_type];} + bool hasData(U32 data_type)const {return mData[data_type] != NULL;} + + LLViewerOctreeEntryData* getDrawable() const {return mData[LLDRAWABLE];} + bool hasDrawable() const {return mData[LLDRAWABLE] != NULL;} + LLViewerOctreeEntryData* getVOCacheEntry() const {return mData[LLVOCACHEENTRY];} + bool hasVOCacheEntry() const {return mData[LLVOCACHEENTRY] != NULL;} + + const LLVector4a* getSpatialExtents() const {return mExtents;} + const LLVector4a& getPositionGroup() const {return mPositionGroup;} + LLviewerOctreeGroup* getGroup()const {return mGroup;} + + F32 getBinRadius() const {return mBinRadius;} + S32 getBinIndex() const {return mBinIndex; } + void setBinIndex(S32 index) const {mBinIndex = index; } + +private: + void addData(LLViewerOctreeEntryData* data); + +private: + LLViewerOctreeEntryData* mData[NUM_DATA_TYPE]; //do not use LLPointer here. + LLviewerOctreeGroup* mGroup; + + //aligned members + LL_ALIGN_16(LLVector4a mExtents[2]); + LL_ALIGN_16(LLVector4a mPositionGroup); + F32 mBinRadius; + mutable S32 mBinIndex; + mutable U32 mVisible; + +} LL_ALIGN_POSTFIX(16); + +//defines an abstract class for entry data +LL_ALIGN_PREFIX(16) +class LLViewerOctreeEntryData : public LLRefCount +{ +protected: + ~LLViewerOctreeEntryData(); + +public: + LLViewerOctreeEntryData(const LLViewerOctreeEntryData& rhs) + { + *this = rhs; + } + LLViewerOctreeEntryData(LLViewerOctreeEntry::eEntryDataType_t data_type); + + LLViewerOctreeEntry::eEntryDataType_t getDataType() const {return mDataType;} + LLViewerOctreeEntry* getEntry() {return mEntry;} + + virtual void setOctreeEntry(LLViewerOctreeEntry* entry); + + virtual S32 getMinVisFrameRange()const = 0; + + F32 getBinRadius() const {return mEntry->getBinRadius();} + const LLVector4a* getSpatialExtents() const; + LLviewerOctreeGroup* getGroup()const; + const LLVector4a& getPositionGroup() const; + + void setBinRadius(F32 rad) {mEntry->mBinRadius = rad;} + void setSpatialExtents(const LLVector3& min, const LLVector3& max); + void setSpatialExtents(const LLVector4a& min, const LLVector4a& max); + void setPositionGroup(const LLVector4a& pos); + + virtual void setGroup(LLviewerOctreeGroup* group); + void shift(const LLVector4a &shift_vector); + + U32 getVisible() const {return mEntry ? mEntry->mVisible : 0;} + void setVisible() const; + virtual bool isVisible() const; + virtual bool isRecentlyVisible() const; + + static S32 getCurrentFrame() { return sCurVisible; } + +protected: + LLVector4a& getGroupPosition() {return mEntry->mPositionGroup;} + void initVisible(U32 visible) {mEntry->mVisible = visible;} + + static void incrementVisible() {sCurVisible++;} +protected: + LLPointer mEntry; + LLViewerOctreeEntry::eEntryDataType_t mDataType; + static U32 sCurVisible; // Counter for what value of mVisible means currently visible +}LL_ALIGN_POSTFIX(16); + + +//defines an octree group for an octree node, which contains multiple entries. +LL_ALIGN_PREFIX(16) +class LLviewerOctreeGroup : public LLOctreeListener +{ + friend class LLViewerOctreeCull; +protected: + ~LLviewerOctreeGroup(); + +public: + enum + { + CLEAN = 0x00000000, + DIRTY = 0x00000001, + OBJECT_DIRTY = 0x00000002, + SKIP_FRUSTUM_CHECK = 0x00000004, + INVALID_STATE = 0x00000008, + }; + +public: + LLviewerOctreeGroup(OctreeNode* node); + LLviewerOctreeGroup(const LLviewerOctreeGroup& rhs) + { + *this = rhs; + } + + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void* ptr) + { + ll_aligned_free_16(ptr); + } + + bool removeFromGroup(LLViewerOctreeEntryData* data); + bool removeFromGroup(LLViewerOctreeEntry* entry); + + virtual void unbound(); + virtual void rebound(); + + virtual BOOL isVisible() const; + virtual BOOL isRecentlyVisible() const = 0; + + U32 getState() {return mState; } + bool isDirty() const {return mState & DIRTY;} + bool hasState(U32 state) const {return mState & state;} + void setState(U32 state) {mState |= state;} + void clearState(U32 state) {mState &= ~state;} + + //LISTENER FUNCTIONS + virtual void handleInsertion(const TreeNode* node, LLViewerOctreeEntry* obj); + virtual void handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj); + virtual void handleDestruction(const TreeNode* node); + virtual void handleStateChange(const TreeNode* node); + virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child); + virtual void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child); + + OctreeNode* getOctreeNode() {return mOctreeNode;} + LLviewerOctreeGroup* getParent(); + + const LLVector4a* getBounds() const {return mBounds;} + const LLVector4a* getExtents() const {return mExtents;} + const LLVector4a* getObjectBounds() const {return mObjectBounds;} + const LLVector4a* getObjectExtents() const {return mObjectExtents;} + +private: + virtual bool boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut); + +protected: + U32 mState; + OctreeNode* mOctreeNode; + + LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects) + LL_ALIGN_16(LLVector4a mObjectBounds[2]); // bounding box (center, size) of objects in this node + LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children + LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node + +}LL_ALIGN_POSTFIX(16); + +class LLViewerOctreeCull : public OctreeTraveler +{ +public: + LLViewerOctreeCull(LLCamera* camera) + : mCamera(camera), mRes(0) { } + + virtual bool earlyFail(LLviewerOctreeGroup* group); + virtual void traverse(const OctreeNode* n); + + S32 AABBInFrustumNoFarClipGroupBounds(const LLviewerOctreeGroup* group); + S32 AABBSphereIntersectGroupExtents(const LLviewerOctreeGroup* group); + S32 AABBInFrustumNoFarClipObjectBounds(const LLviewerOctreeGroup* group); + S32 AABBSphereIntersectObjectExtents(const LLviewerOctreeGroup* group); + S32 AABBInFrustumGroupBounds(const LLviewerOctreeGroup* group); + S32 AABBInFrustumObjectBounds(const LLviewerOctreeGroup* group); + + virtual S32 frustumCheck(const LLviewerOctreeGroup* group) = 0; + virtual S32 frustumCheckObjects(const LLviewerOctreeGroup* group) = 0; + + virtual bool checkObjects(const OctreeNode* branch, const LLviewerOctreeGroup* group); + virtual void preprocess(LLviewerOctreeGroup* group); + virtual void processGroup(LLviewerOctreeGroup* group); + virtual void visit(const OctreeNode* branch); + +protected: + LLCamera *mCamera; + S32 mRes; +}; + +#endif \ No newline at end of file diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 6bd9f66b9c..8acdc08b00 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -151,8 +151,8 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo if (group != NULL) { - LLVector3 center(group->mOctreeNode->getCenter().getF32ptr()); - LLVector3 size(group->mOctreeNode->getSize().getF32ptr()); + LLVector3 center(group->getOctreeNode()->getCenter().getF32ptr()); + LLVector3 size(group->getOctreeNode()->getSize().getF32ptr()); size += LLVector3(0.01f, 0.01f, 0.01f); mMinObjPos = center - size; mMaxObjPos = center + size; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 31e3820a21..15c95aa30a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -70,6 +70,7 @@ #include "stringize.h" #include "llviewercontrol.h" #include "llsdserialize.h" +#include "llvieweroctree.h" #ifdef LL_WINDOWS #pragma warning(disable:4355) @@ -133,7 +134,14 @@ public: // Misc LLVLComposition *mCompositionp; // Composition layer for the surface - LLVOCacheEntry::vocache_entry_map_t mCacheMap; + LLVOCacheEntry::vocache_entry_map_t mCacheMap; //all cached entries + LLVOCacheEntry::vocache_entry_set_t mActiveSet; //all active entries; + LLVOCacheEntry::vocache_entry_set_t mWaitingSet; //entries waiting for LLDrawable to be generated. + LLVOCacheEntry::vocache_entry_set_t mVisibleEntries; //visible root entries of a linked set. + std::set< LLPointer > mDummyEntries; //dummy vo cache entries, for LLSpatialBridge use. + std::set< LLSpatialGroup* > mVisibleGroups; //visible llspatialgroup + LLVOCachePartition* mVOCachePartition; + // time? // LRU info? @@ -291,7 +299,8 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mCacheLoaded(FALSE), mCacheDirty(FALSE), mReleaseNotesRequested(FALSE), - mCapabilitiesReceived(false) + mCapabilitiesReceived(false), + mDead(FALSE) { mWidth = region_width_meters; mImpl->mOriginGlobal = from_region_handle(handle); @@ -323,17 +332,20 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, //create object partitions //MUST MATCH declaration of eObjectPartitions - mImpl->mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD - mImpl->mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN - mImpl->mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER - mImpl->mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER - mImpl->mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE - mImpl->mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE - mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS - mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME - mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE - mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE + mImpl->mObjectPartition.push_back(new LLHUDPartition(this)); //PARTITION_HUD + mImpl->mObjectPartition.push_back(new LLTerrainPartition(this)); //PARTITION_TERRAIN + mImpl->mObjectPartition.push_back(new LLVoidWaterPartition(this)); //PARTITION_VOIDWATER + mImpl->mObjectPartition.push_back(new LLWaterPartition(this)); //PARTITION_WATER + mImpl->mObjectPartition.push_back(new LLTreePartition(this)); //PARTITION_TREE + mImpl->mObjectPartition.push_back(new LLParticlePartition(this)); //PARTITION_PARTICLE + mImpl->mObjectPartition.push_back(new LLGrassPartition(this)); //PARTITION_GRASS + mImpl->mObjectPartition.push_back(new LLVolumePartition(this)); //PARTITION_VOLUME + mImpl->mObjectPartition.push_back(new LLBridgePartition(this)); //PARTITION_BRIDGE + mImpl->mObjectPartition.push_back(new LLHUDParticlePartition(this));//PARTITION_HUD_PARTICLE + mImpl->mObjectPartition.push_back(new LLVOCachePartition(this)); //PARTITION_VO_CACHE mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE + + mImpl->mVOCachePartition = (LLVOCachePartition*)getSpatialPartition(PARTITION_VO_CACHE); } @@ -354,6 +366,12 @@ void LLViewerRegion::initStats() LLViewerRegion::~LLViewerRegion() { + mDead = TRUE; + mImpl->mActiveSet.clear(); + mImpl->mVisibleEntries.clear(); + mImpl->mVisibleGroups.clear(); + mImpl->mWaitingSet.clear(); + gVLManager.cleanupData(this); // Can't do this on destruction, because the neighbor pointers might be invalid. // This should be reference counted... @@ -437,10 +455,6 @@ void LLViewerRegion::saveObjectCache() mCacheDirty = FALSE; } - for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.begin(); iter != mImpl->mCacheMap.end(); ++iter) - { - delete iter->second; - } mImpl->mCacheMap.clear(); } @@ -718,8 +732,199 @@ void LLViewerRegion::dirtyHeights() } } +void LLViewerRegion::replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry) +{ + LLPointer oct_entry; + U32 state = LLVOCacheEntry::INACTIVE; + + if(old_entry) + { + oct_entry = old_entry->getEntry(); + state = old_entry->getState(); + + while(old_entry->getNumOfChildren() > 0) + { + new_entry->addChild(old_entry->getNextChild()); + } + + killCacheEntry(old_entry); + } + + mImpl->mCacheMap[new_entry->getLocalID()] = new_entry; + if(oct_entry.notNull()) + { + new_entry->setOctreeEntry(oct_entry); + } + + if(state == LLVOCacheEntry::ACTIVE) + { + llassert(new_entry->getEntry()->hasDrawable()); + mImpl->mActiveSet.insert(new_entry); + } + else if(state == LLVOCacheEntry::WAITING) + { + mImpl->mWaitingSet.insert(new_entry); + } + else if(old_entry && oct_entry) + { + addToVOCacheTree(new_entry); + } + new_entry->setState(state); +} + +//physically delete the cache entry +void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) +{ + if(!entry) + { + return; + } + + //1, remove from active list and waiting list + if(entry->isState(LLVOCacheEntry::ACTIVE)) + { + mImpl->mActiveSet.erase(entry); + } + else if(entry->isState(LLVOCacheEntry::WAITING)) + { + mImpl->mWaitingSet.erase(entry); + } + + //2, kill LLViewerObject if exists + //this should be done by the rendering pipeline automatically. + + //3, remove from mVOCachePartition + if(entry->isState(LLVOCacheEntry::INACTIVE) && entry->getEntry()) + { + removeFromVOCacheTree(entry); + } + + entry->setState(LLVOCacheEntry::INACTIVE); + //4, remove from mCacheMap, real deletion + mImpl->mCacheMap.erase(entry->getLocalID()); +} + +//physically delete the cache entry +void LLViewerRegion::killCacheEntry(U32 local_id) +{ + killCacheEntry(getCacheEntry(local_id)); +} + +U32 LLViewerRegion::getNumOfActiveCachedObjects() const +{ + return mImpl->mActiveSet.size(); +} + +void LLViewerRegion::addActiveCacheEntry(LLVOCacheEntry* entry) +{ + if(!entry || mDead) + { + return; + } + + if(entry->isState(LLVOCacheEntry::WAITING)) + { + mImpl->mWaitingSet.erase(entry); + } + + entry->setState(LLVOCacheEntry::ACTIVE); + entry->setVisible(); + + llassert(entry->getEntry()->hasDrawable()); + mImpl->mActiveSet.insert(entry); +} + +void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep) +{ + if(mDead) + { + return; + } + if(entry->isDummy()) + { + mImpl->mDummyEntries.insert(entry); //keep a copy to prevent from being deleted. + addToVOCacheTree(entry); + } + else if(!drawablep->getParent()) //root node + { + addToVOCacheTree(entry); + mImpl->mVisibleEntries.erase(entry); + } + else //child node + { + LLViewerOctreeEntry* parent_oct_entry = drawablep->getParent()->getEntry(); + if(parent_oct_entry && parent_oct_entry->hasVOCacheEntry()) + { + LLVOCacheEntry* parent = (LLVOCacheEntry*)parent_oct_entry->getVOCacheEntry(); + parent->addChild(entry); + } + } + + mImpl->mActiveSet.erase(entry); + mImpl->mWaitingSet.erase(entry); + entry->setState(LLVOCacheEntry::INACTIVE); +} + +void LLViewerRegion::addVisibleGroup(LLSpatialGroup* group) +{ + if(mDead || group->isEmpty() || group->isDead()) + { + return; + } + + mImpl->mVisibleGroups.insert(group); +} + +void LLViewerRegion::addToVOCacheTree(LLVOCacheEntry* entry) +{ + static BOOL vo_cache_culling_enabled = gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled"); + + if(mDead || !entry || !entry->getEntry()) + { + return; + } + llassert(!entry->getGroup()); + + mImpl->mVOCachePartition->addEntry(entry->getEntry()); +} + +void LLViewerRegion::removeFromVOCacheTree(LLVOCacheEntry* entry) +{ + if(mDead || !entry || !entry->getEntry()) + { + return; + } + + mImpl->mVOCachePartition->removeEntry(entry->getEntry()); +} + +//add the visible root entry of a linked set +void LLViewerRegion::addVisibleCacheEntry(LLVOCacheEntry* entry) +{ + if(mDead || !entry || !entry->getNumOfChildren()) + { + return; //no child entries + } + + mImpl->mVisibleEntries.insert(entry); +} + +void LLViewerRegion::clearVisibleGroup(LLSpatialGroup* group) +{ + if(mDead) + { + return; + } + + llassert(!group->getOctreeNode() || group->isEmpty()); + + mImpl->mVisibleGroups.erase(group); +} + BOOL LLViewerRegion::idleUpdate(F32 max_update_time) { + LLTimer update_timer; + // did_update returns TRUE if we did at least one significant update BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time); @@ -729,9 +934,168 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time) mParcelOverlay->idleUpdate(); } + if(update_timer.getElapsedTimeF32() > max_update_time) + { + return did_update; + } + + //kill invisible objects + std::vector delete_list; + for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mActiveSet.begin(); + iter != mImpl->mActiveSet.end(); ++iter) + { + if(!(*iter)->isRecentlyVisible()) + { + killObject((*iter), delete_list); + } + } + for(S32 i = 0; i < delete_list.size(); i++) + { + gObjectList.killObject(delete_list[i]->getVObj()); + } + delete_list.clear(); + + bool timeout = false; + S32 new_object_count = 64; //minimum number of new objects to be added + //add childrens of visible objects to the rendering pipeline + for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();) + { + LLVOCacheEntry* entry = *iter; + LLVOCacheEntry* child = entry->getNextChild(); + while(child != NULL) + { + if(child->isState(LLVOCacheEntry::INACTIVE)) + { + addNewObject(child); + + if(new_object_count-- < 0 && update_timer.getElapsedTimeF32() > max_update_time) + { + timeout = true; + break; + } + } + child = entry->getNextChild(); + } + if(!child) + { + if(entry->isDummy()) + { + mImpl->mDummyEntries.erase(entry); + } + + iter = mImpl->mVisibleEntries.erase(iter); + } + else + { + break; //timeout + } + } + if(timeout) + { + mImpl->mVisibleGroups.clear(); + return did_update; + } + + //add objects in the visible groups to the rendering pipeline + std::set< LLSpatialGroup* >::iterator group_iter = mImpl->mVisibleGroups.begin(); + while(group_iter != mImpl->mVisibleGroups.end()) + { + LLSpatialGroup* group = *group_iter; + if(!group->getOctreeNode() || group->isEmpty()) + { + mImpl->mVisibleGroups.erase(group_iter); + group_iter = mImpl->mVisibleGroups.begin(); + continue; + } + + std::vector entry_list; + for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) + { + //group data contents could change during creating new objects, so copy all contents first. + entry_list.push_back(*i); + } + + for(S32 i = 0; i < entry_list.size(); i++) + { + LLViewerOctreeEntry* entry = entry_list[i]; + if(entry && entry->hasVOCacheEntry()) + { + LLVOCacheEntry* vo_entry = (LLVOCacheEntry*)entry->getVOCacheEntry(); + if(vo_entry->isDummy()) + { + addVisibleCacheEntry(vo_entry); //for LLSpatialBridge. + } + else if(vo_entry->isState(LLVOCacheEntry::INACTIVE)) + { + addNewObject(vo_entry); + if(new_object_count-- < 0 && update_timer.getElapsedTimeF32() > max_update_time) + { + timeout = true; + break; + } + } + } + } + entry_list.clear(); + + if(timeout) + { + break; + } + mImpl->mVisibleGroups.erase(group); + group_iter = mImpl->mVisibleGroups.begin(); + } + mImpl->mVisibleGroups.clear(); + return did_update; } +void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector& delete_list) +{ + //kill the object. + LLDrawable* drawablep = (LLDrawable*)entry->getEntry()->getDrawable(); + llassert(drawablep); + + if(!drawablep->getParent()) + { + LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren(); + for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); + iter != child_list.end(); iter++) + { + LLViewerObject* child = *iter; + if(child->mDrawable->isRecentlyVisible()) + { + //set the parent group visible if any of its children visible. + drawablep->getSpatialGroup()->setVisible(); + return; + } + } + delete_list.push_back(drawablep); + } +} + +LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry) +{ + LLViewerObject* obj = NULL; + if(!entry->getEntry()->hasDrawable()) //not added to the rendering pipeline yet + { + //add the object + obj = gObjectList.processObjectUpdateFromCache(entry, this); + if(obj) + { + if(!entry->isState(LLVOCacheEntry::ACTIVE)) + { + mImpl->mWaitingSet.insert(entry); + entry->setState(LLVOCacheEntry::WAITING); + } + } + } + else + { + llerrs << "Object is already created." << llendl; + } + return obj; +} // As above, but forcibly do the update. void LLViewerRegion::forceUpdate() @@ -1191,8 +1555,9 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec { U32 local_id = objectp->getLocalID(); U32 crc = objectp->getCRC(); + eCacheUpdateResult result; - LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL); + LLVOCacheEntry* entry = getCacheEntry(local_id); if (entry) { @@ -1201,41 +1566,79 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec { // Record a hit entry->recordDupe(); - return CACHE_UPDATE_DUPE; + result = CACHE_UPDATE_DUPE; } + else + { + // Update the cache entry + LLPointer new_entry = new LLVOCacheEntry(local_id, crc, dp); + replaceCacheEntry(entry, new_entry); + entry = new_entry; - // Update the cache entry - mImpl->mCacheMap.erase(local_id); - delete entry; + result = CACHE_UPDATE_CHANGED; + } + } + else + { + // we haven't seen this object before + // Create new entry and add to map + result = CACHE_UPDATE_ADDED; + //if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) + //{ + // delete mImpl->mCacheMap.begin()->second ; + // mImpl->mCacheMap.erase(mImpl->mCacheMap.begin()); + // result = CACHE_UPDATE_REPLACED; + // + //} entry = new LLVOCacheEntry(local_id, crc, dp); + mImpl->mCacheMap[local_id] = entry; - return CACHE_UPDATE_CHANGED; } - // we haven't seen this object before - - // Create new entry and add to map - eCacheUpdateResult result = CACHE_UPDATE_ADDED; - if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) + if(objectp->mDrawable.notNull() && !entry->getEntry()) { - delete mImpl->mCacheMap.begin()->second ; - mImpl->mCacheMap.erase(mImpl->mCacheMap.begin()); - result = CACHE_UPDATE_REPLACED; - + entry->setOctreeEntry(objectp->mDrawable->getEntry()); + } + if(entry->getEntry() && entry->getEntry()->hasDrawable() && entry->isState(LLVOCacheEntry::INACTIVE)) + { + addActiveCacheEntry(entry); } - entry = new LLVOCacheEntry(local_id, crc, dp); - mImpl->mCacheMap[local_id] = entry; return result; } +LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id) +{ + static BOOL vo_cache_culling_enabled = gSavedSettings.getBOOL("ObjectCacheViewCullingEnabled"); + + if(!vo_cache_culling_enabled) + { + return NULL; + } + + LLVOCacheEntry* entry = getCacheEntry(local_id); + removeFromVOCacheTree(entry); + + return entry; +} + +LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id) +{ + LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.find(local_id); + if(iter != mImpl->mCacheMap.end()) + { + return iter->second; + } + return NULL; +} + // Get data packer for this object, if we have cached data // AND the CRC matches. JC LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type) { //llassert(mCacheLoaded); This assert failes often, changing to early-out -- davep, 2010/10/18 - LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL); + LLVOCacheEntry* entry = getCacheEntry(local_id); if (entry) { @@ -1244,20 +1647,21 @@ LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type) { // Record a hit entry->recordHit(); - cache_miss_type = CACHE_MISS_TYPE_NONE; + cache_miss_type = CACHE_MISS_TYPE_NONE; + return entry->getDP(crc); } else { // llinfos << "CRC miss for " << local_id << llendl; - cache_miss_type = CACHE_MISS_TYPE_CRC; + cache_miss_type = CACHE_MISS_TYPE_CRC; mCacheMissCRC.put(local_id); } } else { // llinfos << "Cache miss for " << local_id << llendl; - cache_miss_type = CACHE_MISS_TYPE_FULL; + cache_miss_type = CACHE_MISS_TYPE_FULL; mCacheMissFull.put(local_id); } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index c9fffaf30e..17654a8bc7 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -66,7 +66,8 @@ class LLDataPacker; class LLDataPackerBinaryBuffer; class LLHost; class LLBBox; - +class LLSpatialGroup; +class LLDrawable; class LLViewerRegionImpl; class LLViewerRegion: public LLCapabilityProvider // implements this interface @@ -85,6 +86,7 @@ public: PARTITION_VOLUME, PARTITION_BRIDGE, PARTITION_HUD_PARTICLE, + PARTITION_VO_CACHE, PARTITION_NONE, NUM_PARTITIONS } eObjectPartitions; @@ -216,6 +218,12 @@ public: F32 getWidth() const { return mWidth; } BOOL idleUpdate(F32 max_update_time); + void addVisibleGroup(LLSpatialGroup* group); + void addVisibleCacheEntry(LLVOCacheEntry* entry); + void addActiveCacheEntry(LLVOCacheEntry* entry); + void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep); + void killCacheEntry(U32 local_id); //physically delete the cache entry + void clearVisibleGroup(LLSpatialGroup* group); // Like idleUpdate, but forces everything to complete regardless of // how long it takes. @@ -305,7 +313,8 @@ public: } eCacheUpdateResult; // handle a full update message - eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); + eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp); + LLVOCacheEntry* getCacheEntryForOctree(U32 local_id); LLDataPacker *getDP(U32 local_id, U32 crc, U8 &cache_miss_type); void requestCacheMisses(); void addCacheMissFull(const U32 local_id); @@ -322,6 +331,7 @@ public: virtual std::string getDescription() const; std::string getHttpUrl() const { return mHttpUrl ;} + U32 getNumOfActiveCachedObjects() const; LLSpatialPartition* getSpatialPartition(U32 type); bool objectIsReturnable(const LLVector3& pos, const std::vector& boxes) const; @@ -331,6 +341,15 @@ public: void getNeighboringRegions( std::vector& uniqueRegions ); void getNeighboringRegionsStatus( std::vector& regions ); +private: + void addToVOCacheTree(LLVOCacheEntry* entry); + LLViewerObject* addNewObject(LLVOCacheEntry* entry); + void killObject(LLVOCacheEntry* entry, std::vector& delete_list); + LLVOCacheEntry* getCacheEntry(U32 local_id); + void removeFromVOCacheTree(LLVOCacheEntry* entry); + void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry); + void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry + public: struct CompareDistance { @@ -408,18 +427,17 @@ private: // Maps local ids to cache entries. // Regions can have order 10,000 objects, so assume // a structure of size 2^14 = 16,000 - BOOL mCacheLoaded; - BOOL mCacheDirty; + BOOL mCacheLoaded; + BOOL mCacheDirty; + BOOL mAlive; // can become false if circuit disconnects + BOOL mCapabilitiesReceived; + BOOL mReleaseNotesRequested; + BOOL mDead; //if true, this region is in the process of deleting. LLDynamicArray mCacheMissFull; LLDynamicArray mCacheMissCRC; - - bool mAlive; // can become false if circuit disconnects - bool mCapabilitiesReceived; - caps_received_signal_t mCapabilitiesReceivedSignal; - - BOOL mReleaseNotesRequested; + caps_received_signal_t mCapabilitiesReceivedSignal; LLSD mSimulatorFeatures; }; diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 91e485d01b..2d5292b5f3 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -220,7 +220,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) } else { - llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; + //llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; return; } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index fd892db3d3..a11653b77d 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -808,8 +808,10 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys, updateMeshTextures(); // unpack the texture UUIDs to the texture slots - retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num); - + if(mesgsys != NULL) + { + retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num); + } // need to trigger a few operations to get the avatar to use the new bakes for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 7db19c5c1b..17e0ef3bdb 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -29,6 +29,8 @@ #include "llerror.h" #include "llregionhandle.h" #include "llviewercontrol.h" +#include "llviewerobjectlist.h" +#include "lldrawable.h" BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) { @@ -46,12 +48,13 @@ BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) //--------------------------------------------------------------------------- LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp) - : + : LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY), mLocalID(local_id), mCRC(crc), mHitCount(0), mDupeCount(0), - mCRCChangeCount(0) + mCRCChangeCount(0), + mState(INACTIVE) { mBuffer = new U8[dp.getBufferSize()]; mDP.assignBuffer(mBuffer, dp.getBufferSize()); @@ -59,19 +62,22 @@ LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer & } LLVOCacheEntry::LLVOCacheEntry() - : + : LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY), mLocalID(0), mCRC(0), mHitCount(0), mDupeCount(0), mCRCChangeCount(0), - mBuffer(NULL) + mBuffer(NULL), + mState(INACTIVE) { mDP.assignBuffer(mBuffer, 0); } LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) - : mBuffer(NULL) + : LLViewerOctreeEntryData(LLViewerOctreeEntry::LLVOCACHEENTRY), + mBuffer(NULL), + mState(INACTIVE) { S32 size = -1; BOOL success; @@ -138,8 +144,57 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) LLVOCacheEntry::~LLVOCacheEntry() { mDP.freeBuffer(); + //llassert(mState == INACTIVE); } +//virtual +void LLVOCacheEntry::setOctreeEntry(LLViewerOctreeEntry* entry) +{ + if(!entry && mDP.getBufferSize() > 0) + { + LLUUID fullid; + mDP.reset(); + mDP.unpackUUID(fullid, "ID"); + mDP.reset(); + + LLViewerObject* obj = gObjectList.findObject(fullid); + if(obj && obj->mDrawable) + { + entry = obj->mDrawable->getEntry(); + } + } + + LLViewerOctreeEntryData::setOctreeEntry(entry); +} + +//virtual +S32 LLVOCacheEntry::getMinVisFrameRange()const +{ + const S32 MIN_RANGE = 128; //frames + + return MIN_RANGE; +} + +void LLVOCacheEntry::addChild(LLVOCacheEntry* entry) +{ + llassert(entry != NULL); + + mChildrenList.push_back(entry); +} + +LLVOCacheEntry* LLVOCacheEntry::getNextChild() +{ + S32 size = mChildrenList.size(); + if(!size) + { + return NULL; + } + + LLVOCacheEntry* entry = mChildrenList[size - 1]; + mChildrenList.pop_back(); //remove the entry; + + return entry; +} // New CRC means the object has changed. void LLVOCacheEntry::assignCRC(U32 crc, LLDataPackerBinaryBuffer &dp) @@ -170,6 +225,16 @@ LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP(U32 crc) return &mDP; } +LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP() +{ + if (mDP.getBufferSize() == 0) + { + //llinfos << "Not getting cache entry, invalid!" << llendl; + return NULL; + } + + return &mDP; +} void LLVOCacheEntry::recordHit() { @@ -625,11 +690,10 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca { for (S32 i = 0; i < num_entries; i++) { - LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file); + LLPointer entry = new LLVOCacheEntry(&apr_file); if (!entry->getLocalID()) { llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl; - delete entry ; success = false ; break ; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 14e3b4c793..85538e8043 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -31,34 +31,57 @@ #include "lldatapacker.h" #include "lldlinked.h" #include "lldir.h" - +#include "llvieweroctree.h" //--------------------------------------------------------------------------- // Cache entries class LLVOCacheEntry; -class LLVOCacheEntry +class LLVOCacheEntry : public LLViewerOctreeEntryData { +public: + enum + { + INACTIVE = 0, + WAITING, + ACTIVE + }; + +protected: + ~LLVOCacheEntry(); public: LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp); LLVOCacheEntry(LLAPRFile* apr_file); - LLVOCacheEntry(); - ~LLVOCacheEntry(); + LLVOCacheEntry(); + + void setState(U32 state) {mState = state;} + bool isState(U32 state) {return mState == state;} + U32 getState() const {return mState;} U32 getLocalID() const { return mLocalID; } U32 getCRC() const { return mCRC; } S32 getHitCount() const { return mHitCount; } S32 getCRCChangeCount() const { return mCRCChangeCount; } + S32 getMinVisFrameRange()const; void dump() const; BOOL writeToFile(LLAPRFile* apr_file) const; void assignCRC(U32 crc, LLDataPackerBinaryBuffer &dp); LLDataPackerBinaryBuffer *getDP(U32 crc); + LLDataPackerBinaryBuffer *getDP(); void recordHit(); void recordDupe() { mDupeCount++; } + + /*virtual*/ void setOctreeEntry(LLViewerOctreeEntry* entry); + + void addChild(LLVOCacheEntry* entry); + LLVOCacheEntry* getNextChild(); + S32 getNumOfChildren() {return mChildrenList.size();} + bool isDummy() {return !mBuffer;} public: - typedef std::map vocache_entry_map_t; + typedef std::map > vocache_entry_map_t; + typedef std::set vocache_entry_set_t; protected: U32 mLocalID; @@ -68,6 +91,9 @@ protected: S32 mCRCChangeCount; LLDataPackerBinaryBuffer mDP; U8 *mBuffer; + + U32 mState; + std::vector mChildrenList; //children entries in a linked set. }; // diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 4dca87652d..d378ed2577 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -603,8 +603,8 @@ U32 LLVOGrass::getPartitionType() const return LLViewerRegion::PARTITION_GRASS; } -LLGrassPartition::LLGrassPartition() -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB) +LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_GRASS; mPartitionType = LLViewerRegion::PARTITION_GRASS; @@ -624,9 +624,9 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count LLViewerCamera* camera = LLViewerCamera::getInstance(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawablep = *i; + LLDrawable* drawablep = (LLDrawable*)(*i)->getDrawable(); - if (drawablep->isDead()) + if (!drawablep || drawablep->isDead()) { continue; } @@ -738,8 +738,10 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group) LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(), //facep->getTexture(), buffer, fullbright); - info->mExtents[0] = group->mObjectExtents[0]; - info->mExtents[1] = group->mObjectExtents[1]; + + const LLVector4a* exts = group->getObjectExtents(); + info->mExtents[0] = exts[0]; + info->mExtents[1] = exts[1]; info->mVSize = vsize; draw_vec.push_back(info); //for alpha sorting diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index fa34a6f1f5..29c78f85f2 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -489,8 +489,8 @@ U32 LLVOPartGroup::getPartitionType() const return LLViewerRegion::PARTITION_PARTICLE; } -LLParticlePartition::LLParticlePartition() -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB) +LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp) { mRenderPass = LLRenderPass::PASS_ALPHA; mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES; @@ -499,8 +499,8 @@ LLParticlePartition::LLParticlePartition() mLODPeriod = 1; } -LLHUDParticlePartition::LLHUDParticlePartition() : - LLParticlePartition() +LLHUDParticlePartition::LLHUDParticlePartition(LLViewerRegion* regionp) : + LLParticlePartition(regionp) { mDrawableType = LLPipeline::RENDER_TYPE_HUD_PARTICLES; mPartitionType = LLViewerRegion::PARTITION_HUD_PARTICLE; @@ -510,7 +510,7 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_VBO("Particle VBO"); void LLParticlePartition::rebuildGeom(LLSpatialGroup* group) { - if (group->isDead() || !group->isState(LLSpatialGroup::GEOM_DIRTY)) + if (group->isDead() || !group->hasState(LLSpatialGroup::GEOM_DIRTY)) { return; } @@ -558,9 +558,9 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co LLViewerCamera* camera = LLViewerCamera::getInstance(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawablep = *i; + LLDrawable* drawablep = (LLDrawable*)(*i)->getDrawable(); - if (drawablep->isDead()) + if (!drawablep || drawablep->isDead()) { continue; } @@ -699,8 +699,10 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(), //facep->getTexture(), buffer, fullbright); - info->mExtents[0] = group->mObjectExtents[0]; - info->mExtents[1] = group->mObjectExtents[1]; + + const LLVector4a* exts = group->getObjectExtents(); + info->mExtents[0] = exts[0]; + info->mExtents[1] = exts[1]; info->mVSize = vsize; draw_vec.push_back(info); //for alpha sorting diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index cb905d02da..d5b3f2fd14 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -1058,8 +1058,8 @@ U32 LLVOSurfacePatch::getPartitionType() const return LLViewerRegion::PARTITION_TERRAIN; } -LLTerrainPartition::LLTerrainPartition() -: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB) +LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp) +: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) { mOcclusionEnabled = FALSE; mInfiniteFarClip = TRUE; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 6687ce432f..fe1ef10f7f 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -1290,8 +1290,8 @@ U32 LLVOTree::getPartitionType() const return LLViewerRegion::PARTITION_TREE; } -LLTreePartition::LLTreePartition() -: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB) +LLTreePartition::LLTreePartition(LLViewerRegion* regionp) +: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_TREE; mPartitionType = LLViewerRegion::PARTITION_TREE; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 813fa72cc3..51a3ace61b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3912,8 +3912,8 @@ U32 LLVOVolume::getPartitionType() const return LLViewerRegion::PARTITION_VOLUME; } -LLVolumePartition::LLVolumePartition() -: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB) +LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp) +: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB, regionp) { mLODPeriod = 32; mDepthMask = FALSE; @@ -3923,8 +3923,8 @@ LLVolumePartition::LLVolumePartition() mBufferUsage = GL_DYNAMIC_DRAW_ARB; } -LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep) -: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK) +LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp) +: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp) { mDepthMask = FALSE; mLODPeriod = 32; @@ -4146,9 +4146,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mLastUpdateViewAngle = group->mViewAngle; - if (!group->isState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY)) + if (!group->hasState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::ALPHA_DIRTY)) { - if (group->isState(LLSpatialGroup::MESH_DIRTY) && !LLPipeline::sDelayVBUpdate) + if (group->hasState(LLSpatialGroup::MESH_DIRTY) && !LLPipeline::sDelayVBUpdate) { rebuildMesh(group); } @@ -4186,7 +4186,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) group->mSurfaceArea = 0; //cache object box size since it might be used for determining visibility - group->mObjectBoxSize = group->mObjectBounds[1].getLength3().getF32(); + const LLVector4a* bounds = group->getObjectBounds(); + group->mObjectBoxSize = bounds[1].getLength3().getF32(); group->clearDrawMap(); @@ -4213,9 +4214,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) //get all the faces into a list for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { - LLDrawable* drawablep = *drawable_iter; + LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); - if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) ) + if (!drawablep || drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) ) { continue; } @@ -4619,8 +4620,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) //drawables have been rebuilt, clear rebuild status for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { - LLDrawable* drawablep = *drawable_iter; - drawablep->clearState(LLDrawable::REBUILD_ALL); + LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); + if(drawablep) + { + drawablep->clearState(LLDrawable::REBUILD_ALL); + } } } @@ -4646,7 +4650,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { llassert(group); - if (group && group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY)) + if (group && group->hasState(LLSpatialGroup::MESH_DIRTY) && !group->hasState(LLSpatialGroup::GEOM_DIRTY)) { LLFastTimer ftm(FTM_REBUILD_VOLUME_VB); LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers @@ -4659,9 +4663,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { - LLDrawable* drawablep = *drawable_iter; + LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); - if (!drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) ) + if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) ) { LLVOVolume* vobj = drawablep->getVOVolume(); vobj->preRebuild(); @@ -4727,7 +4731,11 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ; for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { - LLDrawable* drawablep = *drawable_iter; + LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); + if(!drawablep) + { + continue; + } for (S32 i = 0; i < drawablep->getNumFaces(); ++i) { LLFace* face = drawablep->getFace(i); @@ -5200,9 +5208,9 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { - LLDrawable* drawablep = *drawable_iter; + LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); - if (drawablep->isDead()) + if (!drawablep || drawablep->isDead()) { continue; } @@ -5240,7 +5248,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun group->mBufferUsage = usage; } -LLHUDPartition::LLHUDPartition() +LLHUDPartition::LLHUDPartition(LLViewerRegion* regionp) : LLBridgePartition(regionp) { mPartitionType = LLViewerRegion::PARTITION_HUD; mDrawableType = LLPipeline::RENDER_TYPE_HUD; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index e8a1c3d1d6..50e7ed7bb5 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -298,15 +298,15 @@ U32 LLVOVoidWater::getPartitionType() const return LLViewerRegion::PARTITION_VOIDWATER; } -LLWaterPartition::LLWaterPartition() -: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB) +LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp) +: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp) { mInfiniteFarClip = TRUE; mDrawableType = LLPipeline::RENDER_TYPE_WATER; mPartitionType = LLViewerRegion::PARTITION_WATER; } -LLVoidWaterPartition::LLVoidWaterPartition() +LLVoidWaterPartition::LLVoidWaterPartition(LLViewerRegion* regionp) : LLWaterPartition(regionp) { mOcclusionEnabled = FALSE; mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9e495c46b1..0a622997f7 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -133,6 +133,9 @@ void LLWorld::destroyClass() { mEdgeWaterObjects[i] = NULL; } + + //make all visible drawbles invisible. + LLDrawable::incrementVisible(); } @@ -599,7 +602,8 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { mCulledRegionList.erase(curiter); mVisibleRegionList.push_back(regionp); @@ -622,7 +626,8 @@ void LLWorld::updateVisibilities() if (part) { LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); - if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1])) + const LLVector4a* bounds = group->getBounds(); + if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1])) { regionp->calculateCameraDistance(); regionp->getLand().updatePatchVisibilities(gAgent); @@ -644,8 +649,8 @@ void LLWorld::updateVisibilities() void LLWorld::updateRegions(F32 max_update_time) { LLTimer update_timer; - BOOL did_one = FALSE; - + BOOL did_one = FALSE; + // Perform idle time updates for the regions (and associated surfaces) for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) @@ -660,6 +665,13 @@ void LLWorld::updateRegions(F32 max_update_time) did_one = TRUE; } } + + mNumOfActiveCachedObjects = 0; + for (region_list_t::iterator iter = mRegionList.begin(); + iter != mRegionList.end(); ++iter) + { + mNumOfActiveCachedObjects += (*iter)->getNumOfActiveCachedObjects(); + } } void LLWorld::updateParticles() diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index f350009d10..8187142b2b 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -144,6 +144,7 @@ public: U64 getSpaceTimeUSec() const; void getInfo(LLSD& info); + U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;} public: typedef std::list region_list_t; @@ -181,7 +182,7 @@ private: S32 mLastPacketsIn; S32 mLastPacketsOut; S32 mLastPacketsLost; - + U32 mNumOfActiveCachedObjects; U64 mSpaceTimeUSec; BOOL mClassicCloudsEnabled; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4582de805f..e06577c512 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1378,18 +1378,18 @@ S32 LLPipeline::setLightingDetail(S32 level) return mLightingDetail; } -class LLOctreeDirtyTexture : public LLOctreeTraveler +class LLOctreeDirtyTexture : public OctreeTraveler { public: const std::set& mTextures; LLOctreeDirtyTexture(const std::set& textures) : mTextures(textures) { } - virtual void visit(const LLOctreeNode* node) + virtual void visit(const OctreeNode* node) { LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0); - if (!group->isState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty()) + if (!group->hasState(LLSpatialGroup::GEOM_DIRTY) && !group->isEmpty()) { for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) { @@ -1578,11 +1578,9 @@ void LLPipeline::addPool(LLDrawPool *new_poolp) void LLPipeline::allocDrawable(LLViewerObject *vobj) { - LLDrawable *drawable = new LLDrawable(); + LLDrawable *drawable = new LLDrawable(vobj); vobj->mDrawable = drawable; - drawable->mVObjp = vobj; - //encompass completely sheared objects by taking //the most extreme point possible (<1,1,0.5>) drawable->setRadius(LLVector3(1,1,0.5f).scaleVec(vobj->getScale()).length()); @@ -2006,7 +2004,7 @@ void check_references(LLSpatialGroup* group, LLDrawable* drawable) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - if (drawable == *i) + if (drawable == (LLDrawable*)(*i)->getDrawable()) { llerrs << "LLDrawable deleted while actively reference by LLPipeline." << llendl; } @@ -2028,8 +2026,11 @@ void check_references(LLSpatialGroup* group, LLFace* face) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawable = *i; - check_references(drawable, face); + LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable(); + if(drawable) + { + check_references(drawable, face); + } } } @@ -2351,6 +2352,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl { part->cull(camera); } + else if(part->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) + { + part->cull(camera); + } } } } @@ -2420,15 +2425,20 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) return; } + const LLVector4a* bounds = group->getBounds(); if (sMinRenderSize > 0.f && - llmax(llmax(group->mBounds[1][0], group->mBounds[1][1]), group->mBounds[1][2]) < sMinRenderSize) + llmax(llmax(bounds[1][0], bounds[1][1]), bounds[1][2]) < sMinRenderSize) { return; } assertInitialized(); - if (!group->mSpatialPartition->mRenderByGroup) + if(group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_VO_CACHE) + { + group->mSpatialPartition->mRegionp->addVisibleGroup(group); + } + else if (!group->mSpatialPartition->mRenderByGroup) { //render by drawable sCull->pushDrawableGroup(group); } @@ -2980,14 +2990,14 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) if (priority) { - if (!group->isState(LLSpatialGroup::IN_BUILD_Q1)) + if (!group->hasState(LLSpatialGroup::IN_BUILD_Q1)) { llassert_always(!mGroupQ1Locked); mGroupQ1.push_back(group); group->setState(LLSpatialGroup::IN_BUILD_Q1); - if (group->isState(LLSpatialGroup::IN_BUILD_Q2)) + if (group->hasState(LLSpatialGroup::IN_BUILD_Q2)) { LLSpatialGroup::sg_vector_t::iterator iter = std::find(mGroupQ2.begin(), mGroupQ2.end(), group); if (iter != mGroupQ2.end()) @@ -2998,7 +3008,7 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) } } } - else if (!group->isState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1)) + else if (!group->hasState(LLSpatialGroup::IN_BUILD_Q2 | LLSpatialGroup::IN_BUILD_Q1)) { llassert_always(!mGroupQ2Locked); mGroupQ2.push_back(group); @@ -3073,7 +3083,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) group->setVisible(); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - markVisible(*i, camera); + markVisible((LLDrawable*)(*i)->getDrawable(), camera); } if (!sDelayVBUpdate) @@ -3160,8 +3170,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { - LLDrawable* drawablep = *i; - stateSort(drawablep, camera); + stateSort((LLDrawable*)(*i)->getDrawable(), camera); } if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) @@ -3280,7 +3289,10 @@ void forAllDrawables(LLCullResult::sg_iterator begin, { for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j) { - func(*j); + if((*j)->hasDrawable()) + { + func((LLDrawable*)(*j)->getDrawable()); + } } } } @@ -3508,7 +3520,7 @@ void LLPipeline::postSort(LLCamera& camera) continue; } - if (group->isState(LLSpatialGroup::NEW_DRAWINFO) && group->isState(LLSpatialGroup::GEOM_DIRTY)) + if (group->hasState(LLSpatialGroup::NEW_DRAWINFO) && group->hasState(LLSpatialGroup::GEOM_DIRTY)) { //no way this group is going to be drawable without a rebuild group->rebuildGeom(); } -- cgit v1.3 From a52d203a4f1d2988e8ffba16258f3f132f22f56d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Oct 2012 20:00:07 -0700 Subject: SH-3405 WIP convert existing stats to lltrace system started conversion of llviewerassetstats removed old, dead LLViewerStats code made units tracing require units declaration clean up of units handling --- indra/llcommon/lltrace.h | 44 +++---- indra/llcommon/lltracerecording.h | 95 ++++++++++++--- indra/llcommon/llunit.h | 34 ++++-- indra/llui/llstatbar.cpp | 3 +- indra/llui/llstatbar.h | 2 +- indra/llui/llstatgraph.h | 10 +- indra/newview/llagent.cpp | 2 - indra/newview/llappviewer.cpp | 5 +- indra/newview/llappviewer.h | 3 +- indra/newview/llcompilequeue.cpp | 2 - indra/newview/llfloaterjoystick.cpp | 2 +- indra/newview/llfloaterregioninfo.cpp | 2 - indra/newview/llfloatersnapshot.cpp | 1 - indra/newview/llgesturemgr.cpp | 2 - indra/newview/lllandmarklist.cpp | 1 - indra/newview/llnearbychatbar.cpp | 1 - indra/newview/llpanelface.cpp | 1 - indra/newview/llpanelpermissions.cpp | 1 - indra/newview/llpreviewgesture.cpp | 2 - indra/newview/llpreviewnotecard.cpp | 2 - indra/newview/llpreviewscript.cpp | 6 - indra/newview/llselectmgr.cpp | 1 - indra/newview/llsidepaneltaskinfo.cpp | 1 - indra/newview/llspatialpartition.cpp | 4 +- indra/newview/llstartup.cpp | 1 - indra/newview/lltexlayer.cpp | 1 - indra/newview/lltextureview.cpp | 6 +- indra/newview/lltooldraganddrop.cpp | 3 - indra/newview/lltoolplacer.cpp | 1 - indra/newview/llviewerassetstats.cpp | 27 +++++ indra/newview/llviewerassetstats.h | 7 ++ indra/newview/llviewerdisplay.cpp | 4 +- indra/newview/llviewerjoystick.cpp | 6 +- indra/newview/llviewermenufile.cpp | 9 -- indra/newview/llviewermessage.cpp | 155 ++---------------------- indra/newview/llviewerobject.cpp | 1 - indra/newview/llviewerobjectlist.cpp | 4 - indra/newview/llviewerstats.cpp | 95 +++++---------- indra/newview/llviewerstats.h | 8 +- indra/newview/llviewertexturelist.cpp | 6 +- indra/newview/llviewerwindow.cpp | 12 +- indra/newview/llvoavatar.cpp | 4 +- indra/newview/llvoavatarself.cpp | 13 +- indra/newview/llwearablelist.cpp | 1 - indra/newview/pipeline.cpp | 16 +-- indra/newview/tests/llviewerassetstats_test.cpp | 13 +- 46 files changed, 255 insertions(+), 365 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 1c6726605a..2a479b31d7 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -192,10 +192,12 @@ namespace LLTrace template class LL_COMMON_API TraceType + : public LLInstanceTracker, std::string> { public: TraceType(const char* name, const char* description = NULL) - : mName(name), + : LLInstanceTracker(name), + mName(name), mDescription(description ? description : "") { mAccumulatorIndex = AccumulatorBuffer::getDefaultBuffer().reserveSlot(); @@ -355,18 +357,17 @@ namespace LLTrace U32 mNumSamples; }; + typedef TraceType > measurement_common_t; + template class LL_COMMON_API Measurement - : public TraceType >, - public LLInstanceTracker, std::string> + : public TraceType > { public: typedef T storage_t; - typedef T base_unit_t; Measurement(const char* name, const char* description = NULL) - : TraceType(name), - LLInstanceTracker(name) + : TraceType(name, description) {} void sample(T value) @@ -376,37 +377,37 @@ namespace LLTrace }; template - class LL_COMMON_API Measurement - : public Measurement + class LL_COMMON_API Measurement + : public TraceType > { public: typedef typename T::storage_t storage_t; - typedef typename T::base_unit_t base_unit_t; typedef Measurement base_measurement_t; Measurement(const char* name, const char* description = NULL) - : Measurement(name, description) + : TraceType(name, description) {} template void sample(UNIT_T value) { - base_measurement_t::sample(((T)value).value()); + T converted_value; + converted_value.assignFrom(value); + getPrimaryAccumulator().sample(converted_value.value()); } }; + typedef TraceType > count_common_t; + template class LL_COMMON_API Count - : public TraceType >, - public LLInstanceTracker, std::string> + : public TraceType > { public: typedef T storage_t; - typedef T base_unit_t; Count(const char* name, const char* description = NULL) - : TraceType(name), - LLInstanceTracker(name) + : TraceType(name) {} void add(T value) @@ -416,22 +417,23 @@ namespace LLTrace }; template - class LL_COMMON_API Count - : public Count + class LL_COMMON_API Count + : public TraceType > { public: typedef typename T::storage_t storage_t; - typedef typename T::base_unit_t base_unit_t; typedef Count base_count_t; Count(const char* name, const char* description = NULL) - : Count(name) + : TraceType(name) {} template void add(UNIT_T value) { - base_count_t::add(((T)value).value()); + T converted_value; + converted_value.assignFrom(value); + getPrimaryAccumulator().add(converted_value.value()); } }; diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 5e7b0752c6..25f4f5c721 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -112,64 +112,121 @@ namespace LLTrace void update(); // Count accessors + template + T getSum(const TraceType >& stat) const + { + return (T)stat.getAccumulator(mCounts).getSum(); + } + template - typename Count::base_unit_t getSum(const Count& stat) const + T getSum(const Count& stat) const + { + return (T)stat.getAccumulator(mCounts).getSum(); + } + + template + T getPerSec(const TraceType >& stat) const { - return (typename Count::base_unit_t)stat.getAccumulator(mCounts).getSum(); + return (T)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; } template - typename Count::base_unit_t getPerSec(const Count& stat) const + T getPerSec(const Count& stat) const { - return (typename Count::base_unit_t)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; + return (T)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; } // Measurement accessors + template + T getSum(const TraceType >& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getSum(); + + } + template - typename Measurement::base_unit_t getSum(const Measurement& stat) const + T getSum(const Measurement& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getSum(); + return (T)stat.getAccumulator(mMeasurements).getSum(); + + } + template + T getPerSec(const TraceType >& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; } template - typename Measurement::base_unit_t getPerSec(const Measurement& stat) const + T getPerSec(const Measurement& stat) const { return (typename Count::base_unit_t)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; } - template - typename Measurement::base_unit_t getMin(const Measurement& stat) const + template + T getMin(const TraceType >& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getMin(); + return (T)stat.getAccumulator(mMeasurements).getMin(); } template - typename Measurement::base_unit_t getMax(const Measurement& stat) const + T getMin(const Measurement& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getMax(); + return (T)stat.getAccumulator(mMeasurements).getMin(); + } + + + template + T getMax(const TraceType >& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getMax(); } template - typename Measurement::base_unit_t getMean(Measurement& stat) const + T getMax(const Measurement& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getMax(); + } + + template + T getMean(const TraceType >& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getMean(); + return (T)stat.getAccumulator(mMeasurements).getMean(); } template - typename Measurement::base_unit_t getStandardDeviation(const Measurement& stat) const + T getMean(Measurement& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getMean(); + } + + template + T getStandardDeviation(const TraceType >& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getStandardDeviation(); + return (T)stat.getAccumulator(mMeasurements).getStandardDeviation(); } template - typename Measurement::base_unit_t getLastValue(const Measurement& stat) const + T getStandardDeviation(const Measurement& stat) const { - return (typename Measurement::base_unit_t)stat.getAccumulator(mMeasurements).getLastValue(); + return (T)stat.getAccumulator(mMeasurements).getStandardDeviation(); + } + + template + T getLastValue(const TraceType >& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getLastValue(); } template - U32 getSampleCount(const Measurement& stat) const + T getLastValue(const Measurement& stat) const + { + return (T)stat.getAccumulator(mMeasurements).getLastValue(); + } + + + template + U32 getSampleCount(const TraceType >& stat) const { return stat.getAccumulator(mMeasurements).getSampleCount(); } diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index d980989c91..e778383959 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -36,7 +36,7 @@ struct LLUnitType : public BASE_UNIT typedef DERIVED_UNIT unit_t; typedef typename STORAGE_TYPE storage_t; - typedef void is_unit_t; + typedef void is_unit_tag_t; LLUnitType() {} @@ -57,7 +57,7 @@ struct LLUnitType : public BASE_UNIT } template - storage_t value() const + storage_t as() const { return CONVERTED_TYPE(*this).value(); } @@ -80,8 +80,7 @@ struct LLUnitType { typedef T unit_t; typedef STORAGE_TYPE storage_t; - typedef void is_unit_t; - typedef T base_unit_t; + typedef void is_unit_tag_t; LLUnitType() : mBaseValue() @@ -105,6 +104,13 @@ struct LLUnitType storage_t value() const { return mBaseValue; } + template + storage_t as() const + { + return CONVERTED_TYPE(*this).value(); + } + + static storage_t convertToBase(storage_t derived_value) { return (storage_t)derived_value; @@ -354,10 +360,16 @@ bool operator != (LLUnitType first, LLUni template \ unit_name(LLUnitType, SOURCE_TYPE> source) \ { \ - setBaseValue((storage_t)source.unit_name::unit_t::value()); \ + assignFrom(source); \ } \ \ - }; + template \ + void assignFrom(LLUnitType, SOURCE_TYPE> source) \ + { \ + setBaseValue((storage_t)source.unit_name::unit_t::value()); \ + } \ + \ + }; \ #define LL_DECLARE_DERIVED_UNIT(base_unit, derived_unit, conversion_factor) \ template \ @@ -372,12 +384,18 @@ bool operator != (LLUnitType first, LLUni template \ derived_unit(LLUnitType, SOURCE_TYPE> source) \ { \ - setBaseValue((storage_t)source.base_unit::unit_t::value()); \ + assignFrom(source); \ + } \ + \ + template \ + void assignFrom(LLUnitType, SOURCE_TYPE> source) \ + { \ + setBaseValue((storage_t)source.base_unit::unit_t::value()); \ } \ \ static F32 conversionToBaseFactor() { return (F32)(conversion_factor); } \ \ - }; + }; \ namespace LLUnit { diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index c60e5431ae..535c6f96e3 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -56,8 +56,7 @@ LLStatBar::LLStatBar(const Params& p) mDisplayBar(p.show_bar), mDisplayHistory(p.show_history), mDisplayMean(p.show_mean) -{ -} +{} BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) { diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index e4b0c61c42..d510f0e3fe 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -99,7 +99,7 @@ private: LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; - LLTrace::Count<>* mNewStatp; + LLTrace::count_common_t* mNewStatp; LLFrameTimer mUpdateTimer; LLUIString mLabel; diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index 5bbd9e9d24..b20966d608 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -59,9 +59,9 @@ public: struct StatParams : public LLInitParam::ChoiceBlock { - Alternative legacy_stat; - Alternative* > count_stat; - Alternative* > measurement_stat; + Alternative legacy_stat; + Alternative count_stat; + Alternative measurement_stat; }; struct Params : public LLInitParam::Block @@ -106,8 +106,8 @@ public: /*virtual*/ void setValue(const LLSD& value); private: - LLStat* mStatp; - LLTrace::Count<>* mNewStatp; + LLStat* mStatp; + LLTrace::count_common_t* mNewStatp; BOOL mPerSec; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a41efbe0b2..ac33f09718 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -754,7 +754,6 @@ void LLAgent::setFlying(BOOL fly) if( !was_flying ) { LLStatViewer::FLY.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_FLY_COUNT); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3811,7 +3810,6 @@ bool LLAgent::teleportCore(bool is_local) // local logic LLStatViewer::TELEPORT.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6e0b298b2a..4ab0e3336a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -277,7 +277,7 @@ LLPumpIO* gServicePump = NULL; U64 gFrameTime = 0; F32 gFrameTimeSeconds = 0.f; -F32 gFrameIntervalSeconds = 0.f; +LLUnit::Seconds 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 @@ -1395,7 +1395,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); @@ -4811,7 +4811,6 @@ void LLAppViewer::idleNetwork() } } LLStatViewer::NUM_NEW_OBJECTS.sample(gObjectList.mNumNewObjects); - //LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects); // Retransmit unacknowledged packets. gXferManager->retransmitUnackedPackets(); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index cdf4426469..d9d888c626 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -31,6 +31,7 @@ #include "llcontrol.h" #include "llsys.h" // for LLOSInfo #include "lltimer.h" +#include "llunit.h" class LLCommandLineParser; class LLFrameTimer; @@ -321,7 +322,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::Seconds 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/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 6739910c38..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/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index d0c22d25f2..f7b2670b8e 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -61,7 +61,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - mAxisStats[i]->addValue(value * gFrameIntervalSeconds); + mAxisStats[i]->addValue(value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 8234841966..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 4a58e0186c..0d90037e7b 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -993,7 +993,6 @@ void LLSnapshotLivePreview::saveTexture() } LLStatViewer::SNAPSHOT.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT ); mDataSize = 0; } diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 63ef8c3d21..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/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 1666425cbe..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/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 0aced5c575..23cbfae044 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -639,7 +639,6 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 gAgent.sendReliableMessage(); LLStatViewer::CHAT_COUNT.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); } class LLChatCommandHandler : public LLCommandHandler diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 52ed24f06d..39ded21183 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1050,7 +1050,6 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item) void LLPanelFace::onCommitTexture( const LLSD& data ) { LLStatViewer::EDIT_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); sendTexture(); } 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/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 4082d272f2..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 b93b97f1e0..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 059d5d4061..7607df5a55 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -943,7 +943,6 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata) void LLScriptEdCore::doSave( BOOL close_after_save ) { LLStatViewer::LSL_SAVES.add(1); - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); if( mSaveCallback ) { @@ -1148,7 +1147,6 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { LLStatViewer::LSL_SAVES.add(1); - //LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); LLScriptEdCore* self = (LLScriptEdCore*) userdata; @@ -1671,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) { @@ -1903,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 fd03d7c0be..36ce7bb60e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1551,7 +1551,6 @@ void LLObjectSelection::applyNoCopyTextureToTEs(LLViewerInventoryItem* item) // apply texture for the selected faces LLStatViewer::EDIT_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); object->setTEImage(te, image); dialog_refresh_all(); 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/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5083478392..c4c9b0bd4c 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1580,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 @@ -2574,7 +2574,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); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cb3c90ea2a..bf47bd44c3 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2072,7 +2072,6 @@ bool idle_startup() { LLNotificationsUtil::add("ClothingLoading"); LLStatViewer::LOADING_WEARABLES_LONG_DELAY.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); LLStartUp::setStartupState( STATE_CLEANUP ); return TRUE; } diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index e354a5c59d..909745c5b6 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -461,7 +461,6 @@ void LLTexLayerSetBuffer::doUpload() { llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl; LLStatViewer::TEX_BAKES.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); // 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/lltextureview.cpp b/indra/newview/lltextureview.cpp index a88233e120..d734620f10 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -512,8 +512,8 @@ void LLGLTexMemBar::draw() 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); + LLUnit::Megabytes total_texture_downloaded = gTotalTextureData; + LLUnit::Megabytes total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -537,7 +537,7 @@ void LLGLTexMemBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); text = llformat("Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d", - total_texture_downloaded, total_object_downloaded, total_http_requests); + total_texture_downloaded.value(), total_object_downloaded.value(), total_http_requests); //, cache_entries, cache_max_entries LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 791da59a1a..652847aac9 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1063,7 +1063,6 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id); LLStatViewer::EDIT_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); S32 num_faces = hit_obj->getNumTEs(); for( S32 face = 0; face < num_faces; face++ ) { @@ -1132,7 +1131,6 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, // update viewer side image in anticipation of update from simulator LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id); LLStatViewer::EDIT_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); hit_obj->setTEImage(hit_face, image); dialog_refresh_all(); @@ -1357,7 +1355,6 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLStatViewer::OBJECT_REZ.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT); } void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index cf5a6e3762..329249eee8 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -434,7 +434,6 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLStatViewer::OBJECT_CREATE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CREATE_COUNT); return TRUE; } diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index e556743cbf..44e4c54142 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -84,6 +84,30 @@ // ------------------------------------------------------ LLViewerAssetStats * gViewerAssetStatsMain(0); LLViewerAssetStats * gViewerAssetStatsThread1(0); +LLTrace::Count<> LLViewerAssetStats::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")}; +LLTrace::Count<> LLViewerAssetStats::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")}; +LLTrace::Measurement LLViewerAssetStats::sResponse[EVACCount] = {LLTrace::Measurement("assetresponsetimestemptexturehttp", "Time spent responding to temporary texture asset http requests"), + LLTrace::Measurement("assetresponsetimestemptextureudp", "Time spent responding to temporary texture asset udp requests"), + LLTrace::Measurement("assetresponsetimesnontemptexturehttp", "Time spent responding to texture asset http requests"), + LLTrace::Measurement("assetresponsetimesnontemptextureudp", "Time spent responding to texture asset udp requests"), + LLTrace::Measurement("assetresponsetimeswearableudp", "Time spent responding to wearable asset requests"), + LLTrace::Measurement("assetresponsetimessoundudp", "Time spent responding to sound asset requests"), + LLTrace::Measurement("assetresponsetimesgestureudp", "Time spent responding to gesture asset requests"), + LLTrace::Measurement("assetresponsetimesother", "Time spent responding to other asset requests")}; // ------------------------------------------------------ @@ -234,6 +258,7 @@ LLViewerAssetStats::recordGetEnqueued(LLViewerAssetType::EType at, bool with_htt const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); ++(mCurRegionStats->mRequests[int(eac)].mEnqueued); + sEnqueued[int(eac)].add(1); } void @@ -242,6 +267,7 @@ LLViewerAssetStats::recordGetDequeued(LLViewerAssetType::EType at, bool with_htt const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); ++(mCurRegionStats->mRequests[int(eac)].mDequeued); + sDequeued[int(eac)].add(1); } void @@ -250,6 +276,7 @@ LLViewerAssetStats::recordGetServiced(LLViewerAssetType::EType at, bool with_htt const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); mCurRegionStats->mRequests[int(eac)].mResponse.record(duration); + sResponse[int(eac)].sample(duration); } void diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 8319752230..a750db2cc2 100755 --- 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 @@ -240,6 +241,7 @@ public: protected: typedef std::map > PerRegionContainer; + typedef std::map PerRegionRecordingContainer; // Region of the currently-active region. Always valid but may // be zero after construction or when explicitly set. Unchanged @@ -251,8 +253,13 @@ protected: // Always points to a collection contained in mRegionStats. LLPointer mCurRegionStats; + static LLTrace::Count<> sEnqueued[EVACCount]; + static LLTrace::Count<> sDequeued[EVACCount]; + static LLTrace::Measurement sResponse[EVACCount]; + // Metrics data for all regions during one collection cycle PerRegionContainer mRegionStats; + PerRegionRecordingContainer mRegionRecordings; // Time of last reset duration_t mResetTimestamp; diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index ffeea2f4df..169b45c14e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -607,7 +607,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLFastTimer t(FTM_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); @@ -760,7 +760,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); } 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/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7ce8cdcfd8..50ca8db267 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -1097,19 +1097,16 @@ void upload_new_resource( if( LLAssetType::AT_SOUND == asset_type ) { LLStatViewer::UPLOAD_SOUND.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT ); } else if( LLAssetType::AT_TEXTURE == asset_type ) { LLStatViewer::UPLOAD_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); } else if( LLAssetType::AT_ANIMATION == asset_type) { LLStatViewer::ANIMATION_UPLOADS.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT ); } if(LLInventoryType::IT_NONE == inv_type) @@ -1235,20 +1232,14 @@ void increase_new_upload_stats(LLAssetType::EType asset_type) if ( LLAssetType::AT_SOUND == asset_type ) { LLStatViewer::UPLOAD_SOUND.add(1); - //LLViewerStats::getInstance()->incStat( - // LLViewerStats::ST_UPLOAD_SOUND_COUNT ); } else if ( LLAssetType::AT_TEXTURE == asset_type ) { LLStatViewer::UPLOAD_TEXTURE.add(1); - //LLViewerStats::getInstance()->incStat( - // LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); } else if ( LLAssetType::AT_ANIMATION == asset_type ) { LLStatViewer::ANIMATION_UPLOADS.add(1); - //LLViewerStats::getInstance()->incStat( - // LLViewerStats::ST_UPLOAD_ANIM_COUNT ); } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b3e1c9bdbe..82caa05983 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4416,18 +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::Bits gObjectData; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectBits += mesgsys->getReceiveCompressedSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectBits += mesgsys->getReceiveSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4439,11 +4439,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectBits += mesgsys->getReceiveCompressedSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectBits += mesgsys->getReceiveSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4455,11 +4455,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectBits += mesgsys->getReceiveCompressedSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectBits += mesgsys->getReceiveSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4471,11 +4471,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ { if (mesgsys->getReceiveCompressedSize()) { - gObjectBits += mesgsys->getReceiveCompressedSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectBits += mesgsys->getReceiveSize() * 8; + gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); } gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); @@ -4763,140 +4763,6 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) { llwarns << "Unknown sim stat identifier: " << stat_id << llendl; } - //switch (stat_id) - //{ - //case LL_SIM_STAT_TIME_DILATION: - // LLStatViewer::SIM_TIME_DILATION.sample(stat_value); - // //LLViewerStats::getInstance()->mSimTimeDilation.addValue(stat_value); - // break; - //case LL_SIM_STAT_FPS: - // LLStatViewer::SIM_FPS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimFPS.addValue(stat_value); - // break; - //case LL_SIM_STAT_PHYSFPS: - // LLStatViewer::SIM_PHYSICS_FPS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimPhysicsFPS.addValue(stat_value); - // break; - //case LL_SIM_STAT_AGENTUPS: - // LLStatViewer::SIM_AGENT_UPS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimAgentUPS.addValue(stat_value); - // break; - //case LL_SIM_STAT_FRAMEMS: - // LLStatViewer::SIM_FRAME_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimFrameMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_NETMS: - // LLStatViewer::SIM_NET_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimNetMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_SIMOTHERMS: - // LLStatViewer::SIM_PHYSICS_OTHER_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimSimOtherMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_SIMPHYSICSMS: - // LLStatViewer::SIM_PHYSICS_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimSimPhysicsMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_AGENTMS: - // LLStatViewer::SIM_AGENTS_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimAgentMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_IMAGESMS: - // LLStatViewer::SIM_IMAGES_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimImagesMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_SCRIPTMS: - // LLStatViewer::SIM_SCRIPTS_TIME.sample(stat_value); - // //LLViewerStats::getInstance()->mSimScriptMsec.addValue(stat_value); - // break; - //case LL_SIM_STAT_NUMTASKS: - // LLStatViewer::SIM_OBJECTS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimObjects.addValue(stat_value); - // break; - //case LL_SIM_STAT_NUMTASKSACTIVE: - // LLStatViewer::SIM_ACTIVE_OBJECTS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimActiveObjects.addValue(stat_value); - // break; - //case LL_SIM_STAT_NUMAGENTMAIN: - // LLStatViewer::SIM_MAIN_AGENTS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimMainAgents.addValue(stat_value); - // break; - //case LL_SIM_STAT_NUMAGENTCHILD: - // LLStatViewer::SIM_CHILD_AGENTS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value); - // break; - //case LL_SIM_STAT_NUMSCRIPTSACTIVE: - // LLStatViewer::SIM_ACTIVE_SCRIPTS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value); - // break; - //case LL_SIM_STAT_SCRIPT_EPS: - // LLStatViewer::SIM_SCRIPT_EPS.sample(stat_value); - // //LLViewerStats::getInstance()->mSimScriptEPS.addValue(stat_value); - // break; - //case LL_SIM_STAT_INPPS: - // LLStatViewer::SIM_IN_PACKETS_PER_SEC.sample(stat_value); - // //LLViewerStats::getInstance()->mSimInPPS.addValue(stat_value); - // break; - //case LL_SIM_STAT_OUTPPS: - // LLStatViewer::SIM_OUT_PACKETS_PER_SEC.sample(stat_value); - // //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; - //} } /* @@ -5968,7 +5834,6 @@ void process_alert_core(const std::string& message, BOOL modal) if ( message == "You died and have been teleported to your home location") { LLStatViewer::KILLED.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT); } else if( message == "Home position set." ) { @@ -7395,8 +7260,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 747dfd3250..ca404858cf 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2034,7 +2034,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) ) { LLStatViewer::AGENT_POSITION_SNAP.sample(diff.length()); - //LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() ); } } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 2f171f89d7..14a2ac3384 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1033,10 +1033,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) LLStatViewer::NUM_ACTIVE_OBJECTS.sample(idle_count); LLStatViewer::NUM_SIZE_CULLED.sample(mNumSizeCulled); LLStatViewer::NUM_VIS_CULLED.sample(mNumVisCulled); - //LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); - //LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count); - //LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); - //LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index ccc0c9ba59..963d2ebb81 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -206,72 +206,53 @@ void LLViewerStats::resetStats() void LLViewerStats::updateFrameStats(const F64 time_diff) { + LLTrace::Seconds time_diff_seconds(time_diff); if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) { - LLStatViewer::LOSS_5_PERCENT_TIME.add(time_diff); - //incStat(ST_LOSS_05_SECONDS, time_diff); + LLStatViewer::LOSS_5_PERCENT_TIME.add(time_diff_seconds); } F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS); if (0.f < sim_fps && sim_fps < 20.f) { - LLStatViewer::SIM_20_FPS_TIME.add(time_diff); - //incStat(ST_SIM_FPS_20_SECONDS, time_diff); + LLStatViewer::SIM_20_FPS_TIME.add(time_diff_seconds); } F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS); if (0.f < sim_physics_fps && sim_physics_fps < 20.f) { - LLStatViewer::SIM_PHYSICS_20_FPS_TIME.add(time_diff); - //incStat(ST_PHYS_FPS_20_SECONDS, time_diff); + LLStatViewer::SIM_PHYSICS_20_FPS_TIME.add(time_diff_seconds); } if (time_diff >= 0.5) { - LLStatViewer::FPS_2_TIME.add(time_diff); - //incStat(ST_FPS_2_SECONDS, time_diff); + LLStatViewer::FPS_2_TIME.add(time_diff_seconds); } if (time_diff >= 0.125) { - LLStatViewer::FPS_8_TIME.add(time_diff); - //incStat(ST_FPS_8_SECONDS, time_diff); + LLStatViewer::FPS_8_TIME.add(time_diff_seconds); } if (time_diff >= 0.1) { - LLStatViewer::FPS_10_TIME.add(time_diff); - //incStat(ST_FPS_10_SECONDS, time_diff); + LLStatViewer::FPS_10_TIME.add(time_diff_seconds); } if (gFrameCount && mLastTimeDiff > 0.0) { // new "stutter" meter LLStatViewer::FRAMETIME_DOUBLED.add(time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); - //setStat(ST_FPS_DROP_50_RATIO, - // (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + - // (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount); - // old stats that were never really used - LLStatViewer::FRAMETIME_JITTER.sample(mLastTimeDiff - time_diff); - //setStat(ST_FRAMETIME_JITTER, - // (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) + - // fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount); + LLStatViewer::FRAMETIME_JITTER.sample(mLastTimeDiff - time_diff); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - LLStatViewer::FRAMETIME_SLEW.sample(average_frametime - time_diff); - //setStat(ST_FRAMETIME_SLEW, - // (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) + - // fabs(average_frametime - time_diff) / average_frametime) / gFrameCount); + LLStatViewer::FRAMETIME_SLEW.sample(average_frametime - time_diff); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; LLStatViewer::DELTA_BANDWIDTH.sample(delta_bandwidth); - //setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); - LLStatViewer::MAX_BANDWIDTH.sample(max_bandwidth); - //setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); - } mLastTimeDiff = time_diff; @@ -299,10 +280,13 @@ 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; +LLUnit::Bytes gTotalWorldData = 0, + gTotalObjectData = 0, + gTotalTextureData = 0; +U32 gSimPingCount = 0; +LLUnit::Bits gObjectData = 0; F32 gAvgSimPing = 0.f; -U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; +LLUnit::Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; extern U32 gVisCompared; extern U32 gVisTested; @@ -311,8 +295,8 @@ LLFrameTimer gTextureTimer; 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) @@ -320,68 +304,48 @@ void update_statistics() if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { LLStatViewer::MOUSELOOK_TIME.add(gFrameIntervalSeconds); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_MOUSELOOK_SECONDS, gFrameIntervalSeconds); } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { LLStatViewer::AVATAR_EDIT_TIME.add(gFrameIntervalSeconds); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds); } else if (LLFloaterReg::instanceVisible("build")) { LLStatViewer::TOOLBOX_TIME.add(gFrameIntervalSeconds); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds); } } LLStatViewer::ENABLE_VBO.sample((F64)gSavedSettings.getBOOL("RenderVBOEnable")); - //stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); LLStatViewer::LIGHTING_DETAIL.sample((F64)gPipeline.getLightingDetail()); - //stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); LLStatViewer::DRAW_DISTANCE.sample((F64)gSavedSettings.getF32("RenderFarClip")); - //stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); LLStatViewer::CHAT_BUBBLES.sample((F64)gSavedSettings.getBOOL("UseChatBubbles")); - //stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); - LLStatViewer::FRAME_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Frame")); - //stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); + LLStatViewer::FRAME_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Frame")); F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle"); F64 network_secs = gDebugView->mFastTimerView->getTime("Network"); - LLStatViewer::UPDATE_STACKTIME.sample(idle_secs - network_secs); - //stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); - LLStatViewer::NETWORK_STACKTIME.sample(network_secs); - //stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); - LLStatViewer::IMAGE_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Update Images")); - //stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); - LLStatViewer::REBUILD_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Sort Draw State")); - //stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); - LLStatViewer::RENDER_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Geometry")); - //stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); + LLStatViewer::UPDATE_STACKTIME.sample(idle_secs - network_secs); + LLStatViewer::NETWORK_STACKTIME.sample(network_secs); + LLStatViewer::IMAGE_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Update Images")); + LLStatViewer::REBUILD_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Sort Draw State")); + LLStatViewer::RENDER_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Geometry")); LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); - //stats.mSimPingStat.addValue(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { LLStatViewer::SIM_PING.sample(10000); - //stats.mSimPingStat.addValue(10000); } - //stats.mFPSStat.addValue(1); LLStatViewer::FPS.add(1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); LLStatViewer::LAYERS_KBIT.add(layer_bits); - //stats.mLayersKBitStat.addValue(layer_bits/1024.f); - LLStatViewer::OBJECT_KBIT.add(gObjectBits); - //stats.mObjectKBitStat.addValue(gObjectBits/1024.f); - //stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); + LLStatViewer::OBJECT_KBIT.add(gObjectData); LLStatViewer::PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending()); LLStatViewer::ASSET_KBIT.add(gTransferManager.getTransferBitsIn(LLTCT_ASSET)); - //stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) @@ -403,14 +367,13 @@ void update_statistics() avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; } LLStatViewer::VISIBLE_AVATARS.sample((F64)avg_visible_avatars); - //stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (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 @@ -419,7 +382,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - gTotalTextureBytes = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); + gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); texture_stats_timer.reset(); } } @@ -559,9 +522,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"]; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index b182a40403..06f65b2cdd 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -57,7 +57,7 @@ struct SimMeasurement : public LLTrace::Measurement, public SimMeasurementSam /*virtual*/ void sample(F64 value) { - LLTrace::Measurement::sample(value); + LLTrace::Measurement::sample(T(value)); } }; @@ -318,7 +318,7 @@ void update_statistics(); void send_stats(); extern LLFrameTimer gTextureTimer; -extern U32 gTotalTextureBytes; -extern U32 gTotalObjectBytes; -extern U32 gTotalTextureBytesPerBoostLevel[] ; +extern LLUnit::Bytes gTotalTextureData; +extern LLUnit::Bytes gTotalObjectData; +extern LLUnit::Bytes gTotalTextureBytesPerBoostLevel[] ; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d355432e8a..b9d5751412 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -709,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()) @@ -943,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 diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2062f07650..06daf15c08 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -731,7 +731,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::Megabytes(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } @@ -1405,8 +1405,8 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S LLTrace::Recording& recording = LLViewerStats::instance().getRecording(); temp_str = llformat( "FPS %3.1f Phy FPS %2.1f Time Dil %1.3f", /* Flawfinder: ignore */ recording.getPerSec(LLStatViewer::FPS), //mFPSStat.getMeanPerSec(), - recording.getMean(LLStatViewer::SIM_PHYSICS_FPS), //LLViewerStats::getInstance()->mSimPhysicsFPS.getPrev(0), - recording.getMean(LLStatViewer::SIM_TIME_DILATION)); //LLViewerStats::getInstance()->mSimTimeDilation.getPrev(0)); + 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); @@ -2185,9 +2185,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) } LLStatViewer::WINDOW_WIDTH.sample((F64)width); - //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); LLStatViewer::WINDOW_HEIGHT.sample((F64)height); - //LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height); LLLayoutStack::updateClass(); } @@ -3237,8 +3235,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); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d366455a62..97c1b07ebc 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7813,14 +7813,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 9f0921ff59..7c20e8eae7 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -910,18 +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; + LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); LLStatViewer::REGION_CROSSING_TIME.sample(delta); - //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); // Diagnostics - llinfos << "Region crossing took " << (F32)(delta * 1000.0) << " ms " << llendl; + llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; } if (regionp) { @@ -2589,7 +2582,6 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; LLStatViewer::TEX_REBAKES.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } } } @@ -2635,7 +2627,6 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) invalidateComposite(layer_set, TRUE); LLStatViewer::TEX_REBAKES.add(1); - //LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else { diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 20033d6fe4..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/pipeline.cpp b/indra/newview/pipeline.cpp index 4582de805f..75af605ad7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4892,7 +4892,7 @@ void LLPipeline::renderDebug() { DebugBlip& blip = *iter; - blip.mAge += gFrameIntervalSeconds; + blip.mAge += gFrameIntervalSeconds.value(); if (blip.mAge > 2.f) { mDebugBlips.erase(iter++); @@ -4902,7 +4902,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); @@ -5713,7 +5713,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) { if (farthest_light->fade >= 0.f) { - farthest_light->fade = -gFrameIntervalSeconds; + farthest_light->fade = -(gFrameIntervalSeconds.value()); } } else @@ -5809,12 +5809,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; @@ -7129,7 +7129,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; @@ -9121,7 +9121,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); @@ -9756,7 +9756,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - F32 fade_amt = gFrameIntervalSeconds * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); + F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); //update shadow targets for (U32 i = 0; i < 2; i++) diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index f8923b9868..4a190fbe23 100755 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -220,7 +220,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_t; typedef tst_viewerassetstats_index_t::object tst_viewerassetstats_index_object_t; tut::tst_viewerassetstats_index_t tut_tst_viewerassetstats_index("tst_viewerassetstats_test"); -- cgit v1.3 From 819adb5eb4d7f982121f3dbd82750e05d26864d9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Nov 2012 00:26:44 -0700 Subject: SH-3405 FIX convert existing stats to lltrace system final removal of remaining LLStat code --- indra/llcommon/CMakeLists.txt | 2 - indra/llcommon/llinstancetracker.h | 10 +- indra/llcommon/llmetricperformancetester.cpp | 1 - indra/llcommon/llpredicate.h | 4 + indra/llcommon/llstat.cpp | 352 ---------------------- indra/llcommon/llstat.h | 103 ------- indra/llcommon/lltrace.h | 90 ++++-- indra/llcommon/lltracerecording.cpp | 119 +++++++- indra/llcommon/lltracerecording.h | 216 +++++++------ indra/llcommon/lltracethreadrecorder.cpp | 4 + indra/llui/llstatbar.cpp | 138 ++++++--- indra/llui/llstatbar.h | 11 +- indra/llui/llstatgraph.cpp | 20 +- indra/llui/llstatgraph.h | 13 +- indra/llvfs/llvfile.cpp | 2 +- indra/lscript/lscript_execute/lscript_execute.cpp | 1 - indra/newview/llagentcamera.cpp | 4 +- indra/newview/llappviewer.cpp | 3 + indra/newview/llfasttimerview.cpp | 1 - indra/newview/llfloaterjoystick.cpp | 17 +- indra/newview/llfloaterjoystick.h | 1 - indra/newview/llhudnametag.cpp | 5 +- indra/newview/llstatusbar.cpp | 4 +- indra/newview/llsurface.h | 1 - indra/newview/lltexturefetch.cpp | 10 +- indra/newview/lltexturefetch.h | 7 +- indra/newview/llviewercamera.cpp | 13 +- indra/newview/llviewercamera.h | 28 +- indra/newview/llviewerdisplay.cpp | 6 +- indra/newview/llviewermessage.cpp | 22 -- indra/newview/llviewerobjectlist.cpp | 4 +- indra/newview/llviewerobjectlist.h | 4 +- indra/newview/llviewerregion.cpp | 9 +- indra/newview/llviewerregion.h | 6 +- indra/newview/llviewerstats.cpp | 33 +- indra/newview/llviewerstats.h | 1 - indra/newview/llviewertexturelist.h | 1 - indra/newview/llviewerwindow.cpp | 11 +- indra/newview/llviewerwindow.h | 7 +- indra/newview/llvoavatar.cpp | 6 - indra/newview/llworld.cpp | 17 +- indra/newview/pipeline.cpp | 6 +- 42 files changed, 543 insertions(+), 770 deletions(-) delete mode 100644 indra/llcommon/llstat.cpp delete mode 100644 indra/llcommon/llstat.h (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index d876842cf1..0f5ded86ed 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -91,7 +91,6 @@ set(llcommon_SOURCE_FILES llsdutil.cpp llsecondlifeurls.cpp llsingleton.cpp - llstat.cpp llstacktrace.cpp llstreamqueue.cpp llstreamtools.cpp @@ -234,7 +233,6 @@ set(llcommon_HEADER_FILES llsortedvector.h llstack.h llstacktrace.h - llstat.h llstatenums.h llstl.h llstreamqueue.h diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 403df08990..3a1187a4c1 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -77,8 +77,8 @@ protected: /// This mix-in class adds support for tracking all instances of the specified class parameter T /// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup /// If KEY is not provided, then instances are stored in a simple set -/// @NOTE: see explicit specialization below for default KEY==T* case -template +/// @NOTE: see explicit specialization below for default KEY==void case +template class LLInstanceTracker : public LLInstanceTrackerBase { typedef LLInstanceTracker MyT; @@ -224,12 +224,12 @@ private: KEY mInstanceKey; }; -/// explicit specialization for default case where KEY is T* +/// explicit specialization for default case where KEY is void /// use a simple std::set template -class LLInstanceTracker : public LLInstanceTrackerBase +class LLInstanceTracker : public LLInstanceTrackerBase { - typedef LLInstanceTracker MyT; + typedef LLInstanceTracker MyT; typedef typename std::set InstanceSet; struct StaticData: public StaticBase { diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 41d3eb0bf3..a1b0a684c5 100644 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -29,7 +29,6 @@ #include "indra_constants.h" #include "llerror.h" #include "llsdserialize.h" -#include "llstat.h" #include "lltreeiterators.h" #include "llmetricperformancetester.h" diff --git a/indra/llcommon/llpredicate.h b/indra/llcommon/llpredicate.h index 3f1bf1c8e6..75744667d9 100644 --- a/indra/llcommon/llpredicate.h +++ b/indra/llcommon/llpredicate.h @@ -165,6 +165,10 @@ namespace LLPredicate : Literal(e) {} + Value(const Literal other) + : Literal(other) + {} + Value() {} }; diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp deleted file mode 100644 index b46d2e58b2..0000000000 --- a/indra/llcommon/llstat.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/** - * @file llstat.cpp - * - * $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 "linden_common.h" - -#include "llstat.h" -#include "lllivefile.h" -#include "llerrorcontrol.h" -#include "llframetimer.h" -#include "timing.h" -#include "llsd.h" -#include "llsdserialize.h" -#include "llstl.h" -#include "u64.h" - - -// statics -//------------------------------------------------------------------------ -LLTimer LLStat::sTimer; -LLFrameTimer LLStat::sFrameTimer; - -void LLStat::reset() -{ - mNumValues = 0; - mLastValue = 0.f; - delete[] mBins; - mBins = new ValueEntry[mNumBins]; - mCurBin = mNumBins-1; - mNextBin = 0; -} - -LLStat::LLStat(std::string name, BOOL use_frame_timer) -: LLInstanceTracker(name), - mUseFrameTimer(use_frame_timer), - mNumBins(50), - mName(name), - mBins(NULL) -{ - llassert(mNumBins > 0); - mLastTime = 0.f; - - reset(); -} - -LLStat::~LLStat() -{ - delete[] mBins; -} -// -//void LLStat::start() -//{ -// if (mUseFrameTimer) -// { -// mBins[mNextBin].mBeginTime = sFrameTimer.getElapsedSeconds(); -// } -// else -// { -// mBins[mNextBin].mBeginTime = sTimer.getElapsedTimeF64(); -// } -//} - -void LLStat::addValue(const F32 value) -{ - if (mNumValues < mNumBins) - { - mNumValues++; - } - - // Increment the bin counters. - mCurBin++; - if (mCurBin >= mNumBins) - { - mCurBin = 0; - } - mNextBin++; - if (mNextBin >= mNumBins) - { - mNextBin = 0; - } - - mBins[mCurBin].mValue = value; - if (mUseFrameTimer) - { - mBins[mCurBin].mTime = sFrameTimer.getElapsedSeconds(); - } - else - { - mBins[mCurBin].mTime = sTimer.getElapsedTimeF64(); - } - mBins[mCurBin].mDT = (F32)(mBins[mCurBin].mTime - mBins[mCurBin].mBeginTime); - - //this value is used to prime the min/max calls - mLastTime = mBins[mCurBin].mTime; - mLastValue = value; - - // Set the begin time for the next stat segment. - mBins[mNextBin].mBeginTime = mBins[mCurBin].mTime; - mBins[mNextBin].mTime = mBins[mCurBin].mTime; - mBins[mNextBin].mDT = 0.f; -} - - -F32 LLStat::getMax() const -{ - S32 i; - F32 current_max = mLastValue; - if (mNumBins == 0) - { - current_max = 0.f; - } - else - { - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - if (mBins[i].mValue > current_max) - { - current_max = mBins[i].mValue; - } - } - } - return current_max; -} - -F32 LLStat::getMean() const -{ - S32 i; - F32 current_mean = 0.f; - S32 samples = 0; - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - current_mean += mBins[i].mValue; - samples++; - } - - // There will be a wrap error at 2^32. :) - if (samples != 0) - { - current_mean /= samples; - } - else - { - current_mean = 0.f; - } - return current_mean; -} - -F32 LLStat::getMin() const -{ - S32 i; - F32 current_min = mLastValue; - - if (mNumBins == 0) - { - current_min = 0.f; - } - else - { - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - if (mBins[i].mValue < current_min) - { - current_min = mBins[i].mValue; - } - } - } - return current_min; -} - -F32 LLStat::getPrev(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - return mBins[bin].mValue; -} - -F32 LLStat::getPrevPerSec(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - return mBins[bin].mValue / mBins[bin].mDT; -} - -F32 LLStat::getCurrent() const -{ - return mBins[mCurBin].mValue; -} - -F32 LLStat::getCurrentPerSec() const -{ - return mBins[mCurBin].mValue / mBins[mCurBin].mDT; -} - -F32 LLStat::getMeanPerSec() const -{ - S32 i; - F32 value = 0.f; - F32 dt = 0.f; - - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - value += mBins[i].mValue; - dt += mBins[i].mDT; - } - - if (dt > 0.f) - { - return value/dt; - } - else - { - return 0.f; - } -} - -F32 LLStat::getMaxPerSec() const -{ - F32 value; - - if (mNextBin != 0) - { - value = mBins[0].mValue/mBins[0].mDT; - } - else if (mNumValues > 0) - { - value = mBins[1].mValue/mBins[1].mDT; - } - else - { - value = 0.f; - } - - for (S32 i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - value = llmax(value, mBins[i].mValue/mBins[i].mDT); - } - return value; -} - -F32 LLStat::getMinPerSec() const -{ - S32 i; - F32 value; - - if (mNextBin != 0) - { - value = mBins[0].mValue/mBins[0].mDT; - } - else if (mNumValues > 0) - { - value = mBins[1].mValue/mBins[0].mDT; - } - else - { - value = 0.f; - } - - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == mNextBin) - { - continue; - } - value = llmin(value, mBins[i].mValue/mBins[i].mDT); - } - return value; -} - -U32 LLStat::getNumValues() const -{ - return mNumValues; -} - -S32 LLStat::getNumBins() const -{ - return mNumBins; -} - -S32 LLStat::getNextBin() const -{ - return mNextBin; -} - diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h deleted file mode 100644 index 82a246275d..0000000000 --- a/indra/llcommon/llstat.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @file llstat.h - * @brief Runtime statistics accumulation. - * - * $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_LLSTAT_H -#define LL_LLSTAT_H - -#include - -#include "lltimer.h" -#include "llframetimer.h" -#include "llinstancetracker.h" - -class LLSD; - -// ---------------------------------------------------------------------------- -class LL_COMMON_API LLStat : public LLInstanceTracker -{ -public: - LLStat(std::string name = std::string(), BOOL use_frame_timer = FALSE); - ~LLStat(); - - //void start(); // Start the timer for the current "frame", otherwise uses the time tracked from - // the last addValue - void reset(); - void addValue(const F32 value = 1.f); // Adds the current value being tracked, and tracks the DT. - void addValue(const S32 value) { addValue((F32)value); } - void addValue(const U32 value) { addValue((F32)value); } - - S32 getNextBin() const; - - F32 getPrev(S32 age) const; // Age is how many "addValues" previously - zero is current - F32 getPrevPerSec(S32 age) const; // Age is how many "addValues" previously - zero is current - - F32 getCurrent() const; - F32 getCurrentPerSec() const; - - F32 getMin() const; - F32 getMinPerSec() const; - - F32 getMean() const; - F32 getMeanPerSec() const; - - F32 getMax() const; - F32 getMaxPerSec() const; - - U32 getNumValues() const; - S32 getNumBins() const; - -private: - bool mUseFrameTimer; - U32 mNumValues; - U32 mNumBins; - F32 mLastValue; - F64 mLastTime; - - struct ValueEntry - { - ValueEntry() - : mValue(0.f), - mBeginTime(0.0), - mTime(0.0), - mDT(0.f) - {} - F32 mValue; - F64 mBeginTime; - F64 mTime; - F32 mDT; - }; - ValueEntry* mBins; - - S32 mCurBin; - S32 mNextBin; - - std::string mName; - - static LLTimer sTimer; - static LLFrameTimer sFrameTimer; -}; - -#endif // LL_STAT_ diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 2cdae4b0d2..2823db5cbb 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -227,10 +227,33 @@ namespace LLTrace }; + template + struct StorageType + { + typedef T type_t; + }; + + template + struct StorageType + { + typedef typename StorageType::type_t type_t; + }; + + template<> struct StorageType { typedef F64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template<> struct StorageType { typedef S64 type_t; }; + template class LL_COMMON_API MeasurementAccumulator { public: + typedef T value_t; + typedef MeasurementAccumulator self_t; + MeasurementAccumulator() : mSum(0), mMin(std::numeric_limits::max()), @@ -243,23 +266,24 @@ namespace LLTrace LL_FORCE_INLINE void sample(T value) { + T storage_value(value); mNumSamples++; - mSum += value; - if (value < mMin) + mSum += storage_value; + if (storage_value < mMin) { - mMin = value; + mMin = storage_value; } - else if (value > mMax) + if (storage_value > mMax) { - mMax = value; + mMax = storage_value; } F64 old_mean = mMean; - mMean += ((F64)value - old_mean) / (F64)mNumSamples; - mVarianceSum += ((F64)value - old_mean) * ((F64)value - mMean); - mLastValue = value; + mMean += ((F64)storage_value - old_mean) / (F64)mNumSamples; + mVarianceSum += ((F64)storage_value - old_mean) * ((F64)storage_value - mMean); + mLastValue = storage_value; } - void addSamples(const MeasurementAccumulator& other) + void addSamples(const self_t& other) { mSum += other.mSum; if (other.mMin < mMin) @@ -293,7 +317,7 @@ namespace LLTrace } else { - mVarianceSum = (F32)mNumSamples + mVarianceSum = (F64)mNumSamples * ((((n_1 - 1.f) * sd_1 * sd_1) + ((n_2 - 1.f) * sd_2 * sd_2) + (((n_1 * n_2) / (n_1 + n_2)) @@ -311,10 +335,10 @@ namespace LLTrace mMax = 0; } - T getSum() const { return mSum; } - T getMin() const { return mMin; } - T getMax() const { return mMax; } - T getLastValue() const { return mLastValue; } + T getSum() const { return (T)mSum; } + T getMin() const { return (T)mMin; } + T getMax() const { return (T)mMax; } + T getLastValue() const { return (T)mLastValue; } F64 getMean() const { return mMean; } F64 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } U32 getSampleCount() const { return mNumSamples; } @@ -325,7 +349,7 @@ namespace LLTrace mMax, mLastValue; - F64 mMean, + F64 mMean, mVarianceSum; U32 mNumSamples; @@ -335,6 +359,8 @@ namespace LLTrace class LL_COMMON_API CountAccumulator { public: + typedef T value_t; + CountAccumulator() : mSum(0), mNumSamples(0) @@ -358,7 +384,7 @@ namespace LLTrace mSum = 0; } - T getSum() const { return mSum; } + T getSum() const { return (T)mSum; } private: T mSum; @@ -366,14 +392,15 @@ namespace LLTrace U32 mNumSamples; }; - typedef TraceType > measurement_common_t; + typedef TraceType > measurement_common_float_t; + typedef TraceType > measurement_common_int_t; template class LL_COMMON_API Measurement - : public TraceType > + : public TraceType::type_t> > { public: - typedef T storage_t; + typedef typename StorageType::type_t storage_t; Measurement(const char* name, const char* description = NULL) : TraceType(name, description) @@ -381,17 +408,16 @@ namespace LLTrace void sample(T value) { - getPrimaryAccumulator().sample(value); + getPrimaryAccumulator().sample((storage_t)value); } }; template class LL_COMMON_API Measurement - : public TraceType > + : public TraceType::type_t> > { public: - typedef typename T::storage_t storage_t; - typedef Measurement base_measurement_t; + typedef typename StorageType::type_t storage_t; Measurement(const char* name, const char* description = NULL) : TraceType(name, description) @@ -402,18 +428,19 @@ namespace LLTrace { T converted_value; converted_value.assignFrom(value); - getPrimaryAccumulator().sample(converted_value.value()); + getPrimaryAccumulator().sample((storage_t)converted_value.value()); } }; - typedef TraceType > count_common_t; + typedef TraceType > count_common_float_t; + typedef TraceType > count_common_int_t; template class LL_COMMON_API Count - : public TraceType > + : public TraceType::type_t> > { public: - typedef T storage_t; + typedef typename StorageType::type_t storage_t; Count(const char* name, const char* description = NULL) : TraceType(name) @@ -421,17 +448,16 @@ namespace LLTrace void add(T value) { - getPrimaryAccumulator().add(value); + getPrimaryAccumulator().add((storage_t)value); } }; template class LL_COMMON_API Count - : public TraceType > + : public TraceType::type_t> > { public: - typedef typename T::storage_t storage_t; - typedef Count base_count_t; + typedef typename StorageType::type_t storage_t; Count(const char* name, const char* description = NULL) : TraceType(name) @@ -442,7 +468,7 @@ namespace LLTrace { T converted_value; converted_value.assignFrom(value); - getPrimaryAccumulator().add(converted_value.value()); + getPrimaryAccumulator().add((storage_t)converted_value.value()); } }; diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 9a769ff344..f44a0a2764 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -39,8 +39,10 @@ namespace LLTrace Recording::Recording() : mElapsedSeconds(0), - mCounts(new AccumulatorBuffer >()), - mMeasurements(new AccumulatorBuffer >()), + mCountsFloat(new AccumulatorBuffer >()), + mMeasurementsFloat(new AccumulatorBuffer >()), + mCounts(new AccumulatorBuffer >()), + mMeasurements(new AccumulatorBuffer >()), mStackTimers(new AccumulatorBuffer()) {} @@ -59,6 +61,8 @@ void Recording::update() void Recording::handleReset() { + mCountsFloat.write()->reset(); + mMeasurementsFloat.write()->reset(); mCounts.write()->reset(); mMeasurements.write()->reset(); mStackTimers.write()->reset(); @@ -88,6 +92,8 @@ void Recording::handleSplitTo(Recording& other) void Recording::makePrimary() { + mCountsFloat.write()->makePrimary(); + mMeasurementsFloat.write()->makePrimary(); mCounts.write()->makePrimary(); mMeasurements.write()->makePrimary(); mStackTimers.write()->makePrimary(); @@ -100,14 +106,120 @@ bool Recording::isPrimary() const void Recording::mergeRecording( const Recording& other ) { + mCountsFloat.write()->addSamples(*other.mCountsFloat); + mMeasurementsFloat.write()->addSamples(*other.mMeasurementsFloat); mCounts.write()->addSamples(*other.mCounts); mMeasurements.write()->addSamples(*other.mMeasurements); mStackTimers.write()->addSamples(*other.mStackTimers); mElapsedSeconds += other.mElapsedSeconds; } +F64 Recording::getSum( const TraceType >& stat ) const +{ + return stat.getAccumulator(mCountsFloat).getSum(); +} + +S64 Recording::getSum( const TraceType >& stat ) const +{ + return stat.getAccumulator(mCounts).getSum(); +} + +F64 Recording::getSum( const TraceType >& stat ) const +{ + return (F64)stat.getAccumulator(mMeasurementsFloat).getSum(); +} + +S64 Recording::getSum( const TraceType >& stat ) const +{ + return (S64)stat.getAccumulator(mMeasurements).getSum(); +} + + + +F64 Recording::getPerSec( const TraceType >& stat ) const +{ + return stat.getAccumulator(mCountsFloat).getSum() / mElapsedSeconds; +} + +F64 Recording::getPerSec( const TraceType >& stat ) const +{ + return (F64)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; +} + +F64 Recording::getPerSec( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getSum() / mElapsedSeconds; +} + +F64 Recording::getPerSec( const TraceType >& stat ) const +{ + return (F64)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; +} + +F64 Recording::getMin( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getMin(); +} + +S64 Recording::getMin( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getMin(); +} + +F64 Recording::getMax( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getMax(); +} + +S64 Recording::getMax( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getMax(); +} + +F64 Recording::getMean( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getMean(); +} + +F64 Recording::getMean( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getMean(); +} + +F64 Recording::getStandardDeviation( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getStandardDeviation(); +} + +F64 Recording::getStandardDeviation( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getStandardDeviation(); +} + +F64 Recording::getLastValue( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getLastValue(); +} + +S64 Recording::getLastValue( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getLastValue(); +} + +U32 Recording::getSampleCount( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurementsFloat).getSampleCount(); +} + +U32 Recording::getSampleCount( const TraceType >& stat ) const +{ + return stat.getAccumulator(mMeasurements).getSampleCount(); +} + + + /////////////////////////////////////////////////////////////////////// -// Recording +// PeriodicRecording /////////////////////////////////////////////////////////////////////// PeriodicRecording::PeriodicRecording( S32 num_periods ) @@ -179,6 +291,7 @@ void PeriodicRecording::handleSplitTo( PeriodicRecording& other ) getCurRecordingPeriod().handleSplitTo(other.getCurRecordingPeriod()); } + /////////////////////////////////////////////////////////////////////// // ExtendableRecording /////////////////////////////////////////////////////////////////////// diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index d3f001ab6a..4af973515d 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -112,124 +112,81 @@ namespace LLTrace void update(); // Count accessors + F64 getSum(const TraceType >& stat) const; + S64 getSum(const TraceType >& stat) const; template - T getSum(const TraceType >& stat) const + T getSum(const Count& stat) const { - return (T)stat.getAccumulator(mCounts).getSum(); - } - - template - T getSum(const Count& stat) const - { - return (T)stat.getAccumulator(mCounts).getSum(); + return (T)getSum(static_cast::type_t> >&> (stat)); } + F64 getPerSec(const TraceType >& stat) const; + F64 getPerSec(const TraceType >& stat) const; template - T getPerSec(const TraceType >& stat) const + T getPerSec(const Count& stat) const { - return (T)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; - } - - template - T getPerSec(const Count& stat) const - { - return (T)stat.getAccumulator(mCounts).getSum() / mElapsedSeconds; + return (T)getPerSec(static_cast::type_t> >&> (stat)); } // Measurement accessors + F64 getSum(const TraceType >& stat) const; + S64 getSum(const TraceType >& stat) const; template - T getSum(const TraceType >& stat) const + T getSum(const Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getSum(); - - } - - template - T getSum(const Measurement& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getSum(); - + return (T)getSum(static_cast::type_t> >&> (stat)); } + F64 getPerSec(const TraceType >& stat) const; + F64 getPerSec(const TraceType >& stat) const; template - T getPerSec(const TraceType >& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; - } - - template - T getPerSec(const Measurement& stat) const + T getPerSec(const Measurement& stat) const { - return (typename Count::base_unit_t)stat.getAccumulator(mMeasurements).getSum() / mElapsedSeconds; + return (T)getPerSec(static_cast::type_t> >&> (stat)); } + F64 getMin(const TraceType >& stat) const; + S64 getMin(const TraceType >& stat) const; template - T getMin(const TraceType >& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getMin(); - } - - template - T getMin(const Measurement& stat) const + T getMin(const Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getMin(); + return (T)getMin(static_cast::type_t> >&> (stat)); } - + F64 getMax(const TraceType >& stat) const; + S64 getMax(const TraceType >& stat) const; template - T getMax(const TraceType >& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getMax(); - } - - template - T getMax(const Measurement& stat) const + T getMax(const Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getMax(); + return (T)getMax(static_cast::type_t> >&> (stat)); } + F64 getMean(const TraceType >& stat) const; + F64 getMean(const TraceType >& stat) const; template - T getMean(const TraceType >& stat) const + T getMean(Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getMean(); - } - - template - T getMean(Measurement& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getMean(); + return (T)getMean(static_cast::type_t> >&> (stat)); } + F64 getStandardDeviation(const TraceType >& stat) const; + F64 getStandardDeviation(const TraceType >& stat) const; template - T getStandardDeviation(const TraceType >& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getStandardDeviation(); - } - - template - T getStandardDeviation(const Measurement& stat) const + T getStandardDeviation(const Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getStandardDeviation(); + return (T)getMean(static_cast::type_t> >&> (stat)); } + F64 getLastValue(const TraceType >& stat) const; + S64 getLastValue(const TraceType >& stat) const; template - T getLastValue(const TraceType >& stat) const - { - return (T)stat.getAccumulator(mMeasurements).getLastValue(); - } - - template - T getLastValue(const Measurement& stat) const + T getLastValue(const Measurement& stat) const { - return (T)stat.getAccumulator(mMeasurements).getLastValue(); + return (T)getLastValue(static_cast::type_t> >&> (stat)); } - - template - U32 getSampleCount(const TraceType >& stat) const - { - return stat.getAccumulator(mMeasurements).getSampleCount(); - } + U32 getSampleCount(const TraceType >& stat) const; + U32 getSampleCount(const TraceType >& stat) const; LLUnit::Seconds getDuration() const { return mElapsedSeconds; } @@ -244,8 +201,10 @@ namespace LLTrace // returns data for current thread class ThreadRecorder* getThreadRecorder(); - LLCopyOnWritePointer > > mCounts; - LLCopyOnWritePointer > > mMeasurements; + LLCopyOnWritePointer > > mCountsFloat; + LLCopyOnWritePointer > > mMeasurementsFloat; + LLCopyOnWritePointer > > mCounts; + LLCopyOnWritePointer > > mMeasurements; LLCopyOnWritePointer > mStackTimers; LLTimer mSamplingTimer; @@ -260,6 +219,7 @@ namespace LLTrace ~PeriodicRecording(); void nextPeriod(); + S32 getNumPeriods() { return mNumPeriods; } Recording& getLastRecordingPeriod() { @@ -268,7 +228,7 @@ namespace LLTrace const Recording& getLastRecordingPeriod() const { - return mRecordingPeriods[(mCurPeriod + mNumPeriods - 1) % mNumPeriods]; + return getPrevRecordingPeriod(1); } Recording& getCurRecordingPeriod() @@ -281,6 +241,16 @@ namespace LLTrace return mRecordingPeriods[mCurPeriod]; } + Recording& getPrevRecordingPeriod(S32 offset) + { + return mRecordingPeriods[(mCurPeriod + mNumPeriods - offset) % mNumPeriods]; + } + + const Recording& getPrevRecordingPeriod(S32 offset) const + { + return mRecordingPeriods[(mCurPeriod + mNumPeriods - offset) % mNumPeriods]; + } + Recording snapshotCurRecordingPeriod() const { Recording recording_copy(getCurRecordingPeriod()); @@ -290,6 +260,84 @@ namespace LLTrace Recording& getTotalRecording(); + template + typename T getPeriodMin(const TraceType >& stat) const + { + T min_val = std::numeric_limits::max(); + for (S32 i = 0; i < mNumPeriods; i++) + { + min_val = llmin(min_val, mRecordingPeriods[i].getSum(stat)); + } + return (T)min_val; + } + + template + F64 getPeriodMinPerSec(const TraceType >& stat) const + { + F64 min_val = std::numeric_limits::max(); + for (S32 i = 0; i < mNumPeriods; i++) + { + min_val = llmin(min_val, mRecordingPeriods[i].getPerSec(stat)); + } + return min_val; + } + + template + T getPeriodMax(const TraceType >& stat) const + { + T max_val = std::numeric_limits::min(); + for (S32 i = 0; i < mNumPeriods; i++) + { + max_val = llmax(max_val, mRecordingPeriods[i].getSum(stat)); + } + return max_val; + } + + template + F64 getPeriodMaxPerSec(const TraceType >& stat) const + { + F64 max_val = std::numeric_limits::min(); + for (S32 i = 0; i < mNumPeriods; i++) + { + max_val = llmax(max_val, mRecordingPeriods[i].getPerSec(stat)); + } + return max_val; + } + + template + F64 getPeriodMean(const TraceType >& stat) const + { + F64 mean = 0.0; + F64 count = 0; + for (S32 i = 0; i < mNumPeriods; i++) + { + if (mRecordingPeriods[i].getDuration() > 0.f) + { + count++; + mean += mRecordingPeriods[i].getSum(stat); + } + } + mean /= (F64)mNumPeriods; + return mean; + } + + template + F64 getPeriodMeanPerSec(const TraceType >& stat) const + { + F64 mean = 0.0; + F64 count = 0; + for (S32 i = 0; i < mNumPeriods; i++) + { + if (mRecordingPeriods[i].getDuration() > 0.f) + { + count++; + mean += mRecordingPeriods[i].getPerSec(stat); + } + } + mean /= count; + return mean; + } + private: // implementation for LLVCRControlsMixin diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index e81333f7f2..15056b80e4 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -113,9 +113,13 @@ ThreadRecorder::ActiveRecording::ActiveRecording( Recording* target ) void ThreadRecorder::ActiveRecording::moveBaselineToTarget() { + mTargetRecording->mMeasurementsFloat.write()->addSamples(*mBaseline.mMeasurementsFloat); + mTargetRecording->mCountsFloat.write()->addSamples(*mBaseline.mCountsFloat); mTargetRecording->mMeasurements.write()->addSamples(*mBaseline.mMeasurements); mTargetRecording->mCounts.write()->addSamples(*mBaseline.mCounts); mTargetRecording->mStackTimers.write()->addSamples(*mBaseline.mStackTimers); + mBaseline.mMeasurementsFloat.write()->reset(); + mBaseline.mCountsFloat.write()->reset(); mBaseline.mMeasurements.write()->reset(); mBaseline.mCounts.write()->reset(); mBaseline.mStackTimers.write()->reset(); diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 535c6f96e3..6b40f8d475 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -34,7 +34,6 @@ #include "llgl.h" #include "llfontgl.h" -#include "llstat.h" #include "lluictrlfactory.h" #include "lltracerecording.h" @@ -46,8 +45,10 @@ LLStatBar::LLStatBar(const Params& p) mUnitLabel(p.unit_label), mMinBar(p.bar_min), mMaxBar(p.bar_max), - mStatp(LLStat::getInstance(p.stat)), - mNewStatp(LLTrace::Count<>::getInstance(p.stat)), + mCountFloatp(LLTrace::Count<>::getInstance(p.stat)), + mCountIntp(LLTrace::Count::getInstance(p.stat)), + mMeasurementFloatp(LLTrace::Measurement<>::getInstance(p.stat)), + mMeasurementIntp(LLTrace::Measurement::getInstance(p.stat)), mTickSpacing(p.tick_spacing), mLabelSpacing(p.label_spacing), mPrecision(p.precision), @@ -90,46 +91,62 @@ void LLStatBar::draw() max = 0.f, mean = 0.f; - if (mStatp) + LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + + if (mCountFloatp) { - // Get the values. + LLTrace::Recording& last_frame_recording = frame_recording.getLastRecordingPeriod(); + if (mPerSec) { - current = mStatp->getCurrentPerSec(); - min = mStatp->getMinPerSec(); - max = mStatp->getMaxPerSec(); - mean = mStatp->getMeanPerSec(); + current = last_frame_recording.getPerSec(*mCountFloatp); + min = frame_recording.getPeriodMinPerSec(*mCountFloatp); + max = frame_recording.getPeriodMaxPerSec(*mCountFloatp); + mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp); } else { - current = mStatp->getCurrent(); - min = mStatp->getMin(); - max = mStatp->getMax(); - mean = mStatp->getMean(); + current = last_frame_recording.getSum(*mCountFloatp); + min = frame_recording.getPeriodMin(*mCountFloatp); + max = frame_recording.getPeriodMax(*mCountFloatp); + mean = frame_recording.getPeriodMean(*mCountFloatp); } } - else if (mNewStatp) + else if (mCountIntp) { - LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); LLTrace::Recording& last_frame_recording = frame_recording.getLastRecordingPeriod(); - LLTrace::Recording& windowed_frame_recording = frame_recording.getTotalRecording(); if (mPerSec) { - current = last_frame_recording.getPerSec(*mNewStatp); - //min = frame_window_recording.getMin(*mNewStatp) / frame_window_recording.getDuration(); - //max = frame_window_recording.getMax(*mNewStatp) / frame_window_recording.getDuration(); - mean = windowed_frame_recording.getPerSec(*mNewStatp);//frame_window_recording.getMean(*mNewStatp) / frame_window_recording.getDuration(); + current = last_frame_recording.getPerSec(*mCountIntp); + min = frame_recording.getPeriodMinPerSec(*mCountIntp); + max = frame_recording.getPeriodMaxPerSec(*mCountIntp); + mean = frame_recording.getPeriodMeanPerSec(*mCountIntp); } else { - current = last_frame_recording.getSum(*mNewStatp); - //min = last_frame_recording.getMin(*mNewStatp); - //max = last_frame_recording.getMax(*mNewStatp); - mean = windowed_frame_recording.getSum(*mNewStatp); + current = last_frame_recording.getSum(*mCountIntp); + min = frame_recording.getPeriodMin(*mCountIntp); + max = frame_recording.getPeriodMax(*mCountIntp); + mean = frame_recording.getPeriodMean(*mCountIntp); } } - + else if (mMeasurementFloatp) + { + LLTrace::Recording& recording = frame_recording.getTotalRecording(); + current = recording.getLastValue(*mMeasurementFloatp); + min = recording.getMin(*mMeasurementFloatp); + max = recording.getMax(*mMeasurementFloatp); + mean = recording.getMean(*mMeasurementFloatp); + } + else if (mMeasurementIntp) + { + LLTrace::Recording& recording = frame_recording.getTotalRecording(); + current = recording.getLastValue(*mMeasurementIntp); + min = recording.getMin(*mMeasurementIntp); + max = recording.getMax(*mMeasurementIntp); + mean = recording.getMean(*mMeasurementIntp); + } if ((mUpdatesPerSec == 0.f) || (mUpdateTimer.getElapsedTimeF32() > 1.f/mUpdatesPerSec) || (mValue == 0.f)) { @@ -176,7 +193,7 @@ void LLStatBar::draw() LLFontGL::RIGHT, LLFontGL::TOP); value_format = llformat( "%%.%df", mPrecision); - if (mDisplayBar && mStatp) + if (mDisplayBar && (mCountFloatp || mCountIntp || mMeasurementFloatp || mMeasurementIntp)) { std::string tick_label; @@ -219,7 +236,7 @@ void LLStatBar::draw() right = width; gl_rect_2d(left, top, right, bottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); - if (mStatp->getNumValues() == 0) + if (frame_recording.getNumPeriods() == 0) { // No data, don't draw anything... return; @@ -236,26 +253,58 @@ void LLStatBar::draw() right = (S32) ((max - mMinBar) * value_scale); gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); - if (mDisplayHistory) + if (mDisplayHistory && (mCountFloatp || mCountIntp || mMeasurementFloatp || mMeasurementIntp)) { - S32 num_values = mStatp->getNumValues() - 1; + S32 num_values = frame_recording.getNumPeriods() - 1; S32 i; - for (i = 0; i < num_values; i++) + for (i = 1; i <= num_values; i++) { - if (i == mStatp->getNextBin()) - { - continue; - } if (mPerSec) { - left = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale); - right = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale) + 1; + if (mCountFloatp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale) + 1; + } + else if (mCountIntp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale) + 1; + } + else if (mMeasurementFloatp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; + } + else if (mMeasurementIntp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale) + 1; + } gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f)); } else { - left = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale); - right = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale) + 1; + if (mCountFloatp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale) + 1; + } + else if (mCountIntp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale) + 1; + } + else if (mMeasurementFloatp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; + } + else if (mMeasurementIntp) + { + left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale); + right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale) + 1; + } gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f)); } } @@ -279,6 +328,15 @@ void LLStatBar::draw() LLView::draw(); } +void LLStatBar::setStat(const std::string& stat_name) +{ + mCountFloatp = LLTrace::Count<>::getInstance(stat_name); + mCountIntp = LLTrace::Count::getInstance(stat_name); + mMeasurementFloatp = LLTrace::Measurement<>::getInstance(stat_name); + mMeasurementIntp = LLTrace::Measurement::getInstance(stat_name); +} + + void LLStatBar::setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing) { mMinBar = bar_min; @@ -293,9 +351,9 @@ LLRect LLStatBar::getRequiredRect() if (mDisplayBar) { - if (mDisplayHistory && mStatp) + if (mDisplayHistory) { - rect.mTop = 35 + mStatp->getNumBins(); + rect.mTop = 35 + LLTrace::get_frame_recording().getNumPeriods(); } else { diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index d510f0e3fe..6aefb1e213 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -30,7 +30,6 @@ #include "llview.h" #include "llframetimer.h" #include "lltracerecording.h" -class LLStat; class LLStatBar : public LLView { @@ -79,7 +78,8 @@ public: virtual void draw(); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - void setStat(LLStat* stat) { mStatp = stat; } + void setStat(const std::string& stat_name); + void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing, F32 label_spacing); void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } @@ -96,10 +96,11 @@ private: BOOL mDisplayBar; // Display the bar graph. BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value - LLTrace::PeriodicRecording* mFrameRecording; - LLStat* mStatp; - LLTrace::count_common_t* mNewStatp; + LLTrace::count_common_float_t* mCountFloatp; + LLTrace::count_common_int_t* mCountIntp; + LLTrace::measurement_common_float_t* mMeasurementFloatp; + LLTrace::measurement_common_int_t* mMeasurementIntp; LLFrameTimer mUpdateTimer; LLUIString mLabel; diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index e961e7d3c0..22c276a018 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -32,7 +32,6 @@ #include "llmath.h" #include "llui.h" -#include "llstat.h" #include "llgl.h" #include "llglheaders.h" #include "lltracerecording.h" @@ -48,8 +47,8 @@ LLStatGraph::LLStatGraph(const Params& p) mPerSec(true), mPrecision(p.precision), mValue(p.value), - mStatp(p.stat.legacy_stat), - mNewStatp(p.stat.count_stat) + mNewStatFloatp(p.stat.count_stat_float), + mNewStatIntp(p.stat.count_stat_int) { setToolTip(p.name()); @@ -73,30 +72,31 @@ void LLStatGraph::draw() { F32 range, frac; range = mMax - mMin; - if (mStatp) + if (mNewStatFloatp) { + LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); + if (mPerSec) { - mValue = mStatp->getMeanPerSec(); + mValue = recording.getPerSec(*mNewStatFloatp); } else { - mValue = mStatp->getMean(); + mValue = recording.getSum(*mNewStatFloatp); } } - else if (mNewStatp) + else if (mNewStatIntp) { LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); if (mPerSec) { - mValue = recording.getPerSec(*mNewStatp); + mValue = recording.getPerSec(*mNewStatIntp); } else { - mValue = recording.getSum(*mNewStatp); + mValue = recording.getSum(*mNewStatIntp); } - } frac = (mValue - mMin) / range; diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index b20966d608..f33c784262 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -32,8 +32,6 @@ #include "v4color.h" #include "lltrace.h" -class LLStat; - class LLStatGraph : public LLView { public: @@ -59,9 +57,10 @@ public: struct StatParams : public LLInitParam::ChoiceBlock { - Alternative legacy_stat; - Alternative count_stat; - Alternative measurement_stat; + Alternative count_stat_float; + Alternative count_stat_int; + Alternative measurement_stat_float; + Alternative measurement_stat_int; }; struct Params : public LLInitParam::Block @@ -106,8 +105,8 @@ public: /*virtual*/ void setValue(const LLSD& value); private: - LLStat* mStatp; - LLTrace::count_common_t* mNewStatp; + LLTrace::count_common_float_t* mNewStatFloatp; + LLTrace::count_common_int_t* mNewStatIntp; BOOL mPerSec; diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index ca749c5eaf..7f631ef0bb 100644 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -30,8 +30,8 @@ #include "llerror.h" #include "llthread.h" -#include "llstat.h" #include "llvfs.h" +#include "lltimer.h" const S32 LLVFile::READ = 0x00000001; const S32 LLVFile::WRITE = 0x00000002; diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp index d79e9f8bde..23e1fe306e 100644 --- a/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/indra/lscript/lscript_execute/lscript_execute.cpp @@ -35,7 +35,6 @@ #include "lscript_library.h" #include "lscript_heapruntime.h" #include "lscript_alloc.h" -#include "llstat.h" // Static diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 751b73e1eb..8d80e3aa0a 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) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 559f427de6..2d090f0f74 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4305,6 +4305,9 @@ void LLAppViewer::idle() update_statistics(); } + LLTrace::get_frame_recording().nextPeriod(); + + //////////////////////////////////////// // // Handle the regular UI idle callbacks as well as diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 4dfb93f1bc..065b20ba2b 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" diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index f7b2670b8e..e2813a8272 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -33,7 +33,7 @@ #include "llerror.h" #include "llrect.h" #include "llstring.h" -#include "llstat.h" +#include "lltrace.h" // project includes #include "lluictrlfactory.h" @@ -42,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) { @@ -61,7 +71,7 @@ void LLFloaterJoystick::draw() for (U32 i = 0; i < 6; i++) { F32 value = joystick->getJoystickAxis(i); - mAxisStats[i]->addValue(value * gFrameIntervalSeconds.value()); + sJoystickAxes[i].sample(value * gFrameIntervalSeconds.value()); if (mAxisStatsBar[i]) { F32 minbar, maxbar; @@ -85,12 +95,11 @@ BOOL LLFloaterJoystick::postBuild() for (U32 i = 0; i < 6; i++) { std::string stat_name(llformat("Joystick axis %d", i)); - mAxisStats[i] = new LLStat(stat_name, 4); std::string axisname = llformat("axis%d", i); mAxisStatsBar[i] = getChild(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/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/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5720395d05..b945ec2318 100644 --- 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(&LLStatViewer::KBIT); + sgp.stat.count_stat_float(&LLStatViewer::KBIT); sgp.units("Kbps"); sgp.precision(0); mSGBandwidth = LLUICtrlFactory::create(sgp); @@ -212,7 +212,7 @@ BOOL LLStatusBar::postBuild() pgp.rect(r); pgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); pgp.mouse_opaque(false); - pgp.stat.measurement_stat(&LLStatViewer::PACKETS_LOST_PERCENT); + pgp.stat.measurement_stat_float(&LLStatViewer::PACKETS_LOST_PERCENT); pgp.units("%"); pgp.min(0.f); pgp.max(5.f); diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h index 9d24bf8771..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; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2a72e77672..fa0e3acf5e 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -59,8 +59,8 @@ #include "llviewerstats.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"); ////////////////////////////////////////////////////////////////////////////// class LLTextureFetchWorker : public LLWorkerClass @@ -895,7 +895,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 { @@ -912,7 +912,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } // fall through - LLTextureFetch::sCacheHitRate.addValue(0.f); + LLTextureFetch::sCacheHitRate.sample(0.f); } } @@ -2039,7 +2039,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; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 7ffa58660e..4ec67c8cdb 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -35,8 +35,7 @@ #include "lltextureinfo.h" #include "llapr.h" #include "llimageworker.h" -#include "llstat.h" -//#include "lltexturecache.h" +#include "lltrace.h" class LLViewerTexture; class LLTextureFetchWorker; @@ -166,8 +165,8 @@ 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; diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index a437a8b3b5..831304f428 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 // 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,12 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, 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() ; + LLTrace::Recording& recording = LLTrace::get_frame_recording().getTotalRecording(); + 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..399eed7695 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; @@ -100,12 +100,12 @@ public: BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const; BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; - const LLVector3* getVelocityDir() const {return &mVelocityDir;} - LLStat *getVelocityStat() { return &mVelocityStat; } - LLStat *getAngularVelocityStat() { return &mAngularVelocityStat; } - F32 getCosHalfFov() {return mCosHalfCameraFOV;} - F32 getAverageSpeed() {return mAverageSpeed ;} - F32 getAverageAngularSpeed() {return mAverageAngularSpeed;} + const LLVector3* getVelocityDir() const {return &mVelocityDir;} + static LLTrace::Count<>* getVelocityStat() {return &sVelocityStat; } + static LLTrace::Count<>* getAngularVelocityStat() {return &sAngularVelocityStat; } + F32 getCosHalfFov() {return mCosHalfCameraFOV;} + F32 getAverageSpeed() {return mAverageSpeed ;} + F32 getAverageAngularSpeed() {return mAverageAngularSpeed;} void getPixelVectors(const LLVector3 &pos_agent, LLVector3 &up, LLVector3 &right); LLVector3 roundToPixel(const LLVector3 &pos_agent); @@ -117,9 +117,9 @@ public: F32 getDefaultFOV() { return mCameraFOVDefault; } BOOL cameraUnderWater() const; - - const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; } BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts); + + const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; } 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; - LLVector3 mVelocityDir ; - F32 mAverageSpeed ; - F32 mAverageAngularSpeed ; + 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 169b45c14e..41a08398bb 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -748,8 +748,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { 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)); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 82caa05983..acbe836c29 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4765,28 +4765,6 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) } } - /* - 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. // diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 14a2ac3384..9c6045943f 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 LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128); +LLTrace::Measurement<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { @@ -520,7 +520,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } justCreated = TRUE; mNumNewObjects++; - sCacheHitRate.addValue(cached ? 100.f : 0.f); + sCacheHitRate.sample(cached ? 100.f : 0.f); } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 9936432a71..ca4110230f 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -31,8 +31,8 @@ #include // common includes -#include "llstat.h" #include "llstring.h" +#include "lltrace.h" // project includes #include "llviewerobject.h" @@ -194,7 +194,7 @@ protected: std::vector mOrphanChildren; // UUID's of orphaned objects S32 mNumOrphans; - static LLStat sCacheHitRate; + static LLTrace::Measurement<> sCacheHitRate; typedef std::vector > vobj_list_t; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 31e3820a21..652e0ee70b 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -291,7 +291,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); @@ -909,9 +911,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; } 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 04b0c30b40..a42368cec4 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -94,8 +94,8 @@ LLTrace::Count KBIT("kbitstat"), OBJECT_KBIT("objectkbitstat"), ASSET_KBIT("assetkbitstat"), TEXTURE_KBIT("texturekbitstat"), - ACTUAL_IN_KBIT("actualinkbit"), - ACTUAL_OUT_KBIT("actualoutkbit"); + ACTUAL_IN_KBIT("actualinkbitstat"), + ACTUAL_OUT_KBIT("actualoutkbitstat"); LLTrace::Count AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearence"), TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"), @@ -276,20 +276,25 @@ void LLViewerStats::addToMessage(LLSD &body) const // *NOTE:Mani The following methods used to exist in viewer.cpp // Moving them here, but not merging them into LLViewerStats yet. -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 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::Bytes gTotalWorldData = 0, gTotalObjectData = 0, gTotalTextureData = 0; -U32 gSimPingCount = 0; +U32 gSimPingCount = 0; LLUnit::Bits gObjectData = 0; -F32 gAvgSimPing = 0.f; -LLUnit::Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; +F32 gAvgSimPing = 0.f; +LLUnit::Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; extern U32 gVisCompared; extern U32 gVisTested; @@ -334,13 +339,13 @@ void update_statistics() LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); + LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - LLStatViewer::SIM_PING.sample(10000); + LLStatViewer::SIM_PING.sample(10); } LLStatViewer::FPS.add(1); @@ -390,8 +395,6 @@ void update_statistics() texture_stats_timer.reset(); } } - - LLTrace::get_frame_recording().nextPeriod(); } class ViewerStatsResponder : public LLHTTPClient::Responder diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 34731481f5..eda7b3329d 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -27,7 +27,6 @@ #ifndef LL_LLVIEWERSTATS_H #define LL_LLVIEWERSTATS_H -#include "llstat.h" #include "llstatenums.h" #include "lltextureinfo.h" #include "lltracerecording.h" diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index a00f48b5a2..e3df71cca2 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -30,7 +30,6 @@ #include "lluuid.h" //#include "message.h" #include "llgl.h" -#include "llstat.h" #include "llviewertexture.h" #include "llui.h" #include diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 06daf15c08..b7415669bb 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -77,7 +77,6 @@ #include "llmediaentry.h" #include "llurldispatcher.h" #include "raytrace.h" -#include "llstat.h" // newview includes #include "llagent.h" @@ -249,6 +248,9 @@ std::string LLViewerWindow::sSnapshotDir; std::string LLViewerWindow::sMovieBaseName; +LLTrace::Measurement<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); + + class RecordToChatConsole : public LLError::Recorder, public LLSingleton { public: @@ -1541,8 +1543,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), - mProgressView(NULL), - mMouseVelocityStat(new LLStat("Mouse Velocity")) + mProgressView(NULL) { // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to // pass its value right now. Instead, pass it a nullary function that @@ -2072,8 +2073,6 @@ LLViewerWindow::~LLViewerWindow() delete mDebugText; mDebugText = NULL; - - delete mMouseVelocityStat; } @@ -3247,7 +3246,7 @@ void LLViewerWindow::updateMouseDelta() mouse_vel.setVec((F32) dx, (F32) dy); } - mMouseVelocityStat->addValue(mouse_vel.magVec()); + sMouseVelocityStat.sample(mouse_vel.magVec()); } void LLViewerWindow::updateKeyboardFocus() diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 5f475fe145..be2d6d885e 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -44,12 +44,12 @@ #include "llmousehandler.h" #include "llhandle.h" #include "llinitparam.h" +#include "lltrace.h" #include #include #include -class LLStat; class LLView; class LLViewerObject; class LLUUID; @@ -250,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; } @@ -427,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; @@ -482,6 +481,8 @@ private: // Object temporarily hovered over while dragging LLPointer mDragHoveredObject; + + static LLTrace::Measurement<> sMouseVelocityStat; }; // diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 97c1b07ebc..3c1f8ca6b0 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4318,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) @@ -4372,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; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index dced5a847b..e140f3b23b 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -692,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; @@ -705,26 +707,15 @@ void LLWorld::updateNetStats() LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); - //LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); - //LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); LLStatViewer::KBIT.add(bits); - //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLStatViewer::PACKETS_IN.add(packets_in); LLStatViewer::PACKETS_OUT.add(packets_out); LLStatViewer::PACKETS_LOST.add(packets_lost); LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); - //LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); - //LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); - //LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); if (packets_in) { LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); - // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); } - //else - //{ - // LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); - //} mLastPacketsIn = gMessageSystem->mPacketsIn; mLastPacketsOut = gMessageSystem->mPacketsOut; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 75af605ad7..1e050d2588 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -488,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) @@ -1769,7 +1768,6 @@ void LLPipeline::resetFrameStats() assertInitialized(); LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn); - //LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f); if (mBatchCount > 0) { @@ -9756,7 +9754,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLViewerCamera::getInstance()->getVelocityStat()->getCurrentPerSec(), 1.f); + LLTrace::Measurement<>* velocity_stat = LLViewerCamera::getVelocityStat(); + F32 fade_amt = gFrameIntervalSeconds.value() + * llmax(LLTrace::get_frame_recording().getLastRecordingPeriod().getLastValue(*velocity_stat), 1.0); //update shadow targets for (U32 i = 0; i < 2; i++) -- cgit v1.3 From 0bb0bd514b235948c1a21c81ab0e8ab6223b1990 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 8 Nov 2012 23:42:18 -0800 Subject: SH-3499 WIP Ensure asset stats output is correct Finished making LLUnit implicitly convertible to/from scalar integer values cleaned up test code --- indra/llcommon/lldate.cpp | 4 +- indra/llcommon/lldate.h | 4 +- indra/llcommon/lldefs.h | 3 + indra/llcommon/llerrorlegacy.h | 7 + indra/llcommon/lltimer.cpp | 15 +- indra/llcommon/lltimer.h | 16 +- indra/llcommon/lltrace.h | 54 +++-- indra/llcommon/lltracerecording.h | 2 +- indra/llcommon/llunit.h | 404 ++++++++++++++++------------------- indra/llmath/v4color.h | 6 +- indra/llrender/llimagegl.cpp | 6 +- indra/llrender/llimagegl.h | 6 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llappviewer.h | 2 +- indra/newview/lldrawpoolwater.cpp | 2 +- indra/newview/lltextureview.cpp | 18 +- indra/newview/llviewerassetstats.cpp | 4 +- indra/newview/llviewermessage.cpp | 20 +- indra/newview/llviewerstats.cpp | 6 +- indra/newview/llviewerstats.h | 6 +- indra/newview/llviewertexture.cpp | 18 +- indra/newview/llviewertexture.h | 14 +- indra/newview/llviewerwindow.cpp | 2 +- 23 files changed, 295 insertions(+), 326 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index d8b3dfe6c6..5569b4102d 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -54,8 +54,8 @@ LLDate::LLDate(const LLDate& date) : mSecondsSinceEpoch(date.mSecondsSinceEpoch) {} -LLDate::LLDate(LLUnit::Seconds seconds_since_epoch) : - mSecondsSinceEpoch(seconds_since_epoch) +LLDate::LLDate(LLUnit seconds_since_epoch) : + mSecondsSinceEpoch(seconds_since_epoch.value()) {} LLDate::LLDate(const std::string& iso8601_date) diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 0500b1dcd8..b62a846147 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -57,9 +57,9 @@ public: /** * @brief Construct a date from a seconds since epoch value. * - * @pararm seconds_since_epoch The number of seconds since UTC epoch. + * @param seconds_since_epoch The number of seconds since UTC epoch. */ - LLDate(LLUnit::Seconds seconds_since_epoch); + LLDate(LLUnit seconds_since_epoch); /** * @brief Construct a date from a string representation diff --git a/indra/llcommon/lldefs.h b/indra/llcommon/lldefs.h index 5a4b8325f4..d57b9dccff 100644 --- a/indra/llcommon/lldefs.h +++ b/indra/llcommon/lldefs.h @@ -244,5 +244,8 @@ inline void llswap(LLDATATYPE& lhs, LLDATATYPE& rhs) rhs = tmp; } +#define LL_GLUE_IMPL(x, y) x##y +#define LL_GLUE_TOKENS(x, y) LL_GLUE_IMPL(x, y) + #endif // LL_LLDEFS_H diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 37cee579cd..58cc2899af 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -29,6 +29,7 @@ #define LL_LLERRORLEGACY_H #include "llpreprocessor.h" +#include /* LEGACY -- DO NOT USE THIS STUFF ANYMORE @@ -111,6 +112,12 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #define llverify(func) do {if (func) {}} while(0) #endif +#ifdef LL_WINDOWS +#define llstatic_assert(func, msg) static_assert(func, msg) +#else +#define llstatic_assert(func, msg) BOOST_STATIC_ASSERT(func) +#endif + // handy compile-time assert - enforce those template parameters! #define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */ //XXX: used in two places in llcommon/llskipmap.h diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 05f6b789e4..23cebf4336 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -287,15 +287,14 @@ LLTimer::~LLTimer() } // static -LLUnit::Microseconds LLTimer::getTotalTime() +LLUnit LLTimer::getTotalTime() { - LLUnit::Seconds sec = LLUnit::Milliseconds(2000) + LLUnit::Hours(1.f / 360.f); // simply call into the implementation function. return totalTime(); } // static -LLUnit::Seconds LLTimer::getTotalSeconds() +LLUnit LLTimer::getTotalSeconds() { return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64; } @@ -344,23 +343,23 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount) } -LLUnit::Seconds LLTimer::getElapsedTimeF64() const +LLUnit LLTimer::getElapsedTimeF64() const { U64 last = mLastClockCount; return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv; } -LLUnit::Seconds LLTimer::getElapsedTimeF32() const +LLUnit LLTimer::getElapsedTimeF32() const { return (F32)getElapsedTimeF64(); } -LLUnit::Seconds LLTimer::getElapsedTimeAndResetF64() +LLUnit LLTimer::getElapsedTimeAndResetF64() { return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv; } -LLUnit::Seconds LLTimer::getElapsedTimeAndResetF32() +LLUnit LLTimer::getElapsedTimeAndResetF32() { return (F32)getElapsedTimeAndResetF64(); } @@ -373,7 +372,7 @@ void LLTimer::setTimerExpirySec(F32 expiration) + (U64)((F32)(expiration * gClockFrequency)); } -LLUnit::Seconds LLTimer::getRemainingTimeF32() const +LLUnit LLTimer::getRemainingTimeF32() const { U64 cur_ticks = get_clock_count(); if (cur_ticks > mExpirationTicks) diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index e0a880a346..5cb2b18111 100644 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -67,16 +67,16 @@ public: // Return a high precision number of seconds since the start of // this application instance. - static LLUnit::Seconds getElapsedSeconds() + static LLUnit getElapsedSeconds() { return sTimer->getElapsedTimeF64(); } // Return a high precision usec since epoch - static LLUnit::Microseconds getTotalTime(); + static LLUnit getTotalTime(); // Return a high precision seconds since epoch - static LLUnit::Seconds getTotalSeconds(); + static LLUnit getTotalSeconds(); // MANIPULATORS @@ -87,16 +87,16 @@ public: void setTimerExpirySec(F32 expiration); BOOL checkExpirationAndReset(F32 expiration); BOOL hasExpired() const; - LLUnit::Seconds getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset - LLUnit::Seconds getElapsedTimeAndResetF64(); + LLUnit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset + LLUnit getElapsedTimeAndResetF64(); - LLUnit::Seconds getRemainingTimeF32() const; + LLUnit getRemainingTimeF32() const; static BOOL knownBadTimer(); // ACCESSORS - LLUnit::Seconds getElapsedTimeF32() const; // Returns elapsed time in seconds - LLUnit::Seconds getElapsedTimeF64() const; // Returns elapsed time in seconds + LLUnit getElapsedTimeF32() const; // Returns elapsed time in seconds + LLUnit getElapsedTimeF64() const; // Returns elapsed time in seconds bool getStarted() const { return mStarted; } diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index e2530a8a24..d289ea9a88 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -38,37 +38,35 @@ #include -#define LL_TOKEN_PASTE_ACTUAL(x, y) x##y -#define LL_TOKEN_PASTE(x, y) LL_TOKEN_PASTE_ACTUAL(x, y) -#define LL_RECORD_BLOCK_TIME(block_timer) LLTrace::BlockTimer::Recorder LL_TOKEN_PASTE(block_time_recorder, __COUNTER__)(block_timer); +#define LL_RECORD_BLOCK_TIME(block_timer) LLTrace::BlockTimer::Recorder LL_GLUE_TOKENS(block_time_recorder, __COUNTER__)(block_timer); namespace LLTrace { class Recording; - typedef LLUnit::Bytes Bytes; - typedef LLUnit::Kilobytes Kilobytes; - typedef LLUnit::Megabytes Megabytes; - typedef LLUnit::Gigabytes Gigabytes; - typedef LLUnit::Bits Bits; - typedef LLUnit::Kilobits Kilobits; - typedef LLUnit::Megabits Megabits; - typedef LLUnit::Gigabits Gigabits; - - typedef LLUnit::Seconds Seconds; - typedef LLUnit::Milliseconds Milliseconds; - typedef LLUnit::Minutes Minutes; - typedef LLUnit::Hours Hours; - typedef LLUnit::Days Days; - typedef LLUnit::Weeks Weeks; - typedef LLUnit::Milliseconds Milliseconds; - typedef LLUnit::Microseconds Microseconds; - typedef LLUnit::Nanoseconds Nanoseconds; - - typedef LLUnit::Meters Meters; - typedef LLUnit::Kilometers Kilometers; - typedef LLUnit::Centimeters Centimeters; - typedef LLUnit::Millimeters Millimeters; + typedef LLUnit Bytes; + typedef LLUnit Kilobytes; + typedef LLUnit Megabytes; + typedef LLUnit Gigabytes; + typedef LLUnit Bits; + typedef LLUnit Kilobits; + typedef LLUnit Megabits; + typedef LLUnit Gigabits; + + typedef LLUnit Seconds; + typedef LLUnit Milliseconds; + typedef LLUnit Minutes; + typedef LLUnit Hours; + typedef LLUnit Days; + typedef LLUnit Weeks; + typedef LLUnit Milliseconds; + typedef LLUnit Microseconds; + typedef LLUnit Nanoseconds; + + typedef LLUnit Meters; + typedef LLUnit Kilometers; + typedef LLUnit Centimeters; + typedef LLUnit Millimeters; void init(); void cleanup(); @@ -438,7 +436,7 @@ namespace LLTrace void sample(UNIT_T value) { T converted_value; - converted_value.assignFrom(value); + converted_value = value; getPrimaryAccumulator().sample((storage_t)converted_value.value()); } }; @@ -478,7 +476,7 @@ namespace LLTrace void add(UNIT_T value) { T converted_value; - converted_value.assignFrom(value); + converted_value = value; getPrimaryAccumulator().add((storage_t)converted_value.value()); } }; diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index fc96631ce0..ca9950b78d 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -197,7 +197,7 @@ namespace LLTrace U32 getSampleCount(const TraceType >& stat) const; U32 getSampleCount(const TraceType >& stat) const; - LLUnit::Seconds getDuration() const { return mElapsedSeconds; } + LLUnit getDuration() const { return mElapsedSeconds; } private: friend class ThreadRecorder; diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 4519905707..0dcafbe26e 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -30,326 +30,288 @@ #include "stdtypes.h" #include "llpreprocessor.h" -template -struct LLUnitType : public BASE_UNIT +namespace LLUnits { - typedef DERIVED_UNIT unit_t; - - typedef typename STORAGE_TYPE storage_t; - typedef void is_unit_tag_t; - - LLUnitType() - {} - - LLUnitType(storage_t value) - : BASE_UNIT(convertToBase(value)) - {} - - // implicit downcast - operator unit_t& () - { - return static_cast(*this); - } - - operator storage_t () const - { - return value(); - } - - storage_t value() const - { - return convertToDerived(mBaseValue); - } - - template - storage_t as() const - { - return CONVERTED_TYPE(*this).value(); - } - -protected: - static storage_t convertToBase(storage_t derived_value) - { - return (storage_t)((F32)derived_value * unit_t::conversionToBaseFactor()); - } - - static storage_t convertToDerived(storage_t base_value) +template +struct ConversionFactor +{ + static F64 get() { - return (storage_t)((F32)base_value / unit_t::conversionToBaseFactor()); + llstatic_assert(sizeof(DERIVED_UNITS_TAG) == 0, "Cannot convert between types."); } +}; +template +struct ConversionFactor +{ + static F64 get() { return 1.0; } }; +} -template -struct LLUnitType +template +struct LLUnit { - typedef T unit_t; - typedef STORAGE_TYPE storage_t; + typedef LLUnit self_t; + typedef typename STORAGE_TYPE storage_t; typedef void is_unit_tag_t; - LLUnitType() - : mBaseValue() + LLUnit(storage_t value = storage_t()) + : mValue(value) {} - LLUnitType(storage_t value) - : mBaseValue(value) + template + LLUnit(LLUnit other) + : mValue(convert(other)) {} - unit_t& operator=(storage_t value) + LLUnit(self_t& other) + : mValue(other.mValue) + {} + + self_t& operator = (storage_t value) { - setBaseValue(value); + mValue = value; return *this; } - //implicit downcast - operator unit_t& () + template + self_t& operator = (LLUnit other) { - return static_cast(*this); + mValue = convert(other); + return *this; } - operator storage_t () const + operator storage_t() const { return value(); } - storage_t value() const { return mBaseValue; } - - template - storage_t as() const + storage_t value() const { - return CONVERTED_TYPE(*this).value(); + return mValue; } - static storage_t convertToBase(storage_t derived_value) + void operator += (storage_t value) { - return (storage_t)derived_value; + mValue += value; } - static storage_t convertToDerived(storage_t base_value) + template + void operator += (LLUnit other) { - return (storage_t)base_value; + mValue += convert(other); } - void operator += (const unit_t other) + void operator -= (storage_t value) { - mBaseValue += other.mBaseValue; + mValue -= value; } - void operator -= (const unit_t other) + template + void operator -= (LLUnit other) { - mBaseValue -= other.mBaseValue; + mValue -= convert(other); } void operator *= (storage_t multiplicand) { - mBaseValue *= multiplicand; + mValue *= multiplicand; + } + + template + void operator *= (LLUnit multiplicand) + { + llstatic_assert(sizeof(OTHER_UNIT) == false, "Multiplication of unit types not supported."); } void operator /= (storage_t divisor) { - mBaseValue /= divisor; + mValue /= divisor; } -protected: - void setBaseValue(storage_t value) + template + void operator /= (LLUnit divisor) { - mBaseValue = value; + llstatic_assert(sizeof(OTHER_UNIT) == false, "Division of unit types not supported."); } - storage_t mBaseValue; -}; + template + static storage_t convert(LLUnit v) + { + return (storage_t)(v.value() + * LLUnits::ConversionFactor::get() + * LLUnits::ConversionFactor::get()); + } -template -struct LLUnitTypeWrapper -: public LLUnitType -{ - typedef LLUnitType unit_t; - LLUnitTypeWrapper(const unit_t& other) - : unit_t(other) - {} -}; +protected: + storage_t mValue; +}; // // operator + // -template -DERIVED_UNIT operator + (typename LLUnitType::storage_t first, LLUnitType second) +template +LLUnit operator + (LLUnit first, LLUnit second) { - return DERIVED_UNIT(first + LLUnitType(second).value()); + LLUnit result(first); + result += second; + return result; } +template +LLUnit operator + (LLUnit first, SCALAR_TYPE second) +{ + LLUnit result(first); + result += second; + return result; +} -// -// operator - -// -template -DERIVED_UNIT operator - (typename LLUnitType::storage_t first, LLUnitType second) +template +LLUnit operator + (SCALAR_TYPE first, LLUnit second) { - return DERIVED_UNIT(first - LLUnitType(second).value()); + LLUnit result(first); + result += second; + return result; } // -// operator * +// operator - // -template -DERIVED_UNIT operator * (STORAGE_TYPE first, LLUnitType second) +template +LLUnit operator - (LLUnit first, LLUnit second) { - return DERIVED_UNIT(first * second.value()); + LLUnit result(first); + result -= second; + return result; } -template -DERIVED_UNIT operator * (LLUnitType first, STORAGE_TYPE second) + +template +LLUnit operator - (LLUnit first, SCALAR_TYPE second) { - return DERIVED_UNIT(first.value() * second); + LLUnit result(first); + result -= second; + return result; } +template +LLUnit operator - (SCALAR_TYPE first, LLUnit second) +{ + LLUnit result(first); + result -= second; + return result; +} // -// operator / +// operator * // -template -DERIVED_UNIT operator / (STORAGE_TYPE first, LLUnitTypeWrapper second) +template +LLUnit operator * (SCALAR_TYPE first, LLUnit second) { - return DERIVED_UNIT(first / second.value()); + return LLUnit(first * second.value()); } -template -DERIVED_UNIT operator / (LLUnitTypeWrapper first, STORAGE_TYPE second) +template +LLUnit operator * (LLUnit first, SCALAR_TYPE second) { - return DERIVED_UNIT(first.value() / second); + return LLUnit(first.value() * second); } -// -// operator < -// -template - -bool operator < (typename LLUnitType::storage_t first, LLUnitType second) +template +void operator * (LLUnit, LLUnit) { - return first < second.value(); + llstatic_assert(sizeof(STORAGE_TYPE1) == false, "Multiplication of unit types results in new unit type - not supported."); } // -// operator <= +// operator / // -template -bool operator <= (typename LLUnitType::storage_t first, LLUnitType second) +template +SCALAR_TYPE operator / (SCALAR_TYPE first, LLUnit second) { - return first <= second.value(); + return SCALAR_TYPE(first / second.value()); } - -// -// operator > -// -template -bool operator > (typename LLUnitType::storage_t first, LLUnitType second) +template +LLUnit operator / (LLUnit first, SCALAR_TYPE second) { - return first > second.value(); + return LLUnit(first.value() / second); } -// -// operator >= -// -template -bool operator >= (typename LLUnitType::storage_t first, LLUnitType second) +template +void operator / (LLUnit, LLUnit) { - return first >= second.value(); + llstatic_assert(sizeof(STORAGE_TYPE1) == false, "Multiplication of unit types results in new unit type - not supported."); } -// -// operator == -// -template -bool operator == (typename LLUnitType::storage_t first, LLUnitType second) -{ - return first == second.value(); +#define COMPARISON_OPERATORS(op) \ +template \ +bool operator op (SCALAR_TYPE first, LLUnit second) \ +{ \ + return first op second.value(); \ +} \ + \ +template \ +bool operator op (LLUnit first, SCALAR_TYPE second) \ +{ \ + return first.value() op second; \ +} \ + \ +template \ +bool operator op (LLUnit first, LLUnit second) \ +{ \ + return first.value() op first.convert(second); \ } -// -// operator != -// -template -bool operator != (typename LLUnitType::storage_t first, LLUnitType second) +COMPARISON_OPERATORS(<) +COMPARISON_OPERATORS(<=) +COMPARISON_OPERATORS(>) +COMPARISON_OPERATORS(>=) +COMPARISON_OPERATORS(==) +COMPARISON_OPERATORS(!=) + +namespace LLUnits { - return first != second.value(); +#define LL_DECLARE_DERIVED_UNIT(base_unit_name, unit_name, conversion_factor)\ +struct unit_name \ +{ \ + typedef base_unit_name base_unit_t; \ +}; \ +template<> \ +struct ConversionFactor \ +{ \ + static F64 get() { return (conversion_factor); } \ +}; \ + \ +template<> \ +struct ConversionFactor \ +{ \ + static F64 get() { return 1.0 / (conversion_factor); } \ } -#define LL_DECLARE_BASE_UNIT(unit_name) \ - template \ - struct unit_name : public LLUnitType, unit_name > \ - { \ - typedef LLUnitType unit_t; \ - \ - unit_name(storage_t value = 0) \ - : LLUnitType(value) \ - {} \ - \ - template \ - unit_name(LLUnitType, SOURCE_TYPE> source) \ - { \ - assignFrom(source); \ - } \ - \ - template \ - void assignFrom(LLUnitType, SOURCE_TYPE> source) \ - { \ - setBaseValue((storage_t)source.unit_name::unit_t::value()); \ - } \ - \ - }; \ - -#define LL_DECLARE_DERIVED_UNIT(base_unit, derived_unit, conversion_factor) \ - template \ - struct derived_unit : public LLUnitType, derived_unit > \ - { \ - typedef LLUnitType, derived_unit > unit_t; \ - \ - derived_unit(storage_t value = 0) \ - : LLUnitType(value) \ - {} \ - \ - template \ - derived_unit(LLUnitType, SOURCE_TYPE> source) \ - { \ - assignFrom(source); \ - } \ - \ - template \ - void assignFrom(LLUnitType, SOURCE_TYPE> source) \ - { \ - setBaseValue((storage_t)source.base_unit::unit_t::value()); \ - } \ - \ - static F32 conversionToBaseFactor() { return (F32)(conversion_factor); } \ - \ - }; \ - -namespace LLUnit -{ - LL_DECLARE_BASE_UNIT(Bytes); - LL_DECLARE_DERIVED_UNIT(Bytes, Kilobytes, 1024); - LL_DECLARE_DERIVED_UNIT(Bytes, Megabytes, 1024 * 1024); - LL_DECLARE_DERIVED_UNIT(Bytes, Gigabytes, 1024 * 1024 * 1024); - LL_DECLARE_DERIVED_UNIT(Bytes, Bits, (1.f / 8.f)); - LL_DECLARE_DERIVED_UNIT(Bytes, Kilobits, (1024 / 8)); - LL_DECLARE_DERIVED_UNIT(Bytes, Megabits, (1024 / 8)); - LL_DECLARE_DERIVED_UNIT(Bytes, Gigabits, (1024 * 1024 * 1024 / 8)); - - LL_DECLARE_BASE_UNIT(Seconds); - LL_DECLARE_DERIVED_UNIT(Seconds, Minutes, 60); - LL_DECLARE_DERIVED_UNIT(Seconds, Hours, 60 * 60); - LL_DECLARE_DERIVED_UNIT(Seconds, Days, 60 * 60 * 24); - LL_DECLARE_DERIVED_UNIT(Seconds, Weeks, 60 * 60 * 24 * 7); - LL_DECLARE_DERIVED_UNIT(Seconds, Milliseconds, (1.f / 1000.f)); - LL_DECLARE_DERIVED_UNIT(Seconds, Microseconds, (1.f / (1000000.f))); - LL_DECLARE_DERIVED_UNIT(Seconds, Nanoseconds, (1.f / (1000000000.f))); - - LL_DECLARE_BASE_UNIT(Meters); - LL_DECLARE_DERIVED_UNIT(Meters, Kilometers, 1000); - LL_DECLARE_DERIVED_UNIT(Meters, Centimeters, 1 / 100); - LL_DECLARE_DERIVED_UNIT(Meters, Millimeters, 1 / 1000); +struct Bytes { typedef Bytes base_unit_t; }; +LL_DECLARE_DERIVED_UNIT(Bytes, Kilobytes, 1024); +LL_DECLARE_DERIVED_UNIT(Bytes, Megabytes, 1024 * 1024); +LL_DECLARE_DERIVED_UNIT(Bytes, Gigabytes, 1024 * 1024 * 1024); +LL_DECLARE_DERIVED_UNIT(Bytes, Bits, (1.0 / 8.0)); +LL_DECLARE_DERIVED_UNIT(Bytes, Kilobits, (1024 / 8)); +LL_DECLARE_DERIVED_UNIT(Bytes, Megabits, (1024 / 8)); +LL_DECLARE_DERIVED_UNIT(Bytes, Gigabits, (1024 * 1024 * 1024 / 8)); + +struct Seconds { typedef Seconds base_unit_t; }; +LL_DECLARE_DERIVED_UNIT(Seconds, Minutes, 60); +LL_DECLARE_DERIVED_UNIT(Seconds, Hours, 60 * 60); +LL_DECLARE_DERIVED_UNIT(Seconds, Days, 60 * 60 * 24); +LL_DECLARE_DERIVED_UNIT(Seconds, Weeks, 60 * 60 * 24 * 7); +LL_DECLARE_DERIVED_UNIT(Seconds, Milliseconds, (1.0 / 1000.0)); +LL_DECLARE_DERIVED_UNIT(Seconds, Microseconds, (1.0 / (1000000.0))); +LL_DECLARE_DERIVED_UNIT(Seconds, Nanoseconds, (1.0 / (1000000000.0))); + +struct Meters { typedef Meters base_unit_t; }; +LL_DECLARE_DERIVED_UNIT(Meters, Kilometers, 1000); +LL_DECLARE_DERIVED_UNIT(Meters, Centimeters, (1.0 / 100)); +LL_DECLARE_DERIVED_UNIT(Meters, Millimeters, (1.0 / 1000)); } #endif // LL_LLUNIT_H diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h index 78223e1e65..0d632f59be 100644 --- a/indra/llmath/v4color.h +++ b/indra/llmath/v4color.h @@ -49,10 +49,10 @@ class LLColor4 LLColor4(); // Initializes LLColor4 to (0, 0, 0, 1) LLColor4(F32 r, F32 g, F32 b); // Initializes LLColor4 to (r, g, b, 1) LLColor4(F32 r, F32 g, F32 b, F32 a); // Initializes LLColor4 to (r. g, b, a) - explicit LLColor4(U32 clr); // Initializes LLColor4 to (r=clr>>24, etc)) - explicit LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1) - explicit LLColor4(const LLColor3 &vec, F32 a = 1.f); // Initializes LLColor4 to (vec, a) + LLColor4(const LLColor3 &vec, F32 a = 1.f); // Initializes LLColor4 to (vec, a) explicit LLColor4(const LLSD& sd); + explicit LLColor4(const F32 *vec); // Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1) + explicit LLColor4(U32 clr); // Initializes LLColor4 to (r=clr>>24, etc)) explicit LLColor4(const LLColor4U& color4u); // "explicit" to avoid automatic conversion explicit LLColor4(const LLVector4& vector4); // "explicit" to avoid automatic conversion diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index fc1edbe664..5361d8e7be 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -50,9 +50,9 @@ U32 wpo2(U32 i); U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; -LLUnit::Bytes LLImageGL::sGlobalTextureMemory = 0; -LLUnit::Bytes LLImageGL::sBoundTextureMemory = 0; -LLUnit::Bytes LLImageGL::sCurBoundTextureMemory = 0; +LLUnit LLImageGL::sGlobalTextureMemory = 0; +LLUnit LLImageGL::sBoundTextureMemory = 0; +LLUnit LLImageGL::sCurBoundTextureMemory = 0; S32 LLImageGL::sCount = 0; LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE]; U32 LLImageGL::sCurTexName = 1; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index dfa59f2a34..11555e20c4 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -246,9 +246,9 @@ public: static F32 sLastFrameTime; // Global memory statistics - static LLUnit::Bytes sGlobalTextureMemory; // Tracks main memory texmem - static LLUnit::Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame - static LLUnit::Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame + static LLUnit sGlobalTextureMemory; // Tracks main memory texmem + static LLUnit sBoundTextureMemory; // Tracks bound texmem for last completed frame + static LLUnit sCurBoundTextureMemory; // Tracks bound texmem for current frame static U32 sBindCount; // Tracks number of texture binds for current frame static U32 sUniqueCount; // Tracks number of unique texture binds for current frame static BOOL sGlobalUseAnisotropic; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 838a982cb4..ac659c409b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -277,7 +277,7 @@ LLPumpIO* gServicePump = NULL; U64 gFrameTime = 0; F32 gFrameTimeSeconds = 0.f; -LLUnit::Seconds gFrameIntervalSeconds = 0.f; +LLUnit 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 diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index d9d888c626..f2bea7cdb2 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -322,7 +322,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 LLUnit::Seconds gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds +extern LLUnit 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/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/lltextureview.cpp b/indra/newview/lltextureview.cpp index d734620f10..288c1233e5 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -503,17 +503,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit::Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit::Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit::Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit::Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; 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); - LLUnit::Megabytes total_texture_downloaded = gTotalTextureData; - LLUnit::Megabytes total_object_downloaded = gTotalObjectData; + LLUnit total_texture_downloaded = gTotalTextureData; + LLUnit total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getCurlRequest().getTotalIssuedRequests() ; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -661,7 +661,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) ; @@ -673,8 +673,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/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index bad2f5b4cd..73a2e24424 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -430,10 +430,10 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) grid_from_region_handle(it->first, &grid_x, &grid_y); r.grid_x(grid_x); r.grid_y(grid_y); - r.duration(LLUnit::Microseconds(rec.getDuration()).value()); + r.duration(LLUnit(rec.getDuration()).value()); } - stats.duration(mCurRecording ? LLUnit::Microseconds(mCurRecording->getDuration()).value() : 0.0); + stats.duration(mCurRecording ? LLUnit(mCurRecording->getDuration()).value() : 0.0); stats.avatar.setProvided(true); for (S32 rez_stat=0; rez_stat < mAvatarRezStates.size(); ++rez_stat) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index acbe836c29..197d91593c 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,18 +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 LLUnit::Bits gObjectData; +extern LLUnit gObjectData; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4439,11 +4439,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4455,11 +4455,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4471,11 +4471,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ { if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit::Bytes)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 317fe5eaf8..36b1179e04 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -288,13 +288,13 @@ F32 gAveLandCompression = 0.f, gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f; -LLUnit::Bytes gTotalWorldData = 0, +LLUnit gTotalWorldData = 0, gTotalObjectData = 0, gTotalTextureData = 0; U32 gSimPingCount = 0; -LLUnit::Bits gObjectData = 0; +LLUnit gObjectData = 0; F32 gAvgSimPing = 0.f; -LLUnit::Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; +LLUnit gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; extern U32 gVisCompared; extern U32 gVisTested; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index eda7b3329d..14ee41dba0 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -319,7 +319,7 @@ void update_statistics(); void send_stats(); extern LLFrameTimer gTextureTimer; -extern LLUnit::Bytes gTotalTextureData; -extern LLUnit::Bytes gTotalObjectData; -extern LLUnit::Bytes gTotalTextureBytesPerBoostLevel[] ; +extern LLUnit gTotalTextureData; +extern LLUnit gTotalObjectData; +extern LLUnit gTotalTextureBytesPerBoostLevel[] ; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ceb8d3155c..f4e8e3eae1 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -65,8 +65,8 @@ /////////////////////////////////////////////////////////////////////////////// // extern -const LLUnit::Megabytes gMinVideoRam = 32; -const LLUnit::Megabytes gMaxVideoRam = 512; +const LLUnit gMinVideoRam = 32; +const LLUnit gMaxVideoRam = 512; // statics @@ -87,11 +87,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -LLUnit::Bytes LLViewerTexture::sBoundTextureMemory = 0; -LLUnit::Bytes LLViewerTexture::sTotalTextureMemory = 0; -LLUnit::Megabytes LLViewerTexture::sMaxBoundTextureMem = 0; -LLUnit::Megabytes LLViewerTexture::sMaxTotalTextureMem = 0; -LLUnit::Bytes LLViewerTexture::sMaxDesiredTextureMem = 0 ; +LLUnit LLViewerTexture::sBoundTextureMemory = 0; +LLUnit LLViewerTexture::sTotalTextureMemory = 0; +LLUnit LLViewerTexture::sMaxBoundTextureMem = 0; +LLUnit LLViewerTexture::sMaxTotalTextureMem = 0; +LLUnit LLViewerTexture::sMaxDesiredTextureMem = 0 ; S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -532,8 +532,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity if (sBoundTextureMemory >= sMaxBoundTextureMem || sTotalTextureMemory >= sMaxTotalTextureMem) { - //when texture memory overflows, lower down the threashold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit::Bytes(gMaxVideoRam)); + //when texture memory overflows, lower down the threshold to release the textures more aggressively. + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index aa1e2010b4..e9efb751f8 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -39,8 +39,8 @@ #include #include -extern const LLUnit::Megabytes gMinVideoRam; -extern const LLUnit::Megabytes gMaxVideoRam; +extern const LLUnit gMinVideoRam; +extern const LLUnit gMaxVideoRam; class LLFace; class LLImageGL ; @@ -323,11 +323,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - static LLUnit::Bytes sBoundTextureMemory; - static LLUnit::Bytes sTotalTextureMemory; - static LLUnit::Megabytes sMaxBoundTextureMem; - static LLUnit::Megabytes sMaxTotalTextureMem; - static LLUnit::Bytes sMaxDesiredTextureMem ; + static LLUnit sBoundTextureMemory; + static LLUnit sTotalTextureMemory; + static LLUnit sMaxBoundTextureMem; + static LLUnit sMaxTotalTextureMem; + static LLUnit sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b7415669bb..8e72ca1d74 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -733,7 +733,7 @@ public: { if(gTotalTextureBytesPerBoostLevel[i] > 0) { - addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit::Megabytes(gTotalTextureBytesPerBoostLevel[i]).value())); + addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } -- cgit v1.3 From 834a956a70bb49f1a242681bd611df4bbb7e4cc8 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 13 Dec 2012 15:43:10 -0800 Subject: We now handle local_id=0 in KillObject as a prefix to deleted local_id's. This is the real viewer-side work that was the motivation for MAINT-2123. Reviewed with Bao. --- indra/newview/llappviewer.cpp | 5 --- indra/newview/llviewermessage.cpp | 80 ++++++++++++++++++------------------ indra/newview/llviewerobjectlist.cpp | 12 +----- indra/newview/llviewerobjectlist.h | 1 - 4 files changed, 40 insertions(+), 58 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bffa1708ec..777fe4b8f1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4267,11 +4267,6 @@ void LLAppViewer::idle() llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl; gObjectList.mNumDeadObjectUpdates = 0; } - if (gObjectList.mNumUnknownKills) - { - llinfos << "Kills on unknown objects: " << gObjectList.mNumUnknownKills << llendl; - gObjectList.mNumUnknownKills = 0; - } if (gObjectList.mNumUnknownUpdates) { llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 67d400af2d..62d4e779d0 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4483,40 +4483,42 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects"); +const U32 KILLOBJECT_DELETE_OPCODE = 0; + void process_kill_object(LLMessageSystem *mesgsys, void **user_data) { LLFastTimer t(FTM_PROCESS_OBJECTS); - LLUUID id; - U32 local_id; - S32 i = 0; - S32 num_objects; - - num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); + LLUUID id; - mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + U32 ip = mesgsys->getSenderIP(); + U32 port = mesgsys->getSenderPort(); LLViewerRegion* regionp = NULL; - bool remove_from_cache = !local_id; //if the first local id is 0, physically remove all objects from VO cache. - if(remove_from_cache) { - i++; - - LLHost host(gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); + LLHost host(ip, port); regionp = LLWorld::getInstance()->getRegion(host); } - for (; i < num_objects; i++) + + bool delete_object = false; + S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); + for (S32 i = 0; i < num_objects; ++i) { + U32 local_id; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + if (local_id == KILLOBJECT_DELETE_OPCODE) + { + // This local_id is invalid, but was sent by the server to flag + // all subsequent local_id's as objects that were actually deleted + // rather than unsubscribed from interestlist. + delete_object = true; + continue; + } - LLViewerObjectList::getUUIDFromLocal(id, - local_id, - gMessageSystem->getSenderIP(), - gMessageSystem->getSenderPort()); + LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port); if (id == LLUUID::null) { LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL; - gObjectList.mNumUnknownKills++; continue; } else @@ -4524,39 +4526,35 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL; } - // ...don't kill the avatar - if (!(id == gAgentID)) + if (id == gAgentID) { - LLViewerObject *objectp = gObjectList.findObject(id); - if (objectp) - { - // Display green bubble on kill - if ( gShowObjectUpdates ) - { - LLColor4 color(0.f,1.f,0.f,1.f); - gPipeline.addDebugBlip(objectp->getPositionAgent(), color); - } - - // Do the kill - gObjectList.killObject(objectp); - } - //else - //{ - // LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; - // gObjectList.mNumUnknownKills++; - //} + // never kill our avatar + continue; + } - if(remove_from_cache) + LLViewerObject *objectp = gObjectList.findObject(id); + if (objectp) + { + // Display green bubble on kill + if ( gShowObjectUpdates ) { - regionp->killCacheEntry(local_id); + LLColor4 color(0.f,1.f,0.f,1.f); + gPipeline.addDebugBlip(objectp->getPositionAgent(), color); } + + // Do the kill + gObjectList.killObject(objectp); + } + + if(delete_object) + { + regionp->killCacheEntry(local_id); } // We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab, // which is using the object, release the mouse capture correctly when the object dies. // See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical(). LLSelectMgr::getInstance()->removeObjectFromSelections(id); - } } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f3552e2c2b..5b2214f3b3 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -107,7 +107,6 @@ LLViewerObjectList::LLViewerObjectList() mNumNewObjects = 0; mWasPaused = FALSE; mNumDeadObjectUpdates = 0; - mNumUnknownKills = 0; mNumUnknownUpdates = 0; } @@ -1342,16 +1341,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { - if (objectp->isDead()) - { - // This object is already dead. Don't need to do more. - return TRUE; - } - else - { - objectp->markDead(); - } - + objectp->markDead(); // does the right thing if object already dead return TRUE; } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 17c8c86ff5..3b26df7de6 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -191,7 +191,6 @@ public: S32 mNumUnknownUpdates; S32 mNumDeadObjectUpdates; - S32 mNumUnknownKills; S32 mNumDeadObjects; protected: std::vector mOrphanParents; // LocalID/ip,port of orphaned objects -- cgit v1.3 From f07b9c2c69f1f6882dcf249aacf33cdfacf878ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Mar 2013 11:08:25 -0800 Subject: renamed LLTrace stat gathering classes/methods to make the structure of LLTrace clearer Count becomes CountStatHandle Count.sum becomes sum(Count, value), etc. --- indra/llcommon/lltrace.h | 832 +++++++++++++++++----------------- indra/llcommon/lltracerecording.h | 23 +- indra/llimage/llimage.cpp | 2 +- indra/llimage/llimage.h | 2 +- indra/llmessage/llassetstorage.cpp | 24 +- indra/llui/llstatbar.cpp | 16 +- indra/llui/lltextbase.cpp | 2 +- indra/llui/lltextbase.h | 2 +- indra/llui/llview.cpp | 2 +- indra/llui/llview.h | 2 +- indra/llui/llviewmodel.cpp | 2 +- indra/llui/llviewmodel.h | 2 +- indra/newview/llagent.cpp | 4 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/lldrawable.cpp | 2 +- indra/newview/lldrawable.h | 2 +- indra/newview/llfloaterjoystick.cpp | 14 +- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llhudnametag.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 2 +- indra/newview/llpanelface.cpp | 2 +- indra/newview/llpreviewscript.cpp | 4 +- indra/newview/llselectmgr.cpp | 4 +- indra/newview/llstartup.cpp | 2 +- indra/newview/lltexlayer.cpp | 2 +- indra/newview/lltexturefetch.cpp | 12 +- indra/newview/lltexturefetch.h | 4 +- indra/newview/lltooldraganddrop.cpp | 6 +- indra/newview/lltoolplacer.cpp | 2 +- indra/newview/llviewerassetstats.cpp | 12 +- indra/newview/llviewercamera.cpp | 4 +- indra/newview/llviewercamera.h | 8 +- indra/newview/llviewerdisplay.cpp | 4 +- indra/newview/llviewermenufile.cpp | 12 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 4 +- indra/newview/llviewerobject.h | 2 +- indra/newview/llviewerobjectlist.cpp | 14 +- indra/newview/llviewerobjectlist.h | 2 +- indra/newview/llviewerstats.cpp | 222 ++++----- indra/newview/llviewerstats.h | 35 +- indra/newview/llviewertexturelist.cpp | 20 +- indra/newview/llviewerwindow.cpp | 8 +- indra/newview/llviewerwindow.h | 4 +- indra/newview/llvoavatarself.cpp | 6 +- indra/newview/llworld.cpp | 14 +- indra/newview/pipeline.cpp | 4 +- 47 files changed, 677 insertions(+), 679 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 5d57327a14..44da1939c6 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -42,517 +42,519 @@ namespace LLTrace { - class Recording; - - typedef LLUnit Bytes; - typedef LLUnit Kilobytes; - typedef LLUnit Megabytes; - typedef LLUnit Gigabytes; - typedef LLUnit Bits; - typedef LLUnit Kilobits; - typedef LLUnit Megabits; - typedef LLUnit Gigabits; - - typedef LLUnit Seconds; - typedef LLUnit Milliseconds; - typedef LLUnit Minutes; - typedef LLUnit Hours; - typedef LLUnit Milliseconds; - typedef LLUnit Microseconds; - typedef LLUnit Nanoseconds; - - typedef LLUnit Meters; - typedef LLUnit Kilometers; - typedef LLUnit Centimeters; - typedef LLUnit Millimeters; - - void init(); - void cleanup(); - bool isInitialized(); - - const LLThreadLocalPointer& get_thread_recorder(); - void set_thread_recorder(class ThreadRecorder*); - - class MasterThreadRecorder& getMasterThreadRecorder(); - - // one per thread per type - template - class AccumulatorBuffer : public LLRefCount - { - typedef AccumulatorBuffer self_t; - static const U32 DEFAULT_ACCUMULATOR_BUFFER_SIZE = 64; - private: - struct StaticAllocationMarker { }; - - AccumulatorBuffer(StaticAllocationMarker m) - : mStorageSize(0), - mStorage(NULL), - mNextStorageSlot(0) - { - } +class Recording; + +typedef LLUnit Bytes; +typedef LLUnit Kilobytes; +typedef LLUnit Megabytes; +typedef LLUnit Gigabytes; +typedef LLUnit Bits; +typedef LLUnit Kilobits; +typedef LLUnit Megabits; +typedef LLUnit Gigabits; + +typedef LLUnit Seconds; +typedef LLUnit Milliseconds; +typedef LLUnit Minutes; +typedef LLUnit Hours; +typedef LLUnit Milliseconds; +typedef LLUnit Microseconds; +typedef LLUnit Nanoseconds; + +typedef LLUnit Meters; +typedef LLUnit Kilometers; +typedef LLUnit Centimeters; +typedef LLUnit Millimeters; + +void init(); +void cleanup(); +bool isInitialized(); + +const LLThreadLocalPointer& get_thread_recorder(); +void set_thread_recorder(class ThreadRecorder*); + +class MasterThreadRecorder& getMasterThreadRecorder(); + +// one per thread per type +template +class AccumulatorBuffer : public LLRefCount +{ + typedef AccumulatorBuffer self_t; + static const U32 DEFAULT_ACCUMULATOR_BUFFER_SIZE = 64; +private: + struct StaticAllocationMarker { }; - public: + AccumulatorBuffer(StaticAllocationMarker m) + : mStorageSize(0), + mStorage(NULL), + mNextStorageSlot(0) + { + } - AccumulatorBuffer(const AccumulatorBuffer& other = *getDefaultBuffer()) - : mStorageSize(0), - mStorage(NULL), - mNextStorageSlot(other.mNextStorageSlot) - { - resize(other.mStorageSize); - for (S32 i = 0; i < mNextStorageSlot; i++) - { - mStorage[i] = other.mStorage[i]; - } - } +public: - ~AccumulatorBuffer() + AccumulatorBuffer(const AccumulatorBuffer& other = *getDefaultBuffer()) + : mStorageSize(0), + mStorage(NULL), + mNextStorageSlot(other.mNextStorageSlot) + { + resize(other.mStorageSize); + for (S32 i = 0; i < mNextStorageSlot; i++) { - if (LLThreadLocalSingletonPointer::getInstance() == mStorage) - { - LLThreadLocalSingletonPointer::setInstance(getDefaultBuffer()->mStorage); - } - delete[] mStorage; + mStorage[i] = other.mStorage[i]; } + } - LL_FORCE_INLINE ACCUMULATOR& operator[](size_t index) - { - return mStorage[index]; + ~AccumulatorBuffer() + { + if (LLThreadLocalSingletonPointer::getInstance() == mStorage) + { + LLThreadLocalSingletonPointer::setInstance(getDefaultBuffer()->mStorage); } + delete[] mStorage; + } - LL_FORCE_INLINE const ACCUMULATOR& operator[](size_t index) const - { - return mStorage[index]; - } + LL_FORCE_INLINE ACCUMULATOR& operator[](size_t index) + { + return mStorage[index]; + } - void addSamples(const AccumulatorBuffer& other) - { - llassert(mNextStorageSlot == other.mNextStorageSlot); + LL_FORCE_INLINE const ACCUMULATOR& operator[](size_t index) const + { + return mStorage[index]; + } - for (size_t i = 0; i < mNextStorageSlot; i++) - { - mStorage[i].addSamples(other.mStorage[i]); - } - } + void addSamples(const AccumulatorBuffer& other) + { + llassert(mNextStorageSlot == other.mNextStorageSlot); - void copyFrom(const AccumulatorBuffer& other) + for (size_t i = 0; i < mNextStorageSlot; i++) { - for (size_t i = 0; i < mNextStorageSlot; i++) - { - mStorage[i] = other.mStorage[i]; - } + mStorage[i].addSamples(other.mStorage[i]); } + } - void reset(const AccumulatorBuffer* other = NULL) + void copyFrom(const AccumulatorBuffer& other) + { + for (size_t i = 0; i < mNextStorageSlot; i++) { - for (size_t i = 0; i < mNextStorageSlot; i++) - { - mStorage[i].reset(other ? &other->mStorage[i] : NULL); - } + mStorage[i] = other.mStorage[i]; } + } - void makePrimary() + void reset(const AccumulatorBuffer* other = NULL) + { + for (size_t i = 0; i < mNextStorageSlot; i++) { - LLThreadLocalSingletonPointer::setInstance(mStorage); + mStorage[i].reset(other ? &other->mStorage[i] : NULL); } + } - bool isPrimary() const - { - return LLThreadLocalSingletonPointer::getInstance() == mStorage; - } + void makePrimary() + { + LLThreadLocalSingletonPointer::setInstance(mStorage); + } - LL_FORCE_INLINE static ACCUMULATOR* getPrimaryStorage() - { - return LLThreadLocalSingletonPointer::getInstance(); - } + bool isPrimary() const + { + return LLThreadLocalSingletonPointer::getInstance() == mStorage; + } - // NOTE: this is not thread-safe. We assume that slots are reserved in the main thread before any child threads are spawned - size_t reserveSlot() + LL_FORCE_INLINE static ACCUMULATOR* getPrimaryStorage() + { + return LLThreadLocalSingletonPointer::getInstance(); + } + + // NOTE: this is not thread-safe. We assume that slots are reserved in the main thread before any child threads are spawned + size_t reserveSlot() + { + if (LLTrace::isInitialized()) { - if (LLTrace::isInitialized()) - { - llerrs << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << llendl; - } - size_t next_slot = mNextStorageSlot++; - if (next_slot >= mStorageSize) - { - resize(mStorageSize + (mStorageSize >> 2)); - } - llassert(mStorage && next_slot < mStorageSize); - return next_slot; + llerrs << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << llendl; } - - void resize(size_t new_size) + size_t next_slot = mNextStorageSlot++; + if (next_slot >= mStorageSize) { - if (new_size <= mStorageSize) return; + resize(mStorageSize + (mStorageSize >> 2)); + } + llassert(mStorage && next_slot < mStorageSize); + return next_slot; + } - ACCUMULATOR* old_storage = mStorage; - mStorage = new ACCUMULATOR[new_size]; - if (old_storage) - { - for (S32 i = 0; i < mStorageSize; i++) - { - mStorage[i] = old_storage[i]; - } - } - mStorageSize = new_size; - delete[] old_storage; + void resize(size_t new_size) + { + if (new_size <= mStorageSize) return; - self_t* default_buffer = getDefaultBuffer(); - if (this != default_buffer - && new_size > default_buffer->size()) + ACCUMULATOR* old_storage = mStorage; + mStorage = new ACCUMULATOR[new_size]; + if (old_storage) + { + for (S32 i = 0; i < mStorageSize; i++) { - //NB: this is not thread safe, but we assume that all resizing occurs during static initialization - default_buffer->resize(new_size); + mStorage[i] = old_storage[i]; } } + mStorageSize = new_size; + delete[] old_storage; - size_t size() const + self_t* default_buffer = getDefaultBuffer(); + if (this != default_buffer + && new_size > default_buffer->size()) { - return mNextStorageSlot; + //NB: this is not thread safe, but we assume that all resizing occurs during static initialization + default_buffer->resize(new_size); } + } + + size_t size() const + { + return mNextStorageSlot; + } - static self_t* getDefaultBuffer() + static self_t* getDefaultBuffer() + { + // this buffer is allowed to leak so that trace calls from global destructors have somewhere to put their data + // so as not to trigger an access violation + static self_t* sBuffer = new AccumulatorBuffer(StaticAllocationMarker()); + static bool sInitialized = false; + if (!sInitialized) { - // this buffer is allowed to leak so that trace calls from global destructors have somewhere to put their data - // so as not to trigger an access violation - static self_t* sBuffer = new AccumulatorBuffer(StaticAllocationMarker()); - static bool sInitialized = false; - if (!sInitialized) - { - sBuffer->resize(DEFAULT_ACCUMULATOR_BUFFER_SIZE); - sInitialized = true; - } - return sBuffer; + sBuffer->resize(DEFAULT_ACCUMULATOR_BUFFER_SIZE); + sInitialized = true; } + return sBuffer; + } - private: - ACCUMULATOR* mStorage; - size_t mStorageSize; - size_t mNextStorageSlot; - }; +private: + ACCUMULATOR* mStorage; + size_t mStorageSize; + size_t mNextStorageSlot; +}; - //TODO: replace with decltype when C++11 is enabled - template - struct MeanValueType - { - typedef F64 type; - }; +//TODO: replace with decltype when C++11 is enabled +template +struct MeanValueType +{ + typedef F64 type; +}; - template - class TraceType - : public LLInstanceTracker, std::string> +template +class TraceType +: public LLInstanceTracker, std::string> +{ +public: + TraceType(const char* name, const char* description = NULL) + : LLInstanceTracker, std::string>(name), + mName(name), + mDescription(description ? description : ""), + mAccumulatorIndex(AccumulatorBuffer::getDefaultBuffer()->reserveSlot()) + {} + + LL_FORCE_INLINE ACCUMULATOR* getPrimaryAccumulator() const { - public: - TraceType(const char* name, const char* description = NULL) - : LLInstanceTracker, std::string>(name), - mName(name), - mDescription(description ? description : ""), - mAccumulatorIndex(AccumulatorBuffer::getDefaultBuffer()->reserveSlot()) - {} + ACCUMULATOR* accumulator_storage = AccumulatorBuffer::getPrimaryStorage(); + return &accumulator_storage[mAccumulatorIndex]; + } - LL_FORCE_INLINE ACCUMULATOR* getPrimaryAccumulator() const - { - ACCUMULATOR* accumulator_storage = AccumulatorBuffer::getPrimaryStorage(); - return &accumulator_storage[mAccumulatorIndex]; - } + size_t getIndex() const { return mAccumulatorIndex; } - size_t getIndex() const { return mAccumulatorIndex; } + const std::string& getName() const { return mName; } - const std::string& getName() const { return mName; } +protected: + const std::string mName; + const std::string mDescription; + const size_t mAccumulatorIndex; +}; - protected: - const std::string mName; - const std::string mDescription; - const size_t mAccumulatorIndex; - }; +template +class MeasurementAccumulator +{ +public: + typedef T value_t; + typedef MeasurementAccumulator self_t; + + MeasurementAccumulator() + : mSum(0), + mMin((std::numeric_limits::max)()), + mMax((std::numeric_limits::min)()), + mMean(0), + mVarianceSum(0), + mNumSamples(0), + mLastValue(0) + {} - template - class MeasurementAccumulator + void sample(T value) { - public: - typedef T value_t; - typedef MeasurementAccumulator self_t; - - MeasurementAccumulator() - : mSum(0), - mMin((std::numeric_limits::max)()), - mMax((std::numeric_limits::min)()), - mMean(0), - mVarianceSum(0), - mNumSamples(0), - mLastValue(0) - {} + mNumSamples++; + mSum += value; + if (value < mMin) + { + mMin = value; + } + if (value > mMax) + { + mMax = value; + } + F64 old_mean = mMean; + mMean += ((F64)value - old_mean) / (F64)mNumSamples; + mVarianceSum += ((F64)value - old_mean) * ((F64)value - mMean); + mLastValue = value; + } - LL_FORCE_INLINE void sample(T value) + void addSamples(const self_t& other) + { + if (other.mNumSamples) { - T storage_value(value); - mNumSamples++; - mSum += storage_value; - if (storage_value < mMin) + mSum += other.mSum; + if (other.mMin < mMin) { - mMin = storage_value; + mMin = other.mMin; } - if (storage_value > mMax) + if (other.mMax > mMax) { - mMax = storage_value; + mMax = other.mMax; } - F64 old_mean = mMean; - mMean += ((F64)storage_value - old_mean) / (F64)mNumSamples; - mVarianceSum += ((F64)storage_value - old_mean) * ((F64)storage_value - mMean); - mLastValue = storage_value; - } - - void addSamples(const self_t& other) - { - if (other.mNumSamples) + F64 weight = (F64)mNumSamples / (F64)(mNumSamples + other.mNumSamples); + mNumSamples += other.mNumSamples; + mMean = mMean * weight + other.mMean * (1.f - weight); + + // combine variance (and hence standard deviation) of 2 different sized sample groups using + // the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm + F64 n_1 = (F64)mNumSamples, + n_2 = (F64)other.mNumSamples; + F64 m_1 = mMean, + m_2 = other.mMean; + F64 v_1 = mVarianceSum / mNumSamples, + v_2 = other.mVarianceSum / other.mNumSamples; + if (n_1 == 0) + { + mVarianceSum = other.mVarianceSum; + } + else if (n_2 == 0) { - mSum += other.mSum; - if (other.mMin < mMin) - { - mMin = other.mMin; - } - if (other.mMax > mMax) - { - mMax = other.mMax; - } - F64 weight = (F64)mNumSamples / (F64)(mNumSamples + other.mNumSamples); - mNumSamples += other.mNumSamples; - mMean = mMean * weight + other.mMean * (1.f - weight); - - // combine variance (and hence standard deviation) of 2 different sized sample groups using - // the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm - F64 n_1 = (F64)mNumSamples, - n_2 = (F64)other.mNumSamples; - F64 m_1 = mMean, - m_2 = other.mMean; - F64 sd_1 = getStandardDeviation(), - sd_2 = other.getStandardDeviation(); - if (n_1 == 0) - { - mVarianceSum = other.mVarianceSum; - } - else if (n_2 == 0) - { - // don't touch variance - // mVarianceSum = mVarianceSum; - } - else - { - mVarianceSum = (F64)mNumSamples - * ((((n_1 - 1.f) * sd_1 * sd_1) - + ((n_2 - 1.f) * sd_2 * sd_2) - + (((n_1 * n_2) / (n_1 + n_2)) - * ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2)))) - / (n_1 + n_2 - 1.f)); - } - mLastValue = other.mLastValue; + // don't touch variance + // mVarianceSum = mVarianceSum; } + else + { + mVarianceSum = (F64)mNumSamples + * ((((n_1 - 1.f) * v_1) + + ((n_2 - 1.f) * v_2) + + (((n_1 * n_2) / (n_1 + n_2)) + * ((m_1 * m_1) + (m_2 * m_2) - (2.f * m_1 * m_2)))) + / (n_1 + n_2 - 1.f)); + } + mLastValue = other.mLastValue; } + } - void reset(const self_t* other) - { - mNumSamples = 0; - mSum = 0; - mMin = 0; - mMax = 0; - mMean = 0; - mVarianceSum = 0; - mLastValue = other ? other->mLastValue : 0; - } + void reset(const self_t* other) + { + mNumSamples = 0; + mSum = 0; + mMin = 0; + mMax = 0; + mMean = 0; + mVarianceSum = 0; + mLastValue = other ? other->mLastValue : 0; + } - T getSum() const { return (T)mSum; } - T getMin() const { return (T)mMin; } - T getMax() const { return (T)mMax; } - T getLastValue() const { return (T)mLastValue; } - F64 getMean() const { return mMean; } - F64 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } - U32 getSampleCount() const { return mNumSamples; } + T getSum() const { return (T)mSum; } + T getMin() const { return (T)mMin; } + T getMax() const { return (T)mMax; } + T getLastValue() const { return (T)mLastValue; } + F64 getMean() const { return mMean; } + F64 getStandardDeviation() const { return sqrtf(mVarianceSum / mNumSamples); } + U32 getSampleCount() const { return mNumSamples; } - private: - T mSum, - mMin, - mMax, - mLastValue; +private: + T mSum, + mMin, + mMax, + mLastValue; - F64 mMean, - mVarianceSum; + F64 mMean, + mVarianceSum; - U32 mNumSamples; - }; + U32 mNumSamples; +}; + +template +class CountAccumulator +{ +public: + typedef CountAccumulator self_t; + typedef T value_t; + + CountAccumulator() + : mSum(0), + mNumSamples(0) + {} - template - class CountAccumulator + void add(T value) { - public: - typedef CountAccumulator self_t; - typedef T value_t; + mNumSamples++; + mSum += value; + } - CountAccumulator() - : mSum(0), - mNumSamples(0) - {} + void addSamples(const CountAccumulator& other) + { + mSum += other.mSum; + mNumSamples += other.mNumSamples; + } - LL_FORCE_INLINE void add(T value) - { - mNumSamples++; - mSum += value; - } + void reset(const self_t* other) + { + mNumSamples = 0; + mSum = 0; + } - void addSamples(const CountAccumulator& other) - { - mSum += other.mSum; - mNumSamples += other.mNumSamples; - } + T getSum() const { return (T)mSum; } - void reset(const self_t* other) - { - mNumSamples = 0; - mSum = 0; - } + U32 getSampleCount() const { return mNumSamples; } - T getSum() const { return (T)mSum; } +private: + T mSum; - U32 getSampleCount() const { return mNumSamples; } + U32 mNumSamples; +}; - private: - T mSum; +class TimeBlockAccumulator +{ +public: + typedef LLUnit value_t; + typedef TimeBlockAccumulator self_t; - U32 mNumSamples; + // fake class that allows us to view call count aspect of timeblock accumulator + struct CallCountAspect + { + typedef U32 value_t; }; - class TimeBlockAccumulator + struct SelfTimeAspect { - public: typedef LLUnit value_t; - typedef TimeBlockAccumulator self_t; + }; - // fake class that allows us to view call count aspect of timeblock accumulator - struct CallCountAspect - { - typedef U32 value_t; - }; + TimeBlockAccumulator(); + void addSamples(const self_t& other); + void reset(const self_t* other); + + // + // members + // + U64 mStartTotalTimeCounter, + mTotalTimeCounter, + mSelfTimeCounter; + U32 mCalls; + class TimeBlock* mParent; // last acknowledged parent of this time block + class TimeBlock* mLastCaller; // used to bootstrap tree construction + U16 mActiveCount; // number of timers with this ID active on stack + bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame - struct SelfTimeAspect - { - typedef LLUnit value_t; - }; - - TimeBlockAccumulator(); - void addSamples(const self_t& other); - void reset(const self_t* other); - - // - // members - // - U64 mStartTotalTimeCounter, - mTotalTimeCounter, - mSelfTimeCounter; - U32 mCalls; - class TimeBlock* mParent; // last acknowledged parent of this time block - class TimeBlock* mLastCaller; // used to bootstrap tree construction - U16 mActiveCount; // number of timers with this ID active on stack - bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame +}; - }; +template<> +struct MeanValueType > +{ + typedef LLUnit type; +}; - template<> - struct MeanValueType > - { - typedef LLUnit type; - }; +template<> +class TraceType +: public TraceType +{ +public: - template<> - class TraceType + TraceType(const char* name, const char* description = "") + : TraceType(name, description) + {} +}; + +template<> +struct MeanValueType > +{ + typedef F64 type; +}; + + +template<> +class TraceType : public TraceType - { - public: +{ +public: - TraceType(const char* name, const char* description = "") + TraceType(const char* name, const char* description = "") : TraceType(name, description) - {} - }; - - template<> - struct MeanValueType > - { - typedef F64 type; - }; + {} +}; +template<> +struct MeanValueType > +{ + typedef LLUnit type; +}; - template<> - class TraceType - : public TraceType - { - public: - TraceType(const char* name, const char* description = "") - : TraceType(name, description) - {} - }; +class TimeBlock; +class TimeBlockTreeNode +{ +public: + TimeBlockTreeNode(); - template<> - struct MeanValueType > - { - typedef LLUnit type; - }; + void setParent(TimeBlock* parent); + TimeBlock* getParent() { return mParent; } + TimeBlock* mBlock; + TimeBlock* mParent; + std::vector mChildren; + bool mNeedsSorting; +}; - class TimeBlock; - class TimeBlockTreeNode - { - public: - TimeBlockTreeNode(); - void setParent(TimeBlock* parent); - TimeBlock* getParent() { return mParent; } +template +class MeasurementStatHandle +: public TraceType::type_t> > +{ +public: + typedef typename LLUnits::HighestPrecisionType::type_t storage_t; + typedef TraceType::type_t> > trace_t; - TimeBlock* mBlock; - TimeBlock* mParent; - std::vector mChildren; - bool mNeedsSorting; - }; + MeasurementStatHandle(const char* name, const char* description = NULL) + : trace_t(name, description) + {} +}; +template +void sample(MeasurementStatHandle& measurement, VALUE_T value) +{ + T converted_value(value); + measurement.getPrimaryAccumulator()->sample(LLUnits::rawValue(converted_value)); +} - template - class Measurement - : public TraceType::type_t> > - { - public: - typedef typename LLUnits::HighestPrecisionType::type_t storage_t; - typedef TraceType::type_t> > trace_t; - Measurement(const char* name, const char* description = NULL) - : trace_t(name, description) - {} +template +class CountStatHandle +: public TraceType::type_t> > +{ +public: + typedef typename LLUnits::HighestPrecisionType::type_t storage_t; + typedef TraceType::type_t> > trace_t; - template - void sample(UNIT_T value) - { - T converted_value(value); - trace_t::getPrimaryAccumulator()->sample(LLUnits::rawValue(converted_value)); - } - }; + CountStatHandle(const char* name, const char* description = NULL) + : trace_t(name) + {} - template - class Count - : public TraceType::type_t> > - { - public: - typedef typename LLUnits::HighestPrecisionType::type_t storage_t; - typedef TraceType::type_t> > trace_t; +}; - Count(const char* name, const char* description = NULL) - : trace_t(name) - {} +template +void add(CountStatHandle& count, VALUE_T value) +{ + T converted_value(value); + count.getPrimaryAccumulator()->add(LLUnits::rawValue(converted_value)); +} - template - void add(UNIT_T value) - { - T converted_value(value); - trace_t::getPrimaryAccumulator()->add(LLUnits::rawValue(converted_value)); - } - }; struct MemStatAccumulator { @@ -585,11 +587,11 @@ struct MemStatAccumulator mDeallocatedCount; }; -class MemStat : public TraceType +class MemStatHandle : public TraceType { public: typedef TraceType trace_t; - MemStat(const char* name) + MemStatHandle(const char* name) : trace_t(name) {} }; diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index af9ba02b29..6b4d4357db 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -135,11 +135,11 @@ namespace LLTrace LLUnit getSum(const TraceType& stat) const; LLUnit getPerSec(const TraceType& stat) const; - // Count accessors + // CountStatHandle accessors F64 getSum(const TraceType >& stat) const; S64 getSum(const TraceType >& stat) const; template - T getSum(const Count& stat) const + T getSum(const CountStatHandle& stat) const { return (T)getSum(static_cast::type_t> >&> (stat)); } @@ -147,7 +147,7 @@ namespace LLTrace F64 getPerSec(const TraceType >& stat) const; F64 getPerSec(const TraceType >& stat) const; template - T getPerSec(const Count& stat) const + T getPerSec(const CountStatHandle& stat) const { return (T)getPerSec(static_cast::type_t> >&> (stat)); } @@ -156,11 +156,11 @@ namespace LLTrace U32 getSampleCount(const TraceType >& stat) const; - // Measurement accessors + // MeasurementStatHandle accessors F64 getSum(const TraceType >& stat) const; S64 getSum(const TraceType >& stat) const; template - T getSum(const Measurement& stat) const + T getSum(const MeasurementStatHandle& stat) const { return (T)getSum(static_cast::type_t> >&> (stat)); } @@ -168,7 +168,7 @@ namespace LLTrace F64 getPerSec(const TraceType >& stat) const; F64 getPerSec(const TraceType >& stat) const; template - T getPerSec(const Measurement& stat) const + T getPerSec(const MeasurementStatHandle& stat) const { return (T)getPerSec(static_cast::type_t> >&> (stat)); } @@ -176,7 +176,7 @@ namespace LLTrace F64 getMin(const TraceType >& stat) const; S64 getMin(const TraceType >& stat) const; template - T getMin(const Measurement& stat) const + T getMin(const MeasurementStatHandle& stat) const { return (T)getMin(static_cast::type_t> >&> (stat)); } @@ -184,7 +184,7 @@ namespace LLTrace F64 getMax(const TraceType >& stat) const; S64 getMax(const TraceType >& stat) const; template - T getMax(const Measurement& stat) const + T getMax(const MeasurementStatHandle& stat) const { return (T)getMax(static_cast::type_t> >&> (stat)); } @@ -192,7 +192,7 @@ namespace LLTrace F64 getMean(const TraceType >& stat) const; F64 getMean(const TraceType >& stat) const; template - T getMean(Measurement& stat) const + T getMean(MeasurementStatHandle& stat) const { return (T)getMean(static_cast::type_t> >&> (stat)); } @@ -200,7 +200,7 @@ namespace LLTrace F64 getStandardDeviation(const TraceType >& stat) const; F64 getStandardDeviation(const TraceType >& stat) const; template - T getStandardDeviation(const Measurement& stat) const + T getStandardDeviation(const MeasurementStatHandle& stat) const { return (T)getMean(static_cast::type_t> >&> (stat)); } @@ -208,7 +208,7 @@ namespace LLTrace F64 getLastValue(const TraceType >& stat) const; S64 getLastValue(const TraceType >& stat) const; template - T getLastValue(const Measurement& stat) const + T getLastValue(const MeasurementStatHandle& stat) const { return (T)getLastValue(static_cast::type_t> >&> (stat)); } @@ -394,6 +394,7 @@ namespace LLTrace { public: void extend(); + Recording& getAcceptedRecording() { return mAcceptedRecording; } // implementation for LLStopWatchControlsMixin diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index f3452ce86a..f06547ed7d 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -50,7 +50,7 @@ LLMutex* LLImage::sMutex = NULL; bool LLImage::sUseNewByteRange = false; S32 LLImage::sMinimalReverseByteRangePercent = 75; LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ; -LLTrace::MemStat LLImageBase::sMemStat("LLImage"); +LLTrace::MemStatHandle LLImageBase::sMemStat("LLImage"); //static void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent) diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 6eafcf1bf7..5487bc6370 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,7 +165,7 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; private: U8 *mData; diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 328d15b4bc..430c9503ac 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -55,7 +55,7 @@ LLAssetStorage *gAssetStorage = NULL; LLMetrics *LLAssetStorage::metric_recipient = NULL; -static LLTrace::Count<> sFailedDownloadCount("faileddownloads", "Number of times LLAssetStorage::getAssetData() has failed"); +static LLTrace::CountStatHandle<> sFailedDownloadCount("faileddownloads", "Number of times LLAssetStorage::getAssetData() has failed"); const LLUUID CATEGORIZE_LOST_AND_FOUND_ID(std::string("00000000-0000-0000-0000-000000000010")); @@ -454,7 +454,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_NONE); } return; @@ -465,7 +465,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // Special case early out for NULL uuid and for shutting down if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); } return; @@ -578,7 +578,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -658,7 +658,7 @@ void LLAssetStorage::downloadCompleteCallback( { if (result != LL_ERR_NOERR) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); } tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status); } @@ -680,7 +680,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen // Special case early out for NULL uuid if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); } return; @@ -753,7 +753,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -798,7 +798,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( if (result != LL_ERR_NOERR) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); } req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status); } @@ -900,7 +900,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; if (callback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); } } @@ -945,7 +945,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback( if (result != LL_ERR_NOERR) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); } req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status); } @@ -1259,7 +1259,7 @@ bool LLAssetStorage::deletePendingRequestImpl(LLAssetStorage::request_list_t* re } if (req->mDownCallback) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED); } if (req->mInfoCallback) @@ -1388,7 +1388,7 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAss if (status != LL_ERR_NOERR) { - sFailedDownloadCount.add(1); + add(sFailedDownloadCount, 1); } legacy->mDownCallback(filename.c_str(), uuid, legacy->mUserData, status, ext_status); delete legacy; diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 1bc9a9fc67..954f615210 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -45,10 +45,10 @@ LLStatBar::LLStatBar(const Params& p) mUnitLabel(p.unit_label), mMinBar(p.bar_min), mMaxBar(p.bar_max), - mCountFloatp(LLTrace::Count<>::getInstance(p.stat)), - mCountIntp(LLTrace::Count::getInstance(p.stat)), - mMeasurementFloatp(LLTrace::Measurement<>::getInstance(p.stat)), - mMeasurementIntp(LLTrace::Measurement::getInstance(p.stat)), + mCountFloatp(LLTrace::CountStatHandle<>::getInstance(p.stat)), + mCountIntp(LLTrace::CountStatHandle::getInstance(p.stat)), + mMeasurementFloatp(LLTrace::MeasurementStatHandle<>::getInstance(p.stat)), + mMeasurementIntp(LLTrace::MeasurementStatHandle::getInstance(p.stat)), mTickSpacing(p.tick_spacing), mLabelSpacing(p.label_spacing), mPrecision(p.precision), @@ -336,10 +336,10 @@ void LLStatBar::draw() void LLStatBar::setStat(const std::string& stat_name) { - mCountFloatp = LLTrace::Count<>::getInstance(stat_name); - mCountIntp = LLTrace::Count::getInstance(stat_name); - mMeasurementFloatp = LLTrace::Measurement<>::getInstance(stat_name); - mMeasurementIntp = LLTrace::Measurement::getInstance(stat_name); + mCountFloatp = LLTrace::CountStatHandle<>::getInstance(stat_name); + mCountIntp = LLTrace::CountStatHandle::getInstance(stat_name); + mMeasurementFloatp = LLTrace::MeasurementStatHandle<>::getInstance(stat_name); + mMeasurementIntp = LLTrace::MeasurementStatHandle::getInstance(stat_name); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 74e966560e..680b6ed16d 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -47,7 +47,7 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; -LLTrace::MemStat LLTextSegment::sMemStat("LLTextSegment"); +LLTrace::MemStatHandle LLTextSegment::sMemStat("LLTextSegment"); LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 7d791ec75a..2ce15d891a 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -99,7 +99,7 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; protected: S32 mStart; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 47bf410af6..587953477d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -67,7 +67,7 @@ LLView* LLView::sPreviewClickedElement = NULL; BOOL LLView::sDrawPreviewHighlights = FALSE; S32 LLView::sLastLeftXML = S32_MIN; S32 LLView::sLastBottomXML = S32_MIN; -LLTrace::MemStat LLView::sMemStat("LLView"); +LLTrace::MemStatHandle LLView::sMemStat("LLView"); std::vector LLViewDrawContext::sDrawContextStack; LLView::DrilldownFunc LLView::sDrilldown = diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 256f86c00d..e18cfff8e5 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -673,7 +673,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; }; class LLCompareByTabOrder diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index 1bd09e8086..901260bec8 100644 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,7 +35,7 @@ // external library headers // other Linden headers -LLTrace::MemStat LLViewModel::sMemStat("LLViewModel"); +LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel"); /// LLViewModel::LLViewModel() diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index 214780393b..2c016d2560 100644 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -83,7 +83,7 @@ public: // void setDirty() { mDirty = true; } - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; protected: LLSD mValue; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 14235bcee4..4fb298df13 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -752,7 +752,7 @@ void LLAgent::setFlying(BOOL fly) } if( !was_flying ) { - LLStatViewer::FLY.add(1); + add(LLStatViewer::FLY, 1); } setControlFlags(AGENT_CONTROL_FLY); } @@ -3806,7 +3806,7 @@ bool LLAgent::teleportCore(bool is_local) gAgentCamera.resetView(FALSE); // local logic - LLStatViewer::TELEPORT.add(1); + add(LLStatViewer::TELEPORT, 1); if (is_local) { gAgent.setTeleportState( LLAgent::TELEPORT_LOCAL ); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3d7770c765..c00fddbb24 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4865,7 +4865,7 @@ void LLAppViewer::idleNetwork() gPrintMessagesThisFrame = FALSE; } } - LLStatViewer::NUM_NEW_OBJECTS.sample(gObjectList.mNumNewObjects); + sample(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects); // Retransmit unacknowledged packets. gXferManager->retransmitUnackedPackets(); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index ba970671af..9c3d9f4d34 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -59,7 +59,7 @@ const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); extern bool gShiftFrame; -LLTrace::MemStat LLDrawable::sMemStat("LLDrawable"); +LLTrace::MemStatHandle LLDrawable::sMemStat("LLDrawable"); //////////////////////// diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 161f550bb6..3691bbf71b 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -292,7 +292,7 @@ public: F32 mDistanceWRTCamera; static F32 sCurPixelAngle; //current pixels per radian - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; private: typedef std::vector face_list_t; diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index ab7fc1cf3f..25c119d9e1 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -42,13 +42,13 @@ #include "llviewerjoystick.h" #include "llcheckboxctrl.h" -static LLTrace::Measurement<> sJoystickAxis1("Joystick axis 1"), - sJoystickAxis2("Joystick axis 2"), - sJoystickAxis3("Joystick axis 3"), - sJoystickAxis4("Joystick axis 4"), - sJoystickAxis5("Joystick axis 5"), - sJoystickAxis6("Joystick axis 6"); -static LLTrace::Measurement<>* sJoystickAxes[6] = +static LLTrace::MeasurementStatHandle<> sJoystickAxis1("Joystick axis 1"), + sJoystickAxis2("Joystick axis 2"), + sJoystickAxis3("Joystick axis 3"), + sJoystickAxis4("Joystick axis 4"), + sJoystickAxis5("Joystick axis 5"), + sJoystickAxis6("Joystick axis 6"); +static LLTrace::MeasurementStatHandle<>* sJoystickAxes[6] = { &sJoystickAxis1, &sJoystickAxis2, diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 0d90037e7b..04fc572220 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -992,7 +992,7 @@ void LLSnapshotLivePreview::saveTexture() llwarns << "Error encoding snapshot" << llendl; } - LLStatViewer::SNAPSHOT.add(1); + add(LLStatViewer::SNAPSHOT, 1); mDataSize = 0; } diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 56fbdb429a..c12916ec6b 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -900,7 +900,7 @@ void LLHUDNameTag::updateAll() // } } - LLTrace::Count<>* camera_vel_stat = LLViewerCamera::getVelocityStat(); + LLTrace::CountStatHandle<>* camera_vel_stat = LLViewerCamera::getVelocityStat(); F32 camera_vel = LLTrace::get_frame_recording().getLastRecordingPeriod().getPerSec(*camera_vel_stat); if (camera_vel > MAX_STABLE_CAMERA_VELOCITY) { diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 23cbfae044..142aaa795b 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -638,7 +638,7 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 gAgent.sendReliableMessage(); - LLStatViewer::CHAT_COUNT.add(1); + add(LLStatViewer::CHAT_COUNT, 1); } class LLChatCommandHandler : public LLCommandHandler diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 39ded21183..88f2c5ff52 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 ) { - LLStatViewer::EDIT_TEXTURE.add(1); + add(LLStatViewer::EDIT_TEXTURE, 1); sendTexture(); } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 050db136bc..f87a958fbc 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 ) { - LLStatViewer::LSL_SAVES.add(1); + add(LLStatViewer::LSL_SAVES, 1); if( mSaveCallback ) { @@ -1146,7 +1146,7 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) void LLScriptEdCore::onBtnSaveToFile( void* userdata ) { - LLStatViewer::LSL_SAVES.add(1); + add(LLStatViewer::LSL_SAVES, 1); LLScriptEdCore* self = (LLScriptEdCore*) userdata; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 36ce7bb60e..bdbb1bb797 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 - LLStatViewer::EDIT_TEXTURE.add(1); + add(LLStatViewer::EDIT_TEXTURE, 1); object->setTEImage(te, image); dialog_refresh_all(); @@ -3424,7 +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. - LLStatViewer::DELETE_OBJECT.add(LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount()); + add(LLStatViewer::DELETE_OBJECT, LLSelectMgr::getInstance()->mSelectedObjects->getObjectCount()); } break; case 1: diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 648fb0f7b7..2effec7d3a 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2071,7 +2071,7 @@ bool idle_startup() if (wearables_time > MAX_WEARABLES_TIME) { LLNotificationsUtil::add("ClothingLoading"); - LLStatViewer::LOADING_WEARABLES_LONG_DELAY.add(1); + add(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, 1); LLStartUp::setStartupState( STATE_CLEANUP ); return TRUE; } diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index fad7a73008..d6cd881894 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; - LLStatViewer::TEX_BAKES.add(1); + add(LLStatViewer::TEX_BAKES, 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 fba636e8ef..0dc2601e60 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -65,8 +65,8 @@ #include "bufferstream.h" bool LLTextureFetchDebugger::sDebuggerEnabled = false ; -LLTrace::Measurement<> LLTextureFetch::sCacheHitRate("texture_cache_hits"); -LLTrace::Measurement<> LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); +LLTrace::MeasurementStatHandle<> LLTextureFetch::sCacheHitRate("texture_cache_hits"); +LLTrace::MeasurementStatHandle<> LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); ////////////////////////////////////////////////////////////////////////////// @@ -1237,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.sample(100.f); + sample(LLTextureFetch::sCacheHitRate, 100.f); } else { @@ -1254,7 +1254,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } // fall through - LLTextureFetch::sCacheHitRate.sample(0.f); + sample(LLTextureFetch::sCacheHitRate, 0.f); } } @@ -2706,7 +2706,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, F32 cache_read_time = worker->mCacheReadTime; if (cache_read_time != 0.f) { - sCacheReadLatency.sample(cache_read_time * 1000.f); + sample(sCacheReadLatency, cache_read_time * 1000.f); } res = true; LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL; @@ -2832,7 +2832,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) mNetworkQueueMutex.lock(); // +Mfnq mMaxBandwidth = band_width ; - LLStatViewer::TEXTURE_KBIT.add(mHTTPTextureBits); + add(LLStatViewer::TEXTURE_KBIT, mHTTPTextureBits); mHTTPTextureBits = 0; mNetworkQueueMutex.unlock(); // -Mfnq diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 2c1e7502e5..2e398023fe 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -308,8 +308,8 @@ private: LLMutex mQueueMutex; //to protect mRequestMap and mCommands only LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue. - static LLTrace::Measurement<> sCacheHitRate; - static LLTrace::Measurement<> sCacheReadLatency; + static LLTrace::MeasurementStatHandle<> sCacheHitRate; + static LLTrace::MeasurementStatHandle<> sCacheReadLatency; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 652847aac9..90ae0b428b 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); - LLStatViewer::EDIT_TEXTURE.add(1); + add(LLStatViewer::EDIT_TEXTURE, 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); - LLStatViewer::EDIT_TEXTURE.add(1); + add(LLStatViewer::EDIT_TEXTURE, 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())); - LLStatViewer::OBJECT_REZ.add(1); + add(LLStatViewer::OBJECT_REZ, 1); } void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 329249eee8..c026ddd42e 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())); - LLStatViewer::OBJECT_CREATE.add(1); + add(LLStatViewer::OBJECT_CREATE, 1); return TRUE; } diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 890394dd22..0c72c3c5aa 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -177,7 +177,7 @@ namespace LLViewerAssetStatsFF return ret; } - static LLTrace::Count<> sEnqueueAssetRequestsTempTextureHTTP ("enqueuedassetrequeststemptexturehttp", + static LLTrace::CountStatHandle<> sEnqueueAssetRequestsTempTextureHTTP ("enqueuedassetrequeststemptexturehttp", "Number of temporary texture asset http requests enqueued"), sEnqueueAssetRequestsTempTextureUDP ("enqueuedassetrequeststemptextureudp", "Number of temporary texture asset udp requests enqueued"), @@ -194,7 +194,7 @@ namespace LLViewerAssetStatsFF sEnqueuedAssetRequestsOther ("enqueuedassetrequestsother", "Number of other asset requests enqueued"); - static LLTrace::Count<>* sEnqueued[EVACCount] = { + static LLTrace::CountStatHandle<>* sEnqueued[EVACCount] = { &sEnqueueAssetRequestsTempTextureHTTP, &sEnqueueAssetRequestsTempTextureUDP, &sEnqueueAssetRequestsNonTempTextureHTTP, @@ -205,7 +205,7 @@ namespace LLViewerAssetStatsFF &sEnqueuedAssetRequestsOther }; - static LLTrace::Count<> sDequeueAssetRequestsTempTextureHTTP ("dequeuedassetrequeststemptexturehttp", + static LLTrace::CountStatHandle<> sDequeueAssetRequestsTempTextureHTTP ("dequeuedassetrequeststemptexturehttp", "Number of temporary texture asset http requests dequeued"), sDequeueAssetRequestsTempTextureUDP ("dequeuedassetrequeststemptextureudp", "Number of temporary texture asset udp requests dequeued"), @@ -222,7 +222,7 @@ namespace LLViewerAssetStatsFF sDequeuedAssetRequestsOther ("dequeuedassetrequestsother", "Number of other asset requests dequeued"); - static LLTrace::Count<>* sDequeued[EVACCount] = { + static LLTrace::CountStatHandle<>* sDequeued[EVACCount] = { &sDequeueAssetRequestsTempTextureHTTP, &sDequeueAssetRequestsTempTextureUDP, &sDequeueAssetRequestsNonTempTextureHTTP, @@ -233,7 +233,7 @@ namespace LLViewerAssetStatsFF &sDequeuedAssetRequestsOther }; - static LLTrace::Measurement sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", + static LLTrace::MeasurementStatHandle sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", "Time spent responding to temporary texture asset http requests"), sResponseAssetRequestsTempTextureUDP ("assetresponsetimestemptextureudp", "Time spent responding to temporary texture asset udp requests"), @@ -250,7 +250,7 @@ namespace LLViewerAssetStatsFF sResponsedAssetRequestsOther ("assetresponsetimesother", "Time spent responding to other asset requests"); - static LLTrace::Measurement* sResponse[EVACCount] = { + static LLTrace::MeasurementStatHandle* sResponse[EVACCount] = { &sResponseAssetRequestsTempTextureHTTP, &sResponseAssetRequestsTempTextureUDP, &sResponseAssetRequestsNonTempTextureHTTP, diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index f74897daa7..6e0a2c88a8 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -54,8 +54,8 @@ // System includes #include // for setprecision -LLTrace::Count<> LLViewerCamera::sVelocityStat("camera_velocity"); -LLTrace::Count<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity"); +LLTrace::CountStatHandle<> LLViewerCamera::sVelocityStat("camera_velocity"); +LLTrace::CountStatHandle<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity"); U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 607bfa7199..ffec284f72 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -101,8 +101,8 @@ public: BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; const LLVector3* getVelocityDir() const {return &mVelocityDir;} - static LLTrace::Count<>* getVelocityStat() {return &sVelocityStat; } - static LLTrace::Count<>* getAngularVelocityStat() {return &sAngularVelocityStat; } + static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; } + static LLTrace::CountStatHandle<>* getAngularVelocityStat() {return &sAngularVelocityStat; } F32 getCosHalfFov() {return mCosHalfCameraFOV;} F32 getAverageSpeed() {return mAverageSpeed ;} F32 getAverageAngularSpeed() {return mAverageAngularSpeed;} @@ -130,8 +130,8 @@ public: protected: void calcProjection(const F32 far_distance) const; - static LLTrace::Count<> sVelocityStat; - static LLTrace::Count<> sAngularVelocityStat; + static LLTrace::CountStatHandle<> sVelocityStat; + static LLTrace::CountStatHandle<> sAngularVelocityStat; LLVector3 mVelocityDir ; F32 mAverageSpeed ; diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index fe83f80caa..2aec25b7aa 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -749,8 +749,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLFastTimer t(FTM_IMAGE_UPDATE_CLASS); - LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat(); - LLTrace::Count<>* angular_velocity_stat = LLViewerCamera::getAngularVelocityStat(); + LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat(); + LLTrace::CountStatHandle<>* angular_velocity_stat = LLViewerCamera::getAngularVelocityStat(); LLViewerTexture::updateClass(LLTrace::get_frame_recording().getPeriodMeanPerSec(*velocity_stat), LLTrace::get_frame_recording().getPeriodMeanPerSec(*angular_velocity_stat)); } diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 50ca8db267..b7282a8493 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -1096,17 +1096,17 @@ void upload_new_resource( if( LLAssetType::AT_SOUND == asset_type ) { - LLStatViewer::UPLOAD_SOUND.add(1); + add(LLStatViewer::UPLOAD_SOUND, 1); } else if( LLAssetType::AT_TEXTURE == asset_type ) { - LLStatViewer::UPLOAD_TEXTURE.add(1); + add(LLStatViewer::UPLOAD_TEXTURE, 1); } else if( LLAssetType::AT_ANIMATION == asset_type) { - LLStatViewer::ANIMATION_UPLOADS.add(1); + add(LLStatViewer::ANIMATION_UPLOADS, 1); } if(LLInventoryType::IT_NONE == inv_type) @@ -1231,15 +1231,15 @@ void increase_new_upload_stats(LLAssetType::EType asset_type) { if ( LLAssetType::AT_SOUND == asset_type ) { - LLStatViewer::UPLOAD_SOUND.add(1); + add(LLStatViewer::UPLOAD_SOUND, 1); } else if ( LLAssetType::AT_TEXTURE == asset_type ) { - LLStatViewer::UPLOAD_TEXTURE.add(1); + add(LLStatViewer::UPLOAD_TEXTURE, 1); } else if ( LLAssetType::AT_ANIMATION == asset_type ) { - LLStatViewer::ANIMATION_UPLOADS.add(1); + add(LLStatViewer::ANIMATION_UPLOADS, 1); } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7a2025ed5b..db169b86a4 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5824,7 +5824,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") { - LLStatViewer::KILLED.add(1); + add(LLStatViewer::KILLED, 1); } else if( message == "Home position set." ) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f5f5bdffbd..a5bd57145d 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -113,7 +113,7 @@ BOOL LLViewerObject::sMapDebug = TRUE; LLColor4 LLViewerObject::sEditSelectColor( 1.0f, 1.f, 0.f, 0.3f); // Edit OK LLColor4 LLViewerObject::sNoEditSelectColor( 1.0f, 0.f, 0.f, 0.3f); // Can't edit S32 LLViewerObject::sAxisArrowLength(50); -LLTrace::MemStat LLViewerObject::sMemStat("LLViewerObject"); +LLTrace::MemStatHandle LLViewerObject::sMemStat("LLViewerObject"); BOOL LLViewerObject::sPulseEnabled(FALSE); @@ -2103,7 +2103,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) ) { - LLStatViewer::AGENT_POSITION_SNAP.sample(diff.length()); + sample(LLStatViewer::AGENT_POSITION_SNAP, LLTrace::Meters(diff.length())); } } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 20254bfe02..aa30d1c790 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -636,7 +636,7 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - static LLTrace::MemStat sMemStat; + static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0335cd769b..176ee49d31 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -94,7 +94,7 @@ extern LLPipeline gPipeline; U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. std::map LLViewerObjectList::sIPAndPortToIndex; std::map LLViewerObjectList::sIndexAndLocalIDToUUID; -LLTrace::Measurement<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); +LLTrace::MeasurementStatHandle<> LLViewerObjectList::sCacheHitRate("object_cache_hits"); LLViewerObjectList::LLViewerObjectList() { @@ -356,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* } justCreated = true; mNumNewObjects++; - sCacheHitRate.sample(100.f); + sample(sCacheHitRate, 100.f); } if (objectp->isDead()) @@ -670,7 +670,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, continue; // no data packer, skip this object } - sCacheHitRate.sample(100.f); + sample(sCacheHitRate, 100.f); } return; @@ -1123,10 +1123,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } */ - 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); + sample(LLStatViewer::NUM_OBJECTS, mObjects.size()); + sample(LLStatViewer::NUM_ACTIVE_OBJECTS, idle_count); + sample(LLStatViewer::NUM_SIZE_CULLED, mNumSizeCulled); + sample(LLStatViewer::NUM_VIS_CULLED, mNumVisCulled); } void LLViewerObjectList::fetchObjectCosts() diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index b92be61fae..cb11ef1f5e 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -198,7 +198,7 @@ protected: std::vector mOrphanChildren; // UUID's of orphaned objects S32 mNumOrphans; - static LLTrace::Measurement<> sCacheHitRate; + static LLTrace::MeasurementStatHandle<> sCacheHitRate; typedef std::vector > vobj_list_t; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 136a4d0a9e..921c681e2a 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -64,48 +64,48 @@ namespace LLStatViewer { -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 KBIT("kbitstat"), - LAYERS_KBIT("layerskbitstat"), - OBJECT_KBIT("objectkbitstat"), - ASSET_KBIT("assetkbitstat"), - TEXTURE_KBIT("texturekbitstat"), - ACTUAL_IN_KBIT("actualinkbitstat"), - ACTUAL_OUT_KBIT("actualoutkbitstat"); - -LLTrace::Count 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%"); +LLTrace::CountStatHandle<> 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::CountStatHandle KBIT("kbitstat"), + LAYERS_KBIT("layerskbitstat"), + OBJECT_KBIT("objectkbitstat"), + ASSET_KBIT("assetkbitstat"), + TEXTURE_KBIT("texturekbitstat"), + ACTUAL_IN_KBIT("actualinkbitstat"), + ACTUAL_OUT_KBIT("actualoutkbitstat"); + +LLTrace::CountStatHandle 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), @@ -128,34 +128,34 @@ SimMeasurement<> SIM_TIME_DILATION("simtimedilation", "", LL_SIM_STAT_TIME_DIL 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"); +LLTrace::MeasurementStatHandle<> 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"); -LLTrace::Measurement AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections"); +LLTrace::MeasurementStatHandle AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections"); -LLTrace::Measurement 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"); +LLTrace::MeasurementStatHandle 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"); SimMeasurement SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS), @@ -177,17 +177,17 @@ SimMeasurement SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_ SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); -LLTrace::Measurement 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"); +LLTrace::MeasurementStatHandle 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"); } @@ -212,50 +212,50 @@ void LLViewerStats::updateFrameStats(const F64 time_diff) LLTrace::Seconds time_diff_seconds(time_diff); if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) { - LLStatViewer::LOSS_5_PERCENT_TIME.add(time_diff_seconds); + add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff_seconds); } F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS); if (0.f < sim_fps && sim_fps < 20.f) { - LLStatViewer::SIM_20_FPS_TIME.add(time_diff_seconds); + add(LLStatViewer::SIM_20_FPS_TIME, time_diff_seconds); } F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS); if (0.f < sim_physics_fps && sim_physics_fps < 20.f) { - LLStatViewer::SIM_PHYSICS_20_FPS_TIME.add(time_diff_seconds); + add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff_seconds); } if (time_diff >= 0.5) { - LLStatViewer::FPS_2_TIME.add(time_diff_seconds); + add(LLStatViewer::FPS_2_TIME, time_diff_seconds); } if (time_diff >= 0.125) { - LLStatViewer::FPS_8_TIME.add(time_diff_seconds); + add(LLStatViewer::FPS_8_TIME, time_diff_seconds); } if (time_diff >= 0.1) { - LLStatViewer::FPS_10_TIME.add(time_diff_seconds); + add(LLStatViewer::FPS_10_TIME, time_diff_seconds); } if (gFrameCount && mLastTimeDiff > 0.0) { // new "stutter" meter - LLStatViewer::FRAMETIME_DOUBLED.add(time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); + add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); // old stats that were never really used - LLStatViewer::FRAMETIME_JITTER.sample(mLastTimeDiff - time_diff); + sample(LLStatViewer::FRAMETIME_JITTER, LLTrace::Milliseconds(mLastTimeDiff - time_diff)); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - LLStatViewer::FRAMETIME_SLEW.sample(average_frametime - time_diff); + sample(LLStatViewer::FRAMETIME_SLEW, LLTrace::Milliseconds(average_frametime - time_diff)); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - LLStatViewer::DELTA_BANDWIDTH.sample(delta_bandwidth); - LLStatViewer::MAX_BANDWIDTH.sample(max_bandwidth); + sample(LLStatViewer::DELTA_BANDWIDTH, LLTrace::Bits(delta_bandwidth)); + sample(LLStatViewer::MAX_BANDWIDTH, LLTrace::Bits(max_bandwidth)); } mLastTimeDiff = time_diff; @@ -311,53 +311,53 @@ void update_statistics() { if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - LLStatViewer::MOUSELOOK_TIME.add(gFrameIntervalSeconds); + add(LLStatViewer::MOUSELOOK_TIME, gFrameIntervalSeconds); } else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { - LLStatViewer::AVATAR_EDIT_TIME.add(gFrameIntervalSeconds); + add(LLStatViewer::AVATAR_EDIT_TIME, gFrameIntervalSeconds); } else if (LLFloaterReg::instanceVisible("build")) { - LLStatViewer::TOOLBOX_TIME.add(gFrameIntervalSeconds); + add(LLStatViewer::TOOLBOX_TIME, gFrameIntervalSeconds); } } - 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")); + sample(LLStatViewer::ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); + sample(LLStatViewer::LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); + sample(LLStatViewer::DRAW_DISTANCE, (F64)gSavedSettings.getF32("RenderFarClip")); + sample(LLStatViewer::CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); - LLStatViewer::FRAME_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Frame")); + sample(LLStatViewer::FRAME_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Frame"))); F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle"); F64 network_secs = gDebugView->mFastTimerView->getTime("Network"); - LLStatViewer::UPDATE_STACKTIME.sample(idle_secs - network_secs); - LLStatViewer::NETWORK_STACKTIME.sample(network_secs); - LLStatViewer::IMAGE_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Update Images")); - LLStatViewer::REBUILD_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Sort Draw State")); - LLStatViewer::RENDER_STACKTIME.sample(gDebugView->mFastTimerView->getTime("Geometry")); + sample(LLStatViewer::UPDATE_STACKTIME, LLTrace::Seconds(idle_secs - network_secs)); + sample(LLStatViewer::NETWORK_STACKTIME, LLTrace::Seconds(network_secs)); + sample(LLStatViewer::IMAGE_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Update Images"))); + sample(LLStatViewer::REBUILD_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Sort Draw State"))); + sample(LLStatViewer::RENDER_STACKTIME, LLTrace::Seconds(gDebugView->mFastTimerView->getTime("Geometry"))); LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - LLStatViewer::SIM_PING.sample(cdp->getPingDelay()); + sample(LLStatViewer::SIM_PING, LLTrace::Milliseconds(cdp->getPingDelay())); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - LLStatViewer::SIM_PING.sample(10); + sample(LLStatViewer::SIM_PING, LLTrace::Seconds(10)); } - LLStatViewer::FPS.add(1); + add(LLStatViewer::FPS, 1); if (LLTrace::get_frame_recording().getTotalRecording().getSampleCount(LLStatViewer::FPS)) { - LLStatViewer::FPS_SAMPLE.sample(LLTrace::get_frame_recording().getTotalRecording().getPerSec(LLStatViewer::FPS)); + sample(LLStatViewer::FPS_SAMPLE, LLTrace::get_frame_recording().getTotalRecording().getPerSec(LLStatViewer::FPS)); } F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - LLStatViewer::LAYERS_KBIT.add(layer_bits); - LLStatViewer::OBJECT_KBIT.add(gObjectData); - LLStatViewer::PENDING_VFS_OPERATIONS.sample(LLVFile::getVFSThread()->getPending()); - LLStatViewer::ASSET_KBIT.add(gTransferManager.getTransferBitsIn(LLTCT_ASSET)); + add(LLStatViewer::LAYERS_KBIT, LLTrace::Bits(layer_bits)); + add(LLStatViewer::OBJECT_KBIT, gObjectData); + sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending()); + add(LLStatViewer::ASSET_KBIT, LLTrace::Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) @@ -378,7 +378,7 @@ void update_statistics() visible_avatar_frames = 1.f; avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; } - LLStatViewer::VISIBLE_AVATARS.sample((F64)avg_visible_avatars); + sample(LLStatViewer::VISIBLE_AVATARS, (F64)avg_visible_avatars); } LLWorld::getInstance()->updateNetStats(); LLWorld::getInstance()->requestCacheMisses(); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 6b95c9359d..a82c64317e 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -41,26 +41,21 @@ struct SimMeasurementSampler : public LLInstanceTracker(id) {} virtual ~SimMeasurementSampler() {} - virtual void sample(F64 value) = 0; }; template -struct SimMeasurement : public LLTrace::Measurement, public SimMeasurementSampler +struct SimMeasurement : public LLTrace::MeasurementStatHandle, public SimMeasurementSampler { SimMeasurement(const char* name, const char* description, ESimStatID stat_id) - : LLTrace::Measurement(name, description), + : LLTrace::MeasurementStatHandle(name, description), SimMeasurementSampler(stat_id) {} using SimMeasurementSampler::getInstance; - - /*virtual*/ void sample(F64 value) - { - LLTrace::Measurement::sample(T(value)); - } }; -extern LLTrace::Count<> FPS, + +extern LLTrace::CountStatHandle<> FPS, PACKETS_IN, PACKETS_LOST, PACKETS_OUT, @@ -87,7 +82,7 @@ extern LLTrace::Count<> FPS, TEX_REBAKES; -extern LLTrace::Count KBIT, +extern LLTrace::CountStatHandle KBIT, LAYERS_KBIT, OBJECT_KBIT, ASSET_KBIT, @@ -95,7 +90,7 @@ extern LLTrace::Count KBIT, ACTUAL_IN_KBIT, ACTUAL_OUT_KBIT; -extern LLTrace::Count AVATAR_EDIT_TIME, +extern LLTrace::CountStatHandle AVATAR_EDIT_TIME, TOOLBOX_TIME, MOUSELOOK_TIME, FPS_10_TIME, @@ -126,7 +121,7 @@ extern SimMeasurement<> SIM_TIME_DILATION, SIM_PHYSICS_PINNED_TASKS, SIM_PHYSICS_LOD_TASKS; -extern LLTrace::Measurement<> FPS_SAMPLE, +extern LLTrace::MeasurementStatHandle<> FPS_SAMPLE, NUM_IMAGES, NUM_RAW_IMAGES, NUM_OBJECTS, @@ -145,14 +140,14 @@ extern LLTrace::Measurement<> FPS_SAMPLE, WINDOW_WIDTH, WINDOW_HEIGHT; -extern LLTrace::Measurement AGENT_POSITION_SNAP; +extern LLTrace::MeasurementStatHandle AGENT_POSITION_SNAP; -extern LLTrace::Measurement DELTA_BANDWIDTH, - MAX_BANDWIDTH, - GL_TEX_MEM, - GL_BOUND_MEM, - RAW_MEM, - FORMATTED_MEM; +extern LLTrace::MeasurementStatHandle DELTA_BANDWIDTH, + MAX_BANDWIDTH, + GL_TEX_MEM, + GL_BOUND_MEM, + RAW_MEM, + FORMATTED_MEM; extern SimMeasurement SIM_FRAME_TIME, SIM_NET_TIME, @@ -173,7 +168,7 @@ extern SimMeasurement SIM_UNACKED_BYTES, SIM_PHYSICS_MEM; -extern LLTrace::Measurement FRAMETIME_JITTER, +extern LLTrace::MeasurementStatHandle FRAMETIME_JITTER, FRAMETIME_SLEW, LOGIN_SECONDS, REGION_CROSSING_TIME, diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 6f8b439049..899ef985ff 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -623,12 +623,12 @@ void LLViewerTextureList::updateImages(F32 max_time) { 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(LLImageRaw::sGlobalRawMemory); - FORMATTED_MEM.sample(LLImageFormatted::sGlobalFormattedMemory); + sample(NUM_IMAGES, sNumImages); + sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); + sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); + sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); + sample(RAW_MEM, LLTrace::Bytes(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, LLTrace::Bytes(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1324,8 +1324,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); - LLStatViewer::TEXTURE_PACKETS.add(1); + add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; U16 packets; @@ -1398,8 +1398,8 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - LLStatViewer::TEXTURE_KBIT.add(received_size); - LLStatViewer::TEXTURE_PACKETS.add(1); + add(LLStatViewer::TEXTURE_KBIT, LLTrace::Bytes(received_size)); + add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 70792cd0a0..0bd0b2a769 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -248,7 +248,7 @@ std::string LLViewerWindow::sSnapshotDir; std::string LLViewerWindow::sMovieBaseName; -LLTrace::Measurement<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); +LLTrace::MeasurementStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); class RecordToChatConsole : public LLError::Recorder, public LLSingleton @@ -2186,8 +2186,8 @@ void LLViewerWindow::reshape(S32 width, S32 height) } } - LLStatViewer::WINDOW_WIDTH.sample((F64)width); - LLStatViewer::WINDOW_HEIGHT.sample((F64)height); + sample(LLStatViewer::WINDOW_WIDTH, width); + sample(LLStatViewer::WINDOW_HEIGHT, height); LLLayoutStack::updateClass(); } @@ -3250,7 +3250,7 @@ void LLViewerWindow::updateMouseDelta() mouse_vel.setVec((F32) dx, (F32) dy); } - sMouseVelocityStat.sample(mouse_vel.magVec()); + sample(sMouseVelocityStat, mouse_vel.magVec()); } void LLViewerWindow::updateKeyboardFocus() diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index be2d6d885e..004a59fda5 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -250,7 +250,7 @@ public: S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; } S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; } LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } - static LLTrace::Measurement<>* getMouseVelocityStat() { return &sMouseVelocityStat; } + static LLTrace::MeasurementStatHandle<>* getMouseVelocityStat() { return &sMouseVelocityStat; } BOOL getLeftMouseDown() const { return mLeftMouseDown; } BOOL getMiddleMouseDown() const { return mMiddleMouseDown; } BOOL getRightMouseDown() const { return mRightMouseDown; } @@ -482,7 +482,7 @@ private: // Object temporarily hovered over while dragging LLPointer mDragHoveredObject; - static LLTrace::Measurement<> sMouseVelocityStat; + static LLTrace::MeasurementStatHandle<> sMouseVelocityStat; }; // diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index cd033c84bf..4ecb7f2fc7 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -913,7 +913,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { ++mRegionCrossingCount; LLTrace::Seconds delta = mRegionCrossingTimer.getElapsedTimeF32(); - LLStatViewer::REGION_CROSSING_TIME.sample(delta); + sample(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; @@ -2583,7 +2583,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; - LLStatViewer::TEX_REBAKES.add(1); + add(LLStatViewer::TEX_REBAKES, 1); } } } @@ -2628,7 +2628,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } invalidateComposite(layer_set, TRUE); - LLStatViewer::TEX_REBAKES.add(1); + add(LLStatViewer::TEX_REBAKES, 1); } else { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 06e2302b0b..e088f94d64 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -720,15 +720,15 @@ void LLWorld::updateNetStats() S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLStatViewer::ACTUAL_IN_KBIT.add(actual_in_bits); - LLStatViewer::ACTUAL_OUT_KBIT.add(actual_out_bits); - LLStatViewer::KBIT.add(bits); - LLStatViewer::PACKETS_IN.add(packets_in); - LLStatViewer::PACKETS_OUT.add(packets_out); - LLStatViewer::PACKETS_LOST.add(packets_lost); + add(LLStatViewer::ACTUAL_IN_KBIT, LLTrace::Bits(actual_in_bits)); + add(LLStatViewer::ACTUAL_OUT_KBIT, LLTrace::Bits(actual_out_bits)); + add(LLStatViewer::KBIT, LLTrace::Bits(bits)); + add(LLStatViewer::PACKETS_IN, packets_in); + add(LLStatViewer::PACKETS_OUT, packets_out); + add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - LLStatViewer::PACKETS_LOST_PERCENT.sample(100.f*((F32)packets_lost/(F32)packets_in)); + sample(LLStatViewer::PACKETS_LOST_PERCENT, 100.f * ((F32)packets_lost/(F32)packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8d3075d1e1..355fa1350b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1800,7 +1800,7 @@ void LLPipeline::resetFrameStats() { assertInitialized(); - LLStatViewer::TRIANGLES_DRAWN.add(mTrianglesDrawn); + add(LLStatViewer::TRIANGLES_DRAWN, mTrianglesDrawn); if (mBatchCount > 0) { @@ -9805,7 +9805,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) if (gen_shadow) { - LLTrace::Count<>* velocity_stat = LLViewerCamera::getVelocityStat(); + LLTrace::CountStatHandle<>* 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); -- cgit v1.3 From 7b4d27ecbcb5ac702459be97cbf6b81354850658 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 14 Mar 2013 19:36:50 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics collapsed Orientation enums to all use LLView::EOrientation added ability to display stat bar horizontally --- indra/llcommon/lltracerecording.cpp | 2 +- indra/llcommon/lltracerecording.h | 16 +- indra/llui/lllayoutstack.cpp | 8 +- indra/llui/lllayoutstack.h | 19 +-- indra/llui/llscrollbar.h | 6 +- indra/llui/llscrollcontainer.cpp | 4 +- indra/llui/llscrollcontainer.h | 3 +- indra/llui/llslider.h | 4 +- indra/llui/llstatbar.cpp | 187 +++++++++++++-------- indra/llui/llstatbar.h | 39 +++-- indra/llui/llstatgraph.cpp | 17 -- indra/llui/llstatgraph.h | 4 +- indra/llui/lltoolbar.cpp | 10 +- indra/llui/lltoolbar.h | 2 +- indra/llui/llview.cpp | 10 ++ indra/llui/llview.h | 13 ++ indra/newview/lltoolbarview.cpp | 6 +- indra/newview/llviewermessage.cpp | 2 +- .../newview/skins/default/xui/en/floater_stats.xml | 1 + 19 files changed, 197 insertions(+), 156 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index ef0a633c9c..6695ebeaca 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -547,7 +547,7 @@ void ExtendableRecording::splitFrom(ExtendableRecording& other) PeriodicRecording& get_frame_recording() { - static LLThreadLocalPointer sRecording(new PeriodicRecording(200, PeriodicRecording::STARTED)); + static LLThreadLocalPointer sRecording(new PeriodicRecording(1000, PeriodicRecording::STARTED)); return *sRecording; } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index a5edcb857a..70afe51d6e 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -100,15 +100,10 @@ private: namespace LLTrace { - struct RecordingBuffers + class RecordingBuffers { + public: RecordingBuffers(); - LLCopyOnWritePointer > > mCountsFloat; - LLCopyOnWritePointer > > mMeasurementsFloat; - LLCopyOnWritePointer > > mCounts; - LLCopyOnWritePointer > > mMeasurements; - LLCopyOnWritePointer > mStackTimers; - LLCopyOnWritePointer > mMemStats; void handOffTo(RecordingBuffers& other); void makePrimary(); @@ -120,6 +115,13 @@ namespace LLTrace void mergeBuffers(const RecordingBuffers& other); void resetBuffers(RecordingBuffers* other = NULL); + protected: + LLCopyOnWritePointer > > mCountsFloat; + LLCopyOnWritePointer > > mMeasurementsFloat; + LLCopyOnWritePointer > > mCounts; + LLCopyOnWritePointer > > mMeasurements; + LLCopyOnWritePointer > mStackTimers; + LLCopyOnWritePointer > mMemStats; }; class Recording : public LLStopWatchControlsMixin, public RecordingBuffers diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 4c730286da..194d2b700c 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -42,12 +42,6 @@ static const F32 MAX_FRACTIONAL_SIZE = 1.f; static LLDefaultChildRegistry::Register register_layout_stack("layout_stack"); static LLLayoutStack::LayoutStackRegistry::Register register_layout_panel("layout_panel"); -void LLLayoutStack::OrientationNames::declareValues() -{ - declare("horizontal", HORIZONTAL); - declare("vertical", VERTICAL); -} - // // LLLayoutPanel // @@ -141,7 +135,7 @@ S32 LLLayoutPanel::getVisibleDim() const + (((F32)mTargetDim - min_dim) * (1.f - mCollapseAmt)))); } -void LLLayoutPanel::setOrientation( LLLayoutStack::ELayoutOrientation orientation ) +void LLLayoutPanel::setOrientation( LLView::EOrientation orientation ) { mOrientation = orientation; S32 layout_dim = llround((F32)((mOrientation == LLLayoutStack::HORIZONTAL) diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 648cd5fdce..f1668d7473 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -37,24 +37,13 @@ class LLLayoutPanel; class LLLayoutStack : public LLView, public LLInstanceTracker { public: - typedef enum e_layout_orientation - { - HORIZONTAL, - VERTICAL - } ELayoutOrientation; - - struct OrientationNames - : public LLInitParam::TypeValuesHelper - { - static void declareValues(); - }; struct LayoutStackRegistry : public LLChildRegistry {}; struct Params : public LLInitParam::Block { - Mandatory orientation; + Mandatory orientation; Optional border_size; Optional animate, clip; @@ -104,7 +93,7 @@ private: bool animatePanels(); void createResizeBar(LLLayoutPanel* panel); - const ELayoutOrientation mOrientation; + const EOrientation mOrientation; typedef std::vector e_panel_list_t; e_panel_list_t mPanels; @@ -179,7 +168,7 @@ public: F32 getVisibleAmount() const; S32 getVisibleDim() const; - void setOrientation(LLLayoutStack::ELayoutOrientation orientation); + void setOrientation(LLView::EOrientation orientation); void storeOriginalDim(); void setIgnoreReshape(bool ignore) { mIgnoreReshape = ignore; } @@ -198,7 +187,7 @@ protected: F32 mFractionalSize; S32 mTargetDim; bool mIgnoreReshape; - LLLayoutStack::ELayoutOrientation mOrientation; + LLView::EOrientation mOrientation; class LLResizeBar* mResizeBar; }; diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h index ff74f753b9..3f3ca1378b 100644 --- a/indra/llui/llscrollbar.h +++ b/indra/llui/llscrollbar.h @@ -40,13 +40,11 @@ class LLScrollbar { public: - enum ORIENTATION { HORIZONTAL, VERTICAL }; - typedef boost::function callback_t; struct Params : public LLInitParam::Block { - Mandatory orientation; + Mandatory orientation; Mandatory doc_size; Mandatory doc_pos; Mandatory page_size; @@ -131,7 +129,7 @@ private: callback_t mChangeCallback; - const ORIENTATION mOrientation; + const EOrientation mOrientation; S32 mDocSize; // Size of the document that the scrollbar is modeling. Units depend on the user. 0 <= mDocSize. S32 mDocPos; // Position within the doc that the scrollbar is modeling, in "lines" (user size) S32 mPageSize; // Maximum number of lines that can be seen at one time. diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 2fd187a526..2abfb15494 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -140,7 +140,7 @@ LLScrollContainer::~LLScrollContainer( void ) { // mScrolledView and mScrollbar are child views, so the LLView // destructor takes care of memory deallocation. - for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) + for( S32 i = 0; i < ORIENTATION_COUNT; i++ ) { mScrollbar[i] = NULL; } @@ -211,7 +211,7 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask) { return TRUE; } - for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) + for( S32 i = 0; i < ORIENTATION_COUNT; i++ ) { if( mScrollbar[i]->handleKeyHere(key, mask) ) { diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h index d87c95b3d7..f9ce4a74ef 100644 --- a/indra/llui/llscrollcontainer.h +++ b/indra/llui/llscrollcontainer.h @@ -56,7 +56,6 @@ class LLScrollContainer : public LLUICtrl public: // Note: vertical comes before horizontal because vertical // scrollbars have priority for mouse and keyboard events. - enum SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; struct Params : public LLInitParam::Block { @@ -126,7 +125,7 @@ private: void updateScroll(); void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const; - LLScrollbar* mScrollbar[SCROLLBAR_COUNT]; + LLScrollbar* mScrollbar[ORIENTATION_COUNT]; S32 mSize; BOOL mIsOpaque; LLUIColor mBackgroundColor; diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index 700c17ea3e..3b492d8182 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -34,8 +34,6 @@ class LLSlider : public LLF32UICtrl { public: - enum ORIENTATION { HORIZONTAL, VERTICAL }; - struct Params : public LLInitParam::Block { Optional orientation; @@ -98,7 +96,7 @@ private: LLPointer mTrackHighlightHorizontalImage; LLPointer mTrackHighlightVerticalImage; - const ORIENTATION mOrientation; + const EOrientation mOrientation; LLRect mThumbRect; LLUIColor mTrackColor; diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 954f615210..2bc385061a 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -57,7 +57,8 @@ LLStatBar::LLStatBar(const Params& p) mPerSec(p.show_per_sec), mDisplayBar(p.show_bar), mDisplayHistory(p.show_history), - mDisplayMean(p.show_mean) + mDisplayMean(p.show_mean), + mOrientation(p.orientation) {} BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) @@ -167,15 +168,27 @@ void LLStatBar::draw() mUpdateTimer.reset(); } - S32 width = getRect().getWidth() - 40; - S32 max_width = width; - S32 bar_top = getRect().getHeight() - 15; // 16 pixels from top. - S32 bar_height = bar_top - 20; - S32 tick_height = 4; - S32 tick_width = 1; - S32 left, top, right, bottom; + S32 bar_top, bar_left, bar_right, bar_bottom; + if (mOrientation == HORIZONTAL) + { + bar_top = getRect().getHeight() - 15; + bar_left = 0; + bar_right = getRect().getWidth() - 80; + bar_bottom = 0; + } + else // VERTICAL + { + bar_top = getRect().getHeight() - 15; // 16 pixels from top. + bar_left = 0; + bar_right = getRect().getWidth(); + bar_bottom = 20; + } + const S32 tick_length = 4; + const S32 tick_width = 1; - F32 value_scale = max_width/(mMaxBar - mMinBar); + F32 value_scale = (mOrientation == HORIZONTAL) + ? (bar_top - bar_bottom)/(mMaxBar - mMinBar) + : (bar_right - bar_left)/(mMaxBar - mMinBar); LLFontGL::getFontMonospace()->renderUTF8(mLabel, 0, 0, getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f), LLFontGL::LEFT, LLFontGL::TOP); @@ -194,9 +207,16 @@ void LLStatBar::draw() } // Draw the value. - LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, width, getRect().getHeight(), - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::RIGHT, LLFontGL::TOP); + if (mOrientation == HORIZONTAL) + { + + } + else + { + LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, bar_right, getRect().getHeight(), + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::RIGHT, LLFontGL::TOP); + } value_format = llformat( "%%.%df", mPrecision); if (mDisplayBar && (mCountFloatp || mCountIntp || mMeasurementFloatp || mMeasurementIntp)) @@ -204,64 +224,75 @@ void LLStatBar::draw() std::string tick_label; // Draw the tick marks. - F32 tick_value; - top = bar_top; - bottom = bar_top - bar_height - tick_height/2; - LLGLSUIDefault gls_ui; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - for (tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mTickSpacing) + for (F32 tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mTickSpacing) { - left = llfloor((tick_value - mMinBar)*value_scale); - right = left + tick_width; - gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.1f)); + const S32 begin = llfloor((tick_value - mMinBar)*value_scale); + const S32 end = begin + tick_width; + if (mOrientation == HORIZONTAL) + { + } + else + { + gl_rect_2d(begin, bar_top, end, bar_bottom - tick_length/2, LLColor4(1.f, 1.f, 1.f, 0.1f)); + } } // Draw the tick labels (and big ticks). - bottom = bar_top - bar_height - tick_height; - for (tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mLabelSpacing) + for (F32 tick_value = mMinBar; tick_value <= mMaxBar; tick_value += mLabelSpacing) { - left = llfloor((tick_value - mMinBar)*value_scale); - right = left + tick_width; - gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f)); - + const S32 begin = llfloor((tick_value - mMinBar)*value_scale); + const S32 end = begin + tick_width; tick_label = llformat( value_format.c_str(), tick_value); + // draw labels for the tick marks - LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, left - 1, bar_top - bar_height - tick_height, - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::LEFT, LLFontGL::TOP); + if (mOrientation == HORIZONTAL) + { + } + else + { + gl_rect_2d(begin, bar_top, end, bar_bottom - tick_length, LLColor4(1.f, 1.f, 1.f, 0.25f)); + LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, begin - 1, bar_bottom - tick_length, + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::LEFT, LLFontGL::TOP); + } } - // Now, draw the bars - top = bar_top; - bottom = bar_top - bar_height; - // draw background bar. - left = 0; - right = width; - gl_rect_2d(left, top, right, bottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); + gl_rect_2d(bar_left, bar_top, bar_right, bar_bottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); if (frame_recording.getNumPeriods() == 0) { // No data, don't draw anything... return; } + // draw min and max - left = (S32) ((min - mMinBar) * value_scale); + S32 begin = (S32) ((min - mMinBar) * value_scale); - if (left < 0) + if (begin < 0) { - left = 0; + begin = 0; llwarns << "Min:" << min << llendl; } - right = (S32) ((max - mMinBar) * value_scale); - gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); + S32 end = (S32) ((max - mMinBar) * value_scale); + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_left, end, bar_right, begin, LLColor4(1.f, 0.f, 0.f, 0.25f)); + } + else // VERTICAL + { + gl_rect_2d(begin, bar_top, end, bar_bottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); + } if (mDisplayHistory && (mCountFloatp || mCountIntp || mMeasurementFloatp || mMeasurementIntp)) { - S32 num_values = frame_recording.getNumPeriods() - 1; + const S32 num_values = frame_recording.getNumPeriods() - 1; + S32 begin = 0; + S32 end = 0; S32 i; for (i = 1; i <= num_values; i++) { @@ -269,66 +300,86 @@ void LLStatBar::draw() { if (mCountFloatp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountFloatp) - mMinBar) * value_scale) + 1; } else if (mCountIntp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mCountIntp) - mMinBar) * value_scale) + 1; } else if (mMeasurementFloatp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; } else if (mMeasurementIntp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getPerSec(*mMeasurementIntp) - mMinBar) * value_scale) + 1; } - gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f)); } else { if (mCountFloatp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountFloatp) - mMinBar) * value_scale) + 1; } else if (mCountIntp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mCountIntp) - mMinBar) * value_scale) + 1; } else if (mMeasurementFloatp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementFloatp) - mMinBar) * value_scale) + 1; } else if (mMeasurementIntp) { - left = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale); - right = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale) + 1; + begin = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale); + end = (S32)((frame_recording.getPrevRecordingPeriod(i).getSum(*mMeasurementIntp) - mMinBar) * value_scale) + 1; } - gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f)); + } + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_right - i, end, bar_right - i - 1, begin, LLColor4(1.f, 0.f, 0.f, 1.f)); + } + else + { + gl_rect_2d(begin, bar_bottom+i+1, end, bar_bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f)); } } } else { + S32 begin = (S32) ((current - mMinBar) * value_scale) - 1; + S32 end = (S32) ((current - mMinBar) * value_scale) + 1; // draw current - left = (S32) ((current - mMinBar) * value_scale) - 1; - right = (S32) ((current - mMinBar) * value_scale) + 1; - gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 1.f)); + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_left, end, bar_right, begin, LLColor4(1.f, 0.f, 0.f, 1.f)); + } + else + { + gl_rect_2d(begin, bar_top, end, bar_bottom, LLColor4(1.f, 0.f, 0.f, 1.f)); + } } // draw mean bar - top = bar_top + 2; - bottom = bar_top - bar_height - 2; - left = (S32) ((mean - mMinBar) * value_scale) - 1; - right = (S32) ((mean - mMinBar) * value_scale) + 1; - gl_rect_2d(left, top, right, bottom, LLColor4(0.f, 1.f, 0.f, 1.f)); + { + const S32 begin = (S32) ((mean - mMinBar) * value_scale) - 1; + const S32 end = (S32) ((mean - mMinBar) * value_scale) + 1; + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_left - 2, begin, bar_right + 2, end, LLColor4(0.f, 1.f, 0.f, 1.f)); + } + else + { + gl_rect_2d(begin, bar_top + 2, end, bar_bottom - 2, LLColor4(0.f, 1.f, 0.f, 1.f)); + } + } } LLView::draw(); diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index c366fd65db..0ec8aaeaa9 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -55,6 +55,7 @@ public: show_mean; Optional stat; + Optional orientation; Params() : label("label"), @@ -70,7 +71,8 @@ public: show_bar("show_bar", TRUE), show_history("show_history", false), show_mean("show_mean", true), - stat("stat") + stat("stat"), + orientation("orientation", VERTICAL) { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); } @@ -88,27 +90,28 @@ public: /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: - F32 mMinBar; - F32 mMaxBar; - F32 mTickSpacing; - F32 mLabelSpacing; - U32 mPrecision; - F32 mUpdatesPerSec; - F32 mUnitScale; - BOOL mPerSec; // Use the per sec stats. - BOOL mDisplayBar; // Display the bar graph. - BOOL mDisplayHistory; - BOOL mDisplayMean; // If true, display mean, if false, display current value - - LLTrace::TraceType >* mCountFloatp; - LLTrace::TraceType >* mCountIntp; + F32 mMinBar; + F32 mMaxBar; + F32 mTickSpacing; + F32 mLabelSpacing; + U32 mPrecision; + F32 mUpdatesPerSec; + F32 mUnitScale; + bool mPerSec; // Use the per sec stats. + bool mDisplayBar; // Display the bar graph. + bool mDisplayHistory; + bool mDisplayMean; // If true, display mean, if false, display current value + EOrientation mOrientation; + + LLTrace::TraceType >* mCountFloatp; + LLTrace::TraceType >* mCountIntp; LLTrace::TraceType >* mMeasurementFloatp; LLTrace::TraceType >* mMeasurementIntp; LLFrameTimer mUpdateTimer; - LLUIString mLabel; - std::string mUnitLabel; - F32 mValue; + LLUIString mLabel; + std::string mUnitLabel; + F32 mValue; }; #endif diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 22c276a018..bdb378c9c5 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -58,14 +58,6 @@ LLStatGraph::LLStatGraph(const Params& p) { mThresholds.push_back(Threshold(it->value(), it->color)); } - - //mThresholdColors[0] = LLColor4(0.f, 1.f, 0.f, 1.f); - //mThresholdColors[1] = LLColor4(1.f, 1.f, 0.f, 1.f); - //mThresholdColors[2] = LLColor4(1.f, 0.f, 0.f, 1.f); - //mThresholdColors[3] = LLColor4(1.f, 0.f, 0.f, 1.f); - //mThresholds[0] = 50.f; - //mThresholds[1] = 75.f; - //mThresholds[2] = 100.f; } void LLStatGraph::draw() @@ -116,15 +108,6 @@ void LLStatGraph::draw() LLColor4 color; - //S32 i; - //for (i = 0; i < mNumThresholds - 1; i++) - //{ - // if (mThresholds[i] > mValue) - // { - // break; - // } - //} - threshold_vec_t::iterator it = std::lower_bound(mThresholds.begin(), mThresholds.end(), Threshold(mValue / mMax, LLUIColor())); if (it != mThresholds.begin()) diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index 57856ff6f2..c9e33ed902 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -57,8 +57,8 @@ public: struct StatParams : public LLInitParam::ChoiceBlock { - Alternative >* > count_stat_float; - Alternative >* > count_stat_int; + Alternative >* > count_stat_float; + Alternative >* > count_stat_int; Alternative >* > measurement_stat_float; Alternative >* > measurement_stat_int; }; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 81ea0ebf0c..2297285c39 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -42,9 +42,9 @@ namespace LLToolBarEnums { - LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType) + LLView::EOrientation getOrientation(SideType sideType) { - LLLayoutStack::ELayoutOrientation orientation = LLLayoutStack::HORIZONTAL; + LLView::EOrientation orientation = LLLayoutStack::HORIZONTAL; if ((sideType == SIDE_LEFT) || (sideType == SIDE_RIGHT)) { @@ -172,7 +172,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p) // Initialize the base object LLUICtrl::initFromParams(p); - LLLayoutStack::ELayoutOrientation orientation = getOrientation(p.side); + LLView::EOrientation orientation = getOrientation(p.side); LLLayoutStack::Params centering_stack_p; centering_stack_p.name = "centering_stack"; @@ -524,7 +524,7 @@ int LLToolBar::getRankFromPosition(S32 x, S32 y) int rank = 0; // Convert the toolbar coord into button panel coords - LLLayoutStack::ELayoutOrientation orientation = getOrientation(mSideType); + LLView::EOrientation orientation = getOrientation(mSideType); S32 button_panel_x = 0; S32 button_panel_y = 0; localPointToOtherView(x, y, &button_panel_x, &button_panel_y, mButtonPanel); @@ -643,7 +643,7 @@ void LLToolBar::updateLayoutAsNeeded() { if (!mNeedsLayout) return; - LLLayoutStack::ELayoutOrientation orientation = getOrientation(mSideType); + LLView::EOrientation orientation = getOrientation(mSideType); // our terminology for orientation-agnostic layout is such that // length refers to a distance in the direction we stack the buttons diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index a50c60282c..2ffcc8b574 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -124,7 +124,7 @@ namespace LLToolBarEnums SIDE_TOP, }; - LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType); + LLView::EOrientation getOrientation(SideType sideType); } // NOTE: This needs to occur before Param block declaration for proper compilation. diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 587953477d..ba88396294 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -83,6 +83,16 @@ template class LLView* LLView::getChild( static LLDefaultChildRegistry::Register r("view"); +namespace LLInitParam +{ + void TypeValues::declareValues() + { + declare("horizontal", LLView::HORIZONTAL); + declare("vertical", LLView::VERTICAL); + } +} + + LLView::Follows::Follows() : string(""), flags("flags", FOLLOWS_LEFT | FOLLOWS_TOP) diff --git a/indra/llui/llview.h b/indra/llui/llview.h index e18cfff8e5..88813da3c6 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -105,6 +105,9 @@ class LLView public LLTrace::MemTrackable // track memory usage { public: + + enum EOrientation { HORIZONTAL, VERTICAL, ORIENTATION_COUNT }; + struct Follows : public LLInitParam::ChoiceBlock { Alternative string; @@ -676,6 +679,16 @@ public: static LLTrace::MemStatHandle sMemStat; }; +namespace LLInitParam +{ +template<> +struct TypeValues : public LLInitParam::TypeValuesHelper +{ + static void declareValues(); +}; +} + + class LLCompareByTabOrder { public: diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 81ad96f39e..da7b259377 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -517,7 +517,7 @@ void LLToolBarView::draw() { if (mToolbars[i]) { - LLLayoutStack::ELayoutOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType()); + LLView::EOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType()); if (orientation == LLLayoutStack::HORIZONTAL) { @@ -535,8 +535,8 @@ void LLToolBarView::draw() for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++) { mToolbars[i]->getParent()->setVisible(mShowToolbars - && (mToolbars[i]->hasButtons() - || isToolDragged())); + && (mToolbars[i]->hasButtons() + || isToolDragged())); } // Draw drop zones if drop of a tool is active diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index db169b86a4..483e42d296 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4065,7 +4065,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { LLTracker::stopTracking(NULL); } - else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() ) + else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero()) { //look at the beacon LLVector3 global_agent_pos = agent_pos; diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index 273954ee3e..93d9945800 100644 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -35,6 +35,7 @@ setting="OpenDebugStatBasic"> Date: Mon, 25 Mar 2013 18:45:42 -0600 Subject: for SH-3927: Interesting: Viewer should send predicted camera position to simulator to control object load order --- indra/newview/llface.cpp | 2 -- indra/newview/llviewercamera.h | 2 +- indra/newview/llviewermessage.cpp | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 28e4b32793..56619563cf 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2346,8 +2346,6 @@ F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist) return 0.f ; } - //F32 camera_relative_speed = camera_moving_speed * (lookAt * LLViewerCamera::getInstance()->getVelocityDir()) ; - S32 i = 0 ; for(i = 0; i < FACE_IMPORTANCE_LEVEL && dist > FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][0]; ++i); i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ; diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index ffec284f72..d7835d8567 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -100,7 +100,7 @@ public: BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const; BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; - const LLVector3* getVelocityDir() const {return &mVelocityDir;} + LLVector3 getVelocityDir() const {return mVelocityDir;} static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; } static LLTrace::CountStatHandle<>* getAngularVelocityStat() {return &sAngularVelocityStat; } F32 getCosHalfFov() {return mCosHalfCameraFOV;} diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4b1c9c5574..8dc72ba5b4 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4222,6 +4222,9 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) LLQuaternion head_rotation = gAgent.getHeadRotation(); camera_pos_agent = gAgentCamera.getCameraPositionAgent(); + LLVector3 camera_velocity = LLViewerCamera::getInstance()->getVelocityDir() * LLViewerCamera::getInstance()->getAverageSpeed(); + F32 time_delta = 1.0f; //predict the camera position in 1 second + camera_pos_agent += camera_velocity * time_delta; render_state = gAgent.getRenderState(); -- cgit v1.3 From a6e80e3526af3890e688e53329be040e899fe203 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 31 May 2013 15:22:29 -0600 Subject: revert changes for SH-3927: Interesting: Viewer should send predicted camera position to simulator to control object load order --- indra/newview/llviewermessage.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8dc72ba5b4..4b1c9c5574 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4222,9 +4222,6 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) LLQuaternion head_rotation = gAgent.getHeadRotation(); camera_pos_agent = gAgentCamera.getCameraPositionAgent(); - LLVector3 camera_velocity = LLViewerCamera::getInstance()->getVelocityDir() * LLViewerCamera::getInstance()->getAverageSpeed(); - F32 time_delta = 1.0f; //predict the camera position in 1 second - camera_pos_agent += camera_velocity * time_delta; render_state = gAgent.getRenderState(); -- cgit v1.3 From 9fd3af3c389ed491b515cbb5136b344b069913e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Jun 2013 15:29:15 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics changed Units macros and argument order to make it more clear optimized units for integer types fixed merging of periodicrecordings...should eliminate duplicate entries in sceneloadmonitor history --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- indra/llcommon/llcriticaldamp.cpp | 2 +- indra/llcommon/llcriticaldamp.h | 4 +- indra/llcommon/lldate.cpp | 2 +- indra/llcommon/lldate.h | 2 +- indra/llcommon/llfasttimer.cpp | 14 +- indra/llcommon/llfasttimer.h | 2 +- indra/llcommon/llprocessor.cpp | 2 +- indra/llcommon/llprocessor.h | 2 +- indra/llcommon/lltimer.cpp | 14 +- indra/llcommon/lltimer.h | 16 +- indra/llcommon/lltrace.h | 76 +++--- indra/llcommon/lltracerecording.cpp | 189 ++++++++------- indra/llcommon/lltracerecording.h | 56 ++--- indra/llcommon/llunit.h | 372 ++++++++++++++++++----------- indra/llcommon/tests/llunits_test.cpp | 104 ++++---- indra/llrender/llimagegl.cpp | 6 +- indra/llrender/llimagegl.h | 6 +- indra/llui/llstatbar.cpp | 4 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llappviewer.h | 2 +- indra/newview/llfasttimerview.cpp | 303 ++++++++++++----------- indra/newview/llfasttimerview.h | 77 +++--- indra/newview/llscenemonitor.cpp | 4 +- indra/newview/lltexturefetch.h | 2 +- indra/newview/lltextureview.cpp | 12 +- indra/newview/llviewerassetstats.cpp | 4 +- indra/newview/llviewerassetstats.h | 2 +- indra/newview/llviewermessage.cpp | 18 +- indra/newview/llviewerstats.cpp | 10 +- indra/newview/llviewerstats.h | 6 +- indra/newview/llviewertexture.cpp | 16 +- indra/newview/llviewertexture.h | 14 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/pipeline.cpp | 2 +- 35 files changed, 735 insertions(+), 616 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index e188b06c03..c6ca0b542e 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnit(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); diff --git a/indra/llcommon/llcriticaldamp.cpp b/indra/llcommon/llcriticaldamp.cpp index 2f013fe255..575fc4149e 100755 --- a/indra/llcommon/llcriticaldamp.cpp +++ b/indra/llcommon/llcriticaldamp.cpp @@ -81,7 +81,7 @@ void LLSmoothInterpolation::updateInterpolants() //----------------------------------------------------------------------------- // getInterpolant() //----------------------------------------------------------------------------- -F32 LLSmoothInterpolation::getInterpolant(LLUnit time_constant, bool use_cache) +F32 LLSmoothInterpolation::getInterpolant(LLUnit time_constant, bool use_cache) { if (time_constant == 0.f) { diff --git a/indra/llcommon/llcriticaldamp.h b/indra/llcommon/llcriticaldamp.h index ab5d4ba6e2..e174643cd0 100755 --- a/indra/llcommon/llcriticaldamp.h +++ b/indra/llcommon/llcriticaldamp.h @@ -42,10 +42,10 @@ public: static void updateInterpolants(); // ACCESSORS - static F32 getInterpolant(LLUnit time_constant, bool use_cache = true); + static F32 getInterpolant(LLUnit time_constant, bool use_cache = true); template - static T lerp(T a, T b, LLUnit time_constant, bool use_cache = true) + static T lerp(T a, T b, LLUnit time_constant, bool use_cache = true) { F32 interpolant = getInterpolant(time_constant, use_cache); return ((a * (1.f - interpolant)) diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 2efe39e158..7892269e35 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -55,7 +55,7 @@ LLDate::LLDate(const LLDate& date) : mSecondsSinceEpoch(date.mSecondsSinceEpoch) {} -LLDate::LLDate(LLUnit seconds_since_epoch) : +LLDate::LLDate(LLUnit seconds_since_epoch) : mSecondsSinceEpoch(seconds_since_epoch.value()) {} diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index b62a846147..1067ac5280 100755 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -59,7 +59,7 @@ public: * * @param seconds_since_epoch The number of seconds since UTC epoch. */ - LLDate(LLUnit seconds_since_epoch); + LLDate(LLUnit seconds_since_epoch); /** * @brief Construct a date from a string representation diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index dfc72bd2ce..809a0327ca 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -146,8 +146,8 @@ U64 TimeBlock::countsPerSecond() { #if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz - static LLUnit sCPUClockFrequency = LLProcessorInfo().getCPUFrequency(); - + static LLUnit sCPUClockFrequency = LLProcessorInfo().getCPUFrequency(); + return sCPUClockFrequency.value(); #else // If we're not using RDTSC, each fasttimer tick is just a performance counter tick. // Not redefining the clock frequency itself (in llprocessor.cpp/calculate_cpu_frequency()) @@ -159,8 +159,8 @@ U64 TimeBlock::countsPerSecond() QueryPerformanceFrequency((LARGE_INTEGER*)&sCPUClockFrequency); firstcall = false; } -#endif return sCPUClockFrequency.value(); +#endif } #endif @@ -318,11 +318,11 @@ void TimeBlock::logStats() LL_DEBUGS("FastTimers") << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << LL_ENDL; LL_DEBUGS("FastTimers") << "getCPUClockCount32() " << getCPUClockCount32() << LL_ENDL; LL_DEBUGS("FastTimers") << "getCPUClockCount64() " << getCPUClockCount64() << LL_ENDL; - LL_DEBUGS("FastTimers") << "elapsed sec " << ((F64)getCPUClockCount64()) / (LLUnit(LLProcessorInfo().getCPUFrequency())) << LL_ENDL; + LL_DEBUGS("FastTimers") << "elapsed sec " << ((F64)getCPUClockCount64()) / (LLUnit(LLProcessorInfo().getCPUFrequency())) << LL_ENDL; } call_count++; - LLUnit total_time(0); + LLUnit total_time(0); LLSD sd; { @@ -365,7 +365,7 @@ void TimeBlock::dumpCurTimes() ++it) { TimeBlock* timerp = (*it); - LLUnit total_time_ms = last_frame_recording.getSum(*timerp); + LLUnit total_time_ms = last_frame_recording.getSum(*timerp); U32 num_calls = last_frame_recording.getSum(timerp->callCount()); // Don't bother with really brief times, keep output concise @@ -449,7 +449,7 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other ) } } -LLUnit BlockTimer::getElapsedTime() +LLUnit BlockTimer::getElapsedTime() { U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime; diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 20514d1638..fdc6997d45 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -71,7 +71,7 @@ public: BlockTimer(TimeBlock& timer); ~BlockTimer(); - LLUnit getElapsedTime(); + LLUnit getElapsedTime(); private: diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 5ddfa6fcef..b80e813d84 100755 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -875,7 +875,7 @@ LLProcessorInfo::LLProcessorInfo() : mImpl(NULL) LLProcessorInfo::~LLProcessorInfo() {} -LLUnitImplicit LLProcessorInfo::getCPUFrequency() const { return mImpl->getCPUFrequency(); } +LLUnitImplicit LLProcessorInfo::getCPUFrequency() const { return mImpl->getCPUFrequency(); } bool LLProcessorInfo::hasSSE() const { return mImpl->hasSSE(); } bool LLProcessorInfo::hasSSE2() const { return mImpl->hasSSE2(); } bool LLProcessorInfo::hasAltivec() const { return mImpl->hasAltivec(); } diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h index fbd427f484..7f220467b0 100755 --- a/indra/llcommon/llprocessor.h +++ b/indra/llcommon/llprocessor.h @@ -37,7 +37,7 @@ public: LLProcessorInfo(); ~LLProcessorInfo(); - LLUnitImplicit getCPUFrequency() const; + LLUnitImplicit getCPUFrequency() const; bool hasSSE() const; bool hasSSE2() const; bool hasAltivec() const; diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 838155d54d..693809b622 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -285,14 +285,14 @@ LLTimer::~LLTimer() } // static -LLUnitImplicit LLTimer::getTotalTime() +LLUnitImplicit LLTimer::getTotalTime() { // simply call into the implementation function. return totalTime(); } // static -LLUnitImplicit LLTimer::getTotalSeconds() +LLUnitImplicit LLTimer::getTotalSeconds() { return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64; } @@ -341,23 +341,23 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount) } -LLUnitImplicit LLTimer::getElapsedTimeF64() const +LLUnitImplicit LLTimer::getElapsedTimeF64() const { U64 last = mLastClockCount; return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv; } -LLUnitImplicit LLTimer::getElapsedTimeF32() const +LLUnitImplicit LLTimer::getElapsedTimeF32() const { return (F32)getElapsedTimeF64(); } -LLUnitImplicit LLTimer::getElapsedTimeAndResetF64() +LLUnitImplicit LLTimer::getElapsedTimeAndResetF64() { return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv; } -LLUnitImplicit LLTimer::getElapsedTimeAndResetF32() +LLUnitImplicit LLTimer::getElapsedTimeAndResetF32() { return (F32)getElapsedTimeAndResetF64(); } @@ -370,7 +370,7 @@ void LLTimer::setTimerExpirySec(F32 expiration) + (U64)((F32)(expiration * gClockFrequency)); } -LLUnitImplicit LLTimer::getRemainingTimeF32() const +LLUnitImplicit LLTimer::getRemainingTimeF32() const { U64 cur_ticks = get_clock_count(); if (cur_ticks > mExpirationTicks) diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index 0ba87d1e15..9e464c4b1a 100755 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -67,16 +67,16 @@ public: // Return a high precision number of seconds since the start of // this application instance. - static LLUnitImplicit getElapsedSeconds() + static LLUnitImplicit getElapsedSeconds() { return sTimer->getElapsedTimeF64(); } // Return a high precision usec since epoch - static LLUnitImplicit getTotalTime(); + static LLUnitImplicit getTotalTime(); // Return a high precision seconds since epoch - static LLUnitImplicit getTotalSeconds(); + static LLUnitImplicit getTotalSeconds(); // MANIPULATORS @@ -87,16 +87,16 @@ public: void setTimerExpirySec(F32 expiration); BOOL checkExpirationAndReset(F32 expiration); BOOL hasExpired() const; - LLUnitImplicit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset - LLUnitImplicit getElapsedTimeAndResetF64(); + LLUnitImplicit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset + LLUnitImplicit getElapsedTimeAndResetF64(); - LLUnitImplicit getRemainingTimeF32() const; + LLUnitImplicit getRemainingTimeF32() const; static BOOL knownBadTimer(); // ACCESSORS - LLUnitImplicit getElapsedTimeF32() const; // Returns elapsed time in seconds - LLUnitImplicit getElapsedTimeF64() const; // Returns elapsed time in seconds + LLUnitImplicit getElapsedTimeF32() const; // Returns elapsed time in seconds + LLUnitImplicit getElapsedTimeF64() const; // Returns elapsed time in seconds bool getStarted() const { return mStarted; } diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index cfe1273b4b..1bf853c5c0 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -44,27 +44,27 @@ namespace LLTrace { class Recording; -typedef LLUnit Bytes; -typedef LLUnit Kibibytes; -typedef LLUnit Mibibytes; -typedef LLUnit Gibibytes; -typedef LLUnit Bits; -typedef LLUnit Kibibits; -typedef LLUnit Mibibits; -typedef LLUnit Gibibits; - -typedef LLUnit Seconds; -typedef LLUnit Milliseconds; -typedef LLUnit Minutes; -typedef LLUnit Hours; -typedef LLUnit Milliseconds; -typedef LLUnit Microseconds; -typedef LLUnit Nanoseconds; - -typedef LLUnit Meters; -typedef LLUnit Kilometers; -typedef LLUnit Centimeters; -typedef LLUnit Millimeters; +typedef LLUnit Bytes; +typedef LLUnit Kibibytes; +typedef LLUnit Mibibytes; +typedef LLUnit Gibibytes; +typedef LLUnit Bits; +typedef LLUnit Kibibits; +typedef LLUnit Mibibits; +typedef LLUnit Gibibits; + +typedef LLUnit Seconds; +typedef LLUnit Milliseconds; +typedef LLUnit Minutes; +typedef LLUnit Hours; +typedef LLUnit Milliseconds; +typedef LLUnit Microseconds; +typedef LLUnit Nanoseconds; + +typedef LLUnit Meters; +typedef LLUnit Kilometers; +typedef LLUnit Centimeters; +typedef LLUnit Millimeters; void init(); void cleanup(); @@ -216,6 +216,11 @@ public: } size_t size() const + { + return getNumIndices(); + } + + static size_t getNumIndices() { return sNextStorageSlot; } @@ -263,6 +268,7 @@ public: } size_t getIndex() const { return mAccumulatorIndex; } + static size_t getNumIndices() { return AccumulatorBuffer::getNumIndices(); } virtual const char* getUnitLabel() { return ""; } @@ -408,8 +414,8 @@ public: void sample(F64 value) { - LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); - LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; + LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); + LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; mLastSampleTimeStamp = time_stamp; if (mHasValue) @@ -498,8 +504,8 @@ public: void flush() { - LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); - LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; + LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); + LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; if (mHasValue) { @@ -528,7 +534,7 @@ private: F64 mMean, mVarianceSum; - LLUnitImplicit mLastSampleTimeStamp, + LLUnitImplicit mLastSampleTimeStamp, mTotalSamplingTime; U32 mNumSamples; @@ -578,8 +584,8 @@ private: class TimeBlockAccumulator { public: - typedef LLUnit value_t; - typedef LLUnit mean_t; + typedef LLUnit value_t; + typedef LLUnit mean_t; typedef TimeBlockAccumulator self_t; // fake classes that allows us to view different facets of underlying statistic @@ -591,8 +597,8 @@ public: struct SelfTimeFacet { - typedef LLUnit value_t; - typedef LLUnit mean_t; + typedef LLUnit value_t; + typedef LLUnit mean_t; }; TimeBlockAccumulator(); @@ -672,7 +678,7 @@ template void record(EventStatHandle& measurement, VALUE_T value) { T converted_value(value); - measurement.getPrimaryAccumulator()->record(LLUnits::rawValue(converted_value)); + measurement.getPrimaryAccumulator()->record(LLUnits::storageValue(converted_value)); } template @@ -694,7 +700,7 @@ template void sample(SampleStatHandle& measurement, VALUE_T value) { T converted_value(value); - measurement.getPrimaryAccumulator()->sample(LLUnits::rawValue(converted_value)); + measurement.getPrimaryAccumulator()->sample(LLUnits::storageValue(converted_value)); } template @@ -716,7 +722,7 @@ template void add(CountStatHandle& count, VALUE_T value) { T converted_value(value); - count.getPrimaryAccumulator()->add(LLUnits::rawValue(converted_value)); + count.getPrimaryAccumulator()->add(LLUnits::storageValue(converted_value)); } @@ -739,8 +745,8 @@ struct MemStatAccumulator struct ChildMemFacet { - typedef LLUnit value_t; - typedef LLUnit mean_t; + typedef LLUnit value_t; + typedef LLUnit mean_t; }; MemStatAccumulator() diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index d32504b014..ff90da3822 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -186,26 +186,18 @@ void Recording::handleSplitTo(Recording& other) void Recording::appendRecording( const Recording& other ) { - EPlayState play_state = getPlayState(); - { - pause(); - mBuffers.write()->append(*other.mBuffers); - mElapsedSeconds += other.mElapsedSeconds; - } - setPlayState(play_state); + update(); + mBuffers.write()->append(*other.mBuffers); + mElapsedSeconds += other.mElapsedSeconds; } void Recording::mergeRecording( const Recording& other) { - EPlayState play_state = getPlayState(); - { - pause(); - mBuffers.write()->merge(*other.mBuffers); - } - setPlayState(play_state); + update(); + mBuffers.write()->merge(*other.mBuffers); } -LLUnit Recording::getSum(const TraceType& stat) +LLUnit Recording::getSum(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; update(); @@ -213,7 +205,7 @@ LLUnit Recording::getSum(const TraceType Recording::getSum(const TraceType& stat) +LLUnit Recording::getSum(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; update(); @@ -227,85 +219,85 @@ U32 Recording::getSum(const TraceType& sta return mBuffers->mStackTimers[stat.getIndex()].mCalls; } -LLUnit Recording::getPerSec(const TraceType& stat) +LLUnit Recording::getPerSec(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; update(); return (F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds); + / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value()); } -LLUnit Recording::getPerSec(const TraceType& stat) +LLUnit Recording::getPerSec(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; update(); return (F64)(accumulator.mSelfTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds); + / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value()); } F32 Recording::getPerSec(const TraceType& stat) { update(); - return (F32)mBuffers->mStackTimers[stat.getIndex()].mCalls / mElapsedSeconds; + return (F32)mBuffers->mStackTimers[stat.getIndex()].mCalls / mElapsedSeconds.value(); } -LLUnit Recording::getMin(const TraceType& stat) +LLUnit Recording::getMin(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mSize.getMin(); } -LLUnit Recording::getMean(const TraceType& stat) +LLUnit Recording::getMean(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mSize.getMean(); } -LLUnit Recording::getMax(const TraceType& stat) +LLUnit Recording::getMax(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mSize.getMax(); } -LLUnit Recording::getStandardDeviation(const TraceType& stat) +LLUnit Recording::getStandardDeviation(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation(); } -LLUnit Recording::getLastValue(const TraceType& stat) +LLUnit Recording::getLastValue(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue(); } -LLUnit Recording::getMin(const TraceType& stat) +LLUnit Recording::getMin(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMin(); } -LLUnit Recording::getMean(const TraceType& stat) +LLUnit Recording::getMean(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMean(); } -LLUnit Recording::getMax(const TraceType& stat) +LLUnit Recording::getMax(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMax(); } -LLUnit Recording::getStandardDeviation(const TraceType& stat) +LLUnit Recording::getStandardDeviation(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mChildSize.getStandardDeviation(); } -LLUnit Recording::getLastValue(const TraceType& stat) +LLUnit Recording::getLastValue(const TraceType& stat) { update(); return mBuffers->mMemStats[stat.getIndex()].mChildSize.getLastValue(); @@ -341,7 +333,7 @@ F64 Recording::getPerSec( const TraceType& stat ) update(); F64 sum = mBuffers->mCounts[stat.getIndex()].getSum(); return (sum != 0.0) - ? (sum / mElapsedSeconds) + ? (sum / mElapsedSeconds.value()) : 0.0; } @@ -430,6 +422,7 @@ U32 Recording::getSampleCount( const TraceType& stat ) PeriodicRecording::PeriodicRecording( U32 num_periods, EPlayState state) : mAutoResize(num_periods == 0), mCurPeriod(0), + mNumPeriods(0), mRecordingPeriods(num_periods ? num_periods : 1) { setPlayState(state); @@ -443,9 +436,20 @@ void PeriodicRecording::nextPeriod() } Recording& old_recording = getCurRecording(); - mCurPeriod = (mCurPeriod + 1) % mRecordingPeriods.size(); old_recording.splitTo(getCurRecording()); + + mNumPeriods = llmin(mRecordingPeriods.size(), mNumPeriods + 1); +} + +void PeriodicRecording::appendRecording(Recording& recording) +{ + // if I have a recording of any length, then close it off and start a fresh one + if (getCurRecording().getDuration().value()) + { + nextPeriod(); + } + getCurRecording().appendRecording(recording); } @@ -453,77 +457,77 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other ) { if (other.mRecordingPeriods.empty()) return; - EPlayState play_state = getPlayState(); - pause(); - - EPlayState other_play_state = other.getPlayState(); - other.pause(); - - U32 other_recording_count = other.mRecordingPeriods.size(); - - Recording& other_oldest_recording = other.mRecordingPeriods[(other.mCurPeriod + 1) % other.mRecordingPeriods.size()]; + getCurRecording().update(); + other.getCurRecording().update(); // if I have a recording of any length, then close it off and start a fresh one if (getCurRecording().getDuration().value()) { nextPeriod(); } - getCurRecording().appendRecording(other_oldest_recording); - if (other_recording_count > 1) + if (mAutoResize) { - if (mAutoResize) + S32 other_index = (other.mCurPeriod + 1) % other.mRecordingPeriods.size(); + S32 end_index = (other.mCurPeriod) % other.mRecordingPeriods.size(); + + do { - for (S32 other_index = (other.mCurPeriod + 2) % other_recording_count, - end_index = (other.mCurPeriod + 1) % other_recording_count; - other_index != end_index; - other_index = (other_index + 1) % other_recording_count) + if (other.mRecordingPeriods[other_index].getDuration().value()) { - llassert(other.mRecordingPeriods[other_index].getDuration() != 0.f - && (mRecordingPeriods.empty() - || other.mRecordingPeriods[other_index].getDuration() != mRecordingPeriods.back().getDuration())); mRecordingPeriods.push_back(other.mRecordingPeriods[other_index]); } - - mCurPeriod = mRecordingPeriods.size() - 1; + other_index = (other_index + 1) % other.mRecordingPeriods.size(); } - else + while(other_index != end_index); + + mCurPeriod = mRecordingPeriods.size() - 1; + mNumPeriods = mRecordingPeriods.size(); + } + else + { + //FIXME: get proper number of recordings from other...might not have used all its slots + size_t num_to_copy = llmin( mRecordingPeriods.size(), other.getNumRecordedPeriods()); + std::vector::iterator src_it = other.mRecordingPeriods.begin() + + ( (other.mCurPeriod + 1 // oldest period + + (other.mRecordingPeriods.size() - num_to_copy)) // minus room for copy + % other.mRecordingPeriods.size()); + std::vector::iterator dest_it = mRecordingPeriods.begin() + mCurPeriod; + + for(size_t i = 0; i < num_to_copy; i++) { - size_t num_to_copy = llmin( mRecordingPeriods.size(), other.mRecordingPeriods.size() - 1); - std::vector::iterator src_it = other.mRecordingPeriods.begin() - + ( (other.mCurPeriod + 1 // oldest period - + (other.mRecordingPeriods.size() - num_to_copy)) // minus room for copy - % other.mRecordingPeriods.size()); - std::vector::iterator dest_it = mRecordingPeriods.begin() + ((mCurPeriod + 1) % mRecordingPeriods.size()); - - for(S32 i = 0; i < num_to_copy; i++) - { - *dest_it = *src_it; + *dest_it = *src_it; - if (++src_it == other.mRecordingPeriods.end()) - { - src_it = other.mRecordingPeriods.begin(); - } + if (++src_it == other.mRecordingPeriods.end()) + { + src_it = other.mRecordingPeriods.begin(); + } - if (++dest_it == mRecordingPeriods.end()) - { - dest_it = mRecordingPeriods.begin(); - } + if (++dest_it == mRecordingPeriods.end()) + { + dest_it = mRecordingPeriods.begin(); } - - mCurPeriod = (mCurPeriod + num_to_copy) % mRecordingPeriods.size(); } + + // want argument to % to be positive, otherwise result could be negative and thus out of bounds + llassert(num_to_copy >= 1); + // advance to last recording period copied, so we can check if the last period had actually carried any data, in which case we'll advance below + // using nextPeriod() which retains continuity (mLastValue, etc) + mCurPeriod = (mCurPeriod + num_to_copy - 1) % mRecordingPeriods.size(); + mNumPeriods = llmin(mRecordingPeriods.size(), mNumPeriods + num_to_copy); } - nextPeriod(); - - setPlayState(play_state); - other.setPlayState(other_play_state); + if (getCurRecording().getDuration().value()) + { + //call this to chain last period copied to new active period + nextPeriod(); + } + getCurRecording().setPlayState(getPlayState()); } -LLUnit PeriodicRecording::getDuration() const +LLUnit PeriodicRecording::getDuration() const { - LLUnit duration; + LLUnit duration; size_t num_periods = mRecordingPeriods.size(); for (size_t i = 1; i <= num_periods; i++) { @@ -615,7 +619,7 @@ void PeriodicRecording::handleSplitTo(PeriodicRecording& other) F64 PeriodicRecording::getPeriodMean( const TraceType& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 mean = 0; if (num_periods <= 0) { return mean; } @@ -643,7 +647,7 @@ F64 PeriodicRecording::getPeriodMean( const TraceType& stat, s F64 PeriodicRecording::getPeriodMin( const TraceType& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 min_val = std::numeric_limits::max(); for (S32 i = 1; i <= num_periods; i++) @@ -657,7 +661,7 @@ F64 PeriodicRecording::getPeriodMin( const TraceType& stat, si F64 PeriodicRecording::getPeriodMax( const TraceType& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 max_val = std::numeric_limits::min(); for (S32 i = 1; i <= num_periods; i++) @@ -671,7 +675,7 @@ F64 PeriodicRecording::getPeriodMax( const TraceType& stat, si F64 PeriodicRecording::getPeriodMin( const TraceType& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 min_val = std::numeric_limits::max(); for (S32 i = 1; i <= num_periods; i++) @@ -685,7 +689,7 @@ F64 PeriodicRecording::getPeriodMin( const TraceType& stat, s F64 PeriodicRecording::getPeriodMax(const TraceType& stat, size_t num_periods /*= U32_MAX*/) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 max_val = std::numeric_limits::min(); for (S32 i = 1; i <= num_periods; i++) @@ -700,9 +704,9 @@ F64 PeriodicRecording::getPeriodMax(const TraceType& stat, si F64 PeriodicRecording::getPeriodMean( const TraceType& stat, size_t num_periods /*= U32_MAX*/ ) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - LLUnit total_duration = 0.f; + LLUnit total_duration = 0.f; F64 mean = 0; if (num_periods <= 0) { return mean; } @@ -712,7 +716,7 @@ F64 PeriodicRecording::getPeriodMean( const TraceType& stat, S32 index = (mCurPeriod + total_periods - i) % total_periods; if (mRecordingPeriods[index].getDuration() > 0.f) { - LLUnit recording_duration = mRecordingPeriods[index].getDuration(); + LLUnit recording_duration = mRecordingPeriods[index].getDuration(); mean += mRecordingPeriods[index].getMean(stat) * recording_duration.value(); total_duration += recording_duration; } @@ -734,13 +738,11 @@ F64 PeriodicRecording::getPeriodMean( const TraceType& stat, void ExtendableRecording::extend() { // stop recording to get latest data - mPotentialRecording.stop(); + mPotentialRecording.update(); // push the data back to accepted recording mAcceptedRecording.appendRecording(mPotentialRecording); // flush data, so we can start from scratch mPotentialRecording.reset(); - // go back to play state we were in initially - mPotentialRecording.setPlayState(getPlayState()); } void ExtendableRecording::handleStart() @@ -777,15 +779,10 @@ ExtendablePeriodicRecording::ExtendablePeriodicRecording() void ExtendablePeriodicRecording::extend() { - llassert(mPotentialRecording.getPlayState() == getPlayState()); - // stop recording to get latest data - mPotentialRecording.pause(); // push the data back to accepted recording mAcceptedRecording.appendPeriodicRecording(mPotentialRecording); // flush data, so we can start from scratch mPotentialRecording.reset(); - // go back to play state we were in initially - mPotentialRecording.setPlayState(getPlayState()); } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 4651bfcb61..e3cef77b06 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -148,26 +148,26 @@ namespace LLTrace void makeUnique() { mBuffers.makeUnique(); } // Timer accessors - LLUnit getSum(const TraceType& stat); - LLUnit getSum(const TraceType& stat); + LLUnit getSum(const TraceType& stat); + LLUnit getSum(const TraceType& stat); U32 getSum(const TraceType& stat); - LLUnit getPerSec(const TraceType& stat); - LLUnit getPerSec(const TraceType& stat); + LLUnit getPerSec(const TraceType& stat); + LLUnit getPerSec(const TraceType& stat); F32 getPerSec(const TraceType& stat); // Memory accessors - LLUnit getMin(const TraceType& stat); - LLUnit getMean(const TraceType& stat); - LLUnit getMax(const TraceType& stat); - LLUnit getStandardDeviation(const TraceType& stat); - LLUnit getLastValue(const TraceType& stat); - - LLUnit getMin(const TraceType& stat); - LLUnit getMean(const TraceType& stat); - LLUnit getMax(const TraceType& stat); - LLUnit getStandardDeviation(const TraceType& stat); - LLUnit getLastValue(const TraceType& stat); + LLUnit getMin(const TraceType& stat); + LLUnit getMean(const TraceType& stat); + LLUnit getMax(const TraceType& stat); + LLUnit getStandardDeviation(const TraceType& stat); + LLUnit getLastValue(const TraceType& stat); + + LLUnit getMin(const TraceType& stat); + LLUnit getMean(const TraceType& stat); + LLUnit getMax(const TraceType& stat); + LLUnit getStandardDeviation(const TraceType& stat); + LLUnit getLastValue(const TraceType& stat); U32 getSum(const TraceType& stat); U32 getSum(const TraceType& stat); @@ -273,7 +273,7 @@ namespace LLTrace U32 getSampleCount(const TraceType& stat); - LLUnit getDuration() const { return LLUnit(mElapsedSeconds); } + LLUnit getDuration() const { return mElapsedSeconds; } protected: friend class ThreadRecorder; @@ -288,7 +288,7 @@ namespace LLTrace class ThreadRecorder* getThreadRecorder(); LLTimer mSamplingTimer; - F64 mElapsedSeconds; + LLUnit mElapsedSeconds; LLCopyOnWritePointer mBuffers; }; @@ -299,11 +299,12 @@ namespace LLTrace PeriodicRecording(U32 num_periods, EPlayState state = STOPPED); void nextPeriod(); - U32 getNumPeriods() { return mRecordingPeriods.size(); } + size_t getNumRecordedPeriods() { return mNumPeriods; } - LLUnit getDuration() const; + LLUnit getDuration() const; void appendPeriodicRecording(PeriodicRecording& other); + void appendRecording(Recording& recording); Recording& getLastRecording(); const Recording& getLastRecording() const; Recording& getCurRecording(); @@ -317,7 +318,7 @@ namespace LLTrace typename T::value_t getPeriodMin(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); typename T::value_t min_val = std::numeric_limits::max(); for (S32 i = 1; i <= num_periods; i++) @@ -346,7 +347,7 @@ namespace LLTrace F64 getPeriodMinPerSec(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 min_val = std::numeric_limits::max(); for (S32 i = 1; i <= num_periods; i++) @@ -362,7 +363,7 @@ namespace LLTrace typename T::value_t getPeriodMax(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); typename T::value_t max_val = std::numeric_limits::min(); for (S32 i = 1; i <= num_periods; i++) @@ -391,7 +392,7 @@ namespace LLTrace F64 getPeriodMaxPerSec(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); F64 max_val = std::numeric_limits::min(); for (S32 i = 1; i <= num_periods; i++) @@ -407,7 +408,7 @@ namespace LLTrace typename T::mean_t getPeriodMean(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); typename T::mean_t mean = 0; if (num_periods <= 0) { return mean; } @@ -442,7 +443,7 @@ namespace LLTrace typename T::mean_t getPeriodMeanPerSec(const TraceType& stat, size_t num_periods = U32_MAX) { size_t total_periods = mRecordingPeriods.size(); - num_periods = llmin(num_periods, total_periods); + num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); typename T::mean_t mean = 0; if (num_periods <= 0) { return mean; } @@ -468,8 +469,9 @@ namespace LLTrace private: std::vector mRecordingPeriods; - const bool mAutoResize; - S32 mCurPeriod; + const bool mAutoResize; + size_t mCurPeriod; + size_t mNumPeriods; }; PeriodicRecording& get_frame_recording(); diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index f48cbe0e11..5b961c81f0 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -35,31 +35,31 @@ namespace LLUnits { template -struct ConversionFactor +struct Convert { - static F64 get() + static VALUE_TYPE get(VALUE_TYPE val) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template llstatic_assert_template(DERIVED_UNITS_TAG, false, "Cannot convert between types."); - return 0; + return val; } }; template -struct ConversionFactor +struct Convert { - static F64 get() + static VALUE_TYPE get(VALUE_TYPE val) { - return 1; + return val; } }; } -template +template struct LLUnit { - typedef LLUnit self_t; + typedef LLUnit self_t; typedef STORAGE_TYPE storage_t; // value initialization @@ -68,11 +68,16 @@ struct LLUnit {} // unit initialization and conversion - template - LLUnit(LLUnit other) + template + LLUnit(LLUnit other) : mValue(convert(other)) {} + bool operator == (const self_t& other) + { + return mValue = other.mValue; + } + // value assignment self_t& operator = (storage_t value) { @@ -81,8 +86,8 @@ struct LLUnit } // unit assignment - template - self_t& operator = (LLUnit other) + template + self_t& operator = (LLUnit other) { mValue = convert(other); return *this; @@ -93,9 +98,9 @@ struct LLUnit return mValue; } - template LLUnit as() + template LLUnit as() { - return LLUnit(*this); + return LLUnit(*this); } @@ -104,8 +109,8 @@ struct LLUnit mValue += value; } - template - void operator += (LLUnit other) + template + void operator += (LLUnit other) { mValue += convert(other); } @@ -115,8 +120,8 @@ struct LLUnit mValue -= value; } - template - void operator -= (LLUnit other) + template + void operator -= (LLUnit other) { mValue -= convert(other); } @@ -127,7 +132,7 @@ struct LLUnit } template - void operator *= (LLUnit multiplicand) + void operator *= (LLUnit multiplicand) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template llstatic_assert_template(OTHER_UNIT, false, "Multiplication of unit types not supported."); @@ -139,37 +144,43 @@ struct LLUnit } template - void operator /= (LLUnit divisor) + void operator /= (LLUnit divisor) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template llstatic_assert_template(OTHER_UNIT, false, "Illegal in-place division of unit types."); } - template - static storage_t convert(LLUnit v) + template + static storage_t convert(LLUnit v) { - return (storage_t)(v.value() - * LLUnits::ConversionFactor::get() - * LLUnits::ConversionFactor::get()); + return (storage_t)LLUnits::Convert::get((STORAGE_TYPE) + LLUnits::Convert::get(v.value())); } + template + static storage_t convert(LLUnit v) + { + return (storage_t)(v.value()); + } + + protected: storage_t mValue; }; -template -struct LLUnitImplicit : public LLUnit +template +struct LLUnitImplicit : public LLUnit { - typedef LLUnitImplicit self_t; - typedef typename LLUnit::storage_t storage_t; - typedef LLUnit base_t; + typedef LLUnitImplicit self_t; + typedef typename LLUnit::storage_t storage_t; + typedef LLUnit base_t; LLUnitImplicit(storage_t value = storage_t()) : base_t(value) {} - template - LLUnitImplicit(LLUnit other) + template + LLUnitImplicit(LLUnit other) : base_t(convert(other)) {} @@ -184,50 +195,50 @@ struct LLUnitImplicit : public LLUnit // // operator + // -template -LLUnit operator + (LLUnit first, LLUnit second) +template +LLUnit operator + (LLUnit first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result += second; return result; } -template -LLUnit operator + (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator + (LLUnit first, SCALAR_TYPE second) { - LLUnit result(first); + LLUnit result(first); result += second; return result; } -template -LLUnit operator + (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator + (SCALAR_TYPE first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result += second; return result; } -template -LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) +template +LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } -template -LLUnitImplicit operator + (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator + (LLUnitImplicit first, SCALAR_TYPE second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } -template -LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) +template +LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } @@ -235,50 +246,50 @@ LLUnitImplicit operator + (LLUnitImplicit -LLUnit operator - (LLUnit first, LLUnit second) +template +LLUnit operator - (LLUnit first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result -= second; return result; } -template -LLUnit operator - (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator - (LLUnit first, SCALAR_TYPE second) { - LLUnit result(first); + LLUnit result(first); result -= second; return result; } -template -LLUnit operator - (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator - (SCALAR_TYPE first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result -= second; return result; } -template -LLUnitImplicit operator - (LLUnitImplicit first, LLUnitImplicit second) +template +LLUnitImplicit operator - (LLUnitImplicit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } -template -LLUnitImplicit operator - (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator - (LLUnitImplicit first, SCALAR_TYPE second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } -template -LLUnitImplicit operator - (SCALAR_TYPE first, LLUnitImplicit second) +template +LLUnitImplicit operator - (SCALAR_TYPE first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } @@ -286,102 +297,100 @@ LLUnitImplicit operator - (SCALAR_TYPE first, LLUnitImp // // operator * // -template -LLUnit operator * (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator * (SCALAR_TYPE first, LLUnit second) { - return LLUnit((STORAGE_TYPE)(first * second.value())); + return LLUnit((STORAGE_TYPE)(first * second.value())); } -template -LLUnit operator * (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator * (LLUnit first, SCALAR_TYPE second) { - return LLUnit((STORAGE_TYPE)(first.value() * second)); + return LLUnit((STORAGE_TYPE)(first.value() * second)); } -template -LLUnit operator * (LLUnit, LLUnit) +template +LLUnit operator * (LLUnit, LLUnit) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template llstatic_assert_template(STORAGE_TYPE1, false, "Multiplication of unit types results in new unit type - not supported."); - return LLUnit(); + return LLUnit(); } -template -LLUnitImplicit operator * (SCALAR_TYPE first, LLUnitImplicit second) +template +LLUnitImplicit operator * (SCALAR_TYPE first, LLUnitImplicit second) { - return LLUnitImplicit(first * second.value()); + return LLUnitImplicit(first * second.value()); } -template -LLUnitImplicit operator * (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator * (LLUnitImplicit first, SCALAR_TYPE second) { - return LLUnitImplicit(first.value() * second); + return LLUnitImplicit(first.value() * second); } -template -LLUnitImplicit operator * (LLUnitImplicit, LLUnitImplicit) +template +LLUnitImplicit operator * (LLUnitImplicit, LLUnitImplicit) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template llstatic_assert_template(STORAGE_TYPE1, false, "Multiplication of unit types results in new unit type - not supported."); - return LLUnitImplicit(); + return LLUnitImplicit(); } // // operator / // -template -SCALAR_TYPE operator / (SCALAR_TYPE first, LLUnit second) +template +SCALAR_TYPE operator / (SCALAR_TYPE first, LLUnit second) { return SCALAR_TYPE(first / second.value()); } -template -LLUnit operator / (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator / (LLUnit first, SCALAR_TYPE second) { - return LLUnit((STORAGE_TYPE)(first.value() / second)); + return LLUnit((STORAGE_TYPE)(first.value() / second)); } -template -STORAGE_TYPE1 operator / (LLUnit first, LLUnit second) +template +STORAGE_TYPE1 operator / (LLUnit first, LLUnit second) { - // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - return STORAGE_TYPE1(first.value() / second.value()); + return STORAGE_TYPE1(first.value() / first.convert(second)); } -template -LLUnitImplicit operator / (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator / (LLUnitImplicit first, SCALAR_TYPE second) { - return LLUnitImplicit((STORAGE_TYPE)(first.value() / second)); + return LLUnitImplicit((STORAGE_TYPE)(first.value() / second)); } -template -STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUnitImplicit second) +template +STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUnitImplicit second) { - // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - return STORAGE_TYPE1(first.value() / second.value()); + return STORAGE_TYPE1(first.value() / first.convert(second)); } #define COMPARISON_OPERATORS(op) \ -template \ -bool operator op (SCALAR_TYPE first, LLUnit second) \ +template \ +bool operator op (SCALAR_TYPE first, LLUnit second) \ { \ return first op second.value(); \ } \ \ -template \ -bool operator op (LLUnit first, SCALAR_TYPE second) \ +template \ +bool operator op (LLUnit first, SCALAR_TYPE second) \ { \ return first.value() op second; \ } \ \ -template \ -bool operator op (LLUnitImplicit first, LLUnitImplicit second) \ +template \ +bool operator op (LLUnitImplicit first, LLUnitImplicit second) \ { \ return first.value() op first.convert(second); \ } \ \ -template \ - bool operator op (LLUnit first, LLUnit second) \ +template \ + bool operator op (LLUnit first, LLUnit second) \ { \ return first.value() op first.convert(second); \ } @@ -401,7 +410,7 @@ struct LLGetUnitLabel }; template -struct LLGetUnitLabel > +struct LLGetUnitLabel > { static const char* getUnitLabel() { return T::getUnitLabel(); } }; @@ -411,70 +420,147 @@ struct LLGetUnitLabel > // namespace LLUnits { + +template +struct LinearOps +{ + typedef LinearOps self_t; + LinearOps(VALUE_TYPE val) : mValue (val) {} + + operator VALUE_TYPE() const { return mValue; } + VALUE_TYPE mValue; + + template + self_t operator * (T other) + { + return mValue * other; + } + + template + self_t operator / (T other) + { + return mValue / other; + } + + template + self_t operator + (T other) + { + return mValue + other; + } + + template + self_t operator - (T other) + { + return mValue - other; + } +}; + +template +struct InverseLinearOps +{ + typedef InverseLinearOps self_t; + + InverseLinearOps(VALUE_TYPE val) : mValue (val) {} + operator VALUE_TYPE() const { return mValue; } + VALUE_TYPE mValue; + + template + self_t operator * (T other) + { + return mValue / other; + } + + template + self_t operator / (T other) + { + return mValue * other; + } + + template + self_t operator + (T other) + { + return mValue - other; + } + + template + self_t operator - (T other) + { + return mValue + other; + } +}; + + template -T rawValue(T val) { return val; } +T storageValue(T val) { return val; } template -STORAGE_TYPE rawValue(LLUnit val) { return val.value(); } +STORAGE_TYPE storageValue(LLUnit val) { return val.value(); } template -STORAGE_TYPE rawValue(LLUnitImplicit val) { return val.value(); } +STORAGE_TYPE storageValue(LLUnitImplicit val) { return val.value(); } -#define LL_DECLARE_DERIVED_UNIT(conversion_factor, base_unit_name, unit_name, unit_label) \ +#define LL_DECLARE_BASE_UNIT(base_unit_name, unit_label) \ +struct base_unit_name { typedef base_unit_name base_unit_t; static const char* getUnitLabel() { return unit_label; }} + +#define LL_DECLARE_DERIVED_UNIT(unit_name, unit_label, base_unit_name, conversion_operation) \ struct unit_name \ { \ typedef base_unit_name base_unit_t; \ static const char* getUnitLabel() { return unit_label; } \ }; \ template \ -struct ConversionFactor \ +struct Convert \ { \ - static F64 get() \ + static STORAGE_TYPE get(STORAGE_TYPE val) \ { \ - return (F64)conversion_factor; \ + return (LinearOps(val) conversion_operation).mValue; \ } \ }; \ \ template \ -struct ConversionFactor \ +struct Convert \ { \ - static F64 get() \ + static STORAGE_TYPE get(STORAGE_TYPE val) \ { \ - return (F64)(1.0 / (conversion_factor)); \ + return (InverseLinearOps(val) conversion_operation).mValue; \ } \ } -#define LL_DECLARE_BASE_UNIT(base_unit_name, unit_label) \ -struct base_unit_name { typedef base_unit_name base_unit_t; static const char* getUnitLabel() { return unit_label; }} - LL_DECLARE_BASE_UNIT(Bytes, "B"); -LL_DECLARE_DERIVED_UNIT(1024, Bytes, Kibibytes, "KiB"); -LL_DECLARE_DERIVED_UNIT(1024 * 1024, Bytes, Mibibytes, "MiB"); -LL_DECLARE_DERIVED_UNIT(1024 * 1024 * 1024, Bytes, Gibibytes, "GiB"); -LL_DECLARE_DERIVED_UNIT(1.0 / 8.0, Bytes, Bits, "b"); -LL_DECLARE_DERIVED_UNIT(1024 / 8, Bytes, Kibibits, "Kib"); -LL_DECLARE_DERIVED_UNIT(1024 / 8, Bytes, Mibibits, "Mib"); -LL_DECLARE_DERIVED_UNIT(1024 * 1024 * 1024 / 8, Bytes, Gibibits, "Gib"); +LL_DECLARE_DERIVED_UNIT(Kilobytes, "KB", Bytes, * 1000); +LL_DECLARE_DERIVED_UNIT(Megabytes, "MB", Bytes, * 1000 * 1000); +LL_DECLARE_DERIVED_UNIT(Gigabytes, "GB", Bytes, * 1000 * 1000 * 1000); +LL_DECLARE_DERIVED_UNIT(Kibibytes, "KiB", Bytes, * 1024); +LL_DECLARE_DERIVED_UNIT(Mibibytes, "MiB", Bytes, * 1024 * 1024); +LL_DECLARE_DERIVED_UNIT(Gibibytes, "GiB", Bytes, * 1024 * 1024 * 1024); + +LL_DECLARE_DERIVED_UNIT(Bits, "b", Bytes, / 8); +LL_DECLARE_DERIVED_UNIT(Kilobits, "Kb", Bytes, * (1000 / 8)); +LL_DECLARE_DERIVED_UNIT(Megabits, "Mb", Bytes, * (1000 / 8)); +LL_DECLARE_DERIVED_UNIT(Gigabits, "Gb", Bytes, * (1000 * 1000 * 1000 / 8)); +LL_DECLARE_DERIVED_UNIT(Kibibits, "Kib", Bytes, * (1024 / 8)); +LL_DECLARE_DERIVED_UNIT(Mibibits, "Mib", Bytes, * (1024 / 8)); +LL_DECLARE_DERIVED_UNIT(Gibibits, "Gib", Bytes, * (1024 * 1024 * 1024 / 8)); LL_DECLARE_BASE_UNIT(Seconds, "s"); -LL_DECLARE_DERIVED_UNIT(60, Seconds, Minutes, "min"); -LL_DECLARE_DERIVED_UNIT(60 * 60, Seconds, Hours, "h"); -LL_DECLARE_DERIVED_UNIT(1.0 / 1000.0, Seconds, Milliseconds, "ms"); -LL_DECLARE_DERIVED_UNIT(1.0 / 1000000.0, Seconds, Microseconds, "\x09\x3cs"); -LL_DECLARE_DERIVED_UNIT(1.0 / 1000000000.0, Seconds, Nanoseconds, "ns"); +LL_DECLARE_DERIVED_UNIT(Minutes, "min", Seconds, * 60); +LL_DECLARE_DERIVED_UNIT(Hours, "h", Seconds, * 60 * 60); +LL_DECLARE_DERIVED_UNIT(Milliseconds, "ms", Seconds, / 1000); +LL_DECLARE_DERIVED_UNIT(Microseconds, "\x09\x3cs", Seconds, / 1000000); +LL_DECLARE_DERIVED_UNIT(Nanoseconds, "ns", Seconds, / 1000000000); LL_DECLARE_BASE_UNIT(Meters, "m"); -LL_DECLARE_DERIVED_UNIT(1000, Meters, Kilometers, "km"); -LL_DECLARE_DERIVED_UNIT(1.0 / 100.0, Meters, Centimeters, "cm"); -LL_DECLARE_DERIVED_UNIT(1.0 / 1000.0, Meters, Millimeters, "mm"); +LL_DECLARE_DERIVED_UNIT(Kilometers, "km", Meters, * 1000); +LL_DECLARE_DERIVED_UNIT(Centimeters, "cm", Meters, * 100); +LL_DECLARE_DERIVED_UNIT(Millimeters, "mm", Meters, * 1000); LL_DECLARE_BASE_UNIT(Hertz, "Hz"); -LL_DECLARE_DERIVED_UNIT(1000, Hertz, Kilohertz, "KHz"); -LL_DECLARE_DERIVED_UNIT(1000 * 1000, Hertz, Megahertz, "MHz"); -LL_DECLARE_DERIVED_UNIT(1000 * 1000 * 1000, Hertz, Gigahertz, "GHz"); +LL_DECLARE_DERIVED_UNIT(Kilohertz, "KHz", Hertz, * 1000); +LL_DECLARE_DERIVED_UNIT(Megahertz, "MHz", Hertz, * 1000 * 1000); +LL_DECLARE_DERIVED_UNIT(Gigahertz, "GHz", Hertz, * 1000 * 1000 * 1000); LL_DECLARE_BASE_UNIT(Radians, "rad"); -LL_DECLARE_DERIVED_UNIT(0.01745329251994, Radians, Degrees, "deg"); +LL_DECLARE_DERIVED_UNIT(Degrees, "deg", Radians, * 0.01745329251994); } // namespace LLUnits diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp index 33e30f9688..747e8d1827 100644 --- a/indra/llcommon/tests/llunits_test.cpp +++ b/indra/llcommon/tests/llunits_test.cpp @@ -34,8 +34,8 @@ namespace LLUnits { // using powers of 2 to allow strict floating point equality LL_DECLARE_BASE_UNIT(Quatloos, "Quat"); - LL_DECLARE_DERIVED_UNIT(4, Quatloos, Latinum, "Lat"); - LL_DECLARE_DERIVED_UNIT((1.0 / 4.0), Quatloos, Solari, "Sol"); + LL_DECLARE_DERIVED_UNIT(Latinum, "Lat", Quatloos, * 4); + LL_DECLARE_DERIVED_UNIT(Solari, "Sol", Quatloos, / 4); } namespace tut @@ -53,105 +53,107 @@ namespace tut template<> template<> void units_object_t::test<1>() { - LLUnit float_quatloos; - ensure(float_quatloos.value() == 0.f); + LLUnit float_quatloos; + ensure(float_quatloos == 0.f); - LLUnit int_quatloos; - ensure(int_quatloos.value() == 0); + LLUnit int_quatloos; + ensure(int_quatloos == 0); int_quatloos = 42; - ensure(int_quatloos.value() == 42); + ensure(int_quatloos == 42); float_quatloos = int_quatloos; - ensure(float_quatloos.value() == 42.f); + ensure(float_quatloos == 42.f); int_quatloos = float_quatloos; - ensure(int_quatloos.value() == 42); + ensure(int_quatloos == 42); float_quatloos = 42.1f; - ensure(float_quatloos.value() == 42.1f); + ensure(float_quatloos == 42.1f); int_quatloos = float_quatloos; - ensure(int_quatloos.value() == 42); - LLUnit unsigned_int_quatloos(float_quatloos); - ensure(unsigned_int_quatloos.value() == 42); + ensure(int_quatloos == 42); + LLUnit unsigned_int_quatloos(float_quatloos); + ensure(unsigned_int_quatloos == 42); } // conversions to/from base unit template<> template<> void units_object_t::test<2>() { - LLUnit quatloos(1.f); - ensure(quatloos.value() == 1.f); - LLUnit latinum_bars(quatloos); - ensure(latinum_bars.value() == 1.f / 4.f); + LLUnit quatloos(1.f); + ensure(quatloos == 1.f); + LLUnit latinum_bars(quatloos); + ensure(latinum_bars == 1.f / 4.f); latinum_bars = 256; quatloos = latinum_bars; - ensure(quatloos.value() == 1024); + ensure(quatloos == 1024); - LLUnit solari(quatloos); - ensure(solari.value() == 4096); + LLUnit solari(quatloos); + ensure(solari == 4096); } // conversions across non-base units template<> template<> void units_object_t::test<3>() { - LLUnit solari = 4.f; - LLUnit latinum_bars = solari; - ensure(latinum_bars.value() == 0.25f); + LLUnit solari = 4.f; + LLUnit latinum_bars = solari; + ensure(latinum_bars == 0.25f); } // math operations template<> template<> void units_object_t::test<4>() { - LLUnit quatloos = 1.f; + LLUnit quatloos = 1.f; quatloos *= 4.f; - ensure(quatloos.value() == 4); + ensure(quatloos == 4); quatloos = quatloos * 2; - ensure(quatloos.value() == 8); + ensure(quatloos == 8); quatloos = 2.f * quatloos; - ensure(quatloos.value() == 16); + ensure(quatloos == 16); quatloos += 4.f; - ensure(quatloos.value() == 20); + ensure(quatloos == 20); quatloos += 4; - ensure(quatloos.value() == 24); + ensure(quatloos == 24); quatloos = quatloos + 4; - ensure(quatloos.value() == 28); + ensure(quatloos == 28); quatloos = 4 + quatloos; - ensure(quatloos.value() == 32); + ensure(quatloos == 32); quatloos += quatloos * 3; - ensure(quatloos.value() == 128); + ensure(quatloos == 128); quatloos -= quatloos / 4 * 3; - ensure(quatloos.value() == 32); + ensure(quatloos == 32); quatloos = quatloos - 8; - ensure(quatloos.value() == 24); + ensure(quatloos == 24); quatloos -= 4; - ensure(quatloos.value() == 20); + ensure(quatloos == 20); quatloos -= 4.f; - ensure(quatloos.value() == 16); + ensure(quatloos == 16); quatloos *= 2.f; - ensure(quatloos.value() == 32); + ensure(quatloos == 32); quatloos = quatloos * 2.f; - ensure(quatloos.value() == 64); + ensure(quatloos == 64); quatloos = 0.5f * quatloos; - ensure(quatloos.value() == 32); + ensure(quatloos == 32); quatloos /= 2.f; - ensure(quatloos.value() == 16); + ensure(quatloos == 16); quatloos = quatloos / 4; - ensure(quatloos.value() == 4); + ensure(quatloos == 4); - F32 ratio = quatloos / LLUnit(4.f); + F32 ratio = quatloos / LLUnit(4.f); + ensure(ratio == 1); + ratio = quatloos / LLUnit(16.f); ensure(ratio == 1); - quatloos += LLUnit(4.f); - ensure(quatloos.value() == 5); - quatloos -= LLUnit(1.f); - ensure(quatloos.value() == 1); + quatloos += LLUnit(4.f); + ensure(quatloos == 5); + quatloos -= LLUnit(1.f); + ensure(quatloos == 1); } // implicit units @@ -159,16 +161,16 @@ namespace tut void units_object_t::test<5>() { // 0-initialized - LLUnit quatloos(0); + LLUnit quatloos(0); // initialize implicit unit from explicit - LLUnitImplicit quatloos_implicit = quatloos + 1; - ensure(quatloos_implicit.value() == 1); + LLUnitImplicit quatloos_implicit = quatloos + 1; + ensure(quatloos_implicit == 1); // assign implicit to explicit, or perform math operations quatloos = quatloos_implicit; - ensure(quatloos.value() == 1); + ensure(quatloos == 1); quatloos += quatloos_implicit; - ensure(quatloos.value() == 2); + ensure(quatloos == 2); // math operations on implicits quatloos_implicit = 1; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 2c3fcfcec1..cb99a651c6 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -51,9 +51,9 @@ U32 wpo2(U32 i); U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; -LLUnit LLImageGL::sGlobalTextureMemory = 0; -LLUnit LLImageGL::sBoundTextureMemory = 0; -LLUnit LLImageGL::sCurBoundTextureMemory = 0; +LLUnit LLImageGL::sGlobalTextureMemory = 0; +LLUnit LLImageGL::sBoundTextureMemory = 0; +LLUnit LLImageGL::sCurBoundTextureMemory = 0; S32 LLImageGL::sCount = 0; LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE]; U32 LLImageGL::sCurTexName = 1; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 2b568e5e0f..227ccc90bd 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -246,9 +246,9 @@ public: static F32 sLastFrameTime; // Global memory statistics - static LLUnit sGlobalTextureMemory; // Tracks main memory texmem - static LLUnit sBoundTextureMemory; // Tracks bound texmem for last completed frame - static LLUnit sCurBoundTextureMemory; // Tracks bound texmem for current frame + static LLUnit sGlobalTextureMemory; // Tracks main memory texmem + static LLUnit sBoundTextureMemory; // Tracks bound texmem for last completed frame + static LLUnit sCurBoundTextureMemory; // Tracks bound texmem for current frame static U32 sBindCount; // Tracks number of texture binds for current frame static U32 sUniqueCount; // Tracks number of unique texture binds for current frame static BOOL sGlobalUseAnisotropic; diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 6966df8213..d3cc2733e6 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -284,7 +284,7 @@ void LLStatBar::draw() // draw background bar. gl_rect_2d(bar_left, bar_top, bar_right, bar_bottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); - if (frame_recording.getNumPeriods() == 0) + if (frame_recording.getNumRecordedPeriods() == 0) { // No data, don't draw anything... return; @@ -315,7 +315,7 @@ void LLStatBar::draw() if (mDisplayHistory && (mCountFloatp || mEventFloatp || mSampleFloatp)) { - const S32 num_values = frame_recording.getNumPeriods() - 1; + const S32 num_values = frame_recording.getNumRecordedPeriods() - 1; F32 begin = 0; F32 end = 0; S32 i; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 42bf9b657b..ef24ba21ee 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -296,7 +296,7 @@ LLPumpIO* gServicePump = NULL; U64 gFrameTime = 0; F32 gFrameTimeSeconds = 0.f; -LLUnit gFrameIntervalSeconds = 0.f; +LLUnit 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 diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 2e75de445f..ad662d8ea1 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -337,7 +337,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 LLUnit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds +extern LLUnit 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/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 40526d3357..8e061ec87c 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -101,21 +101,15 @@ LLFastTimerView::LLFastTimerView(const LLSD& key) mScrollIndex(0), mHoverID(NULL), mHoverBarIndex(-1), - mPrintStats(-1), - mRecording(&get_frame_recording()), - mPauseHistory(false) + mStatsIndex(-1), + mPauseHistory(false), + mRecording(512) { - mTimerBars = new std::vector[MAX_VISIBLE_HISTORY + 1]; + mTimerBarRows.resize(MAX_VISIBLE_HISTORY); } LLFastTimerView::~LLFastTimerView() { - if (mRecording != &get_frame_recording()) - { - delete mRecording; - } - mRecording = NULL; - delete [] mTimerBars; } void LLFastTimerView::onPause() @@ -130,16 +124,11 @@ void LLFastTimerView::setPauseState(bool pause_state) // reset scroll to bottom when unpausing if (!pause_state) { - if (mRecording != &get_frame_recording()) - { - delete mRecording; - } - mRecording = &get_frame_recording(); + getChild("pause_btn")->setLabel(getString("pause")); } else { - mRecording = new PeriodicRecording(get_frame_recording()); mScrollIndex = 0; getChild("pause_btn")->setLabel(getString("run")); @@ -175,7 +164,7 @@ 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 = mScrollIndex + bar_idx; + mStatsIndex = mScrollIndex + bar_idx; return TRUE; } return LLFloater::handleRightMouseDown(x, y, mask); @@ -262,8 +251,8 @@ 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)(mRecording->getNumPeriods() - MAX_VISIBLE_HISTORY)); - mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording->getNumPeriods()); + mScrollIndex = llround( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); + mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording.getNumRecordedPeriods()); return TRUE; } mHoverTimer = NULL; @@ -272,7 +261,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) if(mPauseHistory && mBarRect.pointInRect(x, y)) { mHoverBarIndex = llmin((mBarRect.mTop - y) / (mBarRect.getHeight() / (MAX_VISIBLE_HISTORY + 2)) - 1, - (S32)mRecording->getNumPeriods() - 1, + (S32)mRecording.getNumRecordedPeriods() - 1, MAX_VISIBLE_HISTORY); if (mHoverBarIndex == 0) { @@ -289,7 +278,8 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) ++it, ++i) { // is mouse over bar for this timer? - if (mTimerBars[mHoverBarIndex][i].mVisibleRect.pointInRect(x, y)) + TimerBarRow& row = mHoverBarIndex == 0 ? mAverageTimerRow : mTimerBarRows[mHoverBarIndex - 1]; + if (row.mBars[i].mVisibleRect.pointInRect(x, y - row.mBottom)) { mHoverID = (*it); if (mHoverTimer != *it) @@ -301,7 +291,8 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) mHoverTimer = (*it); } - mToolTipRect = mTimerBars[mHoverBarIndex][i].mVisibleRect; + mToolTipRect = row.mBars[i].mVisibleRect; + mToolTipRect.translate(0, row.mBottom); } if ((*it)->getCollapsed()) @@ -329,11 +320,11 @@ static std::string get_tooltip(TimeBlock& timer, S32 history_index, PeriodicReco if (history_index == 0) { // by default, show average number of call - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPeriodMean(timer)).value(), (S32)frame_recording.getPeriodMean(timer.callCount())); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPeriodMean(timer)).value(), (S32)frame_recording.getPeriodMean(timer.callCount())); } else { - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); } return tooltip; } @@ -348,7 +339,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) LLRect screen_rect; localRectToScreen(mToolTipRect, &screen_rect); - std::string tooltip = get_tooltip(*mHoverTimer, mHoverBarIndex > 0 ? mScrollIndex + mHoverBarIndex : 0, *mRecording); + std::string tooltip = get_tooltip(*mHoverTimer, mHoverBarIndex > 0 ? mScrollIndex + mHoverBarIndex : 0, mRecording); LLToolTipMgr::instance().show(LLToolTip::Params() .message(tooltip) @@ -366,7 +357,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) TimeBlock* idp = getLegendID(y); if (idp) { - LLToolTipMgr::instance().show(get_tooltip(*idp, 0, *mRecording)); + LLToolTipMgr::instance().show(get_tooltip(*idp, 0, mRecording)); return TRUE; } @@ -381,7 +372,7 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) setPauseState(true); mScrollIndex = llclamp( mScrollIndex + clicks, 0, - llmin((S32)mRecording->getNumPeriods(), (S32)mRecording->getNumPeriods() - MAX_VISIBLE_HISTORY)); + llmin((S32)mRecording.getNumRecordedPeriods(), (S32)mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); return TRUE; } @@ -389,12 +380,19 @@ static TimeBlock FTM_RENDER_TIMER("Timers", true); static const S32 MARGIN = 10; static const S32 LEGEND_WIDTH = 220; -static std::map sTimerColors; +static std::vector sTimerColors; void LLFastTimerView::draw() { LLFastTimer t(FTM_RENDER_TIMER); + if (!mPauseHistory) + { + mRecording.appendRecording(LLTrace::get_frame_recording().getLastRecording()); + mTimerBarRows.pop_back(); + mTimerBarRows.push_front(TimerBarRow()); + } + generateUniqueColors(); // Draw the window background @@ -417,11 +415,20 @@ void LLFastTimerView::draw() printLineStats(); LLView::draw(); - mAllTimeMax = llmax(mAllTimeMax, mRecording->getLastRecording().getSum(FTM_FRAME)); + mAllTimeMax = llmax(mAllTimeMax, mRecording.getLastRecording().getSum(FTM_FRAME)); mHoverID = NULL; mHoverBarIndex = -1; } +void LLFastTimerView::onOpen(const LLSD& key) +{ + if (mRecording.getNumRecordedPeriods() == 0) + { + mRecording.appendPeriodicRecording(LLTrace::get_frame_recording()); + } +} + + void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch) { //read result back into raw image @@ -828,7 +835,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target LLSD current = analyzePerformanceLogDefault(target_is); target_is.close(); - //output comparision + //output comparison std::ofstream os(output.c_str()); LLSD::Real session_time = current["SessionTime"].asReal(); @@ -936,7 +943,7 @@ void LLFastTimerView::onClickCloseBtn() void LLFastTimerView::printLineStats() { // Output stats for clicked bar to log - if (mPrintStats >= 0) + if (mStatsIndex >= 0) { std::string legend_stat; bool first = true; @@ -974,16 +981,16 @@ void LLFastTimerView::printLineStats() } first = false; - LLUnit ticks; - if (mPrintStats > 0) + LLUnit ticks; + if (mStatsIndex == 0) { - ticks = mRecording->getPrevRecording(mPrintStats).getSum(*idp); + ticks = mRecording.getPeriodMean(*idp); } else { - ticks = mRecording->getPeriodMean(*idp); + ticks = mRecording.getPrevRecording(mStatsIndex).getSum(*idp); } - LLUnit ms = ticks; + LLUnit ms = ticks; timer_stat += llformat("%.1f",ms.value()); @@ -993,7 +1000,7 @@ void LLFastTimerView::printLineStats() } } llinfos << timer_stat << llendl; - mPrintStats = -1; + mStatsIndex = -1; } } @@ -1009,7 +1016,7 @@ void LLFastTimerView::drawLineGraph() LLLocalClipRect clip(mGraphRect); //normalize based on last frame's maximum - static LLUnit max_time = 0.000001; + static LLUnit max_time = 0.000001; static U32 max_calls = 0; static F32 alpha_interp = 0.f; @@ -1020,7 +1027,7 @@ void LLFastTimerView::drawLineGraph() else if (mDisplayHz) axis_label = llformat("%d Hz", (int)(1.f / max_time.value())); else - axis_label = llformat("%4.2f ms", LLUnit(max_time).value()); + axis_label = llformat("%4.2f ms", LLUnit(max_time).value()); x = mGraphRect.mRight - LLFontGL::getFontMonospace()->getWidth(axis_label)-5; y = mGraphRect.mTop - LLFontGL::getFontMonospace()->getLineHeight(); @@ -1030,10 +1037,10 @@ void LLFastTimerView::drawLineGraph() //highlight visible range { - S32 first_frame = mRecording->getNumPeriods() - mScrollIndex; + S32 first_frame = mRecording.getNumRecordedPeriods() - mScrollIndex; S32 last_frame = first_frame - MAX_VISIBLE_HISTORY; - F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(mRecording->getNumPeriods()-1); + F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(mRecording.getNumRecordedPeriods()-1); F32 right = (F32) mGraphRect.mLeft + frame_delta*first_frame; F32 left = (F32) mGraphRect.mLeft + frame_delta*last_frame; @@ -1055,7 +1062,7 @@ void LLFastTimerView::drawLineGraph() } } - LLUnit cur_max = 0; + LLUnit cur_max = 0; U32 cur_max_calls = 0; for(timer_tree_iterator_t it = begin_timer_tree(FTM_FRAME); it != end_timer_tree(); @@ -1070,7 +1077,7 @@ void LLFastTimerView::drawLineGraph() glLineWidth(3); } - const F32 * col = sTimerColors[idp].mV;// ft_display_table[idx].color->mV; + const F32 * col = sTimerColors[idp->getIndex()].mV;// ft_display_table[idx].color->mV; F32 alpha = 1.f; @@ -1085,12 +1092,13 @@ void LLFastTimerView::drawLineGraph() gGL.color4f(col[0], col[1], col[2], alpha); gGL.begin(LLRender::TRIANGLE_STRIP); - for (U32 j = mRecording->getNumPeriods(); + for (U32 j = mRecording.getNumRecordedPeriods(); j > 0; j--) { - LLUnit time = llmax(mRecording->getPrevRecording(j).getSum(*idp), LLUnit(0.000001)); - U32 calls = mRecording->getPrevRecording(j).getSum(idp->callCount()); + LLTrace::Recording& recording = mRecording.getPrevRecording(j); + LLUnit time = llmax(recording.getSum(*idp), LLUnit(0.000001)); + U32 calls = recording.getSum(idp->callCount()); if (alpha == 1.f) { @@ -1098,7 +1106,7 @@ void LLFastTimerView::drawLineGraph() cur_max = llmax(cur_max, time); cur_max_calls = llmax(cur_max_calls, calls); } - F32 x = mGraphRect.mRight - j * (F32)(mGraphRect.getWidth())/(mRecording->getNumPeriods()-1); + F32 x = mGraphRect.mRight - j * (F32)(mGraphRect.getWidth())/(mRecording.getNumRecordedPeriods()-1); F32 y = mDisplayHz ? mGraphRect.mBottom + (1.f / time.value()) * ((F32) mGraphRect.getHeight() / (1.f / max_time.value())) : mGraphRect.mBottom + time / max_time * (F32)mGraphRect.getHeight(); @@ -1124,7 +1132,7 @@ void LLFastTimerView::drawLineGraph() max_time = lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f)); if (max_time - cur_max <= 1 || cur_max - max_time <= 1) { - max_time = llmax(LLUnit(1), LLUnit(cur_max)); + max_time = llmax(LLUnit(1), LLUnit(cur_max)); } max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); @@ -1183,20 +1191,20 @@ void LLFastTimerView::drawLegend( S32 y ) scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 2.f); } bar_rect.stretch(scale_offset); - gl_rect_2d(bar_rect, sTimerColors[idp]); + gl_rect_2d(bar_rect, sTimerColors[idp->getIndex()]); - LLUnit ms = 0; + LLUnit ms = 0; S32 calls = 0; if (mHoverBarIndex > 0 && mHoverID) { S32 hidx = mScrollIndex + mHoverBarIndex; - ms = mRecording->getPrevRecording(hidx).getSum(*idp); - calls = mRecording->getPrevRecording(hidx).getSum(idp->callCount()); + ms = mRecording.getPrevRecording(hidx).getSum(*idp); + calls = mRecording.getPrevRecording(hidx).getSum(idp->callCount()); } else { - ms = LLUnit(mRecording->getPeriodMean(*idp)); - calls = (S32)mRecording->getPeriodMean(idp->callCount()); + ms = LLUnit(mRecording.getPeriodMean(*idp)); + calls = (S32)mRecording.getPeriodMean(idp->callCount()); } std::string timer_label; @@ -1254,7 +1262,8 @@ void LLFastTimerView::generateUniqueColors() { // generate unique colors { - sTimerColors[&FTM_FRAME] = LLColor4::grey; + sTimerColors.reserve(LLTrace::TimeBlock::getNumIndices()); + sTimerColors[FTM_FRAME.getIndex()] = LLColor4::grey; F32 hue = 0.f; @@ -1274,7 +1283,7 @@ void LLFastTimerView::generateUniqueColors() LLColor4 child_color; child_color.setHSL(hue, saturation, lightness); - sTimerColors[idp] = child_color; + sTimerColors[idp->getIndex()] = child_color; } } } @@ -1315,7 +1324,7 @@ void LLFastTimerView::drawTicks() { // Draw MS ticks { - LLUnit ms = mTotalTimeDisplay; + LLUnit ms = mTotalTimeDisplay; std::string tick_label; S32 x; S32 barw = mBarRect.getWidth(); @@ -1382,127 +1391,127 @@ void LLFastTimerView::updateTotalTime() switch(mDisplayMode) { case 0: - mTotalTimeDisplay = mRecording->getPeriodMean(FTM_FRAME)*2; + mTotalTimeDisplay = mRecording.getPeriodMean(FTM_FRAME)*2; break; case 1: mTotalTimeDisplay = mAllTimeMax; break; case 2: // Calculate the max total ticks for the current history - mTotalTimeDisplay = mRecording->getPeriodMax(FTM_FRAME); + mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME); break; default: - mTotalTimeDisplay = LLUnit(100); + mTotalTimeDisplay = LLUnit(100); break; } - mTotalTimeDisplay = LLUnit(llceil(mTotalTimeDisplay.as().value() / 20.f) * 20.f); + mTotalTimeDisplay = LLUnit(llceil(mTotalTimeDisplay.as().value() / 20.f) * 20.f); } void LLFastTimerView::drawBars() { - updateTotalTime(); - if (mTotalTimeDisplay <= 0.0) return; - LLLocalClipRect clip(mBarRect); S32 bar_height = mBarRect.getHeight() / (MAX_VISIBLE_HISTORY + 2); - S32 vpad = llmax(1, bar_height / 4); // spacing between bars + const S32 vpad = llmax(1, bar_height / 4); // spacing between bars bar_height -= vpad; + updateTotalTime(); + if (mTotalTimeDisplay <= 0.0) return; + drawTicks(); - S32 y = mBarRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4); - drawBorders(y, mBarRect.mLeft, bar_height, vpad); + const S32 bars_top = mBarRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4); + drawBorders(bars_top, mBarRect.mLeft, bar_height, vpad); // Draw bars for each history entry - // Special: -1 = show running average + // Special: 0 = show running average LLPointer bar_image = LLUI::getUIImage("Rounded_Square"); + + const S32 image_width = bar_image->getTextureWidth(); + const S32 image_height = bar_image->getTextureHeight(); + gGL.getTexUnit(0)->bind(bar_image->getImage()); - const S32 histmax = llmin((S32)mRecording->getNumPeriods(), MAX_VISIBLE_HISTORY) + 1; + { + const S32 histmax = llmin((S32)mRecording.getNumRecordedPeriods(), MAX_VISIBLE_HISTORY); - for (S32 bar_index = 0; bar_index < histmax && y > LINE_GRAPH_HEIGHT; bar_index++) - { - S32 history_index = (bar_index > 0) - ? bar_index + mScrollIndex - : -1; - mTimerBars[bar_index].clear(); - mTimerBars[bar_index].reserve(LLInstanceTracker::instanceCount()); - - updateTimerBarWidths(&FTM_FRAME, mTimerBars[bar_index], history_index, true); - LLRect frame_bar_rect(mBarRect.mLeft, y, mBarRect.mLeft + mTimerBars[bar_index][0].mWidth, y-bar_height); - mTimerBars[bar_index][0].mVisibleRect = frame_bar_rect; - updateTimerBarFractions(&FTM_FRAME, 0, mTimerBars[bar_index]); - drawBar(&FTM_FRAME, frame_bar_rect, mTimerBars[bar_index], 0, bar_image); - - y -= (bar_height + vpad); - if (bar_index == 0) - y -= bar_height; - } + llassert(mTimerBarRows.size() >= histmax); + + // update widths + updateTimerBarWidths(&FTM_FRAME, mAverageTimerRow, -1); + mAverageTimerRow.mBars[0].mVisibleRect = LLRect(mBarRect.mLeft, 0, mBarRect.mLeft + mAverageTimerRow.mBars[0].mWidth, -bar_height); + updateTimerBarFractions(&FTM_FRAME, mAverageTimerRow); + + for (S32 history_index = 0; history_index < histmax; history_index++) + { + TimerBarRow& row = mTimerBarRows[history_index]; + if (row.mBars.empty()) + { + row.mBars.reserve(LLInstanceTracker::instanceCount()); + updateTimerBarWidths(&FTM_FRAME, row, history_index); + row.mBars[0].mVisibleRect = LLRect(mBarRect.mLeft, 0, mBarRect.mLeft + row.mBars[0].mWidth, -1); + updateTimerBarFractions(&FTM_FRAME, row); + } + } + + // draw bars + LLRect frame_bar_rect( mBarRect.mLeft, + bars_top, + mBarRect.mLeft + mAverageTimerRow.mBars[0].mWidth, + bars_top - bar_height); + mAverageTimerRow.mBottom = frame_bar_rect.mBottom; + drawBar(&FTM_FRAME, frame_bar_rect, mAverageTimerRow, image_width, image_height, false); + frame_bar_rect.translate(0, -(bar_height + vpad + bar_height)); + + for(S32 bar_index = mScrollIndex; bar_index < llmin(histmax, mScrollIndex + MAX_VISIBLE_HISTORY); ++bar_index) + { + TimerBarRow& row = mTimerBarRows[bar_index]; + row.mBottom = frame_bar_rect.mBottom; + drawBar(&FTM_FRAME, frame_bar_rect, row, image_width, image_height, false); + + frame_bar_rect.translate(0, -(bar_height + vpad)); + } + + } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); -S32 LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, std::vector& bars, S32 history_index, bool visible) +S32 LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, bool visible) { + std::vector& bars = row.mBars; LLFastTimer _(FTM_UPDATE_TIMER_BAR_WIDTHS); - F32 self_time_frame_fraction = history_index == -1 - ? (mRecording->getPeriodMean(time_block->selfTime()) / mTotalTimeDisplay) - : (mRecording->getPrevRecording(history_index).getSum(time_block->selfTime()) / mTotalTimeDisplay); + const F32 self_time_frame_fraction = history_index == -1 + ? (mRecording.getPeriodMean(time_block->selfTime()) / mTotalTimeDisplay) + : (mRecording.getPrevRecording(history_index).getSum(time_block->selfTime()) / mTotalTimeDisplay); - S32 self_time_width = llround(self_time_frame_fraction * (F32)mBarRect.getWidth()); + const S32 self_time_width = llround(self_time_frame_fraction * (F32)mBarRect.getWidth()); S32 full_width = self_time_width; - bool children_visible = visible; - // reserve a spot for this bar to be rendered before its children // even though we don't know its size yet - S32 bar_rect_index = bars.size(); - if (visible) - { - bars.push_back(TimerBar()); - } + bars.push_back(TimerBar()); + TimerBar& timer_bar = bars.back(); - if (time_block->getCollapsed()) - { - children_visible = false; - } + const bool children_visible = visible && !time_block->getCollapsed(); for (TimeBlock::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it) { - full_width += updateTimerBarWidths(*it, bars, history_index, children_visible); + full_width += updateTimerBarWidths(*it, row, history_index, children_visible); } - if (visible) - { - TimerBar& timer_bar = bars[bar_rect_index]; - - timer_bar.mWidth = full_width; - timer_bar.mSelfWidth = self_time_width; - timer_bar.mColor = sTimerColors[time_block]; - - BOOL is_child_of_hover_item = (time_block == mHoverID); - TimeBlock* next_parent = time_block->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(); - } - - if (mHoverID != NULL - && time_block != mHoverID - && !is_child_of_hover_item) - { - timer_bar.mColor = lerp(timer_bar.mColor, LLColor4::grey, 0.8f); - } - } + timer_bar.mWidth = full_width; + timer_bar.mSelfWidth = self_time_width; + timer_bar.mTimeBlock = time_block; + timer_bar.mVisible = visible; + return full_width; } static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions"); -S32 LLFastTimerView::updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 timer_bar_index, std::vector& bars) +S32 LLFastTimerView::updateTimerBarFractions(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index) { + std::vector& bars = row.mBars; LLFastTimer _(FTM_UPDATE_TIMER_BAR_FRACTIONS); TimerBar& timer_bar = bars[timer_bar_index]; S32 child_time_width = timer_bar.mWidth - timer_bar.mSelfWidth; @@ -1518,11 +1527,6 @@ S32 LLFastTimerView::updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 } children_rect.mRight = children_rect.mLeft + timer_bar.mWidth - timer_bar.mSelfWidth; - if (children_rect.getHeight() > MIN_BAR_HEIGHT) - { - children_rect.mTop -= 1; - children_rect.mBottom += 1; - } timer_bar.mChildrenRect = children_rect; //now loop through children and figure out portion of bar image covered by each bar, now that we know the @@ -1548,7 +1552,7 @@ S32 LLFastTimerView::updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 children_rect.mLeft + llround(child_timer_bar.mEndFraction * children_rect.getWidth()), children_rect.mBottom); - timer_bar_index = updateTimerBarFractions(child_time_block, timer_bar_index, bars); + timer_bar_index = updateTimerBarFractions(child_time_block, row, timer_bar_index); bar_fraction_start = child_timer_bar.mEndFraction; } @@ -1556,25 +1560,29 @@ S32 LLFastTimerView::updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 return timer_bar_index; } -S32 LLFastTimerView::drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector& bars, S32 bar_index, LLPointer& bar_image) +S32 LLFastTimerView::drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered, S32 bar_index) { - TimerBar& timer_bar = bars[bar_index]; + TimerBar& timer_bar = row.mBars[bar_index]; + + hovered |= mHoverID == time_block; // animate scale of bar when hovering over that particular timer if (bar_rect.getWidth() > 0) { LLRect render_rect(bar_rect); S32 scale_offset = 0; - if (time_block == mHoverID) + if (mHoverID == time_block) { scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 3.f); render_rect.mTop += scale_offset; render_rect.mBottom -= scale_offset; } - gGL.color4fv(timer_bar.mColor.mV); + LLColor4 color = sTimerColors[time_block->getIndex()]; + if (!hovered) color = lerp(color, LLColor4::grey, 0.8f); + gGL.color4fv(color.mV); gl_segmented_rect_2d_fragment_tex(render_rect, - bar_image->getTextureWidth(), bar_image->getTextureHeight(), + image_width, image_height, 16, timer_bar.mStartFraction, timer_bar.mEndFraction); } @@ -1584,7 +1592,20 @@ S32 LLFastTimerView::drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, st for (TimeBlock::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it) { ++bar_index; - bar_index = drawBar(*it, timer_bar.mChildrenRect, bars, bar_index, bar_image); + LLRect children_rect = timer_bar.mChildrenRect; + children_rect.translate(0, row.mBottom); + if (bar_rect.getHeight() > MIN_BAR_HEIGHT) + { + // shrink as we go down a level + children_rect.mTop = bar_rect.mTop - 1; + children_rect.mBottom = bar_rect.mBottom + 1; + } + else + { + children_rect.mTop = bar_rect.mTop; + children_rect.mBottom = bar_rect.mBottom; + } + bar_index = drawBar(*it, children_rect, row, image_width, image_height, hovered, bar_index); } } diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 341adacd65..c20cadd6d7 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -31,6 +31,7 @@ #include "llfasttimer.h" #include "llunit.h" #include "lltracerecording.h" +#include class LLFastTimerView : public LLFloater { @@ -60,13 +61,11 @@ public: virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - + virtual void onOpen(const LLSD& key); LLTrace::TimeBlock* getLegendID(S32 y); -protected: - virtual void onClickCloseBtn(); - private: + virtual void onClickCloseBtn(); void drawTicks(); void drawLineGraph(); void drawLegend(S32 y); @@ -87,47 +86,53 @@ private: mStartFraction(0.f), mEndFraction(1.f) {} - S32 mWidth; - S32 mSelfWidth; - LLRect mVisibleRect, - mChildrenRect; - LLColor4 mColor; - bool mVisible; - F32 mStartFraction, - mEndFraction; + S32 mWidth; + S32 mSelfWidth; + LLRect mVisibleRect, + mChildrenRect; + LLTrace::TimeBlock* mTimeBlock; + bool mVisible; + F32 mStartFraction, + mEndFraction; }; - S32 updateTimerBarWidths(LLTrace::TimeBlock* time_block, std::vector& bars, S32 history_index, bool visible); - S32 updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 timer_bar_index, std::vector& bars); - S32 drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector& bars, S32 bar_index, LLPointer& bar_image); + + struct TimerBarRow + { + S32 mBottom; + std::vector mBars; + }; + + S32 updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, bool visible = true); + S32 updateTimerBarFractions(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0); + S32 drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered, S32 bar_index = 0); void setPauseState(bool pause_state); - std::vector* mTimerBars; - S32 mDisplayMode; + std::deque mTimerBarRows; + TimerBarRow mAverageTimerRow; - typedef enum child_alignment + enum ChildAlignment { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, ALIGN_COUNT - } ChildAlignment; - - ChildAlignment mDisplayCenter; - bool mDisplayCalls, - mDisplayHz; - LLUnit mAllTimeMax, - mTotalTimeDisplay; - LLRect mBarRect; - S32 mScrollIndex; - LLTrace::TimeBlock* mHoverID; - LLTrace::TimeBlock* mHoverTimer; - LLRect mToolTipRect; - S32 mHoverBarIndex; - LLFrameTimer mHighlightTimer; - S32 mPrintStats; - LLRect mGraphRect; - LLTrace::PeriodicRecording* mRecording; - bool mPauseHistory; + } mDisplayCenter; + bool mDisplayCalls, + mDisplayHz, + mPauseHistory; + LLUnit mAllTimeMax, + mTotalTimeDisplay; + S32 mScrollIndex, + mHoverBarIndex, + mStatsIndex; + S32 mDisplayMode; + LLTrace::TimeBlock* mHoverID; + LLTrace::TimeBlock* mHoverTimer; + LLRect mToolTipRect, + mGraphRect, + mBarRect; + LLFrameTimer mHighlightTimer; + LLTrace::PeriodicRecording mRecording; }; #endif diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index dccf8a2a17..3d9e0ab4c3 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -503,9 +503,9 @@ void LLSceneMonitor::dumpToFile(std::string file_name) os << std::setprecision(3); PeriodicRecording& scene_load_recording = mSceneLoadRecording.getAcceptedRecording(); - const U32 frame_count = scene_load_recording.getNumPeriods(); + const U32 frame_count = scene_load_recording.getNumRecordedPeriods(); - LLUnit frame_time; + LLUnit frame_time; os << "Stat"; for (S32 frame = 0; frame < frame_count; frame++) diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 2530beb722..7fc58e230c 100755 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -330,7 +330,7 @@ private: LLTextureInfo mTextureInfo; // XXX possible delete - LLUnit mHTTPTextureBits; // Mfnq + LLUnit mHTTPTextureBits; // Mfnq // XXX possible delete //debug use diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c9ec5d9bf6..766b66efa0 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -507,17 +507,17 @@ private: void LLGLTexMemBar::draw() { - LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; - LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; - LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + LLUnit bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; F32 cache_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; F32 cache_max_usage = (F32)LLTrace::Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); - LLUnit total_texture_downloaded = gTotalTextureData; - LLUnit total_object_downloaded = gTotalObjectData; + LLUnit total_texture_downloaded = gTotalTextureData; + LLUnit total_object_downloaded = gTotalObjectData; U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ; U32 total_active_cached_objects = LLWorld::getInstance()->getNumOfActiveCachedObjects(); U32 total_objects = gObjectList.getNumObjects(); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 3a6ee636d4..dc4c9fe4ad 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -486,10 +486,10 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) grid_from_region_handle(it->first, &grid_x, &grid_y); r.grid_x(grid_x); r.grid_y(grid_y); - r.duration(LLUnit(rec.getDuration()).value()); + r.duration(LLUnit(rec.getDuration()).value()); } - stats.duration(mCurRecording ? LLUnit(mCurRecording->getDuration()).value() : 0.0); + stats.duration(mCurRecording ? LLUnit(mCurRecording->getDuration()).value() : 0.0); } LLSD LLViewerAssetStats::asLLSD(bool compact_output) diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 1a8770f8a7..e03b7c53a6 100755 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -83,7 +83,7 @@ public: * for compatibility with the pre-existing timestamp on the texture * fetcher class, LLTextureFetch. */ - typedef LLUnit duration_t; + typedef LLUnit duration_t; /** * Type for the region identifier used in stats. Currently uses diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f2a3ffc3dc..0309acdad2 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4480,18 +4480,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 LLUnit gObjectData; +extern LLUnit gObjectData; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4503,11 +4503,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4519,11 +4519,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } // Update the object... @@ -4535,11 +4535,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ { if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (LLUnit)mesgsys->getReceiveSize(); } gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index be477f7f9a..7ddee48b38 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -290,13 +290,13 @@ F32 gAveLandCompression = 0.f, gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f; -LLUnit gTotalWorldData = 0, +LLUnit gTotalWorldData = 0, gTotalObjectData = 0, gTotalTextureData = 0; U32 gSimPingCount = 0; -LLUnit gObjectData = 0; +LLUnit gObjectData = 0; F32 gAvgSimPing = 0.f; -LLUnit gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; +LLUnit gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {0}; extern U32 gVisCompared; extern U32 gVisTested; @@ -334,8 +334,8 @@ void update_statistics() typedef LLInstanceTracker, std::string> trace_type_t; - LLUnit idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); - LLUnit network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); + LLUnit idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); + LLUnit network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame"))); record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs); diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index bfba7bca9a..4e48a61264 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -331,7 +331,7 @@ void update_statistics(); void send_stats(); extern LLFrameTimer gTextureTimer; -extern LLUnit gTotalTextureData; -extern LLUnit gTotalObjectData; -extern LLUnit gTotalTextureBytesPerBoostLevel[] ; +extern LLUnit gTotalTextureData; +extern LLUnit gTotalObjectData; +extern LLUnit gTotalTextureBytesPerBoostLevel[] ; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e0a88bfad6..f468df0674 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -66,8 +66,8 @@ /////////////////////////////////////////////////////////////////////////////// // extern -const LLUnit gMinVideoRam = 32; -const LLUnit gMaxVideoRam = 512; +const LLUnit gMinVideoRam = 32; +const LLUnit gMaxVideoRam = 512; // statics @@ -88,11 +88,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -LLUnit LLViewerTexture::sBoundTextureMemory = 0; -LLUnit LLViewerTexture::sTotalTextureMemory = 0; -LLUnit LLViewerTexture::sMaxBoundTextureMem = 0; -LLUnit LLViewerTexture::sMaxTotalTextureMem = 0; -LLUnit LLViewerTexture::sMaxDesiredTextureMem = 0 ; +LLUnit LLViewerTexture::sBoundTextureMemory = 0; +LLUnit LLViewerTexture::sTotalTextureMemory = 0; +LLUnit LLViewerTexture::sMaxBoundTextureMem = 0; +LLUnit LLViewerTexture::sMaxTotalTextureMem = 0; +LLUnit LLViewerTexture::sMaxDesiredTextureMem = 0 ; S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -542,7 +542,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit(gMaxVideoRam)); + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index e939731cf2..529b812f41 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -39,8 +39,8 @@ #include #include -extern const LLUnit gMinVideoRam; -extern const LLUnit gMaxVideoRam; +extern const LLUnit gMinVideoRam; +extern const LLUnit gMaxVideoRam; class LLFace; class LLImageGL ; @@ -205,11 +205,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - static LLUnit sBoundTextureMemory; - static LLUnit sTotalTextureMemory; - static LLUnit sMaxBoundTextureMem; - static LLUnit sMaxTotalTextureMem; - static LLUnit sMaxDesiredTextureMem ; + static LLUnit sBoundTextureMemory; + static LLUnit sTotalTextureMemory; + static LLUnit sMaxBoundTextureMem; + static LLUnit sMaxTotalTextureMem; + static LLUnit sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 349849a267..97f7baa98d 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -738,7 +738,7 @@ public: { if(gTotalTextureBytesPerBoostLevel[i] > 0) { - addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit(gTotalTextureBytesPerBoostLevel[i]).value())); + addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dd5c153d55..7cf30e1661 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2792,7 +2792,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.3 From 1e8f9fd80d0ac4e0eab656ed8e8e32f91ab8b533 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 24 Jul 2013 19:36:43 -0700 Subject: SH-4376 FIX: Interesting: in Statistics, replace the text "0" with "n/a" when there are no samples during the time period. added hasValue to SampleAccumulator so we don't print a value when we don't have a single sample yet added some disabled log output for scene load timing --- indra/llcommon/llerror.cpp | 25 +++++++++++++++---------- indra/llcommon/llerror.h | 12 ++++++------ indra/llcommon/lltraceaccumulators.h | 1 + indra/llui/llnotifications.h | 5 +---- indra/llui/llstatbar.cpp | 21 +++++++++++++-------- indra/newview/llappviewer.cpp | 11 ++++++++--- indra/newview/llviewermessage.cpp | 4 +++- indra/newview/llviewerobject.cpp | 2 ++ indra/newview/pipeline.cpp | 12 ++++++------ 9 files changed, 55 insertions(+), 38 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index d2af004cde..5b4be1ac80 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -158,14 +158,20 @@ namespace { } private: - bool mTimestamp; - enum ANSIState {ANSI_PROBE, ANSI_YES, ANSI_NO}; - ANSIState mUseANSI; + bool mTimestamp; + enum ANSIState + { + ANSI_PROBE, + ANSI_YES, + ANSI_NO + } mUseANSI; + void colorANSI(const std::string color) { // ANSI color code escape sequence fprintf(stderr, "\033[%sm", color.c_str() ); }; + bool checkANSI(void) { #if LL_LINUX || LL_DARWIN @@ -727,13 +733,13 @@ namespace LLError namespace LLError { Recorder::~Recorder() - { } + {} // virtual bool Recorder::wantsTime() - { return false; } - - + { + return false; + } void addRecorder(Recorder* recorder) { @@ -752,9 +758,8 @@ namespace LLError return; } Settings& s = Settings::get(); - s.recorders.erase( - std::remove(s.recorders.begin(), s.recorders.end(), recorder), - s.recorders.end()); + s.recorders.erase(std::remove(s.recorders.begin(), s.recorders.end(), recorder), + s.recorders.end()); } } diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 0b723aeb5d..ceff40e900 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -155,12 +155,12 @@ namespace LLError // these describe the call site and never change const ELevel mLevel; const char* const mFile; - const int mLine; - const std::type_info& mClassInfo; + const int mLine; + const std::type_info& mClassInfo; const char* const mFunction; const char* const mBroadTag; const char* const mNarrowTag; - const bool mPrintOnce; + const bool mPrintOnce; // these implement a cache of the call to shouldLog() bool mCached; @@ -213,7 +213,7 @@ namespace LLError #endif //this is cheaper than llcallstacks if no need to output other variables to call stacks. -#define llpushcallstacks LLError::LLCallStacks::push(__FUNCTION__, __LINE__) +#define LL_PUSH_CALLSTACKS() LLError::LLCallStacks::push(__FUNCTION__, __LINE__) #define llcallstacks \ {\ std::ostringstream* _out = LLError::LLCallStacks::insert(__FUNCTION__, __LINE__) ; \ @@ -222,8 +222,8 @@ namespace LLError LLError::End(); \ LLError::LLCallStacks::end(_out) ; \ } -#define llclearcallstacks LLError::LLCallStacks::clear() -#define llprintcallstacks LLError::LLCallStacks::print() +#define LL_CLEAR_CALLSTACKS() LLError::LLCallStacks::clear() +#define LL_PRINT_CALLSTACKS() LLError::LLCallStacks::print() /* Class type information for logging diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index b1aa078f9a..9ea787188c 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -453,6 +453,7 @@ namespace LLTrace F64 getMean() const { return mMean; } F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); } U32 getSampleCount() const { return mNumSamples; } + bool hasValue() const { return mHasValue; } private: F64 mSum, diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 2948f88755..f9089b8cc9 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -1056,15 +1056,13 @@ class LLPersistentNotificationChannel : public LLNotificationChannel public: LLPersistentNotificationChannel() : LLNotificationChannel("Persistent", "Visible", ¬ificationFilter) - { - } + {} typedef std::vector history_list_t; history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); } history_list_t::iterator endHistory() { return mHistory.end(); } private: - struct sortByTime { S32 operator ()(const LLNotificationPtr& a, const LLNotificationPtr& b) @@ -1078,7 +1076,6 @@ private: std::sort(mHistory.begin(), mHistory.end(), sortByTime()); } - // The channel gets all persistent notifications except those that have been canceled static bool notificationFilter(LLNotificationPtr pNotification) { diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index d9f4a36f8d..2543bd8f0a 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -226,8 +226,7 @@ void LLStatBar::draw() max = 0, mean = 0; - - S32 num_samples = 0; + bool show_data = false; LLLocalClipRect _(getLocalRect()); LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); @@ -240,7 +239,6 @@ void LLStatBar::draw() if (mPerSec) { unit_label += "/s"; - num_samples = frame_recording.getSampleCount(*mCountFloatp, mNumFrames); current = last_frame_recording.getPerSec(*mCountFloatp); min = frame_recording.getPeriodMinPerSec(*mCountFloatp, mNumFrames); max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, mNumFrames); @@ -248,34 +246,41 @@ void LLStatBar::draw() } else { - num_samples = frame_recording.getSampleCount(*mCountFloatp, mNumFrames); current = last_frame_recording.getSum(*mCountFloatp); min = frame_recording.getPeriodMin(*mCountFloatp, mNumFrames); max = frame_recording.getPeriodMax(*mCountFloatp, mNumFrames); mean = frame_recording.getPeriodMean(*mCountFloatp, mNumFrames); } + + // always show count-style data + show_data = true; } else if (mEventFloatp) { LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); unit_label = mUnitLabel.empty() ? mEventFloatp->getUnitLabel() : mUnitLabel; - num_samples = frame_recording.getSampleCount(*mEventFloatp, mNumFrames); + // only show data if there is an event in the relevant time period current = last_frame_recording.getMean(*mEventFloatp); min = frame_recording.getPeriodMin(*mEventFloatp, mNumFrames); max = frame_recording.getPeriodMax(*mEventFloatp, mNumFrames); mean = frame_recording.getPeriodMean(*mEventFloatp, mNumFrames); + + show_data = frame_recording.getSampleCount(*mEventFloatp, mNumFrames) != 0; } else if (mSampleFloatp) { + LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); unit_label = mUnitLabel.empty() ? mSampleFloatp->getUnitLabel() : mUnitLabel; - num_samples = frame_recording.getSampleCount(*mSampleFloatp, mNumFrames); current = last_frame_recording.getMean(*mSampleFloatp); min = frame_recording.getPeriodMin(*mSampleFloatp, mNumFrames); max = frame_recording.getPeriodMax(*mSampleFloatp, mNumFrames); mean = frame_recording.getPeriodMean(*mSampleFloatp, mNumFrames); + + // always show sample data if we've ever grabbed any samples + show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue(); } S32 bar_top, bar_left, bar_right, bar_bottom; @@ -337,7 +342,7 @@ void LLStatBar::draw() { decimal_digits = 0; } - std::string value_str = num_samples + std::string value_str = show_data ? llformat("%10.*f %s", decimal_digits, mean, unit_label.c_str()) : "n/a"; @@ -454,7 +459,7 @@ void LLStatBar::draw() gl_rect_2d(begin, bar_top, end, bar_bottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); } - if (num_samples) + if (show_data) { F32 span = (mOrientation == HORIZONTAL) ? (bar_right - bar_left) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5f6b183fcc..8ad5784f40 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -660,8 +660,13 @@ LLTextureCache* LLAppViewer::sTextureCache = NULL; LLImageDecodeThread* LLAppViewer::sImageDecodeThread = NULL; LLTextureFetch* LLAppViewer::sTextureFetch = NULL; -LLAppViewer::LLAppViewer() : - mMarkerFile(), +std::string getRuntime() +{ + return llformat("%g", LLTimer::getElapsedSeconds()); +} + +LLAppViewer::LLAppViewer() +: mMarkerFile(), mLogoutMarkerFile(), mReportedCrash(false), mNumSessions(0), @@ -1300,7 +1305,7 @@ bool LLAppViewer::mainLoop() LLTrace::get_master_thread_recorder()->pullFromChildren(); //clear call stack records - llclearcallstacks; + LL_CLEAR_CALLSTACKS(); //check memory availability information checkMemory() ; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c33efd4255..970f6913cb 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -358,7 +358,7 @@ void process_logout_reply(LLMessageSystem* msg, void**) { LL_INFOS("Messaging") << "process_logout_reply item not found: " << item_id << LL_ENDL; } - } + } LLAppViewer::instance()->forceQuit(); } @@ -366,6 +366,8 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegion(mesgsys->getSender()); + LL_DEBUGS_ONCE("SceneLoadTiming") << "Received layer data" << LL_ENDL; + if(!regionp) { llwarns << "Invalid region for layer data." << llendl; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 4e514ddfd1..e834febad5 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1043,6 +1043,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, LLDataPacker *dp) { + LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL; + U32 retval = 0x0; // If region is removed from the list it is also deleted. diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 34d7e0ab64..870ee6a103 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3757,7 +3757,7 @@ void LLPipeline::postSort(LLCamera& camera) assertInitialized(); - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //rebuild drawable geometry for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) { @@ -3768,12 +3768,12 @@ void LLPipeline::postSort(LLCamera& camera) group->rebuildGeom(); } } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //rebuild groups sCull->assertDrawMapsEmpty(); rebuildPriorityGroups(); - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); //build render map @@ -3884,7 +3884,7 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus if (LLFloaterReg::instanceVisible("beacons") && !sShadowRender) { @@ -3937,7 +3937,7 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderSoundHighlights); } } - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); // If managing your telehub, draw beacons at telehub and currently selected spawnpoint. if (LLFloaterTelehub::renderBeacons()) { @@ -3973,7 +3973,7 @@ void LLPipeline::postSort(LLCamera& camera) } //LLSpatialGroup::sNoDelete = FALSE; - llpushcallstacks ; + LL_PUSH_CALLSTACKS(); } -- cgit v1.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llappearance/llavatarappearance.cpp | 195 +++-- indra/llappearance/llavatarjointmesh.cpp | 25 +- indra/llappearance/lldriverparam.h | 1 + indra/llappearance/llpolymesh.cpp | 19 +- indra/llappearance/llpolymesh.h | 3 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.h | 1 - indra/llappearance/lltexlayer.cpp | 1 - indra/llappearance/llwearable.h | 1 - indra/llaudio/llaudiodecodemgr.cpp | 16 +- indra/llaudio/llaudiodecodemgr.h | 1 - indra/llaudio/llaudioengine.cpp | 2 +- indra/llaudio/llaudioengine.h | 4 +- indra/llaudio/llstreamingaudio_fmodex.h | 4 +- indra/llcharacter/llanimationstates.h | 2 +- indra/llcharacter/llcharacter.h | 2 +- indra/llcharacter/llgesture.cpp | 41 +- indra/llcharacter/llgesture.h | 17 +- indra/llcharacter/lljoint.cpp | 2 +- indra/llcharacter/lljoint.h | 2 - indra/llcharacter/lljointsolverrp3.cpp | 74 +- indra/llcharacter/llkeyframemotion.cpp | 5 +- indra/llcharacter/llkeyframemotionparam.h | 1 - indra/llcharacter/llmotion.cpp | 2 +- indra/llcharacter/llpose.h | 1 - indra/llcommon/CMakeLists.txt | 39 +- indra/llcommon/bitpack.cpp | 30 - indra/llcommon/bitpack.h | 208 ----- indra/llcommon/imageids.cpp | 73 -- indra/llcommon/imageids.h | 70 -- indra/llcommon/indra_constants.cpp | 31 +- indra/llcommon/indra_constants.h | 356 +++----- indra/llcommon/linked_lists.h | 937 --------------------- indra/llcommon/ll_template_cast.h | 177 ---- indra/llcommon/llaccountingcost.h | 86 -- indra/llcommon/llagentconstants.h | 159 ---- indra/llcommon/llapp.h | 5 +- indra/llcommon/llassettype.h | 2 - indra/llcommon/llavatarconstants.h | 55 -- indra/llcommon/llavatarname.cpp | 239 ------ indra/llcommon/llavatarname.h | 133 --- indra/llcommon/llbitpack.cpp | 30 + indra/llcommon/llbitpack.h | 208 +++++ indra/llcommon/llchat.h | 109 --- indra/llcommon/llclickaction.h | 41 - indra/llcommon/llcursortypes.cpp | 91 -- indra/llcommon/llcursortypes.h | 79 -- indra/llcommon/lldarray.h | 223 ----- indra/llcommon/lldeleteutils.h | 47 -- indra/llcommon/lldepthstack.h | 11 +- indra/llcommon/llerror.cpp | 171 ++-- indra/llcommon/llerror.h | 180 ++-- indra/llcommon/llerrorcontrol.h | 4 + indra/llcommon/llerrorlegacy.h | 95 --- indra/llcommon/llevents.h | 2 +- indra/llcommon/llextendedstatus.h | 67 -- indra/llcommon/llfoldertype.cpp | 168 ---- indra/llcommon/llfoldertype.h | 111 --- indra/llcommon/llframetimer.h | 1 - indra/llcommon/llindexedvector.h | 100 +++ indra/llcommon/llinitparam.cpp | 10 +- indra/llcommon/llinstancetracker.h | 2 +- indra/llcommon/lllinkedqueue.h | 309 ------- indra/llcommon/lllog.cpp | 111 --- indra/llcommon/lllog.h | 52 -- indra/llcommon/lllslconstants.h | 213 ----- indra/llcommon/llmap.h | 245 ------ indra/llcommon/llnametable.h | 105 --- indra/llcommon/lloptioninterface.cpp | 33 - indra/llcommon/lloptioninterface.h | 40 - indra/llcommon/llsecondlifeurls.cpp | 84 -- indra/llcommon/llsecondlifeurls.h | 76 -- indra/llcommon/llstatenums.h | 75 -- indra/llcommon/llstl.h | 199 ++++- indra/llcommon/llstringtable.cpp | 4 +- indra/llcommon/lltimer.cpp | 9 +- indra/llcommon/lltimer.h | 4 +- indra/llcommon/llunit.h | 88 +- indra/llcommon/llversionserver.h | 38 - indra/llcommon/roles_constants.h | 192 ----- indra/llcommon/stdenums.h | 137 --- indra/llcommon/string_table.h | 26 - indra/llcommon/tests/bitpack_test.cpp | 2 +- indra/llcommon/timing.h | 42 - indra/llcrashlogger/llcrashlogger.h | 5 + indra/llinventory/CMakeLists.txt | 2 + indra/llinventory/llfoldertype.cpp | 168 ++++ indra/llinventory/llfoldertype.h | 111 +++ indra/llinventory/llinventory.h | 5 +- indra/llinventory/llparcel.cpp | 4 +- indra/llmath/llvolume.cpp | 1 - indra/llmath/llvolume.h | 1 - indra/llmessage/CMakeLists.txt | 3 + indra/llmessage/llassetstorage.h | 11 +- indra/llmessage/llavatarname.cpp | 239 ++++++ indra/llmessage/llavatarname.h | 133 +++ indra/llmessage/llcircuit.h | 3 +- indra/llmessage/llextendedstatus.h | 67 ++ indra/llmessage/llhttpassetstorage.cpp | 3 + indra/llmessage/llmessagetemplate.h | 8 +- indra/llmessage/llnamevalue.cpp | 2 +- indra/llmessage/llnamevalue.h | 2 +- indra/llmessage/llpacketbuffer.cpp | 2 +- indra/llmessage/llpacketring.cpp | 1 - indra/llmessage/llxfer.h | 4 + indra/llmessage/llxfermanager.cpp | 10 +- indra/llmessage/llxfermanager.h | 4 +- indra/llmessage/message.cpp | 235 +++--- indra/llmessage/message.h | 2 +- indra/llmessage/net.h | 3 + indra/llmessage/partsyspacket.cpp | 2 +- indra/llmessage/patch_code.cpp | 2 +- indra/llprimitive/CMakeLists.txt | 1 + indra/llprimitive/lllslconstants.h | 213 +++++ indra/llprimitive/llmaterialtable.cpp | 2 +- indra/llprimitive/llprimitive.cpp | 1 - indra/llprimitive/llprimitive.h | 24 +- indra/llprimitive/tests/llmediaentry_test.cpp | 2 +- indra/llrender/llpostprocess.cpp | 2 +- indra/llui/CMakeLists.txt | 5 +- indra/llui/llbutton.cpp | 2 +- indra/llui/llchat.h | 109 +++ indra/llui/llclipboard.cpp | 1 + indra/llui/llclipboard.h | 1 - indra/llui/llctrlselectioninterface.h | 2 +- indra/llui/lldraghandle.cpp | 4 +- indra/llui/llflatlistview.cpp | 2 +- indra/llui/llfloater.cpp | 4 +- indra/llui/llfolderview.cpp | 23 +- indra/llui/llfolderview.h | 1 - indra/llui/llfolderviewitem.cpp | 4 +- indra/llui/lliconctrl.h | 1 - indra/llui/llkeywords.cpp | 22 +- indra/llui/lllineeditor.cpp | 4 +- indra/llui/llmodaldialog.cpp | 2 +- indra/llui/llmultislider.cpp | 4 +- indra/llui/llresmgr.cpp | 27 - indra/llui/llscrollbar.cpp | 4 +- indra/llui/llscrollcontainer.cpp | 2 - indra/llui/llscrollcontainer.h | 1 - indra/llui/llscrolllistctrl.cpp | 2 - indra/llui/llscrolllistctrl.h | 1 - indra/llui/llslider.cpp | 4 +- indra/llui/llstatbar.cpp | 58 +- indra/llui/llstatbar.h | 12 +- indra/llui/lltexteditor.cpp | 2 +- indra/llui/lltexteditor.h | 2 - indra/llui/llui.h | 46 + indra/llui/lluistring.h | 6 +- indra/llui/llurlentry.h | 1 + indra/llui/llview.h | 2 +- indra/llui/llviewmodel.h | 2 +- indra/llvfs/CMakeLists.txt | 2 - indra/llvfs/lldir.cpp | 32 +- indra/llvfs/llpidlock.cpp | 276 ------ indra/llvfs/llpidlock.h | 59 -- indra/llvfs/llvfs.h | 1 - indra/llwindow/CMakeLists.txt | 2 + indra/llwindow/llcursortypes.cpp | 91 ++ indra/llwindow/llcursortypes.h | 79 ++ indra/llwindow/llkeyboard.cpp | 2 +- indra/llwindow/llkeyboard.h | 2 +- indra/llwindow/llwindow.cpp | 1 - indra/llxml/llcontrol.h | 2 - indra/llxml/llxmltree.h | 2 +- indra/lscript/lscript_compile/indra.l | 1 - indra/lscript/lscript_compile/lscript_bytecode.cpp | 17 +- indra/lscript/lscript_compile/lscript_bytecode.h | 5 +- indra/lscript/lscript_compile/lscript_scope.h | 51 +- indra/lscript/lscript_compile/lscript_tree.h | 9 +- indra/lscript/lscript_execute.h | 65 +- indra/lscript/lscript_execute/lscript_execute.cpp | 10 +- indra/lscript/lscript_execute/lscript_readlso.h | 1 - indra/newview/CMakeLists.txt | 3 +- indra/newview/app_settings/logcontrol.xml | 1 + indra/newview/llaccountingcost.h | 55 ++ indra/newview/llagent.cpp | 45 +- indra/newview/llagent.h | 6 +- indra/newview/llagentlistener.cpp | 2 +- indra/newview/llagentpicksinfo.cpp | 4 +- indra/newview/llagentpilot.cpp | 27 +- indra/newview/llagentpilot.h | 3 +- indra/newview/llagentwearables.cpp | 14 +- indra/newview/llagentwearables.h | 2 +- indra/newview/llagentwearablesfetch.cpp | 14 +- indra/newview/llappearancemgr.cpp | 119 +-- indra/newview/llappviewer.cpp | 72 +- indra/newview/llappviewer.h | 8 +- indra/newview/llappviewerwin32.cpp | 15 +- indra/newview/llavataractions.cpp | 18 +- indra/newview/llavataractions.h | 1 - indra/newview/llavatariconctrl.cpp | 1 - indra/newview/llavatarlist.cpp | 2 +- indra/newview/llavatarpropertiesprocessor.cpp | 1 - indra/newview/llavatarpropertiesprocessor.h | 8 + indra/newview/llblocklist.cpp | 2 +- indra/newview/llchatbar.cpp | 1 - indra/newview/llcofwearables.cpp | 2 +- indra/newview/llcolorswatch.cpp | 15 +- indra/newview/llcolorswatch.h | 29 +- indra/newview/llcompilequeue.cpp | 212 +---- indra/newview/llcompilequeue.h | 22 +- indra/newview/llconversationlog.cpp | 66 +- indra/newview/llconversationlog.h | 7 +- indra/newview/llconversationloglist.cpp | 6 +- indra/newview/lldebugmessagebox.h | 1 - indra/newview/lldebugview.cpp | 1 - indra/newview/lldrawable.cpp | 8 +- indra/newview/lldrawable.h | 3 +- indra/newview/lldrawpoolsky.cpp | 2 - indra/newview/llfavoritesbar.cpp | 24 +- indra/newview/llfeaturemanager.cpp | 1 - indra/newview/llfirstuse.cpp | 5 + indra/newview/llfloaterabout.cpp | 1 - indra/newview/llfloaterbulkpermission.cpp | 19 +- indra/newview/llfloaterbulkpermission.h | 6 +- indra/newview/llfloatercolorpicker.cpp | 7 +- indra/newview/llfloatercolorpicker.h | 5 +- indra/newview/llfloaterevent.cpp | 1 - indra/newview/llfloatergesture.cpp | 8 +- indra/newview/llfloatergroups.cpp | 10 +- indra/newview/llfloaterlandholdings.cpp | 8 +- indra/newview/llfloateroutbox.cpp | 4 +- indra/newview/llfloaterpreference.cpp | 5 +- indra/newview/llfloatertopobjects.h | 16 + indra/newview/llfloaterworldmap.cpp | 33 +- indra/newview/llfloaterworldmap.h | 5 +- indra/newview/llfriendcard.cpp | 30 +- indra/newview/llgiveinventory.cpp | 22 +- indra/newview/llgroupactions.cpp | 6 +- indra/newview/llgroupiconctrl.cpp | 28 +- indra/newview/llgrouplist.cpp | 6 +- indra/newview/llgroupmgr.h | 11 + indra/newview/llhudicon.h | 1 - indra/newview/llhudmanager.cpp | 18 +- indra/newview/llhudmanager.h | 3 +- indra/newview/llimview.cpp | 26 +- indra/newview/llimview.h | 7 +- indra/newview/llinventorybridge.cpp | 78 +- indra/newview/llinventoryitemslist.h | 4 +- indra/newview/llinventorymodel.cpp | 124 +-- indra/newview/llinventorymodel.h | 5 +- indra/newview/llinventoryobserver.cpp | 6 +- indra/newview/llinventorypanel.cpp | 10 +- indra/newview/llinventorypanel.h | 1 - indra/newview/lllogchat.cpp | 4 +- indra/newview/llmanip.cpp | 4 +- indra/newview/llmaniprotate.cpp | 4 +- indra/newview/llmanipscale.cpp | 4 +- indra/newview/llmaniptranslate.cpp | 12 +- indra/newview/llnamelistctrl.cpp | 2 +- indra/newview/llpanelavatar.cpp | 1 - indra/newview/llpanelcontents.h | 1 - indra/newview/llpaneleditwearable.cpp | 2 +- indra/newview/llpanelface.cpp | 14 +- indra/newview/llpanelgrouplandmoney.cpp | 32 +- indra/newview/llpanelgrouplandmoney.h | 5 +- indra/newview/llpanellandmarkinfo.cpp | 6 +- indra/newview/llpanellogin.cpp | 7 +- indra/newview/llpanelme.cpp | 1 - indra/newview/llpanelobjectinventory.cpp | 6 +- indra/newview/llpanelpicks.cpp | 1 - indra/newview/llpanelteleporthistory.cpp | 22 +- indra/newview/llpanelteleporthistory.h | 2 +- indra/newview/llphysicsshapebuilderutil.h | 2 + indra/newview/llpreview.cpp | 1 - indra/newview/llpreviewgesture.cpp | 8 +- indra/newview/llpreviewscript.cpp | 6 +- indra/newview/llpreviewscript.h | 3 +- indra/newview/llscriptfloater.cpp | 2 +- indra/newview/llselectmgr.cpp | 3 + indra/newview/llselectmgr.h | 27 + indra/newview/llspeakers.cpp | 2 +- indra/newview/llstartup.cpp | 7 +- indra/newview/llstartup.h | 12 + indra/newview/llstatusbar.cpp | 1 - indra/newview/llsurface.cpp | 2 +- indra/newview/llsurfacepatch.cpp | 7 +- indra/newview/lltexturectrl.cpp | 8 +- indra/newview/lltoastgroupnotifypanel.h | 1 - indra/newview/lltool.cpp | 2 +- indra/newview/lltoolbrush.cpp | 2 +- indra/newview/lltooldraganddrop.cpp | 46 +- indra/newview/lltooldraganddrop.h | 2 - indra/newview/lltoolfocus.cpp | 8 +- indra/newview/lltoolgrab.cpp | 12 +- indra/newview/lltoolgun.cpp | 4 +- indra/newview/lltoolpie.cpp | 10 +- indra/newview/lltoolplacer.cpp | 2 +- indra/newview/lltoolselectland.cpp | 8 +- indra/newview/lltoolselectrect.cpp | 5 +- indra/newview/lltracker.cpp | 1 - indra/newview/lltracker.h | 5 +- indra/newview/llviewerassettype.h | 1 + indra/newview/llviewerdisplay.cpp | 5 + indra/newview/llviewergesture.h | 1 - indra/newview/llviewerinventory.h | 4 +- indra/newview/llviewerjointattachment.cpp | 2 +- indra/newview/llviewerjointmesh.cpp | 9 +- indra/newview/llviewerkeyboard.cpp | 8 +- indra/newview/llviewermenu.cpp | 26 +- indra/newview/llviewermessage.cpp | 19 +- indra/newview/llviewermessage.h | 1 - indra/newview/llviewerobject.cpp | 11 +- indra/newview/llviewerobjectlist.cpp | 13 +- indra/newview/llviewerparcelmgr.cpp | 13 +- indra/newview/llviewerparcelmgr.h | 3 +- indra/newview/llviewerparceloverlay.cpp | 89 +- indra/newview/llviewerparceloverlay.h | 7 +- indra/newview/llviewerprecompiledheaders.h | 4 - indra/newview/llviewerregion.cpp | 40 +- indra/newview/llviewerregion.h | 5 +- indra/newview/llviewerstats.cpp | 20 +- indra/newview/llviewerstats.h | 51 +- indra/newview/llviewertexteditor.cpp | 2 +- indra/newview/llviewertexture.cpp | 1 - indra/newview/llviewertexturelist.cpp | 81 +- indra/newview/llviewerwearable.h | 1 + indra/newview/llviewerwindow.cpp | 3 +- indra/newview/llvlcomposition.cpp | 1 - indra/newview/llvlmanager.cpp | 22 +- indra/newview/llvlmanager.h | 3 +- indra/newview/llvoavatar.cpp | 39 +- indra/newview/llvoavatar.h | 5 +- indra/newview/llvoavatarself.cpp | 20 +- indra/newview/llvoavatarself.h | 4 +- indra/newview/llvograss.cpp | 1 - indra/newview/llvograss.h | 1 - indra/newview/llvoicevivox.cpp | 4 +- indra/newview/llvopartgroup.cpp | 2 +- indra/newview/llvosky.cpp | 2 - indra/newview/llvotree.h | 1 - indra/newview/llvotreenew.h | 218 ----- indra/newview/llvovolume.cpp | 1 - indra/newview/llvowater.cpp | 1 - indra/newview/llwaterparammanager.cpp | 4 +- indra/newview/llwearableitemslist.h | 2 +- indra/newview/llwind.h | 2 + indra/newview/llwlparammanager.cpp | 4 +- indra/newview/llworld.cpp | 10 +- indra/newview/llworld.h | 6 +- indra/newview/llworldmap.h | 12 + indra/newview/llworldmapview.cpp | 2 +- indra/newview/pipeline.cpp | 2 - indra/newview/roles_constants.h | 192 +++++ .../newview/skins/default/xui/en/floater_stats.xml | 3 +- indra/newview/skins/default/xui/en/strings.xml | 1 + 347 files changed, 4139 insertions(+), 7726 deletions(-) delete mode 100755 indra/llcommon/bitpack.cpp delete mode 100755 indra/llcommon/bitpack.h delete mode 100755 indra/llcommon/imageids.cpp delete mode 100755 indra/llcommon/imageids.h delete mode 100755 indra/llcommon/linked_lists.h delete mode 100755 indra/llcommon/ll_template_cast.h delete mode 100755 indra/llcommon/llaccountingcost.h delete mode 100755 indra/llcommon/llagentconstants.h delete mode 100755 indra/llcommon/llavatarconstants.h delete mode 100755 indra/llcommon/llavatarname.cpp delete mode 100755 indra/llcommon/llavatarname.h create mode 100755 indra/llcommon/llbitpack.cpp create mode 100755 indra/llcommon/llbitpack.h delete mode 100755 indra/llcommon/llchat.h delete mode 100755 indra/llcommon/llclickaction.h delete mode 100755 indra/llcommon/llcursortypes.cpp delete mode 100755 indra/llcommon/llcursortypes.h delete mode 100755 indra/llcommon/lldarray.h delete mode 100644 indra/llcommon/lldeleteutils.h delete mode 100755 indra/llcommon/llextendedstatus.h delete mode 100755 indra/llcommon/llfoldertype.cpp delete mode 100755 indra/llcommon/llfoldertype.h create mode 100755 indra/llcommon/llindexedvector.h delete mode 100755 indra/llcommon/lllinkedqueue.h delete mode 100755 indra/llcommon/lllog.cpp delete mode 100755 indra/llcommon/lllog.h delete mode 100755 indra/llcommon/lllslconstants.h delete mode 100755 indra/llcommon/llmap.h delete mode 100755 indra/llcommon/llnametable.h delete mode 100755 indra/llcommon/lloptioninterface.cpp delete mode 100755 indra/llcommon/lloptioninterface.h delete mode 100755 indra/llcommon/llsecondlifeurls.cpp delete mode 100755 indra/llcommon/llsecondlifeurls.h delete mode 100755 indra/llcommon/llstatenums.h delete mode 100755 indra/llcommon/llversionserver.h delete mode 100755 indra/llcommon/roles_constants.h delete mode 100755 indra/llcommon/stdenums.h delete mode 100755 indra/llcommon/string_table.h delete mode 100755 indra/llcommon/timing.h create mode 100755 indra/llinventory/llfoldertype.cpp create mode 100755 indra/llinventory/llfoldertype.h create mode 100755 indra/llmessage/llavatarname.cpp create mode 100755 indra/llmessage/llavatarname.h create mode 100755 indra/llmessage/llextendedstatus.h create mode 100755 indra/llprimitive/lllslconstants.h create mode 100755 indra/llui/llchat.h delete mode 100755 indra/llvfs/llpidlock.cpp delete mode 100755 indra/llvfs/llpidlock.h create mode 100755 indra/llwindow/llcursortypes.cpp create mode 100755 indra/llwindow/llcursortypes.h create mode 100755 indra/newview/llaccountingcost.h delete mode 100755 indra/newview/llvotreenew.h create mode 100755 indra/newview/roles_constants.h (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 0e91cd3185..8126d620ec 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -35,8 +35,7 @@ #include "llavatarappearance.h" #include "llavatarappearancedefines.h" #include "llavatarjointmesh.h" -#include "imageids.h" -#include "lldeleteutils.h" +#include "llstl.h" #include "lldir.h" #include "llpolymorph.h" #include "llpolymesh.h" @@ -135,9 +134,9 @@ LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo() std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer()); std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer()); std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer()); - deleteAndClear(mTexSkinColorInfo); - deleteAndClear(mTexHairColorInfo); - deleteAndClear(mTexEyeColorInfo); + delete_and_clear(mTexSkinColorInfo); + delete_and_clear(mTexHairColorInfo); + delete_and_clear(mTexEyeColorInfo); std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer()); std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer()); std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer()); @@ -222,7 +221,7 @@ void LLAvatarAppearance::initInstance() mesh->setMeshID(mesh_index); mesh->setPickName(mesh_dict->mPickName); mesh->setIsTransparent(FALSE); - switch((int)mesh_index) + switch((S32)mesh_index) { case MESH_ID_HAIR: mesh->setIsTransparent(TRUE); @@ -258,7 +257,7 @@ void LLAvatarAppearance::initInstance() ++iter) { LLAvatarJointMesh* mesh = (*iter); - mBakedTextureDatas[(int)baked_texture_index].mJointMeshes.push_back(mesh); + mBakedTextureDatas[(S32)baked_texture_index].mJointMeshes.push_back(mesh); } } @@ -269,13 +268,13 @@ void LLAvatarAppearance::initInstance() // virtual LLAvatarAppearance::~LLAvatarAppearance() { - deleteAndClear(mTexSkinColor); - deleteAndClear(mTexHairColor); - deleteAndClear(mTexEyeColor); + delete_and_clear(mTexSkinColor); + delete_and_clear(mTexHairColor); + delete_and_clear(mTexEyeColor); for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - deleteAndClear(mBakedTextureDatas[i].mTexLayerSet); + delete_and_clear(mBakedTextureDatas[i].mTexLayerSet); mBakedTextureDatas[i].mJointMeshes.clear(); for (morph_list_t::iterator iter2 = mBakedTextureDatas[i].mMaskedMorphs.begin(); @@ -290,11 +289,11 @@ LLAvatarAppearance::~LLAvatarAppearance() mJointMap.clear(); clearSkeleton(); - deleteAndClearArray(mCollisionVolumes); + delete_and_clear_array(mCollisionVolumes); - deleteAndClear(mTexSkinColor); - deleteAndClear(mTexHairColor); - deleteAndClear(mTexEyeColor); + delete_and_clear(mTexSkinColor); + delete_and_clear(mTexHairColor); + delete_and_clear(mTexEyeColor); std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer()); mPolyMeshes.clear(); @@ -320,14 +319,14 @@ void LLAvatarAppearance::initClass() BOOL success = sXMLTree.parseFile( xmlFile, FALSE ); if (!success) { - llerrs << "Problem reading avatar configuration file:" << xmlFile << llendl; + llerrs << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL; } // now sanity check xml file LLXmlTreeNode* root = sXMLTree.getRoot(); if (!root) { - llerrs << "No root node found in avatar configuration file: " << xmlFile << llendl; + llerrs << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL; return; } @@ -336,14 +335,14 @@ void LLAvatarAppearance::initClass() //------------------------------------------------------------------------- if( !root->hasName( "linden_avatar" ) ) { - llerrs << "Invalid avatar file header: " << xmlFile << llendl; + llerrs << "Invalid avatar file header: " << xmlFile << LL_ENDL; } std::string version; static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { - llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << llendl; + llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL; } S32 wearable_def_version = 1; @@ -356,7 +355,7 @@ void LLAvatarAppearance::initClass() LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" ); if (!skeleton_node) { - llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl; + llerrs << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL; return; } @@ -364,14 +363,14 @@ void LLAvatarAppearance::initClass() static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name"); if (!skeleton_node->getFastAttributeString(file_name_string, skeleton_file_name)) { - llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << llendl; + llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL; } std::string skeleton_path; skeleton_path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,skeleton_file_name); if (!parseSkeletonFile(skeleton_path)) { - llerrs << "Error parsing skeleton file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton file: " << skeleton_path << LL_ENDL; } // Process XML data @@ -384,43 +383,43 @@ void LLAvatarAppearance::initClass() sAvatarSkeletonInfo = new LLAvatarSkeletonInfo; if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot())) { - llerrs << "Error parsing skeleton XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL; } // parse avatar_lad.xml if (sAvatarXmlInfo) { //this can happen if a login attempt failed - deleteAndClear(sAvatarXmlInfo); + delete_and_clear(sAvatarXmlInfo); } sAvatarXmlInfo = new LLAvatarXmlInfo; if (!sAvatarXmlInfo->parseXmlSkeletonNode(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlMeshNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlColorNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlLayerNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlDriverNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlMorphNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl; + llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } } void LLAvatarAppearance::cleanupClass() { - deleteAndClear(sAvatarXmlInfo); + delete_and_clear(sAvatarXmlInfo); // *TODO: What about sAvatarSkeletonInfo ??? sSkeletonXMLTree.cleanup(); sXMLTree.cleanup(); @@ -527,7 +526,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) if (!parsesuccess) { - llerrs << "Can't parse skeleton file: " << filename << llendl; + llerrs << "Can't parse skeleton file: " << filename << LL_ENDL; return FALSE; } @@ -535,13 +534,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) LLXmlTreeNode* root = sSkeletonXMLTree.getRoot(); if (!root) { - llerrs << "No root node found in avatar skeleton file: " << filename << llendl; + llerrs << "No root node found in avatar skeleton file: " << filename << LL_ENDL; return FALSE; } if( !root->hasName( "linden_skeleton" ) ) { - llerrs << "Invalid avatar skeleton file header: " << filename << llendl; + llerrs << "Invalid avatar skeleton file header: " << filename << LL_ENDL; return FALSE; } @@ -549,7 +548,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { - llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl; + llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL; return FALSE; } @@ -568,7 +567,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent joint = getCharacterJoint(joint_num); if (!joint) { - llwarns << "Too many bones" << llendl; + llwarns << "Too many bones" << LL_ENDL; return FALSE; } joint->setName( info->mName ); @@ -577,7 +576,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent { if (volume_num >= (S32)mNumCollisionVolumes) { - llwarns << "Too many bones" << llendl; + llwarns << "Too many bones" << LL_ENDL; return FALSE; } joint = (&mCollisionVolumes[volume_num]); @@ -647,7 +646,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) //------------------------------------------------------------------------- if (!allocateCharacterJoints(info->mNumBones)) { - llerrs << "Can't allocate " << info->mNumBones << " joints" << llendl; + llerrs << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL; return FALSE; } @@ -658,7 +657,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) { if (!allocateCollisionVolumes(info->mNumCollisionVolumes)) { - llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << llendl; + llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL; return FALSE; } } @@ -671,7 +670,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) LLAvatarBoneInfo *info = *iter; if (!setupBone(info, NULL, current_volume_num, current_joint_num)) { - llerrs << "Error parsing bone in skeleton file" << llendl; + llerrs << "Error parsing bone in skeleton file" << LL_ENDL; return FALSE; } } @@ -731,17 +730,17 @@ void LLAvatarAppearance::buildCharacter() stop_glerror(); // gPrintMessagesThisFrame = TRUE; - lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << llendl; + lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; if (!status) { if (isSelf()) { - llerrs << "Unable to load user's avatar" << llendl; + llerrs << "Unable to load user's avatar" << LL_ENDL; } else { - llwarns << "Unable to load other's avatar" << llendl; + llwarns << "Unable to load other's avatar" << LL_ENDL; } return; } @@ -790,7 +789,7 @@ void LLAvatarAppearance::buildCharacter() mEyeLeftp && mEyeRightp)) { - llerrs << "Failed to create avatar." << llendl; + llerrs << "Failed to create avatar." << LL_ENDL; return; } @@ -811,21 +810,21 @@ BOOL LLAvatarAppearance::loadAvatar() // avatar_skeleton.xml if( !buildSkeleton(sAvatarSkeletonInfo) ) { - llwarns << "avatar file: buildSkeleton() failed" << llendl; + llwarns << "avatar file: buildSkeleton() failed" << LL_ENDL; return FALSE; } // avatar_lad.xml : if( !loadSkeletonNode() ) { - llwarns << "avatar file: loadNodeSkeleton() failed" << llendl; + llwarns << "avatar file: loadNodeSkeleton() failed" << LL_ENDL; return FALSE; } // avatar_lad.xml : if( !loadMeshNodes() ) { - llwarns << "avatar file: loadNodeMesh() failed" << llendl; + llwarns << "avatar file: loadNodeMesh() failed" << LL_ENDL; return FALSE; } @@ -835,13 +834,13 @@ BOOL LLAvatarAppearance::loadAvatar() mTexSkinColor = new LLTexGlobalColor( this ); if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) ) { - llwarns << "avatar file: mTexSkinColor->setInfo() failed" << llendl; + llwarns << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"skin_color\" not found" << llendl; + llwarns << " name=\"skin_color\" not found" << LL_ENDL; return FALSE; } if( sAvatarXmlInfo->mTexHairColorInfo ) @@ -849,13 +848,13 @@ BOOL LLAvatarAppearance::loadAvatar() mTexHairColor = new LLTexGlobalColor( this ); if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) ) { - llwarns << "avatar file: mTexHairColor->setInfo() failed" << llendl; + llwarns << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"hair_color\" not found" << llendl; + llwarns << " name=\"hair_color\" not found" << LL_ENDL; return FALSE; } if( sAvatarXmlInfo->mTexEyeColorInfo ) @@ -863,26 +862,26 @@ BOOL LLAvatarAppearance::loadAvatar() mTexEyeColor = new LLTexGlobalColor( this ); if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) ) { - llwarns << "avatar file: mTexEyeColor->setInfo() failed" << llendl; + llwarns << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"eye_color\" not found" << llendl; + llwarns << " name=\"eye_color\" not found" << LL_ENDL; return FALSE; } // avatar_lad.xml : if (sAvatarXmlInfo->mLayerInfoList.empty()) { - llwarns << "avatar file: missing node" << llendl; + llwarns << "avatar file: missing node" << LL_ENDL; return FALSE; } if (sAvatarXmlInfo->mMorphMaskInfoList.empty()) { - llwarns << "avatar file: missing node" << llendl; + llwarns << "avatar file: missing node" << LL_ENDL; return FALSE; } @@ -924,14 +923,14 @@ BOOL LLAvatarAppearance::loadAvatar() LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam; if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false)) { - llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << llendl; + llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL; continue; } } else { delete driver_param; - llwarns << "avatar file: driver_param->parseData() failed" << llendl; + llwarns << "avatar file: driver_param->parseData() failed" << LL_ENDL; return FALSE; } } @@ -1051,17 +1050,17 @@ BOOL LLAvatarAppearance::loadMeshNodes() } else { - llwarns << "Avatar file: has invalid lod setting " << lod << llendl; + llwarns << "Avatar file: has invalid lod setting " << lod << LL_ENDL; return FALSE; } } else { - llwarns << "Ignoring unrecognized mesh type: " << type << llendl; + llwarns << "Ignoring unrecognized mesh type: " << type << LL_ENDL; return FALSE; } - // llinfos << "Parsing mesh data for " << type << "..." << llendl; + // llinfos << "Parsing mesh data for " << type << "..." << LL_ENDL; // If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings. // Do not touch!!! @@ -1091,7 +1090,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if( !poly_mesh ) { - llwarns << "Failed to load mesh of type " << type << llendl; + llwarns << "Failed to load mesh of type " << type << LL_ENDL; return FALSE; } @@ -1151,7 +1150,7 @@ BOOL LLAvatarAppearance::loadLayersets() { stop_glerror(); delete layer_set; - llwarns << "avatar file: layer_set->setInfo() failed" << llendl; + llwarns << "avatar file: layer_set->setInfo() failed" << LL_ENDL; return FALSE; } @@ -1174,7 +1173,7 @@ BOOL LLAvatarAppearance::loadLayersets() // if no baked texture was found, warn and cleanup if (baked_index == BAKED_NUM_INDICES) { - llwarns << " has invalid body_region attribute" << llendl; + llwarns << " has invalid body_region attribute" << LL_ENDL; delete layer_set; return FALSE; } @@ -1192,7 +1191,7 @@ BOOL LLAvatarAppearance::loadLayersets() } else { - llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << llendl; + llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL; success = FALSE; } } @@ -1288,7 +1287,7 @@ BOOL LLAvatarAppearance::isValid() const // This should only be called on ourself. if (!isSelf()) { - llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << llendl; + llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL; } return TRUE; } @@ -1453,7 +1452,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in //----------------------------------------------------------------------------- BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num ) { - deleteAndClearArray(mCollisionVolumes); + delete_and_clear_array(mCollisionVolumes); mNumCollisionVolumes = 0; mCollisionVolumes = new LLAvatarJointCollisionVolume[num]; @@ -1477,7 +1476,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { - llwarns << "Bone without name" << llendl; + llwarns << "Bone without name" << LL_ENDL; return FALSE; } } @@ -1492,28 +1491,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) } else { - llwarns << "Invalid node " << node->getName() << llendl; + llwarns << "Invalid node " << node->getName() << LL_ENDL; return FALSE; } static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos"); if (!node->getFastAttributeVector3(pos_string, mPos)) { - llwarns << "Bone without position" << llendl; + llwarns << "Bone without position" << LL_ENDL; return FALSE; } static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot"); if (!node->getFastAttributeVector3(rot_string, mRot)) { - llwarns << "Bone without rotation" << llendl; + llwarns << "Bone without rotation" << LL_ENDL; return FALSE; } static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); if (!node->getFastAttributeVector3(scale_string, mScale)) { - llwarns << "Bone without scale" << llendl; + llwarns << "Bone without scale" << LL_ENDL; return FALSE; } @@ -1522,7 +1521,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot"); if (!node->getFastAttributeVector3(pivot_string, mPivot)) { - llwarns << "Bone without pivot" << llendl; + llwarns << "Bone without pivot" << LL_ENDL; return FALSE; } } @@ -1550,7 +1549,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones"); if (!node->getFastAttributeS32(num_bones_string, mNumBones)) { - llwarns << "Couldn't find number of bones." << llendl; + llwarns << "Couldn't find number of bones." << LL_ENDL; return FALSE; } @@ -1564,7 +1563,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - llwarns << "Error parsing bone in skeleton file" << llendl; + llwarns << "Error parsing bone in skeleton file" << LL_ENDL; return FALSE; } mBoneInfoList.push_back(info); @@ -1581,7 +1580,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro LLXmlTreeNode* node = root->getChildByName( "skeleton" ); if( !node ) { - llwarns << "avatar file: missing " << llendl; + llwarns << "avatar file: missing " << LL_ENDL; return FALSE; } @@ -1596,11 +1595,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { if (child->getChildByName("param_morph")) { - llwarns << "Can't specify morph param in skeleton definition." << llendl; + llwarns << "Can't specify morph param in skeleton definition." << LL_ENDL; } else { - llwarns << "Unknown param type." << llendl; + llwarns << "Unknown param type." << LL_ENDL; } continue; } @@ -1625,7 +1624,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!child->getFastAttributeString(name_string, info->mName)) { - llwarns << "No name supplied for attachment point." << llendl; + llwarns << "No name supplied for attachment point." << LL_ENDL; delete info; continue; } @@ -1633,7 +1632,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint"); if (!child->getFastAttributeString(joint_string, info->mJointName)) { - llwarns << "No bone declared in attachment point " << info->mName << llendl; + llwarns << "No bone declared in attachment point " << info->mName << LL_ENDL; delete info; continue; } @@ -1659,7 +1658,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id"); if (!child->getFastAttributeS32(id_string, info->mAttachmentID)) { - llwarns << "No id supplied for attachment point " << info->mName << llendl; + llwarns << "No id supplied for attachment point " << info->mName << LL_ENDL; delete info; continue; } @@ -1694,7 +1693,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle type_string = LLXmlTree::addAttributeString("type"); if( !node->getFastAttributeString( type_string, info->mType ) ) { - llwarns << "Avatar file: is missing type attribute. Ignoring element. " << llendl; + llwarns << "Avatar file: is missing type attribute. Ignoring element. " << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1702,7 +1701,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod"); if (!node->getFastAttributeS32( lod_string, info->mLOD )) { - llwarns << "Avatar file: is missing lod attribute. Ignoring element. " << llendl; + llwarns << "Avatar file: is missing lod attribute. Ignoring element. " << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1710,7 +1709,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name"); if( !node->getFastAttributeString( file_name_string, info->mMeshFileName ) ) { - llwarns << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << llendl; + llwarns << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1741,11 +1740,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { if (child->getChildByName("param_skeleton")) { - llwarns << "Can't specify skeleton param in a mesh definition." << llendl; + llwarns << "Can't specify skeleton param in a mesh definition." << LL_ENDL; } else { - llwarns << "Unknown param type." << llendl; + llwarns << "Unknown param type." << LL_ENDL; } continue; } @@ -1786,14 +1785,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexSkinColorInfo) { - llwarns << "avatar file: multiple instances of skin_color" << llendl; + llwarns << "avatar file: multiple instances of skin_color" << LL_ENDL; return FALSE; } mTexSkinColorInfo = new LLTexGlobalColorInfo; if( !mTexSkinColorInfo->parseXml( color_node ) ) { - deleteAndClear(mTexSkinColorInfo); - llwarns << "avatar file: mTexSkinColor->parseXml() failed" << llendl; + delete_and_clear(mTexSkinColorInfo); + llwarns << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1801,14 +1800,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexHairColorInfo) { - llwarns << "avatar file: multiple instances of hair_color" << llendl; + llwarns << "avatar file: multiple instances of hair_color" << LL_ENDL; return FALSE; } mTexHairColorInfo = new LLTexGlobalColorInfo; if( !mTexHairColorInfo->parseXml( color_node ) ) { - deleteAndClear(mTexHairColorInfo); - llwarns << "avatar file: mTexHairColor->parseXml() failed" << llendl; + delete_and_clear(mTexHairColorInfo); + llwarns << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1816,13 +1815,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexEyeColorInfo) { - llwarns << "avatar file: multiple instances of eye_color" << llendl; + llwarns << "avatar file: multiple instances of eye_color" << LL_ENDL; return FALSE; } mTexEyeColorInfo = new LLTexGlobalColorInfo; if( !mTexEyeColorInfo->parseXml( color_node ) ) { - llwarns << "avatar file: mTexEyeColor->parseXml() failed" << llendl; + llwarns << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1848,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root else { delete layer_info; - llwarns << "avatar file: layer_set->parseXml() failed" << llendl; + llwarns << "avatar file: layer_set->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1877,7 +1876,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo else { delete driver_info; - llwarns << "avatar file: driver_param->parseXml() failed" << llendl; + llwarns << "avatar file: driver_param->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1906,7 +1905,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle name_string = LLXmlTree::addAttributeString("morph_name"); if (!grand_child->getFastAttributeString(name_string, info->mName)) { - llwarns << "No name supplied for morph mask." << llendl; + llwarns << "No name supplied for morph mask." << LL_ENDL; delete info; continue; } @@ -1914,7 +1913,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region"); if (!grand_child->getFastAttributeString(region_string, info->mRegion)) { - llwarns << "No region supplied for morph mask." << llendl; + llwarns << "No region supplied for morph mask." << LL_ENDL; delete info; continue; } @@ -1922,7 +1921,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer"); if (!grand_child->getFastAttributeString(layer_string, info->mLayer)) { - llwarns << "No layer supplied for morph mask." << llendl; + llwarns << "No layer supplied for morph mask." << LL_ENDL; delete info; continue; } diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp index 753805b314..e50ef8d485 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -28,7 +28,6 @@ // Header Files //----------------------------------------------------------------------------- #include "linden_common.h" -#include "imageids.h" #include "llfasttimer.h" #include "llrender.h" @@ -317,7 +316,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh ) setupJoint((LLAvatarJoint*)getRoot()); } -// llinfos << "joint render entries: " << mMesh->mJointRenderData.count() << llendl; + LL_DEBUGS() << "joint render entries: " << mMesh->mJointRenderData.size() << LL_ENDL; } //----------------------------------------------------------------------------- @@ -325,10 +324,11 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh ) //----------------------------------------------------------------------------- void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint) { -// llinfos << "Mesh: " << getName() << llendl; + LL_DEBUGS() << "Mesh: " << getName() << LL_ENDL; -// S32 joint_count = 0; + S32 joint_count = 0; U32 sj; + for (sj=0; sjmJointRenderData.count() && mMesh->mJointRenderData[mMesh->mJointRenderData.count() - 1]->mWorldMatrix == ¤t_joint->getParent()->getWorldMatrix()) + if(mMesh->mJointRenderData.size() && mMesh->mJointRenderData[mMesh->mJointRenderData.size() - 1]->mWorldMatrix == ¤t_joint->getParent()->getWorldMatrix()) { // ...then just add ourselves LLAvatarJoint* jointp = js.mJoint; - mMesh->mJointRenderData.put(new LLJointRenderData(&jointp->getWorldMatrix(), &js)); -// llinfos << "joint " << joint_count << js.mJoint->getName() << llendl; -// joint_count++; + mMesh->mJointRenderData.push_back(new LLJointRenderData(&jointp->getWorldMatrix(), &js)); + LL_DEBUGS() << "joint " << joint_count++ << js.mJoint->getName() << LL_ENDL; } // otherwise add our parent and ourselves else { - mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getParent()->getWorldMatrix(), NULL)); -// llinfos << "joint " << joint_count << current_joint->getParent()->getName() << llendl; -// joint_count++; - mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getWorldMatrix(), &js)); -// llinfos << "joint " << joint_count << current_joint->getName() << llendl; -// joint_count++; + mMesh->mJointRenderData.push_back(new LLJointRenderData(¤t_joint->getParent()->getWorldMatrix(), NULL)); + LL_DEBUGS() << "joint " << joint_count++ << current_joint->getParent()->getName() << LL_ENDL; + mMesh->mJointRenderData.push_back(new LLJointRenderData(¤t_joint->getWorldMatrix(), &js)); + LL_DEBUGS() << "joint " << joint_count++ << current_joint->getName() << LL_ENDL; } } diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h index 040c9cf5be..2420db76e7 100644 --- a/indra/llappearance/lldriverparam.h +++ b/indra/llappearance/lldriverparam.h @@ -29,6 +29,7 @@ #include "llviewervisualparam.h" #include "llwearabletype.h" +#include class LLAvatarAppearance; class LLDriverParam; diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index a01457246e..1e87dae485 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -161,8 +161,8 @@ void LLPolyMeshSharedData::freeMeshData() // mVertFaceMap.deleteAllData(); } -// compate_int is used by the qsort function to sort the index array -int compare_int(const void *a, const void *b); +// compare_int is used by the qsort function to sort the index array +S32 compare_int(const void *a, const void *b); //----------------------------------------------------------------------------- // genIndices() @@ -547,10 +547,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) // S32 j; // for(j = 0; j < 3; j++) // { -// LLDynamicArray *face_list = mVertFaceMap.getIfThere(face[j]); +// std::vector *face_list = mVertFaceMap.getIfThere(face[j]); // if (!face_list) // { -// face_list = new LLDynamicArray; +// face_list = new std::vector; // mVertFaceMap.addData(face[j], face_list); // } // face_list->put(i); @@ -808,15 +808,8 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_ //----------------------------------------------------------------------------- LLPolyMesh::~LLPolyMesh() { - S32 i; - for (i = 0; i < mJointRenderData.count(); i++) - { - delete mJointRenderData[i]; - mJointRenderData[i] = NULL; - } - - ll_aligned_free_16(mVertexData); - + delete_and_clear(mJointRenderData); + ll_aligned_free_16(mVertexData); } diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h index ef1dfb1adb..83659d9514 100644 --- a/indra/llappearance/llpolymesh.h +++ b/indra/llappearance/llpolymesh.h @@ -36,7 +36,6 @@ #include "llquaternion.h" #include "llpolymorph.h" #include "lljoint.h" -//#include "lldarray.h" class LLSkinJoint; class LLAvatarAppearance; @@ -322,7 +321,7 @@ public: void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; } LLAvatarAppearance* getAvatar() { return mAvatarp; } - LLDynamicArray mJointRenderData; + std::vector mJointRenderData; U32 mFaceVertexOffset; U32 mFaceVertexCount; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index a98a11b357..8f1f413e02 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -28,7 +28,7 @@ // Header Files //----------------------------------------------------------------------------- #include "llpreprocessor.h" -#include "llerrorlegacy.h" +#include "llerror.h" #include "llavatarappearance.h" #include "llavatarjoint.h" #include "llpolymorph.h" diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h index 774bc7dfa2..24c9e9ae48 100644 --- a/indra/llappearance/llpolyskeletaldistortion.h +++ b/indra/llappearance/llpolyskeletaldistortion.h @@ -39,7 +39,6 @@ //#include "llpolymorph.h" #include "lljoint.h" #include "llviewervisualparam.h" -//#include "lldarray.h" //class LLSkinJoint; class LLAvatarAppearance; diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index f65829febe..6c584c239c 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -30,7 +30,6 @@ #include "llavatarappearance.h" #include "llcrc.h" -#include "imageids.h" #include "llimagej2c.h" #include "llimagetga.h" #include "lldir.h" diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h index 6e4d2b2242..132c153bcd 100644 --- a/indra/llappearance/llwearable.h +++ b/indra/llappearance/llwearable.h @@ -28,7 +28,6 @@ #define LL_LLWEARABLE_H #include "llavatarappearancedefines.h" -#include "llextendedstatus.h" #include "llpermissions.h" #include "llsaleinfo.h" #include "llwearabletype.h" diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index bcff03ceaa..e7b9fa6b18 100755 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -41,6 +41,7 @@ #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #include +#include extern LLAudioEngine *gAudiop; @@ -114,7 +115,7 @@ size_t vfs_read(void *ptr, size_t size, size_t nmemb, void *datasource) } } -int vfs_seek(void *datasource, ogg_int64_t offset, int whence) +S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence) { LLVFile *file = (LLVFile *)datasource; @@ -150,7 +151,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence) } } -int vfs_close (void *datasource) +S32 vfs_close (void *datasource) { LLVFile *file = (LLVFile *)datasource; delete file; @@ -209,7 +210,7 @@ BOOL LLVorbisDecodeState::initDecode() return FALSE; } - int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks); + S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks); if(r < 0) { llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl; @@ -542,7 +543,7 @@ public: void processQueue(const F32 num_secs = 0.005); protected: - LLLinkedQueue mDecodeQueue; + std::deque mDecodeQueue; LLPointer mCurrentDecodep; }; @@ -617,7 +618,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) if (!done) { - if (!mDecodeQueue.getLength()) + if (mDecodeQueue.empty()) { // Nothing else on the queue. done = TRUE; @@ -625,7 +626,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) else { LLUUID uuid; - mDecodeQueue.pop(uuid); + uuid = mDecodeQueue.front(); + mDecodeQueue.pop_front(); if (gAudiop->hasDecodedFile(uuid)) { // This file has already been decoded, don't decode it again. @@ -683,7 +685,7 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) { // Just put it on the decode queue. //llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl; - mImpl->mDecodeQueue.push(uuid); + mImpl->mDecodeQueue.push_back(uuid); return TRUE; } diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h index e42fe8a40d..7a9b807d04 100755 --- a/indra/llaudio/llaudiodecodemgr.h +++ b/indra/llaudio/llaudiodecodemgr.h @@ -28,7 +28,6 @@ #include "stdtypes.h" -#include "lllinkedqueue.h" #include "lluuid.h" #include "llassettype.h" diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 06e752cf34..9c72515a0f 100755 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -187,7 +187,7 @@ void LLAudioEngine::stopInternetStream() } // virtual -void LLAudioEngine::pauseInternetStream(int pause) +void LLAudioEngine::pauseInternetStream(S32 pause) { if (mStreamingAudioImpl) mStreamingAudioImpl->pause(pause); diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index da1629a1db..f1e1b4e308 100755 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -88,7 +88,7 @@ public: enum LLAudioPlayState { - // isInternetStreamPlaying() returns an *int*, with + // isInternetStreamPlaying() returns an *S32*, with // 0 = stopped, 1 = playing, 2 = paused. AUDIO_STOPPED = 0, AUDIO_PLAYING = 1, @@ -160,7 +160,7 @@ public: // Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists void startInternetStream(const std::string& url); void stopInternetStream(); - void pauseInternetStream(int pause); + void pauseInternetStream(S32 pause); void updateInternetStream(); // expected to be called often LLAudioPlayState isInternetStreamPlaying(); // use a value from 0.0 to 1.0, inclusive diff --git a/indra/llaudio/llstreamingaudio_fmodex.h b/indra/llaudio/llstreamingaudio_fmodex.h index 1dee18ae7d..2787840ba1 100644 --- a/indra/llaudio/llstreamingaudio_fmodex.h +++ b/indra/llaudio/llstreamingaudio_fmodex.h @@ -49,9 +49,9 @@ class LLStreamingAudio_FMODEX : public LLStreamingAudioInterface /*virtual*/ void start(const std::string& url); /*virtual*/ void stop(); - /*virtual*/ void pause(int pause); + /*virtual*/ void pause(S32 pause); /*virtual*/ void update(); - /*virtual*/ int isPlaying(); + /*virtual*/ S32 isPlaying(); /*virtual*/ void setGain(F32 vol); /*virtual*/ F32 getGain(); /*virtual*/ std::string getURL(); diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 84185c3f92..79cbcabdc1 100755 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -29,7 +29,7 @@ #include -#include "string_table.h" +#include "llstringtable.h" #include "lluuid.h" //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 5740dbce77..43fb68bb5c 100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -35,7 +35,7 @@ #include "lljoint.h" #include "llmotioncontroller.h" #include "llvisualparam.h" -#include "string_table.h" +#include "llstringtable.h" #include "llpointer.h" #include "llthread.h" diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index c23694639e..aeb65eb10f 100755 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -173,27 +173,7 @@ S32 LLGesture::getMaxSerialSize() LLGestureList::LLGestureList() : mList(0) -{ - // add some gestures for debugging -// LLGesture *gesture = NULL; -/* - gesture = new LLGesture(KEY_F2, MASK_NONE, ":-)", - SND_CHIRP, "dance2", ":-)" ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F3, MASK_NONE, "/dance", - SND_OBJECT_CREATE, "dance3", "(dances)" ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F4, MASK_NONE, "/boogie", - LLUUID::null, "dance4", LLStringUtil::null ); - mList.put(gesture); - - gesture = new LLGesture(KEY_F5, MASK_SHIFT, "/tongue", - LLUUID::null, "Express_Tongue_Out", LLStringUtil::null ); - mList.put(gesture); - */ -} +{} LLGestureList::~LLGestureList() { @@ -203,12 +183,7 @@ LLGestureList::~LLGestureList() void LLGestureList::deleteAll() { - S32 count = mList.count(); - for (S32 i = 0; i < count; i++) - { - delete mList.get(i); - } - mList.reset(); + delete_and_clear(mList); } // Iterates through space delimited tokens in string, triggering any gestures found. @@ -235,9 +210,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin std::string cur_token_lower = *token_iter; LLStringUtil::toLower(cur_token_lower); - for (S32 i = 0; i < mList.count(); i++) + for (U32 i = 0; i < mList.size(); i++) { - gesture = mList.get(i); + gesture = mList.at(i); if (gesture->trigger(cur_token_lower)) { if( !gesture->getOutputString().empty() ) @@ -286,9 +261,9 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin BOOL LLGestureList::trigger(KEY key, MASK mask) { - for (S32 i = 0; i < mList.count(); i++) + for (U32 i = 0; i < mList.size(); i++) { - LLGesture* gesture = mList.get(i); + LLGesture* gesture = mList.at(i); if( gesture ) { if (gesture->trigger(key, mask)) @@ -308,7 +283,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) U8 *LLGestureList::serialize(U8 *buffer) const { // a single S32 serves as the header that tells us how many to read - S32 count = mList.count(); + U32 count = mList.size(); htonmemcpy(buffer, &count, MVT_S32, 4); buffer += sizeof(count); @@ -345,7 +320,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) tmp += sizeof(count); - mList.reserve_block(count); + mList.resize(count); for (S32 i = 0; i < count; i++) { diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h index 66b618c473..cfb489f727 100755 --- a/indra/llcharacter/llgesture.h +++ b/indra/llcharacter/llgesture.h @@ -31,7 +31,6 @@ #include "llanimationstates.h" #include "lluuid.h" #include "llstring.h" -#include "lldarray.h" class LLGesture { @@ -67,12 +66,12 @@ public: static S32 getMaxSerialSize(); protected: - KEY mKey; // usually a function key - MASK mMask; // usually MASK_NONE, or MASK_SHIFT + KEY mKey; // usually a function key + MASK mMask; // usually MASK_NONE, or MASK_SHIFT std::string mTrigger; // string, no whitespace allowed std::string mTriggerLower; // lowercase version of mTrigger - LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none - std::string mAnimation; // canonical name of animation or face animation + LLUUID mSoundItemID; // ItemID of sound to play, LLUUID::null if none + std::string mAnimation; // canonical name of animation or face animation std::string mOutputString; // string to say static const S32 MAX_SERIAL_SIZE; @@ -91,9 +90,9 @@ public: BOOL triggerAndReviseString(const std::string &string, std::string* revised_string); // Used for construction from UI - S32 count() const { return mList.count(); } - virtual LLGesture* get(S32 i) const { return mList.get(i); } - virtual void put(LLGesture* gesture) { mList.put( gesture ); } + S32 count() const { return mList.size(); } + virtual LLGesture* get(S32 i) const { return mList.at(i); } + virtual void put(LLGesture* gesture) { mList.push_back( gesture ); } void deleteAll(); // non-endian-neutral serialization @@ -106,7 +105,7 @@ protected: virtual LLGesture *create_gesture(U8 **buffer, S32 max_size); protected: - LLDynamicArray mList; + std::vector mList; static const S32 SERIAL_HEADER_SIZE; }; diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 09a7c11a22..83bd62e8fa 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -560,7 +560,7 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot) // LLVector3 old_axis = main_axis * old_rot; // LLVector3 new_axis = main_axis * new_rot; -// for (S32 i = 0; i < mConstraintSilhouette.count() - 1; i++) +// for (S32 i = 0; i < mConstraintSilhouette.size() - 1; i++) // { // LLVector3 vert1 = mConstraintSilhouette[i]; // LLVector3 vert2 = mConstraintSilhouette[i + 1]; diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 07374b7814..6efa13aeb5 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -33,13 +33,11 @@ #include #include -#include "linked_lists.h" #include "v3math.h" #include "v4math.h" #include "m4math.h" #include "llquaternion.h" #include "xform.h" -#include "lldarray.h" const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15; const U32 LL_CHARACTER_MAX_JOINTS = 32; // must be divisible by 4! diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index 1331900791..69a7e3dc6e 100755 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -135,8 +135,6 @@ void LLJointSolverRP3::setTwist( F32 twist ) //----------------------------------------------------------------------------- void LLJointSolverRP3::solve() { -// llinfos << llendl; -// llinfos << "LLJointSolverRP3::solve()" << llendl; //------------------------------------------------------------------------- // setup joints in their base rotations @@ -152,15 +150,15 @@ void LLJointSolverRP3::solve() LLVector3 cPos = mJointC->getWorldPosition(); LLVector3 gPos = mJointGoal->getWorldPosition(); -// llinfos << "bPosLocal = " << mJointB->getPosition() << llendl; -// llinfos << "cPosLocal = " << mJointC->getPosition() << llendl; -// llinfos << "bRotLocal = " << mJointB->getRotation() << llendl; -// llinfos << "cRotLocal = " << mJointC->getRotation() << llendl; - -// llinfos << "aPos : " << aPos << llendl; -// llinfos << "bPos : " << bPos << llendl; -// llinfos << "cPos : " << cPos << llendl; -// llinfos << "gPos : " << gPos << llendl; + LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE + << "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE + << "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE + << "bRotLocal = " << mJointB->getRotation() << LL_NEWLINE + << "cRotLocal = " << mJointC->getRotation() << LL_NEWLINE + << "aPos : " << aPos << LL_NEWLINE + << "bPos : " << bPos << LL_NEWLINE + << "cPos : " << cPos << LL_NEWLINE + << "gPos : " << gPos << LL_ENDL; //------------------------------------------------------------------------- // get the poleVector in world space @@ -184,11 +182,6 @@ void LLJointSolverRP3::solve() LLVector3 acVec = cPos - aPos; LLVector3 agVec = gPos - aPos; -// llinfos << "abVec : " << abVec << llendl; -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "agVec : " << agVec << llendl; - //------------------------------------------------------------------------- // compute needed lengths of those vectors //------------------------------------------------------------------------- @@ -196,16 +189,19 @@ void LLJointSolverRP3::solve() F32 bcLen = bcVec.magVec(); F32 agLen = agVec.magVec(); -// llinfos << "abLen : " << abLen << llendl; -// llinfos << "bcLen : " << bcLen << llendl; -// llinfos << "agLen : " << agLen << llendl; - //------------------------------------------------------------------------- // compute component vector of (A->B) orthogonal to (A->C) //------------------------------------------------------------------------- LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec)); -// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl; + LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE + << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "agVec : " << agVec << LL_NEWLINE + << "abLen : " << abLen << LL_NEWLINE + << "bcLen : " << bcLen << LL_NEWLINE + << "agLen : " << agLen << LL_NEWLINE + << "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL; //------------------------------------------------------------------------- // compute the normal of the original ABC plane (and store for later) @@ -273,13 +269,17 @@ void LLJointSolverRP3::solve() LLQuaternion bRot(theta - abbcAng, abbcOrthoVec); -// llinfos << "abbcAng : " << abbcAng << llendl; -// llinfos << "abbcOrthoVec : " << abbcOrthoVec << llendl; -// llinfos << "agLenSq : " << agLenSq << llendl; -// llinfos << "cosTheta : " << cosTheta << llendl; -// llinfos << "theta : " << theta << llendl; -// llinfos << "bRot : " << bRot << llendl; -// llinfos << "theta abbcAng theta-abbcAng: " << theta*180.0/F_PI << " " << abbcAng*180.0f/F_PI << " " << (theta - abbcAng)*180.0f/F_PI << llendl; + LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE + << "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE + << "agLenSq : " << agLenSq << LL_NEWLINE + << "cosTheta : " << cosTheta << LL_NEWLINE + << "theta : " << theta << LL_NEWLINE + << "bRot : " << bRot << LL_NEWLINE + << "theta abbcAng theta-abbcAng: " + << theta*180.0/F_PI << " " + << abbcAng*180.0f/F_PI << " " + << (theta - abbcAng)*180.0f/F_PI + << LL_ENDL; //------------------------------------------------------------------------- // compute rotation that rotates new A->C to A->G @@ -293,9 +293,9 @@ void LLJointSolverRP3::solve() LLQuaternion cgRot; cgRot.shortestArc( acVec, agVec ); -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "cgRot : " << cgRot << llendl; + LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "cgRot : " << cgRot << LL_ENDL; // update A->B and B->C with rotation from C to G abVec = abVec * cgRot; @@ -353,18 +353,16 @@ void LLJointSolverRP3::solve() pRot.shortestArc( abcNorm, apgNorm ); } -// llinfos << "abcNorm = " << abcNorm << llendl; -// llinfos << "apgNorm = " << apgNorm << llendl; -// llinfos << "pRot = " << pRot << llendl; - //------------------------------------------------------------------------- // compute twist rotation //------------------------------------------------------------------------- LLQuaternion twistRot( mTwist, agVec ); -// llinfos << "twist : " << mTwist*180.0/F_PI << llendl; -// llinfos << "agNormVec: " << agNormVec << llendl; -// llinfos << "twistRot : " << twistRot << llendl; + LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE + << "apgNorm = " << apgNorm << LL_NEWLINE + << "pRot = " << pRot << LL_NEWLINE + << "twist : " << mTwist*180.0/F_PI << LL_NEWLINE + << "twistRot : " << twistRot << LL_ENDL; //------------------------------------------------------------------------- // compute rotation of A diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 831a0a6719..1352c9d592 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1263,7 +1263,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (mJointMotionList->mBasePriority >= LLJoint::ADDITIVE_PRIORITY) { - mJointMotionList->mBasePriority = (LLJoint::JointPriority)((int)LLJoint::ADDITIVE_PRIORITY-1); + mJointMotionList->mBasePriority = (LLJoint::JointPriority)((S32)LLJoint::ADDITIVE_PRIORITY-1); mJointMotionList->mMaxPriority = mJointMotionList->mBasePriority; } else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY) @@ -2288,8 +2288,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh mTargetVolume = NULL; mFixupDistanceRMS = 0.f; - int i; - for (i=0; i diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 0c76fd46c0..4336550d07 100755 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -26,22 +26,20 @@ include_directories( # ${LLCOMMON_LIBRARIES}) set(llcommon_SOURCE_FILES - imageids.cpp indra_constants.cpp llallocator.cpp llallocator_heap_profile.cpp llapp.cpp llapr.cpp llassettype.cpp - llavatarname.cpp llbase32.cpp llbase64.cpp + llbitpack.cpp llcommon.cpp llcommonutils.cpp llcoros.cpp llcrc.cpp llcriticaldamp.cpp - llcursortypes.cpp lldate.cpp lldependencies.cpp lldictionary.cpp @@ -58,7 +56,6 @@ set(llcommon_SOURCE_FILES llfile.cpp llfindlocale.cpp llfixedbuffer.cpp - llfoldertype.cpp llformat.cpp llframetimer.cpp llheartbeat.cpp @@ -68,7 +65,6 @@ set(llcommon_SOURCE_FILES llleaplistener.cpp llliveappconfig.cpp lllivefile.cpp - lllog.cpp llmd5.cpp llmemory.cpp llmemorystream.cpp @@ -76,7 +72,6 @@ set(llcommon_SOURCE_FILES llmetricperformancetester.cpp llmortician.cpp llmutex.cpp - lloptioninterface.cpp llptrto.cpp llpredicate.cpp llprocess.cpp @@ -90,7 +85,6 @@ set(llcommon_SOURCE_FILES llsdserialize.cpp llsdserialize_xml.cpp llsdutil.cpp - llsecondlifeurls.cpp llsingleton.cpp llstacktrace.cpp llstreamqueue.cpp @@ -116,45 +110,33 @@ set(llcommon_SOURCE_FILES set(llcommon_HEADER_FILES CMakeLists.txt - bitpack.h ctype_workaround.h fix_macros.h - imageids.h indra_constants.h linden_common.h - linked_lists.h - llaccountingcost.h llallocator.h llallocator_heap_profile.h - llagentconstants.h - llavatarname.h llapp.h llapr.h llassettype.h - llavatarconstants.h llbase32.h llbase64.h + llbitpack.h llboost.h - llchat.h - llclickaction.h llcommon.h llcommonutils.h llcoros.h llcrc.h llcriticaldamp.h - llcursortypes.h - lldarray.h lldate.h lldefs.h lldependencies.h - lldeleteutils.h lldepthstack.h lldictionary.h lldoubledispatch.h llendianswizzle.h llerror.h llerrorcontrol.h - llerrorlegacy.h llerrorthread.h llevent.h lleventapi.h @@ -163,30 +145,25 @@ set(llcommon_HEADER_FILES lleventfilter.h llevents.h lleventemitter.h - llextendedstatus.h llfasttimer.h llfile.h llfindlocale.h llfixedbuffer.h - llfoldertype.h llformat.h llframetimer.h llhandle.h llhash.h llheartbeat.h llhttpstatuscodes.h + llindexedvector.h llinitparam.h llinstancetracker.h llkeythrottle.h llleap.h llleaplistener.h lllistenerwrapper.h - lllinkedqueue.h llliveappconfig.h lllivefile.h - lllog.h - lllslconstants.h - llmap.h llmd5.h llmemory.h llmemorystream.h @@ -194,8 +171,6 @@ set(llcommon_HEADER_FILES llmetricperformancetester.h llmortician.h llmutex.h - llnametable.h - lloptioninterface.h llpointer.h llpredicate.h llpreprocessor.h @@ -215,11 +190,9 @@ set(llcommon_HEADER_FILES llsdserialize.h llsdserialize_xml.h llsdutil.h - llsecondlifeurls.h llsimplehash.h llsingleton.h llstacktrace.h - llstatenums.h llstl.h llstreamqueue.h llstreamtools.h @@ -239,18 +212,12 @@ set(llcommon_HEADER_FILES llunit.h lluri.h lluuid.h - llversionserver.h llwin32headers.h llwin32headerslean.h llworkerthread.h - ll_template_cast.h - roles_constants.h - stdenums.h stdtypes.h - string_table.h stringize.h timer.h - timing.h u64.h ) diff --git a/indra/llcommon/bitpack.cpp b/indra/llcommon/bitpack.cpp deleted file mode 100755 index cdcaba0765..0000000000 --- a/indra/llcommon/bitpack.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file bitpack.cpp - * @brief LLBitPack 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 "linden_common.h" - -// implementation is all in the header, this include dep ensures the unit test is rerun if the implementation changes. -#include "bitpack.h" diff --git a/indra/llcommon/bitpack.h b/indra/llcommon/bitpack.h deleted file mode 100755 index 037300dd14..0000000000 --- a/indra/llcommon/bitpack.h +++ /dev/null @@ -1,208 +0,0 @@ -/** - * @file bitpack.h - * @brief Convert data to packed bit stream - * - * $LicenseInfo:firstyear=2000&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_BITPACK_H -#define LL_BITPACK_H - -#include "llerror.h" - -const U32 MAX_DATA_BITS = 8; - - -class LLBitPack -{ -public: - LLBitPack(U8 *buffer, U32 max_size) : mBuffer(buffer), mBufferSize(0), mLoad(0), mLoadSize(0), mTotalBits(0), mMaxSize(max_size) - { - } - - ~LLBitPack() - { - } - - void resetBitPacking() - { - mLoad = 0; - mLoadSize = 0; - mTotalBits = 0; - mBufferSize = 0; - } - - U32 bitPack(U8 *total_data, U32 total_dsize) - { - U32 dsize; - U8 data; - - while (total_dsize > 0) - { - if (total_dsize > MAX_DATA_BITS) - { - dsize = MAX_DATA_BITS; - total_dsize -= MAX_DATA_BITS; - } - else - { - dsize = total_dsize; - total_dsize = 0; - } - - data = *total_data++; - - data <<= (MAX_DATA_BITS - dsize); - while (dsize > 0) - { - if (mLoadSize == MAX_DATA_BITS) - { - *(mBuffer + mBufferSize++) = mLoad; - if (mBufferSize > mMaxSize) - { - llerror("mBufferSize exceeding mMaxSize!", 0); - } - mLoadSize = 0; - mLoad = 0x00; - } - mLoad <<= 1; - mLoad |= (data >> (MAX_DATA_BITS - 1)); - data <<= 1; - mLoadSize++; - mTotalBits++; - dsize--; - } - } - return mBufferSize; - } - - U32 bitCopy(U8 *total_data, U32 total_dsize) - { - U32 dsize; - U8 data; - - while (total_dsize > 0) - { - if (total_dsize > MAX_DATA_BITS) - { - dsize = MAX_DATA_BITS; - total_dsize -= MAX_DATA_BITS; - } - else - { - dsize = total_dsize; - total_dsize = 0; - } - - data = *total_data++; - - while (dsize > 0) - { - if (mLoadSize == MAX_DATA_BITS) - { - *(mBuffer + mBufferSize++) = mLoad; - if (mBufferSize > mMaxSize) - { - llerror("mBufferSize exceeding mMaxSize!", 0); - } - mLoadSize = 0; - mLoad = 0x00; - } - mLoad <<= 1; - mLoad |= (data >> (MAX_DATA_BITS - 1)); - data <<= 1; - mLoadSize++; - mTotalBits++; - dsize--; - } - } - return mBufferSize; - } - - U32 bitUnpack(U8 *total_retval, U32 total_dsize) - { - U32 dsize; - U8 *retval; - - while (total_dsize > 0) - { - if (total_dsize > MAX_DATA_BITS) - { - dsize = MAX_DATA_BITS; - total_dsize -= MAX_DATA_BITS; - } - else - { - dsize = total_dsize; - total_dsize = 0; - } - - retval = total_retval++; - *retval = 0x00; - while (dsize > 0) - { - if (mLoadSize == 0) - { -#ifdef _DEBUG - if (mBufferSize > mMaxSize) - { - llerrs << "mBufferSize exceeding mMaxSize" << llendl; - llerrs << mBufferSize << " > " << mMaxSize << llendl; - } -#endif - mLoad = *(mBuffer + mBufferSize++); - mLoadSize = MAX_DATA_BITS; - } - *retval <<= 1; - *retval |= (mLoad >> (MAX_DATA_BITS - 1)); - mLoadSize--; - mLoad <<= 1; - dsize--; - } - } - return mBufferSize; - } - - U32 flushBitPack() - { - if (mLoadSize) - { - mLoad <<= (MAX_DATA_BITS - mLoadSize); - *(mBuffer + mBufferSize++) = mLoad; - if (mBufferSize > mMaxSize) - { - llerror("mBufferSize exceeding mMaxSize!", 0); - } - mLoadSize = 0; - } - return mBufferSize; - } - - U8 *mBuffer; - U32 mBufferSize; - U8 mLoad; - U32 mLoadSize; - U32 mTotalBits; - U32 mMaxSize; -}; - -#endif diff --git a/indra/llcommon/imageids.cpp b/indra/llcommon/imageids.cpp deleted file mode 100755 index 7d647e5c36..0000000000 --- a/indra/llcommon/imageids.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/** - * @file imageids.cpp - * - * $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 "linden_common.h" - -#include "imageids.h" - -#include "lluuid.h" - -// -// USE OF THIS FILE IS DEPRECATED -// -// Please use viewerart.ini and the standard -// art import path. // indicates if file is only - // on dataserver, or also - // pre-cached on viewer - -// Grass Images -const LLUUID IMG_SMOKE ("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"); // VIEWER - -const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER - -const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver -const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver -const LLUUID IMG_CLOUD_POOF ("fc4b9f0b-d008-45c6-96a4-01dd947ac621"); // dataserver -const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver -const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver -const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver -const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector -const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver -const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver - -const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver -const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver -const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver -const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver -const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver - -const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver -const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver - -const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER -const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER -const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER -const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER -const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER - -const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER - -const LLUUID IMG_CHECKERBOARD_RGBA ("2585a0f3-4163-6dd1-0f34-ad48cb909e25"); // dataserver - diff --git a/indra/llcommon/imageids.h b/indra/llcommon/imageids.h deleted file mode 100755 index 18c8ecb074..0000000000 --- a/indra/llcommon/imageids.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file imageids.h - * @brief Temporary holder for image IDs - * - * $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_IMAGEIDS_H -#define LL_IMAGEIDS_H - -// -// USE OF THIS FILE IS DEPRECATED -// -// Please use viewerart.ini and the standard -// art import path. - -class LLUUID; - -LL_COMMON_API extern const LLUUID IMG_SMOKE; - -LL_COMMON_API extern const LLUUID IMG_DEFAULT; - -LL_COMMON_API extern const LLUUID IMG_SUN; -LL_COMMON_API extern const LLUUID IMG_MOON; -LL_COMMON_API extern const LLUUID IMG_CLOUD_POOF; -LL_COMMON_API extern const LLUUID IMG_SHOT; -LL_COMMON_API extern const LLUUID IMG_SPARK; -LL_COMMON_API extern const LLUUID IMG_FIRE; -LL_COMMON_API extern const LLUUID IMG_FACE_SELECT; -LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR; -LL_COMMON_API extern const LLUUID IMG_INVISIBLE; - -LL_COMMON_API extern const LLUUID IMG_EXPLOSION; -LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2; -LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3; -LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4; -LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF; - -LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1; -LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2; - -LL_COMMON_API extern const LLUUID IMG_BLOOM1; -LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL; -LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL; -LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL; -LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL; - -LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; - -LL_COMMON_API extern const LLUUID IMG_CHECKERBOARD_RGBA; -#endif diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp index d32ae6c041..b61dca3243 100755 --- a/indra/llcommon/indra_constants.cpp +++ b/indra/llcommon/indra_constants.cpp @@ -35,6 +35,35 @@ const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb"); // Governor Linden's agent id. const LLUUID ALEXANDRIA_LINDEN_ID("ba2a564a-f0f1-4b82-9c61-b7520bfcd09f"); const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); -const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1"); // Maintenance's group id. const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd"); +// Grass Images +const LLUUID IMG_SMOKE ("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"); // VIEWER + +const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER + +const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver +const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver +const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver +const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver +const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver +const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector +const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver +const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver + +const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver +const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver +const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver +const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver +const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver + +const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver +const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver + +const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER +const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER +const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER +const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER +const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER + +const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER \ No newline at end of file diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 0da83720bd..02f063f5e8 100755 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -31,122 +31,28 @@ class LLUUID; -// At 45 Hz collisions seem stable and objects seem -// to settle down at a reasonable rate. -// JC 3/18/2003 - -// const F32 PHYSICS_TIMESTEP = 1.f / 45.f; -// This must be a #define due to anal retentive restrictions on const expressions -// CG 2008-06-05 -#define PHYSICS_TIMESTEP (1.f / 45.f) - -const F32 COLLISION_TOLERANCE = 0.1f; -const F32 HALF_COLLISION_TOLERANCE = 0.05f; - -// Time constants -const U32 HOURS_PER_LINDEN_DAY = 4; -const U32 DAYS_PER_LINDEN_YEAR = 11; - -const U32 SEC_PER_LINDEN_DAY = HOURS_PER_LINDEN_DAY * 60 * 60; -const U32 SEC_PER_LINDEN_YEAR = DAYS_PER_LINDEN_YEAR * SEC_PER_LINDEN_DAY; - static const F32 REGION_WIDTH_METERS = 256.f; static const S32 REGION_WIDTH_UNITS = 256; static const U32 REGION_WIDTH_U32 = 256; const F32 REGION_HEIGHT_METERS = 4096.f; -// Bits for simulator performance query flags -enum LAND_STAT_FLAGS -{ - STAT_FILTER_BY_PARCEL = 0x00000001, - STAT_FILTER_BY_OWNER = 0x00000002, - STAT_FILTER_BY_OBJECT = 0x00000004, - STAT_FILTER_BY_PARCEL_NAME = 0x00000008, - STAT_REQUEST_LAST_ENTRY = 0x80000000, -}; - -enum LAND_STAT_REPORT_TYPE -{ - STAT_REPORT_TOP_SCRIPTS = 0, - STAT_REPORT_TOP_COLLIDERS -}; - -const U32 STAT_FILTER_MASK = 0x1FFFFFFF; - -// Region absolute limits -static const S32 REGION_AGENT_COUNT_MIN = 1; -static const S32 REGION_AGENT_COUNT_MAX = 200; // Must fit in U8 for the moment (RegionInfo msg) -static const S32 REGION_PRIM_COUNT_MIN = 0; -static const S32 REGION_PRIM_COUNT_MAX = 40000; -static const F32 REGION_PRIM_BONUS_MIN = 1.0; -static const F32 REGION_PRIM_BONUS_MAX = 10.0; - -// Default maximum number of tasks/prims per region. -const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000; - -const F32 MIN_AGENT_DEPTH = 0.30f; const F32 DEFAULT_AGENT_DEPTH = 0.45f; -const F32 MAX_AGENT_DEPTH = 0.60f; - -const F32 MIN_AGENT_WIDTH = 0.40f; const F32 DEFAULT_AGENT_WIDTH = 0.60f; -const F32 MAX_AGENT_WIDTH = 0.80f; - -const F32 MIN_AGENT_HEIGHT = 1.1f; const F32 DEFAULT_AGENT_HEIGHT = 1.9f; -const F32 MAX_AGENT_HEIGHT = 2.45f; - -// For linked sets -const S32 MAX_CHILDREN_PER_TASK = 255; -const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; - -const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x - -const char* const DEFAULT_DMZ_SPACE_SERVER = "192.168.0.140"; -const char* const DEFAULT_DMZ_USER_SERVER = "192.168.0.140"; -const char* const DEFAULT_DMZ_DATA_SERVER = "192.168.0.140"; -const char* const DEFAULT_DMZ_ASSET_SERVER = "http://asset.dmz.lindenlab.com:80"; - -const char* const DEFAULT_AGNI_SPACE_SERVER = "63.211.139.100"; -const char* const DEFAULT_AGNI_USER_SERVER = "63.211.139.100"; -const char* const DEFAULT_AGNI_DATA_SERVER = "63.211.139.100"; -const char* const DEFAULT_AGNI_ASSET_SERVER = "http://asset.agni.lindenlab.com:80"; - -// Information about what ports are for what services is in the wiki Name Space Ports page -// https://wiki.lindenlab.com/wiki/Name_Space_Ports -const char* const DEFAULT_LOCAL_ASSET_SERVER = "http://localhost:12041/asset/tmp"; -const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset"; - -const U32 DEFAULT_LAUNCHER_PORT = 12029; -//const U32 DEFAULT_BIGBOARD_PORT = 12030; // Deprecated -//const U32 DEFAULT_QUERYSIM_PORT = 12031; // Deprecated -const U32 DEFAULT_DATA_SERVER_PORT = 12032; -const U32 DEFAULT_SPACE_SERVER_PORT = 12033; -const U32 DEFAULT_VIEWER_PORT = 12034; -const U32 DEFAULT_SIMULATOR_PORT = 12035; -const U32 DEFAULT_USER_SERVER_PORT = 12036; -const U32 DEFAULT_RPC_SERVER_PORT = 12037; -const U32 DEFAULT_LOG_DATA_SERVER_PORT = 12039; -const U32 DEFAULT_BACKBONE_PORT = 12040; -const U32 DEFAULT_LOCAL_ASSET_PORT = 12041; -//const U32 DEFAULT_BACKBONE_CAP_PORT = 12042; // Deprecated -const U32 DEFAULT_CAP_PROXY_PORT = 12043; -const U32 DEFAULT_INV_DATA_SERVER_PORT = 12044; -const U32 DEFAULT_CGI_SERVICES_PORT = 12045; - -// Mapserver uses ports 12124 - 12139 to allow multiple mapservers to run -// on a single host for map tile generation. JC -const U32 DEFAULT_MAPSERVER_PORT = 12124; - -// For automatic port discovery when running multiple viewers on one host -const U32 PORT_DISCOVERY_RANGE_MIN = 13000; -const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50; - -const char LAND_LAYER_CODE = 'L'; -const char WATER_LAYER_CODE = 'W'; -const char WIND_LAYER_CODE = '7'; -const char CLOUD_LAYER_CODE = '8'; + +enum ETerrainBrushType +{ + // the valid brush numbers cannot be reordered, because they + // are used in the binary LSL format as arguments to llModifyLand() + E_LANDBRUSH_LEVEL = 0, + E_LANDBRUSH_RAISE = 1, + E_LANDBRUSH_LOWER = 2, + E_LANDBRUSH_SMOOTH = 3, + E_LANDBRUSH_NOISE = 4, + E_LANDBRUSH_REVERT = 5, + E_LANDBRUSH_INVALID = 6 +}; // keys // Bit masks for various keyboard modifier keys. @@ -265,89 +171,43 @@ LL_COMMON_API extern const LLUUID LL_UUID_ALL_AGENTS; LL_COMMON_API extern const LLUUID ALEXANDRIA_LINDEN_ID; LL_COMMON_API extern const LLUUID GOVERNOR_LINDEN_ID; -LL_COMMON_API extern const LLUUID REALESTATE_LINDEN_ID; // Maintenance's group id. LL_COMMON_API extern const LLUUID MAINTENANCE_GROUP_ID; -// Flags for kick message -const U32 KICK_FLAGS_DEFAULT = 0x0; -const U32 KICK_FLAGS_FREEZE = 1 << 0; -const U32 KICK_FLAGS_UNFREEZE = 1 << 1; - -const U8 UPD_NONE = 0x00; -const U8 UPD_POSITION = 0x01; -const U8 UPD_ROTATION = 0x02; -const U8 UPD_SCALE = 0x04; -const U8 UPD_LINKED_SETS = 0x08; -const U8 UPD_UNIFORM = 0x10; // used with UPD_SCALE - -// Agent Update Flags (U8) -const U8 AU_FLAGS_NONE = 0x00; -const U8 AU_FLAGS_HIDETITLE = 0x01; -const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02; - -// start location constants -const U32 START_LOCATION_ID_LAST = 0; -const U32 START_LOCATION_ID_HOME = 1; -const U32 START_LOCATION_ID_DIRECT = 2; // for direct teleport -const U32 START_LOCATION_ID_PARCEL = 3; // for teleports to a parcel -const U32 START_LOCATION_ID_TELEHUB = 4; // for teleports to a spawnpoint -const U32 START_LOCATION_ID_URL = 5; -const U32 START_LOCATION_ID_COUNT = 6; - -// group constants -const U32 GROUP_MIN_SIZE = 2; - -// gMaxAgentGroups is now sent by login.cgi, which -// looks it up from globals.xml. -// -// For now we need an old default value however, -// so the viewer can be deployed ahead of login.cgi. -// -const S32 DEFAULT_MAX_AGENT_GROUPS = 25; +// image ids +LL_COMMON_API extern const LLUUID IMG_SMOKE; -// radius within which a chat message is fully audible -const F32 CHAT_WHISPER_RADIUS = 10.f; -const F32 CHAT_NORMAL_RADIUS = 20.f; -const F32 CHAT_SHOUT_RADIUS = 100.f; -const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS; -const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f; +LL_COMMON_API extern const LLUUID IMG_DEFAULT; -// squared editions of the above for distance checks -const F32 CHAT_WHISPER_RADIUS_SQUARED = CHAT_WHISPER_RADIUS * CHAT_WHISPER_RADIUS; -const F32 CHAT_NORMAL_RADIUS_SQUARED = CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS; -const F32 CHAT_SHOUT_RADIUS_SQUARED = CHAT_SHOUT_RADIUS * CHAT_SHOUT_RADIUS; -const F32 CHAT_MAX_RADIUS_SQUARED = CHAT_SHOUT_RADIUS_SQUARED; -const F32 CHAT_MAX_RADIUS_BY_TWO_SQUARED = CHAT_MAX_RADIUS_BY_TWO * CHAT_MAX_RADIUS_BY_TWO; +LL_COMMON_API extern const LLUUID IMG_SUN; +LL_COMMON_API extern const LLUUID IMG_MOON; +LL_COMMON_API extern const LLUUID IMG_SHOT; +LL_COMMON_API extern const LLUUID IMG_SPARK; +LL_COMMON_API extern const LLUUID IMG_FIRE; +LL_COMMON_API extern const LLUUID IMG_FACE_SELECT; +LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR; +LL_COMMON_API extern const LLUUID IMG_INVISIBLE; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_3; +LL_COMMON_API extern const LLUUID IMG_EXPLOSION_4; +LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF; -// this times above gives barely audible radius -const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f; +LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1; +LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2; -// distance in front of speaking agent the sphere is centered -const F32 CHAT_WHISPER_OFFSET = 5.f; -const F32 CHAT_NORMAL_OFFSET = 10.f; -const F32 CHAT_SHOUT_OFFSET = 50.f; +LL_COMMON_API extern const LLUUID IMG_BLOOM1; +LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL; +LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL; -// first clean starts at 3 AM -const S32 SANDBOX_FIRST_CLEAN_HOUR = 3; -// clean every hours -const S32 SANDBOX_CLEAN_FREQ = 12; +LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; -const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic -enum ETerrainBrushType -{ - // the valid brush numbers cannot be reordered, because they - // are used in the binary LSL format as arguments to llModifyLand() - E_LANDBRUSH_LEVEL = 0, - E_LANDBRUSH_RAISE = 1, - E_LANDBRUSH_LOWER = 2, - E_LANDBRUSH_SMOOTH = 3, - E_LANDBRUSH_NOISE = 4, - E_LANDBRUSH_REVERT = 5, - E_LANDBRUSH_INVALID = 6 -}; +// radius within which a chat message is fully audible +const F32 CHAT_NORMAL_RADIUS = 20.f; // media commands const U32 PARCEL_MEDIA_COMMAND_STOP = 0; @@ -365,51 +225,101 @@ const U32 PARCEL_MEDIA_COMMAND_SIZE = 11; const U32 PARCEL_MEDIA_COMMAND_DESC = 12; const U32 PARCEL_MEDIA_COMMAND_LOOP_SET = 13; -// map item types -const U32 MAP_ITEM_TELEHUB = 0x01; -const U32 MAP_ITEM_PG_EVENT = 0x02; -const U32 MAP_ITEM_MATURE_EVENT = 0x03; -//const U32 MAP_ITEM_POPULAR = 0x04; // No longer supported, 2009-03-02 KLW -//const U32 MAP_ITEM_AGENT_COUNT = 0x05; -const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06; -const U32 MAP_ITEM_LAND_FOR_SALE = 0x07; -const U32 MAP_ITEM_CLASSIFIED = 0x08; -const U32 MAP_ITEM_ADULT_EVENT = 0x09; -const U32 MAP_ITEM_LAND_FOR_SALE_ADULT = 0x0a; - -// Region map layer numbers -const S32 MAP_SIM_OBJECTS = 0; -const S32 MAP_SIM_TERRAIN = 1; -const S32 MAP_SIM_LAND_FOR_SALE = 2; // Transparent alpha overlay of land for sale -const S32 MAP_SIM_IMAGE_TYPES = 3; // Number of map layers -const S32 MAP_SIM_INFO_MASK = 0x00FFFFFF; // Agent access may be stuffed into upper byte -const S32 MAP_SIM_LAYER_MASK = 0x0000FFFF; // Layer info is in lower 16 bits -const S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000; -const S32 MAP_SIM_PRELUDE = 0x00020000; - -// Crash reporter behavior -const S32 CRASH_BEHAVIOR_ASK = 0; -const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; -const S32 CRASH_BEHAVIOR_NEVER_SEND = 2; - -// Export/Import return values -const S32 EXPORT_SUCCESS = 0; -const S32 EXPORT_ERROR_PERMISSIONS = -1; -const S32 EXPORT_ERROR_UNKNOWN = -2; - -// This is how long the sim will try to teleport you before giving up. -const F32 TELEPORT_EXPIRY = 15.0f; -// Additional time (in seconds) to wait per attachment -const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f; - -// The maximum size of an object extra parameters binary (packed) block -#define MAX_OBJECT_PARAMS_SIZE 1024 - const S32 CHAT_CHANNEL_DEBUG = S32_MAX; -// PLEASE don't add constants here. Every dev will have to do -// a complete rebuild. Try to find another shared header file, -// like llregionflags.h, lllslconstants.h, llagentconstants.h, -// or create a new one. JC +// agent constants +const U32 CONTROL_AT_POS_INDEX = 0; +const U32 CONTROL_AT_NEG_INDEX = 1; +const U32 CONTROL_LEFT_POS_INDEX = 2; +const U32 CONTROL_LEFT_NEG_INDEX = 3; +const U32 CONTROL_UP_POS_INDEX = 4; +const U32 CONTROL_UP_NEG_INDEX = 5; +const U32 CONTROL_PITCH_POS_INDEX = 6; +const U32 CONTROL_PITCH_NEG_INDEX = 7; +const U32 CONTROL_YAW_POS_INDEX = 8; +const U32 CONTROL_YAW_NEG_INDEX = 9; +const U32 CONTROL_FAST_AT_INDEX = 10; +const U32 CONTROL_FAST_LEFT_INDEX = 11; +const U32 CONTROL_FAST_UP_INDEX = 12; +const U32 CONTROL_FLY_INDEX = 13; +const U32 CONTROL_STOP_INDEX = 14; +const U32 CONTROL_FINISH_ANIM_INDEX = 15; +const U32 CONTROL_STAND_UP_INDEX = 16; +const U32 CONTROL_SIT_ON_GROUND_INDEX = 17; +const U32 CONTROL_MOUSELOOK_INDEX = 18; +const U32 CONTROL_NUDGE_AT_POS_INDEX = 19; +const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20; +const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21; +const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22; +const U32 CONTROL_NUDGE_UP_POS_INDEX = 23; +const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24; +const U32 CONTROL_TURN_LEFT_INDEX = 25; +const U32 CONTROL_TURN_RIGHT_INDEX = 26; +const U32 CONTROL_AWAY_INDEX = 27; +const U32 CONTROL_LBUTTON_DOWN_INDEX = 28; +const U32 CONTROL_LBUTTON_UP_INDEX = 29; +const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30; +const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31; +const U32 TOTAL_CONTROLS = 32; + +const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; // 0x00000001 +const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; // 0x00000002 +const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; // 0x00000004 +const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; // 0x00000008 +const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; // 0x00000010 +const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; // 0x00000020 +const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; // 0x00000040 +const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; // 0x00000080 +const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; // 0x00000100 +const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; // 0x00000200 + +const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; // 0x00000400 +const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; // 0x00000800 +const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; // 0x00001000 + +const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; // 0x00002000 +const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; // 0x00004000 +const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; // 0x00008000 +const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; // 0x00010000 +const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; // 0x00020000 +const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; // 0x00040000 + +const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; // 0x00080000 +const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; // 0x00100000 +const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; // 0x00200000 +const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; // 0x00400000 +const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; // 0x00800000 +const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; // 0x01000000 +const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; // 0x02000000 +const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; // 0x04000000 + +const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; // 0x08000000 + +const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; // 0x10000000 +const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; // 0x20000000 +const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; // 0x40000000 +const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; // 0x80000000 + +// move these up so that we can hide them in "State" for object updates +// (for now) +const U32 AGENT_ATTACH_OFFSET = 4; +const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET; + +// RN: this method swaps the upper and lower nibbles to maintain backward +// compatibility with old objects that only used the upper nibble +#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4))) + +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! +const U8 CLICK_ACTION_NONE = 0; +const U8 CLICK_ACTION_TOUCH = 0; +const U8 CLICK_ACTION_SIT = 1; +const U8 CLICK_ACTION_BUY = 2; +const U8 CLICK_ACTION_PAY = 3; +const U8 CLICK_ACTION_OPEN = 4; +const U8 CLICK_ACTION_PLAY = 5; +const U8 CLICK_ACTION_OPEN_MEDIA = 6; +const U8 CLICK_ACTION_ZOOM = 7; +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! + #endif diff --git a/indra/llcommon/linked_lists.h b/indra/llcommon/linked_lists.h deleted file mode 100755 index 6b25295b7b..0000000000 --- a/indra/llcommon/linked_lists.h +++ /dev/null @@ -1,937 +0,0 @@ -/** - * @file linked_lists.h - * @brief LLLinkedList class header amd implementation file. - * - * $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_LINKED_LISTS_H -#define LL_LINKED_LISTS_H - -/** - * Provides a standard doubly linked list for fun and profit - * Utilizes a neat trick off of Flipcode where the back pointer is a - * pointer to a pointer, allowing easier transfer of nodes between lists, &c - * And a template class, of course - */ - -#include "llerror.h" - - -template class LLLinkedList -{ -public: - friend class LLLinkNode; - // External interface - - // basic constructor - LLLinkedList() : mHead(NULL), mCurrentp(NULL), mInsertBefore(NULL) - { - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - mCount = 0; - } - - // basic constructor - LLLinkedList(BOOL (*insert_before)(DATA_TYPE *data_new, DATA_TYPE *data_tested)) : mHead(NULL), mCurrentp(NULL), mInsertBefore(insert_before) - { - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - mCount = 0; - } - - // destructor destroys list and nodes, but not data in nodes - ~LLLinkedList() - { - removeAllNodes(); - } - - // set mInsertBefore - void setInsertBefore(BOOL (*insert_before)(DATA_TYPE *data_new, DATA_TYPE *data_tested)) - { - mInsertBefore = insert_before; - } - - // - // WARNING!!!!!!! - // addData and addDataSorted are NOT O(1) operations, but O(n) because they check - // for existence of the data in the linked list first. Why, I don't know - djs - // If you don't care about dupes, use addDataNoCheck - // - - // put data into a node and stick it at the front of the list - inline BOOL addData(DATA_TYPE *data); - - // put data into a node and sort into list by mInsertBefore() - // calls normal add if mInsertBefore isn't set - inline BOOL addDataSorted(DATA_TYPE *data); - - inline BOOL addDataNoCheck(DATA_TYPE *data); - - // bubbleSortList - // does an improved bubble sort of the list . . . works best with almost sorted data - // does nothing if mInsertBefore isn't set - // Nota Bene: Swaps are accomplished by swapping data pointers - inline void bubbleSortList(); - - // put data into a node and stick it at the end of the list - inline BOOL addDataAtEnd(DATA_TYPE *data); - - // returns number of items in the list - inline S32 getLength() const; - - inline BOOL isEmpty(); - - // search the list starting at mHead.mNextp and remove the link with mDatap == data - // leave mCurrentp and mCurrentOperatingp on the next entry - // return TRUE if found, FALSE if not found - inline BOOL removeData(DATA_TYPE *data); - - // search the list starting at mHead.mNextp and delete the link with mDatap == data - // leave mCurrentp and mCurrentOperatingp on the next entry - // return TRUE if found, FALSE if not found - inline BOOL deleteData(DATA_TYPE *data); - - // remove all nodes from the list and delete the associated data - inline void deleteAllData(); - - // remove all nodes from the list but do not delete data - inline void removeAllNodes(); - - // check to see if data is in list - // if TRUE then mCurrentp and mCurrentOperatingp point to data - inline BOOL checkData(DATA_TYPE *data); - - // place mCurrentp on first node - inline void resetList(); - - // return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp - inline DATA_TYPE *getCurrentData(); - - // same as getCurrentData() but a more intuitive name for the operation - inline DATA_TYPE *getNextData(); - - // reset the list and return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp - inline DATA_TYPE *getFirstData(); - - // reset the list and return the data at position n, set mCurentOperatingp to that node and bump mCurrentp - // Note: n is zero-based - inline DATA_TYPE *getNthData( U32 n); - - // reset the list and return the last data in it, set mCurentOperatingp to that node and bump mCurrentp - inline DATA_TYPE *getLastData(); - - // remove the Node at mCurentOperatingp - // leave mCurrentp and mCurentOperatingp on the next entry - inline void removeCurrentData(); - - // remove the Node at mCurentOperatingp and add it to newlist - // leave mCurrentp and mCurentOperatingp on the next entry - void moveCurrentData(LLLinkedList *newlist, BOOL b_sort); - - BOOL moveData(DATA_TYPE *data, LLLinkedList *newlist, BOOL b_sort); - - // delete the Node at mCurentOperatingp - // leave mCurrentp anf mCurentOperatingp on the next entry - void deleteCurrentData(); - -private: - // node that actually contains the data - class LLLinkNode - { - public: - // assign the mDatap pointer - LLLinkNode(DATA_TYPE *data) : mDatap(data), mNextp(NULL), mPrevpp(NULL) - { - } - - // destructor does not, by default, destroy associated data - // however, the mDatap must be NULL to ensure that we aren't causing memory leaks - ~LLLinkNode() - { - if (mDatap) - { - llerror("Attempting to call LLLinkNode destructor with a non-null mDatap!", 1); - } - } - - // delete associated data and NULL out pointer - void deleteData() - { - delete mDatap; - mDatap = NULL; - } - - // NULL out pointer - void removeData() - { - mDatap = NULL; - } - - DATA_TYPE *mDatap; - LLLinkNode *mNextp; - LLLinkNode **mPrevpp; - }; - - // add a node at the front of the list - void addData(LLLinkNode *node) - { - // don't allow NULL to be passed to addData - if (!node) - { - llerror("NULL pointer passed to LLLinkedList::addData", 0); - } - - // add the node to the front of the list - node->mPrevpp = &mHead.mNextp; - node->mNextp = mHead.mNextp; - - // if there's something in the list, fix its back pointer - if (node->mNextp) - { - node->mNextp->mPrevpp = &node->mNextp; - } - - mHead.mNextp = node; - } - - LLLinkNode mHead; // fake head node. . . makes pointer operations faster and easier - LLLinkNode *mCurrentp; // mCurrentp is the Node that getCurrentData returns - LLLinkNode *mCurrentOperatingp; // this is the node that the various mumbleCurrentData functions act on - BOOL (*mInsertBefore)(DATA_TYPE *data_new, DATA_TYPE *data_tested); // user function set to allow sorted lists - U32 mCount; -}; - -template -BOOL LLLinkedList::addData(DATA_TYPE *data) -{ - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::addData", 0); - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - if ( checkData(data)) - { - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return FALSE; - } - - // make the new node - LLLinkNode *temp = new LLLinkNode(data); - - // add the node to the front of the list - temp->mPrevpp = &mHead.mNextp; - temp->mNextp = mHead.mNextp; - - // if there's something in the list, fix its back pointer - if (temp->mNextp) - { - temp->mNextp->mPrevpp = &temp->mNextp; - } - - mHead.mNextp = temp; - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - mCount++; - return TRUE; -} - - -template -BOOL LLLinkedList::addDataNoCheck(DATA_TYPE *data) -{ - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::addData", 0); - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - // make the new node - LLLinkNode *temp = new LLLinkNode(data); - - // add the node to the front of the list - temp->mPrevpp = &mHead.mNextp; - temp->mNextp = mHead.mNextp; - - // if there's something in the list, fix its back pointer - if (temp->mNextp) - { - temp->mNextp->mPrevpp = &temp->mNextp; - } - - mHead.mNextp = temp; - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - mCount++; - return TRUE; -} - - -template -BOOL LLLinkedList::addDataSorted(DATA_TYPE *data) -{ - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::addDataSorted", 0); - } - - if (checkData(data)) - { - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return FALSE; - } - - // mInsertBefore not set? - if (!mInsertBefore) - { - addData(data); - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return FALSE; - } - - // empty list? - if (!mHead.mNextp) - { - addData(data); - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return TRUE; - } - - // make the new node - LLLinkNode *temp = new LLLinkNode(data); - - // walk the list until mInsertBefore returns true - mCurrentp = mHead.mNextp; - while (mCurrentp->mNextp) - { - if (mInsertBefore(data, mCurrentp->mDatap)) - { - // insert before the current one - temp->mPrevpp = mCurrentp->mPrevpp; - temp->mNextp = mCurrentp; - *(temp->mPrevpp) = temp; - mCurrentp->mPrevpp = &temp->mNextp; - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - mCount++; - return TRUE; - } - else - { - mCurrentp = mCurrentp->mNextp; - } - } - - // on the last element, add before? - if (mInsertBefore(data, mCurrentp->mDatap)) - { - // insert before the current one - temp->mPrevpp = mCurrentp->mPrevpp; - temp->mNextp = mCurrentp; - *(temp->mPrevpp) = temp; - mCurrentp->mPrevpp = &temp->mNextp; - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - } - else // insert after - { - temp->mPrevpp = &mCurrentp->mNextp; - temp->mNextp = NULL; - mCurrentp->mNextp = temp; - - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - } - mCount++; - return TRUE; -} - -template -void LLLinkedList::bubbleSortList() -{ - // mInsertBefore not set - if (!mInsertBefore) - { - return; - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - BOOL b_swapped = FALSE; - DATA_TYPE *temp; - - // Nota Bene: This will break if more than 0x7FFFFFFF members in list! - S32 length = 0x7FFFFFFF; - S32 count = 0; - do - { - b_swapped = FALSE; - mCurrentp = mHead.mNextp; - count = 0; - while ( (count + 1 < length) - &&(mCurrentp)) - { - if (mCurrentp->mNextp) - { - if (!mInsertBefore(mCurrentp->mDatap, mCurrentp->mNextp->mDatap)) - { - // swap data pointers! - temp = mCurrentp->mDatap; - mCurrentp->mDatap = mCurrentp->mNextp->mDatap; - mCurrentp->mNextp->mDatap = temp; - b_swapped = TRUE; - } - } - else - { - break; - } - count++; - mCurrentp = mCurrentp->mNextp; - } - length = count; - } while (b_swapped); - - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; -} - - -template -BOOL LLLinkedList::addDataAtEnd(DATA_TYPE *data) -{ - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::addData", 0); - } - - if (checkData(data)) - { - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return FALSE; - } - - // make the new node - LLLinkNode *temp = new LLLinkNode(data); - - // add the node to the end of the list - - // if empty, add to the front and be done with it - if (!mHead.mNextp) - { - temp->mPrevpp = &mHead.mNextp; - temp->mNextp = NULL; - mHead.mNextp = temp; - } - else - { - // otherwise, walk to the end of the list - mCurrentp = mHead.mNextp; - while (mCurrentp->mNextp) - { - mCurrentp = mCurrentp->mNextp; - } - temp->mPrevpp = &mCurrentp->mNextp; - temp->mNextp = NULL; - mCurrentp->mNextp = temp; - } - - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - mCount++; - return TRUE; -} - - -// returns number of items in the list -template -S32 LLLinkedList::getLength() const -{ -// S32 length = 0; -// for (LLLinkNode* temp = mHead.mNextp; temp != NULL; temp = temp->mNextp) -// { -// length++; -// } - return mCount; -} - - -template -BOOL LLLinkedList::isEmpty() -{ - return (mCount == 0); -} - - -// search the list starting at mHead.mNextp and remove the link with mDatap == data -// leave mCurrentp and mCurrentOperatingp on the next entry -// return TRUE if found, FALSE if not found -template -BOOL LLLinkedList::removeData(DATA_TYPE *data) -{ - BOOL b_found = FALSE; - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::removeData", 0); - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - - while (mCurrentOperatingp) - { - if (mCurrentOperatingp->mDatap == data) - { - b_found = TRUE; - - // remove the node - - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // remove the LLLinkNode - - // if we were on the one we want to delete, bump the cached copies - if (mCurrentOperatingp == tcurrop) - { - tcurrop = tcurr = mCurrentOperatingp->mNextp; - } - else if (mCurrentOperatingp == tcurr) - { - tcurrop = tcurr = mCurrentOperatingp->mNextp; - } - - mCurrentp = mCurrentOperatingp->mNextp; - - mCurrentOperatingp->removeData(); - delete mCurrentOperatingp; - mCurrentOperatingp = mCurrentp; - mCount--; - break; - } - mCurrentOperatingp = mCurrentOperatingp->mNextp; - } - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return b_found; -} - -// search the list starting at mHead.mNextp and delete the link with mDatap == data -// leave mCurrentp and mCurrentOperatingp on the next entry -// return TRUE if found, FALSE if not found -template -BOOL LLLinkedList::deleteData(DATA_TYPE *data) -{ - BOOL b_found = FALSE; - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::removeData", 0); - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - - while (mCurrentOperatingp) - { - if (mCurrentOperatingp->mDatap == data) - { - b_found = TRUE; - - // remove the node - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // delete the LLLinkNode - // if we were on the one we want to delete, bump the cached copies - if (mCurrentOperatingp == tcurrop) - { - tcurrop = tcurr = mCurrentOperatingp->mNextp; - } - - // and delete the associated data - llassert(mCurrentOperatingp); - mCurrentp = mCurrentOperatingp->mNextp; - mCurrentOperatingp->deleteData(); - delete mCurrentOperatingp; - mCurrentOperatingp = mCurrentp; - mCount--; - break; - } - mCurrentOperatingp = mCurrentOperatingp->mNextp; - } - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return b_found; -} - - // remove all nodes from the list and delete the associated data -template -void LLLinkedList::deleteAllData() -{ - LLLinkNode *temp; - // reset mCurrentp - mCurrentp = mHead.mNextp; - - while (mCurrentp) - { - temp = mCurrentp->mNextp; - mCurrentp->deleteData(); - delete mCurrentp; - mCurrentp = temp; - } - - // reset mHead and mCurrentp - mHead.mNextp = NULL; - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - mCount = 0; -} - -// remove all nodes from the list but do not delete data -template -void LLLinkedList::removeAllNodes() -{ - LLLinkNode *temp; - // reset mCurrentp - mCurrentp = mHead.mNextp; - - while (mCurrentp) - { - temp = mCurrentp->mNextp; - mCurrentp->removeData(); - delete mCurrentp; - mCurrentp = temp; - } - - // reset mHead and mCurrentp - mHead.mNextp = NULL; - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - mCount = 0; -} - -// check to see if data is in list -// if TRUE then mCurrentp and mCurrentOperatingp point to data -template -BOOL LLLinkedList::checkData(DATA_TYPE *data) -{ - // reset mCurrentp - mCurrentp = mHead.mNextp; - - while (mCurrentp) - { - if (mCurrentp->mDatap == data) - { - mCurrentOperatingp = mCurrentp; - return TRUE; - } - mCurrentp = mCurrentp->mNextp; - } - mCurrentOperatingp = mCurrentp; - return FALSE; -} - -// place mCurrentp on first node -template -void LLLinkedList::resetList() -{ - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; -} - -// return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp -template -DATA_TYPE *LLLinkedList::getCurrentData() -{ - if (mCurrentp) - { - mCurrentOperatingp = mCurrentp; - mCurrentp = mCurrentp->mNextp; - return mCurrentOperatingp->mDatap; - } - else - { - return NULL; - } -} - -// same as getCurrentData() but a more intuitive name for the operation -template -DATA_TYPE *LLLinkedList::getNextData() -{ - if (mCurrentp) - { - mCurrentOperatingp = mCurrentp; - mCurrentp = mCurrentp->mNextp; - return mCurrentOperatingp->mDatap; - } - else - { - return NULL; - } -} - -// reset the list and return the data currently pointed to, set mCurentOperatingp to that node and bump mCurrentp -template -DATA_TYPE *LLLinkedList::getFirstData() -{ - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - if (mCurrentp) - { - mCurrentOperatingp = mCurrentp; - mCurrentp = mCurrentp->mNextp; - return mCurrentOperatingp->mDatap; - } - else - { - return NULL; - } -} - -// Note: n is zero-based -template -DATA_TYPE *LLLinkedList::getNthData( U32 n ) -{ - mCurrentOperatingp = mHead.mNextp; - - // if empty, return NULL - if (!mCurrentOperatingp) - { - return NULL; - } - - for( U32 i = 0; i < n; i++ ) - { - mCurrentOperatingp = mCurrentOperatingp->mNextp; - if( !mCurrentOperatingp ) - { - return NULL; - } - } - - mCurrentp = mCurrentOperatingp->mNextp; - return mCurrentOperatingp->mDatap; -} - - -// reset the list and return the last data in it, set mCurentOperatingp to that node and bump mCurrentp -template -DATA_TYPE *LLLinkedList::getLastData() -{ - mCurrentOperatingp = mHead.mNextp; - - // if empty, return NULL - if (!mCurrentOperatingp) - return NULL; - - // walk until we're pointing at the last entry - while (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp = mCurrentOperatingp->mNextp; - } - mCurrentp = mCurrentOperatingp->mNextp; - return mCurrentOperatingp->mDatap; -} - -// remove the Node at mCurentOperatingp -// leave mCurrentp and mCurentOperatingp on the next entry -// return TRUE if found, FALSE if not found -template -void LLLinkedList::removeCurrentData() -{ - if (mCurrentOperatingp) - { - // remove the node - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // remove the LLLinkNode - mCurrentp = mCurrentOperatingp->mNextp; - - mCurrentOperatingp->removeData(); - delete mCurrentOperatingp; - mCount--; - mCurrentOperatingp = mCurrentp; - } -} - -// remove the Node at mCurentOperatingp and add it to newlist -// leave mCurrentp and mCurentOperatingp on the next entry -// return TRUE if found, FALSE if not found -template -void LLLinkedList::moveCurrentData(LLLinkedList *newlist, BOOL b_sort) -{ - if (mCurrentOperatingp) - { - // remove the node - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // remove the LLLinkNode - mCurrentp = mCurrentOperatingp->mNextp; - // move the node to the new list - newlist->addData(mCurrentOperatingp); - if (b_sort) - bubbleSortList(); - mCurrentOperatingp = mCurrentp; - } -} - -template -BOOL LLLinkedList::moveData(DATA_TYPE *data, LLLinkedList *newlist, BOOL b_sort) -{ - BOOL b_found = FALSE; - // don't allow NULL to be passed to addData - if (!data) - { - llerror("NULL pointer passed to LLLinkedList::removeData", 0); - } - - LLLinkNode *tcurr = mCurrentp; - LLLinkNode *tcurrop = mCurrentOperatingp; - - mCurrentp = mHead.mNextp; - mCurrentOperatingp = mHead.mNextp; - - while (mCurrentOperatingp) - { - if (mCurrentOperatingp->mDatap == data) - { - b_found = TRUE; - - // remove the node - - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // if we were on the one we want to delete, bump the cached copies - if ( (mCurrentOperatingp == tcurrop) - ||(mCurrentOperatingp == tcurr)) - { - tcurrop = tcurr = mCurrentOperatingp->mNextp; - } - - // remove the LLLinkNode - mCurrentp = mCurrentOperatingp->mNextp; - // move the node to the new list - newlist->addData(mCurrentOperatingp); - if (b_sort) - newlist->bubbleSortList(); - mCurrentOperatingp = mCurrentp; - break; - } - mCurrentOperatingp = mCurrentOperatingp->mNextp; - } - // restore - mCurrentp = tcurr; - mCurrentOperatingp = tcurrop; - return b_found; -} - -// delete the Node at mCurentOperatingp -// leave mCurrentp anf mCurentOperatingp on the next entry -// return TRUE if found, FALSE if not found -template -void LLLinkedList::deleteCurrentData() -{ - if (mCurrentOperatingp) - { - // remove the node - // if there is a next one, fix it - if (mCurrentOperatingp->mNextp) - { - mCurrentOperatingp->mNextp->mPrevpp = mCurrentOperatingp->mPrevpp; - } - *(mCurrentOperatingp->mPrevpp) = mCurrentOperatingp->mNextp; - - // remove the LLLinkNode - mCurrentp = mCurrentOperatingp->mNextp; - - mCurrentOperatingp->deleteData(); - if (mCurrentOperatingp->mDatap) - llerror("This is impossible!", 0); - delete mCurrentOperatingp; - mCurrentOperatingp = mCurrentp; - mCount--; - } -} - -#endif diff --git a/indra/llcommon/ll_template_cast.h b/indra/llcommon/ll_template_cast.h deleted file mode 100755 index c8f9a2f7eb..0000000000 --- a/indra/llcommon/ll_template_cast.h +++ /dev/null @@ -1,177 +0,0 @@ -/** - * @file ll_template_cast.h - * @author Nat Goodspeed - * @date 2009-11-21 - * @brief Define ll_template_cast function - * - * $LicenseInfo:firstyear=2009&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$ - */ - -#if ! defined(LL_LL_TEMPLATE_CAST_H) -#define LL_LL_TEMPLATE_CAST_H - -/** - * Implementation for ll_template_cast() (q.v.). - * - * Default implementation: trying to cast two completely unrelated types - * returns 0. Typically you'd specify T and U as pointer types, but in fact T - * can be any type that can be initialized with 0. - */ -template -struct ll_template_cast_impl -{ - T operator()(U) - { - return 0; - } -}; - -/** - * ll_template_cast(some_value) is for use in a template function when - * some_value might be of arbitrary type, but you want to recognize type T - * specially. - * - * It's designed for use with pointer types. Example: - * @code - * struct SpecialClass - * { - * void someMethod(const std::string&) const; - * }; - * - * template - * void somefunc(const REALCLASS& instance) - * { - * const SpecialClass* ptr = ll_template_cast(&instance); - * if (ptr) - * { - * ptr->someMethod("Call method only available on SpecialClass"); - * } - * } - * @endcode - * - * Why is this better than dynamic_cast<>? Because unless OtherClass is - * polymorphic, the following won't even compile (gcc 4.0.1): - * @code - * OtherClass other; - * SpecialClass* ptr = dynamic_cast(&other); - * @endcode - * to say nothing of this: - * @code - * void function(int); - * SpecialClass* ptr = dynamic_cast(&function); - * @endcode - * ll_template_cast handles these kinds of cases by returning 0. - */ -template -T ll_template_cast(U value) -{ - return ll_template_cast_impl()(value); -} - -/** - * Implementation for ll_template_cast() (q.v.). - * - * Implementation for identical types: return same value. - */ -template -struct ll_template_cast_impl -{ - T operator()(T value) - { - return value; - } -}; - -/** - * LL_TEMPLATE_CONVERTIBLE(dest, source) asserts that, for a value @c s of - * type @c source, ll_template_cast(s) will return @c s -- - * presuming that @c source can be converted to @c dest by the normal rules of - * C++. - * - * By default, ll_template_cast(s) will return 0 unless @c s's - * type is literally identical to @c dest. (This is because of the - * straightforward application of template specialization rules.) That can - * lead to surprising results, e.g.: - * - * @code - * Foo myFoo; - * const Foo* fooptr = ll_template_cast(&myFoo); - * @endcode - * - * Here @c fooptr will be 0 because &myFoo is of type Foo* - * -- @em not const Foo*. (Declaring const Foo myFoo; would - * force the compiler to do the right thing.) - * - * More disappointingly: - * @code - * struct Base {}; - * struct Subclass: public Base {}; - * Subclass object; - * Base* ptr = ll_template_cast(&object); - * @endcode - * - * Here @c ptr will be 0 because &object is of type - * Subclass* rather than Base*. We @em want this cast to - * succeed, but without our help ll_template_cast can't recognize it. - * - * The following would suffice: - * @code - * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*); - * ... - * Base* ptr = ll_template_cast(&object); - * @endcode - * - * However, as noted earlier, this is easily fooled: - * @code - * const Base* ptr = ll_template_cast(&object); - * @endcode - * would still produce 0 because we haven't yet seen: - * @code - * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*); - * @endcode - * - * @TODO - * This macro should use Boost type_traits facilities for stripping and - * re-adding @c const and @c volatile qualifiers so that invoking - * LL_TEMPLATE_CONVERTIBLE(dest, source) will automatically generate all - * permitted permutations. It's really not fair to the coder to require - * separate: - * @code - * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*); - * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*); - * LL_TEMPLATE_CONVERTIBLE(const Base*, const Subclass*); - * @endcode - * - * (Naturally we omit LL_TEMPLATE_CONVERTIBLE(Base*, const Subclass*) - * because that's not permitted by normal C++ assignment anyway.) - */ -#define LL_TEMPLATE_CONVERTIBLE(DEST, SOURCE) \ -template <> \ -struct ll_template_cast_impl \ -{ \ - DEST operator()(SOURCE wrapper) \ - { \ - return wrapper; \ - } \ -} - -#endif /* ! defined(LL_LL_TEMPLATE_CAST_H) */ diff --git a/indra/llcommon/llaccountingcost.h b/indra/llcommon/llaccountingcost.h deleted file mode 100755 index 0ef3b50c6d..0000000000 --- a/indra/llcommon/llaccountingcost.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file llaccountingcost.h - * @ - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, 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_ACCOUNTINGQUOTA_H -#define LL_ACCOUNTINGQUOTA_H - -struct ParcelQuota -{ - ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost, - F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost, - F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost, - F32 tempRenderCost, F32 tempPhysicsCost, F32 tempNetworkCost, F32 tempSimulationCost, - F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost, - F32 parcelCapacity ) - : mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost ) - , mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost ) - , mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost ) - , mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost ) - , mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost ) - , mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost ) - , mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost ) - , mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost ) - , mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost ) - , mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost ) - , mParcelCapacity( parcelCapacity ) - { - } - - ParcelQuota(){} - F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost; - F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost; - F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost; - F32 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost; - F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost; - F32 mParcelCapacity; -}; - -//SelectionQuota atm does not require a id -struct SelectionCost -{ - SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost ) - //: mTransactionId( transactionId) - : mPhysicsCost( physicsCost ) - , mNetworkCost( networkCost ) - , mSimulationCost( simulationCost ) - { - } - SelectionCost() - : mPhysicsCost( 0.0f ) - , mNetworkCost( 0.0f ) - , mSimulationCost( 0.0f ) - {} - - F32 mPhysicsCost, mNetworkCost, mSimulationCost; - //LLTransactionID mTransactionId; -}; - -typedef enum { Roots = 0 , Prims } eSelectionType; - -#endif - - - diff --git a/indra/llcommon/llagentconstants.h b/indra/llcommon/llagentconstants.h deleted file mode 100755 index cd237da4eb..0000000000 --- a/indra/llcommon/llagentconstants.h +++ /dev/null @@ -1,159 +0,0 @@ -/** - * @file llagentconstants.h - * @author James Cook, Andrew Meadows, Richard Nelson - * @brief Shared constants through the system for agents. - * - * $LicenseInfo:firstyear=2006&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_LLAGENTCONSTANTS_H -#define LL_LLAGENTCONSTANTS_H - -const U32 CONTROL_AT_POS_INDEX = 0; -const U32 CONTROL_AT_NEG_INDEX = 1; -const U32 CONTROL_LEFT_POS_INDEX = 2; -const U32 CONTROL_LEFT_NEG_INDEX = 3; -const U32 CONTROL_UP_POS_INDEX = 4; -const U32 CONTROL_UP_NEG_INDEX = 5; -const U32 CONTROL_PITCH_POS_INDEX = 6; -const U32 CONTROL_PITCH_NEG_INDEX = 7; -const U32 CONTROL_YAW_POS_INDEX = 8; -const U32 CONTROL_YAW_NEG_INDEX = 9; -const U32 CONTROL_FAST_AT_INDEX = 10; -const U32 CONTROL_FAST_LEFT_INDEX = 11; -const U32 CONTROL_FAST_UP_INDEX = 12; -const U32 CONTROL_FLY_INDEX = 13; -const U32 CONTROL_STOP_INDEX = 14; -const U32 CONTROL_FINISH_ANIM_INDEX = 15; -const U32 CONTROL_STAND_UP_INDEX = 16; -const U32 CONTROL_SIT_ON_GROUND_INDEX = 17; -const U32 CONTROL_MOUSELOOK_INDEX = 18; -const U32 CONTROL_NUDGE_AT_POS_INDEX = 19; -const U32 CONTROL_NUDGE_AT_NEG_INDEX = 20; -const U32 CONTROL_NUDGE_LEFT_POS_INDEX = 21; -const U32 CONTROL_NUDGE_LEFT_NEG_INDEX = 22; -const U32 CONTROL_NUDGE_UP_POS_INDEX = 23; -const U32 CONTROL_NUDGE_UP_NEG_INDEX = 24; -const U32 CONTROL_TURN_LEFT_INDEX = 25; -const U32 CONTROL_TURN_RIGHT_INDEX = 26; -const U32 CONTROL_AWAY_INDEX = 27; -const U32 CONTROL_LBUTTON_DOWN_INDEX = 28; -const U32 CONTROL_LBUTTON_UP_INDEX = 29; -const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30; -const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31; -const U32 TOTAL_CONTROLS = 32; - -const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; // 0x00000001 -const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; // 0x00000002 -const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; // 0x00000004 -const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; // 0x00000008 -const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; // 0x00000010 -const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; // 0x00000020 -const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; // 0x00000040 -const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; // 0x00000080 -const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; // 0x00000100 -const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; // 0x00000200 - -const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; // 0x00000400 -const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; // 0x00000800 -const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; // 0x00001000 - -const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; // 0x00002000 -const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; // 0x00004000 -const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; // 0x00008000 -const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; // 0x00010000 -const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; // 0x00020000 -const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; // 0x00040000 - -const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; // 0x00080000 -const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; // 0x00100000 -const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; // 0x00200000 -const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; // 0x00400000 -const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; // 0x00800000 -const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; // 0x01000000 -const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; // 0x02000000 -const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; // 0x04000000 - -const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; // 0x08000000 - -const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; // 0x10000000 -const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; // 0x20000000 -const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; // 0x40000000 -const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; // 0x80000000 - -const U32 AGENT_CONTROL_AT = AGENT_CONTROL_AT_POS - | AGENT_CONTROL_AT_NEG - | AGENT_CONTROL_NUDGE_AT_POS - | AGENT_CONTROL_NUDGE_AT_NEG; - -const U32 AGENT_CONTROL_LEFT = AGENT_CONTROL_LEFT_POS - | AGENT_CONTROL_LEFT_NEG - | AGENT_CONTROL_NUDGE_LEFT_POS - | AGENT_CONTROL_NUDGE_LEFT_NEG; - -const U32 AGENT_CONTROL_UP = AGENT_CONTROL_UP_POS - | AGENT_CONTROL_UP_NEG - | AGENT_CONTROL_NUDGE_UP_POS - | AGENT_CONTROL_NUDGE_UP_NEG; - -const U32 AGENT_CONTROL_HORIZONTAL = AGENT_CONTROL_AT - | AGENT_CONTROL_LEFT; - -const U32 AGENT_CONTROL_NOT_USED_BY_LSL = AGENT_CONTROL_FLY - | AGENT_CONTROL_STOP - | AGENT_CONTROL_FINISH_ANIM - | AGENT_CONTROL_STAND_UP - | AGENT_CONTROL_SIT_ON_GROUND - | AGENT_CONTROL_MOUSELOOK - | AGENT_CONTROL_AWAY; - -const U32 AGENT_CONTROL_MOVEMENT = AGENT_CONTROL_AT - | AGENT_CONTROL_LEFT - | AGENT_CONTROL_UP; - -const U32 AGENT_CONTROL_ROTATION = AGENT_CONTROL_PITCH_POS - | AGENT_CONTROL_PITCH_NEG - | AGENT_CONTROL_YAW_POS - | AGENT_CONTROL_YAW_NEG; - -const U32 AGENT_CONTROL_NUDGE = AGENT_CONTROL_NUDGE_AT_POS - | AGENT_CONTROL_NUDGE_AT_NEG - | AGENT_CONTROL_NUDGE_LEFT_POS - | AGENT_CONTROL_NUDGE_LEFT_NEG; - - -// move these up so that we can hide them in "State" for object updates -// (for now) -const U32 AGENT_ATTACH_OFFSET = 4; -const U32 AGENT_ATTACH_MASK = 0xf << AGENT_ATTACH_OFFSET; -const U32 AGENT_ATTACH_CLEAR = 0x00; - -// RN: this method swaps the upper and lower nibbles to maintain backward -// compatibility with old objects that only used the upper nibble -#define ATTACHMENT_ID_FROM_STATE(state) ((S32)((((U8)state & AGENT_ATTACH_MASK) >> 4) | (((U8)state & ~AGENT_ATTACH_MASK) << 4))) - -// test state for use in testing grabbing the camera -const U32 AGENT_CAMERA_OBJECT = 0x1 << 3; - -const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters? - -#endif diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index afa06df23e..82df78a335 100755 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -30,7 +30,6 @@ #include #include "llrun.h" #include "llsd.h" -#include "lloptioninterface.h" // Forward declarations template class LLAtomic32; @@ -64,7 +63,7 @@ namespace google_breakpad { class ExceptionHandler; // See exception_handler.h } -class LL_COMMON_API LLApp : public LLOptionInterface +class LL_COMMON_API LLApp { friend class LLErrorThread; public: @@ -113,7 +112,7 @@ public: * @param name The name of the option. * @return Returns the option data. */ - virtual LLSD getOption(const std::string& name) const; + LLSD getOption(const std::string& name) const; /** * @brief Parse command line options and insert them into diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h index 69b01731e5..5a95a58d93 100755 --- a/indra/llcommon/llassettype.h +++ b/indra/llcommon/llassettype.h @@ -29,8 +29,6 @@ #include -#include "stdenums.h" // for EDragAndDropType - class LL_COMMON_API LLAssetType { public: diff --git a/indra/llcommon/llavatarconstants.h b/indra/llcommon/llavatarconstants.h deleted file mode 100755 index f47f447b45..0000000000 --- a/indra/llcommon/llavatarconstants.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file llavatarconstants.h - * @brief some useful short term constants for Indra - * - * $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_AVATAR_CONSTANTS_H -#define LL_AVATAR_CONSTANTS_H - -// If this string is passed to dataserver in AvatarPropertiesUpdate -// then no change is made to user.profile_web -const char* const BLACKLIST_PROFILE_WEB_STR = "featureWebProfilesDisabled"; - -// If profile web pages are feature blacklisted then this URL is -// shown in the profile instead of the user's set URL -const char* const BLACKLIST_PROFILE_WEB_URL = "http://secondlife.com/app/webdisabled"; - -// Maximum number of avatar picks -const S32 MAX_AVATAR_PICKS = 10; - -// For Flags in AvatarPropertiesReply -const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not -const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature" -const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info -const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info -const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known. -const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified - -char const* const VISIBILITY_DEFAULT = "default"; -char const* const VISIBILITY_HIDDEN = "hidden"; -char const* const VISIBILITY_VISIBLE = "visible"; -char const* const VISIBILITY_INVISIBLE = "invisible"; - -#endif - diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp deleted file mode 100755 index 642bd82e90..0000000000 --- a/indra/llcommon/llavatarname.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/** - * @file llavatarname.cpp - * @brief Represents name-related data for an avatar, such as the - * username/SLID ("bobsmith123" or "james.linden") and the display - * name ("James Cook") - * - * $LicenseInfo:firstyear=2010&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 "linden_common.h" - -#include "llavatarname.h" - -#include "lldate.h" -#include "llframetimer.h" -#include "llsd.h" - -// Store these in pre-built std::strings to avoid memory allocations in -// LLSD map lookups -static const std::string USERNAME("username"); -static const std::string DISPLAY_NAME("display_name"); -static const std::string LEGACY_FIRST_NAME("legacy_first_name"); -static const std::string LEGACY_LAST_NAME("legacy_last_name"); -static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default"); -static const std::string DISPLAY_NAME_EXPIRES("display_name_expires"); -static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update"); - -bool LLAvatarName::sUseDisplayNames = true; - -// Minimum time-to-live (in seconds) for a name entry. -// Avatar name should always guarantee to expire reasonably soon by default -// so if the failure to get a valid expiration time was due to something temporary -// we will eventually request and get the right data. -const F64 MIN_ENTRY_LIFETIME = 60.0; - -LLAvatarName::LLAvatarName() -: mUsername(), - mDisplayName(), - mLegacyFirstName(), - mLegacyLastName(), - mIsDisplayNameDefault(false), - mIsTemporaryName(false), - mExpires(F64_MAX), - mNextUpdate(0.0) -{ } - -bool LLAvatarName::operator<(const LLAvatarName& rhs) const -{ - if (mUsername == rhs.mUsername) - return mDisplayName < rhs.mDisplayName; - else - return mUsername < rhs.mUsername; -} - -//static -void LLAvatarName::setUseDisplayNames(bool use) -{ - sUseDisplayNames = use; -} -//static -bool LLAvatarName::useDisplayNames() -{ - return sUseDisplayNames; -} - -LLSD LLAvatarName::asLLSD() const -{ - LLSD sd; - sd[USERNAME] = mUsername; - sd[DISPLAY_NAME] = mDisplayName; - sd[LEGACY_FIRST_NAME] = mLegacyFirstName; - sd[LEGACY_LAST_NAME] = mLegacyLastName; - sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault; - sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires); - sd[DISPLAY_NAME_NEXT_UPDATE] = LLDate(mNextUpdate); - return sd; -} - -void LLAvatarName::fromLLSD(const LLSD& sd) -{ - mUsername = sd[USERNAME].asString(); - mDisplayName = sd[DISPLAY_NAME].asString(); - mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString(); - mLegacyLastName = sd[LEGACY_LAST_NAME].asString(); - mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean(); - LLDate expires = sd[DISPLAY_NAME_EXPIRES]; - mExpires = expires.secondsSinceEpoch(); - LLDate next_update = sd[DISPLAY_NAME_NEXT_UPDATE]; - mNextUpdate = next_update.secondsSinceEpoch(); - - // Some avatars don't have explicit display names set. Force a legible display name here. - if (mDisplayName.empty()) - { - mDisplayName = mUsername; - } -} - -// Transform a string (typically provided by the legacy service) into a decent -// avatar name instance. -void LLAvatarName::fromString(const std::string& full_name) -{ - mDisplayName = full_name; - std::string::size_type index = full_name.find(' '); - if (index != std::string::npos) - { - // The name is in 2 parts (first last) - mLegacyFirstName = full_name.substr(0, index); - mLegacyLastName = full_name.substr(index+1); - if (mLegacyLastName != "Resident") - { - mUsername = mLegacyFirstName + "." + mLegacyLastName; - mDisplayName = full_name; - LLStringUtil::toLower(mUsername); - } - else - { - // Very old names do have a dummy "Resident" last name - // that we choose to hide from users. - mUsername = mLegacyFirstName; - mDisplayName = mLegacyFirstName; - } - } - else - { - mLegacyFirstName = full_name; - mLegacyLastName = ""; - mUsername = full_name; - mDisplayName = full_name; - } - mIsDisplayNameDefault = true; - mIsTemporaryName = true; - setExpires(MIN_ENTRY_LIFETIME); -} - -void LLAvatarName::setExpires(F64 expires) -{ - mExpires = LLFrameTimer::getTotalSeconds() + expires; -} - -std::string LLAvatarName::getCompleteName() const -{ - std::string name; - if (sUseDisplayNames) - { - if (mUsername.empty() || mIsDisplayNameDefault) - { - // If this particular display name is defaulted (i.e. based on user name), - // then display only the easier to read instance of the person's name. - name = mDisplayName; - } - else - { - name = mDisplayName + " (" + mUsername + ")"; - } - } - else - { - name = getUserName(); - } - return name; -} - -std::string LLAvatarName::getLegacyName() const -{ - if (mLegacyFirstName.empty() && mLegacyLastName.empty()) // display names disabled? - { - return mDisplayName; - } - - std::string name; - name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() ); - name = mLegacyFirstName; - name += " "; - name += mLegacyLastName; - return name; -} - -std::string LLAvatarName::getDisplayName() const -{ - if (sUseDisplayNames) - { - return mDisplayName; - } - else - { - return getUserName(); - } -} - -std::string LLAvatarName::getUserName() const -{ - std::string name; - if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) - { - if (mLegacyFirstName.empty()) - { - // If we cannot create a user name from the legacy strings, use the display name - name = mDisplayName; - } - else - { - // The last name might be empty if it defaulted to "Resident" - name = mLegacyFirstName; - } - } - else - { - name = mLegacyFirstName + " " + mLegacyLastName; - } - return name; -} - -void LLAvatarName::dump() const -{ - LL_DEBUGS("AvNameCache") << "LLAvatarName: " - << "user '" << mUsername << "' " - << "display '" << mDisplayName << "' " - << "expires in " << mExpires - LLFrameTimer::getTotalSeconds() << " seconds" - << LL_ENDL; -} - diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h deleted file mode 100755 index 5d2fccc5ba..0000000000 --- a/indra/llcommon/llavatarname.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * @file llavatarname.h - * @brief Represents name-related data for an avatar, such as the - * username/SLID ("bobsmith123" or "james.linden") and the display - * name ("James Cook") - * - * $LicenseInfo:firstyear=2010&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 LLAVATARNAME_H -#define LLAVATARNAME_H - -#include - -class LLSD; - -class LL_COMMON_API LLAvatarName -{ -public: - LLAvatarName(); - - bool operator<(const LLAvatarName& rhs) const; - - // Conversion to and from LLSD (cache file or server response) - LLSD asLLSD() const; - void fromLLSD(const LLSD& sd); - - // Used only in legacy mode when the display name capability is not provided server side - // or to otherwise create a temporary valid item. - void fromString(const std::string& full_name); - - // Set the name object to become invalid in "expires" seconds from now - void setExpires(F64 expires); - - // Set and get the display name flag set by the user in preferences. - static void setUseDisplayNames(bool use); - static bool useDisplayNames(); - - // A name object is valid if not temporary and not yet expired (default is expiration not checked) - bool isValidName(F64 max_unrefreshed = 0.0f) const { return !mIsTemporaryName && (mExpires >= max_unrefreshed); } - - // Return true if the name is made up from legacy or temporary data - bool isDisplayNameDefault() const { return mIsDisplayNameDefault; } - - // For normal names, returns "James Linden (james.linden)" - // When display names are disabled returns just "James Linden" - std::string getCompleteName() const; - - // Returns "James Linden" or "bobsmith123 Resident" for backwards - // compatibility with systems like voice and muting - // *TODO: Eliminate this in favor of username only - std::string getLegacyName() const; - - // "José Sanchez" or "James Linden", UTF-8 encoded Unicode - // Takes the display name preference into account. This is truly the name that should - // be used for all UI where an avatar name has to be used unless we truly want something else (rare) - std::string getDisplayName() const; - - // Returns "James Linden" or "bobsmith123 Resident" - // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name - // Also used for backwards compatibility with systems like voice and muting - std::string getUserName() const; - - // Returns "james.linden" or the legacy name for very old names - std::string getAccountName() const { return mUsername; } - - // Debug print of the object - void dump() const; - - // Names can change, so need to keep track of when name was - // last checked. - // Unix time-from-epoch seconds for efficiency - F64 mExpires; - - // You can only change your name every N hours, so record - // when the next update is allowed - // Unix time-from-epoch seconds - F64 mNextUpdate; - -private: - // "bobsmith123" or "james.linden", US-ASCII only - std::string mUsername; - - // "José Sanchez" or "James Linden", UTF-8 encoded Unicode - // Contains data whether or not user has explicitly set - // a display name; may duplicate their username. - std::string mDisplayName; - - // For "James Linden", "James" - // For "bobsmith123", "bobsmith123" - // Used to communicate with legacy systems like voice and muting which - // rely on old-style names. - // *TODO: Eliminate this in favor of username only - std::string mLegacyFirstName; - - // For "James Linden", "Linden" - // For "bobsmith123", "Resident" - // see above for rationale - std::string mLegacyLastName; - - // If true, both display name and SLID were generated from - // a legacy first and last name, like "James Linden (james.linden)" - bool mIsDisplayNameDefault; - - // Under error conditions, we may insert "dummy" records with - // names like "???" into caches as placeholders. These can be - // shown in UI, but are not serialized. - bool mIsTemporaryName; - - // Global flag indicating if display name should be used or not - // This will affect the output of the high level "get" methods - static bool sUseDisplayNames; -}; - -#endif diff --git a/indra/llcommon/llbitpack.cpp b/indra/llcommon/llbitpack.cpp new file mode 100755 index 0000000000..622a099945 --- /dev/null +++ b/indra/llcommon/llbitpack.cpp @@ -0,0 +1,30 @@ +/** + * @file bitpack.cpp + * @brief LLBitPack 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 "linden_common.h" + +// implementation is all in the header, this include dep ensures the unit test is rerun if the implementation changes. +#include "llbitpack.h" diff --git a/indra/llcommon/llbitpack.h b/indra/llcommon/llbitpack.h new file mode 100755 index 0000000000..fea56a4f1f --- /dev/null +++ b/indra/llcommon/llbitpack.h @@ -0,0 +1,208 @@ +/** + * @file llbitpack.h + * @brief Convert data to packed bit stream + * + * $LicenseInfo:firstyear=2000&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_BITPACK_H +#define LL_BITPACK_H + +#include "llerror.h" + +const U32 MAX_DATA_BITS = 8; + + +class LLBitPack +{ +public: + LLBitPack(U8 *buffer, U32 max_size) : mBuffer(buffer), mBufferSize(0), mLoad(0), mLoadSize(0), mTotalBits(0), mMaxSize(max_size) + { + } + + ~LLBitPack() + { + } + + void resetBitPacking() + { + mLoad = 0; + mLoadSize = 0; + mTotalBits = 0; + mBufferSize = 0; + } + + U32 bitPack(U8 *total_data, U32 total_dsize) + { + U32 dsize; + U8 data; + + while (total_dsize > 0) + { + if (total_dsize > MAX_DATA_BITS) + { + dsize = MAX_DATA_BITS; + total_dsize -= MAX_DATA_BITS; + } + else + { + dsize = total_dsize; + total_dsize = 0; + } + + data = *total_data++; + + data <<= (MAX_DATA_BITS - dsize); + while (dsize > 0) + { + if (mLoadSize == MAX_DATA_BITS) + { + *(mBuffer + mBufferSize++) = mLoad; + if (mBufferSize > mMaxSize) + { + LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL; + } + mLoadSize = 0; + mLoad = 0x00; + } + mLoad <<= 1; + mLoad |= (data >> (MAX_DATA_BITS - 1)); + data <<= 1; + mLoadSize++; + mTotalBits++; + dsize--; + } + } + return mBufferSize; + } + + U32 bitCopy(U8 *total_data, U32 total_dsize) + { + U32 dsize; + U8 data; + + while (total_dsize > 0) + { + if (total_dsize > MAX_DATA_BITS) + { + dsize = MAX_DATA_BITS; + total_dsize -= MAX_DATA_BITS; + } + else + { + dsize = total_dsize; + total_dsize = 0; + } + + data = *total_data++; + + while (dsize > 0) + { + if (mLoadSize == MAX_DATA_BITS) + { + *(mBuffer + mBufferSize++) = mLoad; + if (mBufferSize > mMaxSize) + { + LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL; + } + mLoadSize = 0; + mLoad = 0x00; + } + mLoad <<= 1; + mLoad |= (data >> (MAX_DATA_BITS - 1)); + data <<= 1; + mLoadSize++; + mTotalBits++; + dsize--; + } + } + return mBufferSize; + } + + U32 bitUnpack(U8 *total_retval, U32 total_dsize) + { + U32 dsize; + U8 *retval; + + while (total_dsize > 0) + { + if (total_dsize > MAX_DATA_BITS) + { + dsize = MAX_DATA_BITS; + total_dsize -= MAX_DATA_BITS; + } + else + { + dsize = total_dsize; + total_dsize = 0; + } + + retval = total_retval++; + *retval = 0x00; + while (dsize > 0) + { + if (mLoadSize == 0) + { +#ifdef _DEBUG + if (mBufferSize > mMaxSize) + { + llerrs << "mBufferSize exceeding mMaxSize" << llendl; + llerrs << mBufferSize << " > " << mMaxSize << llendl; + } +#endif + mLoad = *(mBuffer + mBufferSize++); + mLoadSize = MAX_DATA_BITS; + } + *retval <<= 1; + *retval |= (mLoad >> (MAX_DATA_BITS - 1)); + mLoadSize--; + mLoad <<= 1; + dsize--; + } + } + return mBufferSize; + } + + U32 flushBitPack() + { + if (mLoadSize) + { + mLoad <<= (MAX_DATA_BITS - mLoadSize); + *(mBuffer + mBufferSize++) = mLoad; + if (mBufferSize > mMaxSize) + { + LL_ERRS() << "mBufferSize exceeding mMaxSize!" << LL_ENDL; + } + mLoadSize = 0; + } + return mBufferSize; + } + + U8 *mBuffer; + U32 mBufferSize; + U8 mLoad; + U32 mLoadSize; + U32 mTotalBits; + U32 mMaxSize; +}; + +#endif diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h deleted file mode 100755 index f5b242fdfc..0000000000 --- a/indra/llcommon/llchat.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @file llchat.h - * @author James Cook - * @brief Chat constants and data structures. - * - * $LicenseInfo:firstyear=2006&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_LLCHAT_H -#define LL_LLCHAT_H - -#include "lluuid.h" -#include "v3math.h" - -// enumerations used by the chat system -typedef enum e_chat_source_type -{ - CHAT_SOURCE_SYSTEM = 0, - CHAT_SOURCE_AGENT = 1, - CHAT_SOURCE_OBJECT = 2, - CHAT_SOURCE_UNKNOWN = 3 -} EChatSourceType; - -typedef enum e_chat_type -{ - CHAT_TYPE_WHISPER = 0, - CHAT_TYPE_NORMAL = 1, - CHAT_TYPE_SHOUT = 2, - CHAT_TYPE_START = 4, - CHAT_TYPE_STOP = 5, - CHAT_TYPE_DEBUG_MSG = 6, - CHAT_TYPE_REGION = 7, - CHAT_TYPE_OWNER = 8, - CHAT_TYPE_DIRECT = 9 // From llRegionSayTo() -} EChatType; - -typedef enum e_chat_audible_level -{ - CHAT_AUDIBLE_NOT = -1, - CHAT_AUDIBLE_BARELY = 0, - CHAT_AUDIBLE_FULLY = 1 -} EChatAudible; - -typedef enum e_chat_style -{ - CHAT_STYLE_NORMAL, - CHAT_STYLE_IRC, - CHAT_STYLE_HISTORY -}EChatStyle; - -// A piece of chat -class LLChat -{ -public: - LLChat(const std::string& text = std::string()) - : mText(text), - mFromName(), - mFromID(), - mNotifId(), - mOwnerID(), - mSourceType(CHAT_SOURCE_AGENT), - mChatType(CHAT_TYPE_NORMAL), - mAudible(CHAT_AUDIBLE_FULLY), - mMuted(FALSE), - mTime(0.0), - mTimeStr(), - mPosAgent(), - mURL(), - mChatStyle(CHAT_STYLE_NORMAL), - mSessionID() - { } - - std::string mText; // UTF-8 line of text - std::string mFromName; // agent or object name - LLUUID mFromID; // agent id or object id - LLUUID mNotifId; - LLUUID mOwnerID; - EChatSourceType mSourceType; - EChatType mChatType; - EChatAudible mAudible; - BOOL mMuted; // pass muted chat to maintain list of chatters - F64 mTime; // viewer only, seconds from viewer start - std::string mTimeStr; - LLVector3 mPosAgent; - std::string mURL; - EChatStyle mChatStyle; - LLUUID mSessionID; -}; - -#endif diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h deleted file mode 100755 index 1f87d8eec3..0000000000 --- a/indra/llcommon/llclickaction.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file llclickaction.h - * @author James Cook - * @brief Constants for single-click actions on objects - * - * $LicenseInfo:firstyear=2006&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_LLCLICKACTION_H -#define LL_LLCLICKACTION_H -// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! -const U8 CLICK_ACTION_NONE = 0; -const U8 CLICK_ACTION_TOUCH = 0; -const U8 CLICK_ACTION_SIT = 1; -const U8 CLICK_ACTION_BUY = 2; -const U8 CLICK_ACTION_PAY = 3; -const U8 CLICK_ACTION_OPEN = 4; -const U8 CLICK_ACTION_PLAY = 5; -const U8 CLICK_ACTION_OPEN_MEDIA = 6; -const U8 CLICK_ACTION_ZOOM = 7; -// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! -#endif diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp deleted file mode 100755 index ec60097195..0000000000 --- a/indra/llcommon/llcursortypes.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/** - * @file llcursortypes.cpp - * @brief Cursor types and lookup of types from a string - * - * $LicenseInfo:firstyear=2008&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 "linden_common.h" - -#include "llcursortypes.h" - -ECursorType getCursorFromString(const std::string& cursor_string) -{ - static std::map cursor_string_table; - if (cursor_string_table.empty()) - { - cursor_string_table["UI_CURSOR_ARROW"] = UI_CURSOR_ARROW; - cursor_string_table["UI_CURSOR_WAIT"] = UI_CURSOR_WAIT; - cursor_string_table["UI_CURSOR_HAND"] = UI_CURSOR_HAND; - cursor_string_table["UI_CURSOR_IBEAM"] = UI_CURSOR_IBEAM; - cursor_string_table["UI_CURSOR_CROSS"] = UI_CURSOR_CROSS; - cursor_string_table["UI_CURSOR_SIZENWSE"] = UI_CURSOR_SIZENWSE; - cursor_string_table["UI_CURSOR_SIZENESW"] = UI_CURSOR_SIZENESW; - cursor_string_table["UI_CURSOR_SIZEWE"] = UI_CURSOR_SIZEWE; - cursor_string_table["UI_CURSOR_SIZENS"] = UI_CURSOR_SIZENS; - cursor_string_table["UI_CURSOR_NO"] = UI_CURSOR_NO; - cursor_string_table["UI_CURSOR_WORKING"] = UI_CURSOR_WORKING; - cursor_string_table["UI_CURSOR_TOOLGRAB"] = UI_CURSOR_TOOLGRAB; - cursor_string_table["UI_CURSOR_TOOLLAND"] = UI_CURSOR_TOOLLAND; - cursor_string_table["UI_CURSOR_TOOLFOCUS"] = UI_CURSOR_TOOLFOCUS; - cursor_string_table["UI_CURSOR_TOOLCREATE"] = UI_CURSOR_TOOLCREATE; - cursor_string_table["UI_CURSOR_ARROWDRAG"] = UI_CURSOR_ARROWDRAG; - cursor_string_table["UI_CURSOR_ARROWCOPY"] = UI_CURSOR_ARROWCOPY; - cursor_string_table["UI_CURSOR_ARROWDRAGMULTI"] = UI_CURSOR_ARROWDRAGMULTI; - cursor_string_table["UI_CURSOR_ARROWCOPYMULTI"] = UI_CURSOR_ARROWCOPYMULTI; - cursor_string_table["UI_CURSOR_NOLOCKED"] = UI_CURSOR_NOLOCKED; - cursor_string_table["UI_CURSOR_ARROWLOCKED"] = UI_CURSOR_ARROWLOCKED; - cursor_string_table["UI_CURSOR_GRABLOCKED"] = UI_CURSOR_GRABLOCKED; - cursor_string_table["UI_CURSOR_TOOLTRANSLATE"] = UI_CURSOR_TOOLTRANSLATE; - cursor_string_table["UI_CURSOR_TOOLROTATE"] = UI_CURSOR_TOOLROTATE; - cursor_string_table["UI_CURSOR_TOOLSCALE"] = UI_CURSOR_TOOLSCALE; - cursor_string_table["UI_CURSOR_TOOLCAMERA"] = UI_CURSOR_TOOLCAMERA; - cursor_string_table["UI_CURSOR_TOOLPAN"] = UI_CURSOR_TOOLPAN; - cursor_string_table["UI_CURSOR_TOOLZOOMIN"] = UI_CURSOR_TOOLZOOMIN; - cursor_string_table["UI_CURSOR_TOOLPICKOBJECT3"] = UI_CURSOR_TOOLPICKOBJECT3; - cursor_string_table["UI_CURSOR_TOOLPLAY"] = UI_CURSOR_TOOLPLAY; - cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE; - cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN; - cursor_string_table["UI_CURSOR_PIPETTE"] = UI_CURSOR_PIPETTE; - cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT; - cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY; - cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN; - cursor_string_table["UI_CURSOR_TOOLPATHFINDING"] = UI_CURSOR_TOOLPATHFINDING; - cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTART"] = UI_CURSOR_TOOLPATHFINDING_PATH_START; - cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTARTADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD; - cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END; - cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHENDADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD; - cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO; - } - - std::map::const_iterator iter = cursor_string_table.find(cursor_string); - - if (iter != cursor_string_table.end()) - { - return (ECursorType)iter->second; - } - - return UI_CURSOR_ARROW; -} - - - diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h deleted file mode 100755 index cb6d6636a0..0000000000 --- a/indra/llcommon/llcursortypes.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file llcursortypes.h - * @brief Cursor types - * - * $LicenseInfo:firstyear=2008&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_LLCURSORTYPES_H -#define LL_LLCURSORTYPES_H - -// If you add types here, add them in LLCursor::getCursorFromString -enum ECursorType { - UI_CURSOR_ARROW, - UI_CURSOR_WAIT, - UI_CURSOR_HAND, - UI_CURSOR_IBEAM, - UI_CURSOR_CROSS, - UI_CURSOR_SIZENWSE, - UI_CURSOR_SIZENESW, - UI_CURSOR_SIZEWE, - UI_CURSOR_SIZENS, - UI_CURSOR_NO, - UI_CURSOR_WORKING, - UI_CURSOR_TOOLGRAB, - UI_CURSOR_TOOLLAND, - UI_CURSOR_TOOLFOCUS, - UI_CURSOR_TOOLCREATE, - UI_CURSOR_ARROWDRAG, - UI_CURSOR_ARROWCOPY, // drag with copy - UI_CURSOR_ARROWDRAGMULTI, - UI_CURSOR_ARROWCOPYMULTI, // drag with copy - UI_CURSOR_NOLOCKED, - UI_CURSOR_ARROWLOCKED, - UI_CURSOR_GRABLOCKED, - UI_CURSOR_TOOLTRANSLATE, - UI_CURSOR_TOOLROTATE, - UI_CURSOR_TOOLSCALE, - UI_CURSOR_TOOLCAMERA, - UI_CURSOR_TOOLPAN, - UI_CURSOR_TOOLZOOMIN, - UI_CURSOR_TOOLPICKOBJECT3, - UI_CURSOR_TOOLPLAY, - UI_CURSOR_TOOLPAUSE, - UI_CURSOR_TOOLMEDIAOPEN, - UI_CURSOR_PIPETTE, - UI_CURSOR_TOOLSIT, - UI_CURSOR_TOOLBUY, - UI_CURSOR_TOOLOPEN, - UI_CURSOR_TOOLPATHFINDING, - UI_CURSOR_TOOLPATHFINDING_PATH_START, - UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD, - UI_CURSOR_TOOLPATHFINDING_PATH_END, - UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD, - UI_CURSOR_TOOLNO, - UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) -}; - -LL_COMMON_API ECursorType getCursorFromString(const std::string& cursor_string); - -#endif // LL_LLCURSORTYPES_H diff --git a/indra/llcommon/lldarray.h b/indra/llcommon/lldarray.h deleted file mode 100755 index 131b819c99..0000000000 --- a/indra/llcommon/lldarray.h +++ /dev/null @@ -1,223 +0,0 @@ -/** - * @file lldarray.h - * @brief Wrapped std::vector for backward compatibility. - * - * $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_LLDARRAY_H -#define LL_LLDARRAY_H - -#include "llerror.h" - -#include -#include - -// class LLDynamicArray<>; // = std::vector + reserves elements -// class LLDynamicArrayIndexed<>; // = std::vector + std::map if indices, only supports operator[] and begin(),end() - -//-------------------------------------------------------- -// LLDynamicArray declaration -//-------------------------------------------------------- -// NOTE: BlockSize is used to reserve a minimal initial amount -template -class LLDynamicArray : public std::vector -{ -public: - enum - { - OKAY = 0, - FAIL = -1 - }; - - LLDynamicArray(S32 size=0) : std::vector(size) { if (size < BlockSize) std::vector::reserve(BlockSize); } - - void reset() { std::vector::clear(); } - - // ACCESSORS - const Type& get(S32 index) const { return std::vector::operator[](index); } - Type& get(S32 index) { return std::vector::operator[](index); } - S32 find(const Type &obj) const; - - S32 count() const { return std::vector::size(); } - S32 getLength() const { return std::vector::size(); } - S32 getMax() const { return std::vector::capacity(); } - - // MANIPULATE - S32 put(const Type &obj); // add to end of array, returns index -// Type* reserve(S32 num); // reserve a block of indices in advance - Type* reserve_block(U32 num); // reserve a block of indices in advance - - S32 remove(S32 index); // remove by index, no bounds checking - S32 removeObj(const Type &obj); // remove by object - S32 removeLast(); - - void operator+=(const LLDynamicArray &other); -}; - -//-------------------------------------------------------- -// LLDynamicArray implementation -//-------------------------------------------------------- - -template -inline S32 LLDynamicArray::find(const Type &obj) const -{ - typename std::vector::const_iterator iter = std::find(this->begin(), this->end(), obj); - if (iter != this->end()) - { - return iter - this->begin(); - } - return FAIL; -} - - -template -inline S32 LLDynamicArray::remove(S32 i) -{ - // This is a fast removal by swapping with the last element - S32 sz = this->size(); - if (i < 0 || i >= sz) - { - return FAIL; - } - if (i < sz-1) - { - this->operator[](i) = this->back(); - } - this->pop_back(); - return i; -} - -template -inline S32 LLDynamicArray::removeObj(const Type& obj) -{ - typename std::vector::iterator iter = std::find(this->begin(), this->end(), obj); - if (iter != this->end()) - { - S32 res = iter - this->begin(); - typename std::vector::iterator last = this->end(); - --last; - *iter = *last; - this->pop_back(); - return res; - } - return FAIL; -} - -template -inline S32 LLDynamicArray::removeLast() -{ - if (!this->empty()) - { - this->pop_back(); - return OKAY; - } - return FAIL; -} - -template -inline Type* LLDynamicArray::reserve_block(U32 num) -{ - U32 sz = this->size(); - this->resize(sz+num); - return &(this->operator[](sz)); -} - -template -inline S32 LLDynamicArray::put(const Type &obj) -{ - this->push_back(obj); - return this->size() - 1; -} - -template -inline void LLDynamicArray::operator+=(const LLDynamicArray &other) -{ - insert(this->end(), other.begin(), other.end()); -} - -//-------------------------------------------------------- -// LLDynamicArrayIndexed declaration -//-------------------------------------------------------- - -template -class LLDynamicArrayIndexed -{ -public: - typedef typename std::vector::iterator iterator; - typedef typename std::vector::const_iterator const_iterator; - typedef typename std::vector::reverse_iterator reverse_iterator; - typedef typename std::vector::const_reverse_iterator const_reverse_iterator; - typedef typename std::vector::size_type size_type; -protected: - std::vector mVector; - std::map mIndexMap; - -public: - LLDynamicArrayIndexed() { mVector.reserve(BlockSize); } - - iterator begin() { return mVector.begin(); } - const_iterator begin() const { return mVector.begin(); } - iterator end() { return mVector.end(); } - const_iterator end() const { return mVector.end(); } - - reverse_iterator rbegin() { return mVector.rbegin(); } - const_reverse_iterator rbegin() const { return mVector.rbegin(); } - reverse_iterator rend() { return mVector.rend(); } - const_reverse_iterator rend() const { return mVector.rend(); } - - void reset() { mVector.resize(0); mIndexMap.resize(0); } - bool empty() const { return mVector.empty(); } - size_type size() const { return mVector.size(); } - - Type& operator[](const Key& k) - { - typename std::map::const_iterator iter = mIndexMap.find(k); - if (iter == mIndexMap.end()) - { - U32 n = mVector.size(); - mIndexMap[k] = n; - mVector.push_back(Type()); - llassert(mVector.size() == mIndexMap.size()); - return mVector[n]; - } - else - { - return mVector[iter->second]; - } - } - - const_iterator find(const Key& k) const - { - typename std::map::const_iterator iter = mIndexMap.find(k); - if(iter == mIndexMap.end()) - { - return mVector.end(); - } - else - { - return mVector.begin() + iter->second; - } - } -}; - -#endif diff --git a/indra/llcommon/lldeleteutils.h b/indra/llcommon/lldeleteutils.h deleted file mode 100644 index f250dc3028..0000000000 --- a/indra/llcommon/lldeleteutils.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file lldeleteutils.h - * @brief Utility functions to simplify some common pointer-munging idioms. - * - * $LicenseInfo:firstyear=2009&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_DELETE_UTILS_H -#define LL_DELETE_UTILS_H - -// Simple utility functions to eventually replace the common 2-line -// idiom scattered throughout the viewer codebase. Note that where -// possible we would rather be using smart pointers of some sort. - -template -inline void deleteAndClear(T*& ptr) -{ - delete ptr; - ptr = NULL; -} - -template -inline void deleteAndClearArray(T*& array_ptr) -{ - delete[] array_ptr; - array_ptr = NULL; -} - -#endif diff --git a/indra/llcommon/lldepthstack.h b/indra/llcommon/lldepthstack.h index ac435a30fa..b65840d342 100755 --- a/indra/llcommon/lldepthstack.h +++ b/indra/llcommon/lldepthstack.h @@ -41,8 +41,6 @@ public: : mCurrentDepth(0), mMaxDepth(0) {} - ~LLDepthStack() {} - void setDepth(U32 depth) { mMaxDepth = depth; @@ -87,14 +85,7 @@ public: { return mStack.empty() ? NULL : mStack.back(); } - - void deleteAllData() - { - mCurrentDepth = 0; - std::for_each(mStack.begin(), mStack.end(), DeletePointer()); - mStack.clear(); - } - + void removeAllNodes() { mCurrentDepth = 0; diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 5b4be1ac80..6da9df4dce 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -96,7 +96,7 @@ namespace { mFile.open(filename, llofstream::out | llofstream::app); if (!mFile) { - llinfos << "Error setting log file to " << filename << llendl; + LL_INFOS() << "Error setting log file to " << filename << LL_ENDL; } } @@ -331,7 +331,7 @@ namespace } LLError::configure(configuration); - llinfos << "logging reconfigured from " << filename() << llendl; + LL_INFOS() << "logging reconfigured from " << filename() << LL_ENDL; return true; } @@ -495,14 +495,44 @@ namespace LLError int line, const std::type_info& class_info, const char* function, + bool printOnce, const char* broadTag, - const char* narrowTag, - bool printOnce) - : mLevel(level), mFile(file), mLine(line), - mClassInfo(class_info), mFunction(function), - mCached(false), mShouldLog(false), - mBroadTag(broadTag), mNarrowTag(narrowTag), mPrintOnce(printOnce) - { } + const char* narrowTag) + : mLevel(level), + mFile(file), + mLine(line), + mClassInfo(class_info), + mFunction(function), + mCached(false), + mShouldLog(false), + mPrintOnce(printOnce), + mBroadTag(broadTag), + mNarrowTag(narrowTag) + {} + + CallSite::CallSite(ELevel level, + const char* file, + int line, + const std::type_info& class_info, + const char* function, + bool printOnce, + const char* broadTag, + const char* narrowTag, + const char*, + ...) + : mLevel(level), + mFile(file), + mLine(line), + mClassInfo(class_info), + mFunction(function), + mCached(false), + mShouldLog(false), + mPrintOnce(printOnce), + mBroadTag(broadTag), + mNarrowTag(narrowTag) + { + LL_ERRS() << "No support for more than 2 logging tags" << LL_ENDL; + } void CallSite::invalidate() @@ -677,7 +707,7 @@ namespace LLError LevelMap::const_iterator i = level_names.find(name); if (i == level_names.end()) { - llwarns << "unrecognized logging level: '" << name << "'" << llendl; + LL_WARNS() << "unrecognized logging level: '" << name << "'" << LL_ENDL; return LLError::LEVEL_INFO; } @@ -741,6 +771,12 @@ namespace LLError return false; } + // virtual + bool Recorder::wantsTags() + { + return false; + } + void addRecorder(Recorder* recorder) { if (recorder == NULL) @@ -817,11 +853,14 @@ namespace LLError namespace { - void writeToRecorders(LLError::ELevel level, const std::string& message) + void writeToRecorders(const LLError::CallSite& site, const std::string& message) { + LLError::ELevel level = site.mLevel; LLError::Settings& s = LLError::Settings::get(); std::string messageWithTime; + std::string messageWithTags; + std::string messageWithTagsAndTime; for (Recorders::const_iterator i = s.recorders.begin(); i != s.recorders.end(); @@ -829,18 +868,47 @@ namespace { LLError::Recorder* r = *i; - if (r->wantsTime() && s.timeFunction != NULL) + if (r->wantsTime() && s.timeFunction != NULL) { - if (messageWithTime.empty()) + if (r->wantsTags()) { - messageWithTime = s.timeFunction() + " " + message; + if (messageWithTagsAndTime.empty()) + { + messageWithTagsAndTime = s.timeFunction() + " " + + (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string()) + + (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string()) + + message; + } + + r->recordMessage(level, messageWithTagsAndTime); + } + else + { + if (messageWithTime.empty()) + { + messageWithTime = s.timeFunction() + " " + message; + } + + r->recordMessage(level, messageWithTime); } - - r->recordMessage(level, messageWithTime); } else { - r->recordMessage(level, message); + if (r->wantsTags()) + { + if (messageWithTags.empty()) + { + messageWithTags = (site.mBroadTag ? (std::string("#") + std::string(site.mBroadTag) + " ") : std::string()) + + (site.mNarrowTag ? (std::string("#") + std::string(site.mNarrowTag) + " ") : std::string()) + + message; + } + + r->recordMessage(level, messageWithTags); + } + else + { + r->recordMessage(level, message); + } } } } @@ -1017,10 +1085,11 @@ namespace LLError else { strncpy(message, out->str().c_str(), 127); - message[127] = '\0' ; + message[127] = '\0'; } Globals& g = Globals::get(); + if (out == &g.messageStream) { g.messageStream.clear(); @@ -1031,7 +1100,7 @@ namespace LLError { delete out; } - return ; + return; } void Log::flush(std::ostringstream* out, const CallSite& site) @@ -1063,7 +1132,7 @@ namespace LLError fatalMessage << abbreviateFile(site.mFile) << "(" << site.mLine << ") : error"; - writeToRecorders(site.mLevel, fatalMessage.str()); + writeToRecorders(site, fatalMessage.str()); } @@ -1125,7 +1194,7 @@ namespace LLError prefix << message; message = prefix.str(); - writeToRecorders(site.mLevel, message); + writeToRecorders(site, message); if (site.mLevel == LEVEL_ERROR && s.crashFunction) { @@ -1164,7 +1233,7 @@ namespace LLError { std::string::size_type i = 0; std::string::size_type len = s.length(); - for ( ; i < len; i++ ) + for (; i < len; i++ ) { if (s[i] == old) { @@ -1235,8 +1304,8 @@ namespace LLError namespace LLError { - char** LLCallStacks::sBuffer = NULL ; - S32 LLCallStacks::sIndex = 0 ; + char** LLCallStacks::sBuffer = NULL; + S32 LLCallStacks::sIndex = 0; #define SINGLE_THREADED 1 @@ -1312,34 +1381,34 @@ namespace LLError if(!sBuffer) { - sBuffer = new char*[512] ; - sBuffer[0] = new char[512 * 128] ; - for(S32 i = 1 ; i < 512 ; i++) + sBuffer = new char*[512]; + sBuffer[0] = new char[512 * 128]; + for(S32 i = 1; i < 512; i++) { - sBuffer[i] = sBuffer[i-1] + 128 ; + sBuffer[i] = sBuffer[i-1] + 128; } - sIndex = 0 ; + sIndex = 0; } if(sIndex > 511) { - clear() ; + clear(); } - strcpy(sBuffer[sIndex], function) ; - sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line) ; - sIndex++ ; + strcpy(sBuffer[sIndex], function); + sprintf(sBuffer[sIndex] + strlen(function), " line: %d ", line); + sIndex++; - return ; + return; } //static std::ostringstream* LLCallStacks::insert(const char* function, const int line) { std::ostringstream* _out = LLError::Log::out(); - *_out << function << " line " << line << " " ; + *_out << function << " line " << line << " "; - return _out ; + return _out; } //static @@ -1353,21 +1422,21 @@ namespace LLError if(!sBuffer) { - sBuffer = new char*[512] ; - sBuffer[0] = new char[512 * 128] ; - for(S32 i = 1 ; i < 512 ; i++) + sBuffer = new char*[512]; + sBuffer[0] = new char[512 * 128]; + for(S32 i = 1; i < 512; i++) { - sBuffer[i] = sBuffer[i-1] + 128 ; + sBuffer[i] = sBuffer[i-1] + 128; } - sIndex = 0 ; + sIndex = 0; } if(sIndex > 511) { - clear() ; + clear(); } - LLError::Log::flush(_out, sBuffer[sIndex++]) ; + LLError::Log::flush(_out, sBuffer[sIndex++]); } //static @@ -1381,27 +1450,27 @@ namespace LLError if(sIndex > 0) { - llinfos << " ************* PRINT OUT LL CALL STACKS ************* " << llendl ; + LL_INFOS() << " ************* PRINT OUT LL CALL STACKS ************* " << LL_ENDL; while(sIndex > 0) { - sIndex-- ; - llinfos << sBuffer[sIndex] << llendl ; + sIndex--; + LL_INFOS() << sBuffer[sIndex] << LL_ENDL; } - llinfos << " *************** END OF LL CALL STACKS *************** " << llendl ; + LL_INFOS() << " *************** END OF LL CALL STACKS *************** " << LL_ENDL; } if(sBuffer) { - delete[] sBuffer[0] ; - delete[] sBuffer ; - sBuffer = NULL ; + delete[] sBuffer[0]; + delete[] sBuffer; + sBuffer = NULL; } } //static void LLCallStacks::clear() { - sIndex = 0 ; + sIndex = 0; } #if LL_WINDOWS diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index ceff40e900..d7dc38a4c6 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -31,9 +31,66 @@ #include #include -#include "llerrorlegacy.h" #include "stdtypes.h" +#include "llpreprocessor.h" +#include + +const int LL_ERR_NOERR = 0; + +// Define one of these for different error levels in release... +// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output. +#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output +#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output. + +#ifdef _DEBUG +#define SHOW_DEBUG +#define SHOW_WARN +#define SHOW_INFO +#define SHOW_ASSERT +#else // _DEBUG + +#ifdef LL_RELEASE_WITH_DEBUG_INFO +#define SHOW_ASSERT +#endif // LL_RELEASE_WITH_DEBUG_INFO + +#ifdef RELEASE_SHOW_DEBUG +#define SHOW_DEBUG +#endif + +#ifdef RELEASE_SHOW_WARN +#define SHOW_WARN +#endif + +#ifdef RELEASE_SHOW_INFO +#define SHOW_INFO +#endif + +#ifdef RELEASE_SHOW_ASSERT +#define SHOW_ASSERT +#endif + +#endif // !_DEBUG + +#define llassert_always(func) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << #func << ")" << LL_ENDL; + +#ifdef SHOW_ASSERT +#define llassert(func) llassert_always(func) +#define llverify(func) llassert_always(func) +#else +#define llassert(func) +#define llverify(func) do {if (func) {}} while(0) +#endif + +#ifdef LL_WINDOWS +#define LL_STATIC_ASSERT(func, msg) static_assert(func, msg) +#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg) +#else +#define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func) +#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false); +#endif + + /** Error Logging Facility Information for most users: @@ -121,26 +178,25 @@ namespace LLError They are not intended for general use. */ - class CallSite; + struct CallSite; class LL_COMMON_API Log { public: static bool shouldLog(CallSite&); static std::ostringstream* out(); - static void flush(std::ostringstream* out, char* message) ; + static void flush(std::ostringstream* out, char* message); static void flush(std::ostringstream*, const CallSite&); }; - class LL_COMMON_API CallSite + struct LL_COMMON_API CallSite { // Represents a specific place in the code where a message is logged // This is public because it is used by the macros below. It is not // intended for public use. - public: CallSite(ELevel, const char* file, int line, - const std::type_info& class_info, const char* function, const char* broadTag, const char* narrowTag, bool printOnce); - + const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag = NULL, const char* narrowTag = NULL ); + #ifdef LL_LIBRARY_INCLUDE bool shouldLog(); #else // LL_LIBRARY_INCLUDE @@ -151,7 +207,6 @@ namespace LLError void invalidate(); - private: // these describe the call site and never change const ELevel mLevel; const char* const mFile; @@ -167,6 +222,11 @@ namespace LLError bool mShouldLog; friend class Log; + + private: + // 3 or more tags not currently supported + CallSite(ELevel, const char* file, int line, + const std::type_info& class_info, const char* function, bool printOnce, const char* broadTag, const char* narrowTag, const char*, ...); }; @@ -237,78 +297,64 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; // Outside a class declaration, or in class without LOG_CLASS(), this // typedef causes the messages to not be associated with any class. +///////////////////////////////// +// Error Logging Macros +// See top of file for common usage. +///////////////////////////////// +#define lllog(level, once, ...) \ + do { \ + static LLError::CallSite _site( \ + level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, once, __VA_ARGS__ );\ + if (LL_UNLIKELY(_site.shouldLog())) \ + { \ + std::ostringstream* _out = LLError::Log::out(); \ + (*_out) +//Use this construct if you need to do computation in the middle of a +//message: +// +// LL_INFOS("AgentGesture") << "the agent " << agend_id; +// switch (f) +// { +// case FOP_SHRUGS: LL_CONT << "shrugs"; break; +// case FOP_TAPS: LL_CONT << "points at " << who; break; +// case FOP_SAYS: LL_CONT << "says " << message; break; +// } +// LL_CONT << " for " << t << " seconds" << LL_ENDL; +// +//Such computation is done iff the message will be logged. +#define LL_CONT (*_out) +#define LL_NEWLINE '\n' -/* - Error Logging Macros - See top of file for common usage. -*/ - -#define lllog(level, broadTag, narrowTag, once) \ - do { \ - static LLError::CallSite _site( \ - level, __FILE__, __LINE__, typeid(_LL_CLASS_TO_LOG), __FUNCTION__, broadTag, narrowTag, once);\ - if (LL_UNLIKELY(_site.shouldLog())) \ - { \ - std::ostringstream* _out = LLError::Log::out(); \ - (*_out) - -// DEPRECATED: Don't call directly, use LL_ENDL instead, which actually looks like a macro -#define llendl \ - LLError::End(); \ +#define LL_ENDL \ + LLError::End(); \ LLError::Log::flush(_out, _site); \ - } \ + } \ } while(0) -// DEPRECATED: Use the new macros that allow tags and *look* like macros. -#define lldebugs lllog(LLError::LEVEL_DEBUG, NULL, NULL, false) -#define llinfos lllog(LLError::LEVEL_INFO, NULL, NULL, false) -#define llwarns lllog(LLError::LEVEL_WARN, NULL, NULL, false) -#define llerrs lllog(LLError::LEVEL_ERROR, NULL, NULL, false) -#define llcont (*_out) - // NEW Macros for debugging, allow the passing of a string tag -// One Tag -#define LL_DEBUGS(broadTag) lllog(LLError::LEVEL_DEBUG, broadTag, NULL, false) -#define LL_INFOS(broadTag) lllog(LLError::LEVEL_INFO, broadTag, NULL, false) -#define LL_WARNS(broadTag) lllog(LLError::LEVEL_WARN, broadTag, NULL, false) -#define LL_ERRS(broadTag) lllog(LLError::LEVEL_ERROR, broadTag, NULL, false) -// Two Tags -#define LL_DEBUGS2(broadTag, narrowTag) lllog(LLError::LEVEL_DEBUG, broadTag, narrowTag, false) -#define LL_INFOS2(broadTag, narrowTag) lllog(LLError::LEVEL_INFO, broadTag, narrowTag, false) -#define LL_WARNS2(broadTag, narrowTag) lllog(LLError::LEVEL_WARN, broadTag, narrowTag, false) -#define LL_ERRS2(broadTag, narrowTag) lllog(LLError::LEVEL_ERROR, broadTag, narrowTag, false) +// Pass comma separated list of tags (currently only supports up to 0, 1, or 2) +#define LL_DEBUGS(...) lllog(LLError::LEVEL_DEBUG, false, __VA_ARGS__) +#define LL_INFOS(...) lllog(LLError::LEVEL_INFO, false, __VA_ARGS__) +#define LL_WARNS(...) lllog(LLError::LEVEL_WARN, false, __VA_ARGS__) +#define LL_ERRS(...) lllog(LLError::LEVEL_ERROR, false, __VA_ARGS__) // Only print the log message once (good for warnings or infos that would otherwise // spam the log file over and over, such as tighter loops). -#define LL_DEBUGS_ONCE(broadTag) lllog(LLError::LEVEL_DEBUG, broadTag, NULL, true) -#define LL_INFOS_ONCE(broadTag) lllog(LLError::LEVEL_INFO, broadTag, NULL, true) -#define LL_WARNS_ONCE(broadTag) lllog(LLError::LEVEL_WARN, broadTag, NULL, true) -#define LL_DEBUGS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_DEBUG, broadTag, narrowTag, true) -#define LL_INFOS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_INFO, broadTag, narrowTag, true) -#define LL_WARNS2_ONCE(broadTag, narrowTag) lllog(LLError::LEVEL_WARN, broadTag, narrowTag, true) - -#define LL_ENDL llendl -#define LL_CONT (*_out) +#define LL_DEBUGS_ONCE(...) lllog(LLError::LEVEL_DEBUG, true, __VA_ARGS__) +#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, __VA_ARGS__) +#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, __VA_ARGS__) - /* - Use this construct if you need to do computation in the middle of a - message: - - LL_INFOS("AgentGesture") << "the agent " << agend_id; - switch (f) - { - case FOP_SHRUGS: LL_CONT << "shrugs"; break; - case FOP_TAPS: LL_CONT << "points at " << who; break; - case FOP_SAYS: LL_CONT << "says " << message; break; - } - LL_CONT << " for " << t << " seconds" << LL_ENDL; - - Such computation is done iff the message will be logged. - */ +// DEPRECATED: Use the new macros that allow tags and *look* like macros. +#define lldebugs LL_DEBUGS() +#define llinfos LL_INFOS() +#define llwarns LL_WARNS() +#define llerrs LL_ERRS() +#define llcont LL_CONT +#define llendl LL_ENDL #endif // LL_LLERROR_H diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index 480654b1a2..7c9df57115 100755 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -144,6 +144,10 @@ namespace LLError virtual bool wantsTime(); // default returns false // override and return true if the recorder wants the time string // included in the text of the message + + virtual bool wantsTags(); // default returns false + // override ands return true if the recorder wants the tags included + // in the text of the message }; /** diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 50c95339e4..31dd207008 100755 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -28,100 +28,5 @@ #ifndef LL_LLERRORLEGACY_H #define LL_LLERRORLEGACY_H -#include "llpreprocessor.h" -#include - -/* - LEGACY -- DO NOT USE THIS STUFF ANYMORE -*/ - -// Specific error codes -const int LL_ERR_NOERR = 0; -const int LL_ERR_ASSET_REQUEST_FAILED = -1; -//const int LL_ERR_ASSET_REQUEST_INVALID = -2; -const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3; -const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4; -const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5; -const int LL_ERR_EOF = -39; -const int LL_ERR_CANNOT_OPEN_FILE = -42; -const int LL_ERR_FILE_NOT_FOUND = -43; -const int LL_ERR_FILE_EMPTY = -44; -const int LL_ERR_TCP_TIMEOUT = -23016; -const int LL_ERR_CIRCUIT_GONE = -23017; -const int LL_ERR_PRICE_MISMATCH = -23018; - - - -// Define one of these for different error levels in release... -// #define RELEASE_SHOW_DEBUG // Define this if you want your release builds to show lldebug output. -#define RELEASE_SHOW_INFO // Define this if you want your release builds to show llinfo output -#define RELEASE_SHOW_WARN // Define this if you want your release builds to show llwarn output. - - -////////////////////////////////////////// -// -// Implementation - ignore -// -// -#ifdef _DEBUG -#define SHOW_DEBUG -#define SHOW_WARN -#define SHOW_INFO -#define SHOW_ASSERT -#else // _DEBUG - -#ifdef LL_RELEASE_WITH_DEBUG_INFO -#define SHOW_ASSERT -#endif // LL_RELEASE_WITH_DEBUG_INFO - -#ifdef RELEASE_SHOW_DEBUG -#define SHOW_DEBUG -#endif - -#ifdef RELEASE_SHOW_WARN -#define SHOW_WARN -#endif - -#ifdef RELEASE_SHOW_INFO -#define SHOW_INFO -#endif - -#ifdef RELEASE_SHOW_ASSERT -#define SHOW_ASSERT -#endif - -#endif // _DEBUG - - - -#define lldebugst(type) lldebugs -#define llendflush llendl - - -#define llerror(msg, num) llerrs << "Error # " << num << ": " << msg << llendl; - -#define llwarning(msg, num) llwarns << "Warning # " << num << ": " << msg << llendl; - -#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs << "ASSERT (" << #func << ")" << llendl; - -#ifdef SHOW_ASSERT -#define llassert(func) llassert_always(func) -#define llverify(func) llassert_always(func) -#else -#define llassert(func) -#define llverify(func) do {if (func) {}} while(0) -#endif - -#ifdef LL_WINDOWS -#define LL_STATIC_ASSERT(func, msg) static_assert(func, msg) -#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg) -#else -#define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func) -#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false); -#endif - -// handy compile-time assert - enforce those template parameters! -#define cassert(expn) typedef char __C_ASSERT__[(expn)?1:-1] /* Flawfinder: ignore */ - //XXX: used in two places in llcommon/llskipmap.h #endif // LL_LLERRORLEGACY_H diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h index 65b0fef354..0cbd1da32d 100755 --- a/indra/llcommon/llevents.h +++ b/indra/llcommon/llevents.h @@ -61,7 +61,7 @@ #include "llsd.h" #include "llsingleton.h" #include "lldependencies.h" -#include "ll_template_cast.h" +#include "llstl.h" /*==========================================================================*| // override this to allow binding free functions with more parameters diff --git a/indra/llcommon/llextendedstatus.h b/indra/llcommon/llextendedstatus.h deleted file mode 100755 index 8ce173d1ff..0000000000 --- a/indra/llcommon/llextendedstatus.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file llextendedstatus.h - * @date August 2007 - * @brief extended status codes for curl/vfs/resident asset storage and delivery - * - * $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 LL_LLEXTENDEDSTATUS_H -#define LL_LLEXTENDEDSTATUS_H - - -typedef S32 LLExtStat; - - -// Status provider groups - Top bits indicate which status type it is -// Zero is common status code (next section) -const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below -const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy -const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs - - -// Common Status Codes -// -const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry! -const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID -const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider -const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced -const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist -const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open - - -// curl status codes: -// -// Mask off LL_EXSTAT_CURL_RESULT for original result and -// see: libraries/include/curl/curl.h - - -// Memory-Resident status codes: -// None at present - - -// VFS status codes: -const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001; -const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002; - - -#endif // LL_LLEXTENDEDSTATUS_H diff --git a/indra/llcommon/llfoldertype.cpp b/indra/llcommon/llfoldertype.cpp deleted file mode 100755 index f6d0f5bce8..0000000000 --- a/indra/llcommon/llfoldertype.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/** - * @file llfoldertype.cpp - * @brief Implementatino of LLFolderType functionality. - * - * $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 "linden_common.h" - -#include "llfoldertype.h" -#include "lldictionary.h" -#include "llmemory.h" -#include "llsingleton.h" - -///---------------------------------------------------------------------------- -/// Class LLFolderType -///---------------------------------------------------------------------------- -struct FolderEntry : public LLDictionaryEntry -{ - FolderEntry(const std::string &type_name, // 8 character limit! - bool is_protected) // can the viewer change categories of this type? - : - LLDictionaryEntry(type_name), - mIsProtected(is_protected) - { - llassert(type_name.length() <= 8); - } - - const bool mIsProtected; -}; - -class LLFolderDictionary : public LLSingleton, - public LLDictionary -{ -public: - LLFolderDictionary(); -protected: - virtual LLFolderType::EType notFound() const - { - return LLFolderType::FT_NONE; - } -}; - -LLFolderDictionary::LLFolderDictionary() -{ - // TYPE NAME PROTECTED - // |-----------|---------| - addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", TRUE)); - addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", TRUE)); - addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", TRUE)); - addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", TRUE)); - addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE)); - addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE)); - addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE)); - addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE)); - addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE)); - addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE)); - addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE)); - addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", TRUE)); - addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", TRUE)); - addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", TRUE)); - addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", TRUE)); - addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", TRUE)); - - for (S32 ensemble_num = S32(LLFolderType::FT_ENSEMBLE_START); ensemble_num <= S32(LLFolderType::FT_ENSEMBLE_END); ensemble_num++) - { - addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", FALSE)); - } - - addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", TRUE)); - addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", FALSE)); - addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", TRUE)); - - addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE)); - - addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE)); - addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE)); - addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); - - addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); -}; - -// static -LLFolderType::EType LLFolderType::lookup(const std::string& name) -{ - return LLFolderDictionary::getInstance()->lookup(name); -} - -// static -const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) -{ - const FolderEntry *entry = LLFolderDictionary::getInstance()->lookup(folder_type); - if (entry) - { - return entry->mName; - } - else - { - return badLookup(); - } -} - -// static -// Only ensembles and plain folders aren't protected. "Protected" means -// you can't change certain properties such as their type. -bool LLFolderType::lookupIsProtectedType(EType folder_type) -{ - const LLFolderDictionary *dict = LLFolderDictionary::getInstance(); - const FolderEntry *entry = dict->lookup(folder_type); - if (entry) - { - return entry->mIsProtected; - } - return true; -} - -// static -bool LLFolderType::lookupIsEnsembleType(EType folder_type) -{ - return (folder_type >= FT_ENSEMBLE_START && - folder_type <= FT_ENSEMBLE_END); -} - -// static -LLAssetType::EType LLFolderType::folderTypeToAssetType(LLFolderType::EType folder_type) -{ - if (LLAssetType::lookup(LLAssetType::EType(folder_type)) == LLAssetType::badLookup()) - { - llwarns << "Converting to unknown asset type " << folder_type << llendl; - } - return (LLAssetType::EType)folder_type; -} - -// static -LLFolderType::EType LLFolderType::assetTypeToFolderType(LLAssetType::EType asset_type) -{ - if (LLFolderType::lookup(LLFolderType::EType(asset_type)) == LLFolderType::badLookup()) - { - llwarns << "Converting to unknown folder type " << asset_type << llendl; - } - return (LLFolderType::EType)asset_type; -} - -// static -const std::string &LLFolderType::badLookup() -{ - static const std::string sBadLookup = "llfoldertype_bad_lookup"; - return sBadLookup; -} diff --git a/indra/llcommon/llfoldertype.h b/indra/llcommon/llfoldertype.h deleted file mode 100755 index a0c847914f..0000000000 --- a/indra/llcommon/llfoldertype.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file llfoldertype.h - * @brief Declaration of LLFolderType. - * - * $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_LLFOLDERTYPE_H -#define LL_LLFOLDERTYPE_H - -#include -#include "llassettype.h" - -// This class handles folder types (similar to assettype, except for folders) -// and operations on those. -class LL_COMMON_API LLFolderType -{ -public: - // ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums. - enum EType - { - FT_TEXTURE = 0, - - FT_SOUND = 1, - - FT_CALLINGCARD = 2, - - FT_LANDMARK = 3, - - FT_CLOTHING = 5, - - FT_OBJECT = 6, - - FT_NOTECARD = 7, - - FT_ROOT_INVENTORY = 8, - // We'd really like to change this to 9 since AT_CATEGORY is 8, - // but "My Inventory" has been type 8 for a long time. - - FT_LSL_TEXT = 10, - - FT_BODYPART = 13, - - FT_TRASH = 14, - - FT_SNAPSHOT_CATEGORY = 15, - - FT_LOST_AND_FOUND = 16, - - FT_ANIMATION = 20, - - FT_GESTURE = 21, - - FT_FAVORITE = 23, - - FT_ENSEMBLE_START = 26, - FT_ENSEMBLE_END = 45, - // This range is reserved for special clothing folder types. - - FT_CURRENT_OUTFIT = 46, - FT_OUTFIT = 47, - FT_MY_OUTFITS = 48, - - FT_MESH = 49, - - FT_INBOX = 50, - FT_OUTBOX = 51, - - FT_BASIC_ROOT = 52, - - FT_COUNT, - - FT_NONE = -1 - }; - - static EType lookup(const std::string& type_name); - static const std::string& lookup(EType folder_type); - - static bool lookupIsProtectedType(EType folder_type); - static bool lookupIsEnsembleType(EType folder_type); - - static LLAssetType::EType folderTypeToAssetType(LLFolderType::EType folder_type); - static LLFolderType::EType assetTypeToFolderType(LLAssetType::EType asset_type); - - static const std::string& badLookup(); // error string when a lookup fails - -protected: - LLFolderType() {} - ~LLFolderType() {} -}; - -#endif // LL_LLFOLDERTYPE_H diff --git a/indra/llcommon/llframetimer.h b/indra/llcommon/llframetimer.h index 45754f3785..7f61861072 100755 --- a/indra/llcommon/llframetimer.h +++ b/indra/llcommon/llframetimer.h @@ -35,7 +35,6 @@ */ #include "lltimer.h" -#include "timing.h" class LL_COMMON_API LLFrameTimer { diff --git a/indra/llcommon/llindexedvector.h b/indra/llcommon/llindexedvector.h new file mode 100755 index 0000000000..68c3821802 --- /dev/null +++ b/indra/llcommon/llindexedvector.h @@ -0,0 +1,100 @@ +/** + * @file lldarray.h + * @brief Wrapped std::vector for backward compatibility. + * + * $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_LLDARRAY_H +#define LL_LLDARRAY_H + +#include "llerror.h" + +#include +#include + +//-------------------------------------------------------- +// LLIndexedVector +//-------------------------------------------------------- + +template +class LLIndexedVector +{ +public: + typedef typename std::vector::iterator iterator; + typedef typename std::vector::const_iterator const_iterator; + typedef typename std::vector::reverse_iterator reverse_iterator; + typedef typename std::vector::const_reverse_iterator const_reverse_iterator; + typedef typename std::vector::size_type size_type; +protected: + std::vector mVector; + std::map mIndexMap; + +public: + LLIndexedVector() { mVector.reserve(BlockSize); } + + iterator begin() { return mVector.begin(); } + const_iterator begin() const { return mVector.begin(); } + iterator end() { return mVector.end(); } + const_iterator end() const { return mVector.end(); } + + reverse_iterator rbegin() { return mVector.rbegin(); } + const_reverse_iterator rbegin() const { return mVector.rbegin(); } + reverse_iterator rend() { return mVector.rend(); } + const_reverse_iterator rend() const { return mVector.rend(); } + + void reset() { mVector.resize(0); mIndexMap.resize(0); } + bool empty() const { return mVector.empty(); } + size_type size() const { return mVector.size(); } + + Type& operator[](const Key& k) + { + typename std::map::const_iterator iter = mIndexMap.find(k); + if (iter == mIndexMap.end()) + { + U32 n = mVector.size(); + mIndexMap[k] = n; + mVector.push_back(Type()); + llassert(mVector.size() == mIndexMap.size()); + return mVector[n]; + } + else + { + return mVector[iter->second]; + } + } + + const_iterator find(const Key& k) const + { + typename std::map::const_iterator iter = mIndexMap.find(k); + if(iter == mIndexMap.end()) + { + return mVector.end(); + } + else + { + return mVector.begin() + iter->second; + } + } +}; + +#endif diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp index dbd4eba7a0..aa2f4eb289 100755 --- a/indra/llcommon/llinitparam.cpp +++ b/indra/llcommon/llinitparam.cpp @@ -100,13 +100,13 @@ namespace LLInitParam void Parser::parserWarning(const std::string& message) { if (mParseSilently) return; - llwarns << message << llendl; + LL_WARNS() << message << LL_ENDL; } void Parser::parserError(const std::string& message) { if (mParseSilently) return; - llerrs << message << llendl; + LL_ERRS() << message << LL_ENDL; } @@ -131,7 +131,7 @@ namespace LLInitParam std::string name(char_name); if ((size_t)param->mParamHandle > mMaxParamOffset) { - llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block" << llendl; + LL_ERRS() << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block" << LL_ENDL; } if (name.empty()) @@ -214,7 +214,7 @@ namespace LLInitParam { if (emit_errors) { - llwarns << "Invalid param \"" << getParamName(block_data, param) << "\"" << llendl; + LL_WARNS() << "Invalid param \"" << getParamName(block_data, param) << "\"" << LL_ENDL; } return false; } @@ -417,7 +417,7 @@ namespace LLInitParam // Block if ((size_t)handle > block_data.mMaxParamOffset) { - llerrs << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block" << llendl; + LL_ERRS() << "Attempted to register param with block defined for parent class, make sure to derive from LLInitParam::Block" << LL_ENDL; } ParamDescriptorPtr param_descriptor = findParamDescriptor(param); diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index f4e37d21fe..349ad530af 100755 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -31,7 +31,7 @@ #include #include -#include "string_table.h" +#include "llstringtable.h" #include #include diff --git a/indra/llcommon/lllinkedqueue.h b/indra/llcommon/lllinkedqueue.h deleted file mode 100755 index 8336608809..0000000000 --- a/indra/llcommon/lllinkedqueue.h +++ /dev/null @@ -1,309 +0,0 @@ -/** - * @file lllinkedqueue.h - * @brief Declaration of linked queue classes. - * - * $LicenseInfo:firstyear=2003&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_LLLINKEDQUEUE_H -#define LL_LLLINKEDQUEUE_H - -#include "llerror.h" - -// node that actually contains the data -template class LLLinkedQueueNode -{ -public: - DATA_TYPE mData; - LLLinkedQueueNode *mNextp; - LLLinkedQueueNode *mPrevp; - - -public: - LLLinkedQueueNode(); - LLLinkedQueueNode(const DATA_TYPE data); - - // destructor does not, by default, destroy associated data - // however, the mDatap must be NULL to ensure that we aren't causing memory leaks - ~LLLinkedQueueNode(); -}; - - - -template class LLLinkedQueue -{ - -public: - LLLinkedQueue(); - - // destructor destroys list and nodes, but not data in nodes - ~LLLinkedQueue(); - - // Puts at end of FIFO - void push(const DATA_TYPE data); - - // Takes off front of FIFO - BOOL pop(DATA_TYPE &data); - BOOL peek(DATA_TYPE &data); - - void reset(); - - S32 getLength() const; - - BOOL isEmpty() const; - - BOOL remove(const DATA_TYPE data); - - BOOL checkData(const DATA_TYPE data) const; - -private: - // add node to end of list - // set mCurrentp to mQueuep - void addNodeAtEnd(LLLinkedQueueNode *nodep); - -private: - LLLinkedQueueNode mHead; // head node - LLLinkedQueueNode mTail; // tail node - S32 mLength; -}; - - -// -// Nodes -// - -template -LLLinkedQueueNode::LLLinkedQueueNode() : - mData(), mNextp(NULL), mPrevp(NULL) -{ } - -template -LLLinkedQueueNode::LLLinkedQueueNode(const DATA_TYPE data) : - mData(data), mNextp(NULL), mPrevp(NULL) -{ } - -template -LLLinkedQueueNode::~LLLinkedQueueNode() -{ } - - -// -// Queue itself -// - -template -LLLinkedQueue::LLLinkedQueue() -: mHead(), - mTail(), - mLength(0) -{ } - - -// destructor destroys list and nodes, but not data in nodes -template -LLLinkedQueue::~LLLinkedQueue() -{ - reset(); -} - - -// put data into a node and stick it at the end of the list -template -void LLLinkedQueue::push(const DATA_TYPE data) -{ - // make the new node - LLLinkedQueueNode *nodep = new LLLinkedQueueNode(data); - - addNodeAtEnd(nodep); -} - - -// search the list starting at mHead.mNextp and remove the link with mDatap == data -// set mCurrentp to mQueuep, or NULL if mQueuep points to node with mDatap == data -// return TRUE if found, FALSE if not found -template -BOOL LLLinkedQueue::remove(const DATA_TYPE data) -{ - BOOL b_found = FALSE; - - LLLinkedQueueNode *currentp = mHead.mNextp; - - while (currentp) - { - if (currentp->mData == data) - { - b_found = TRUE; - - // if there is a next one, fix it - if (currentp->mNextp) - { - currentp->mNextp->mPrevp = currentp->mPrevp; - } - else // we are at end of list - { - mTail.mPrevp = currentp->mPrevp; - } - - // if there is a previous one, fix it - if (currentp->mPrevp) - { - currentp->mPrevp->mNextp = currentp->mNextp; - } - else // we are at beginning of list - { - mHead.mNextp = currentp->mNextp; - } - - // remove the node - delete currentp; - mLength--; - break; - } - currentp = currentp->mNextp; - } - - return b_found; -} - - -// remove all nodes from the list but do not delete associated data -template -void LLLinkedQueue::reset() -{ - LLLinkedQueueNode *currentp; - LLLinkedQueueNode *nextp; - currentp = mHead.mNextp; - - while (currentp) - { - nextp = currentp->mNextp; - delete currentp; - currentp = nextp; - } - - // reset mHead and mCurrentp - mHead.mNextp = NULL; - mTail.mPrevp = NULL; - mLength = 0; -} - -template -S32 LLLinkedQueue::getLength() const -{ - return mLength; -} - -template -BOOL LLLinkedQueue::isEmpty() const -{ - return mLength <= 0; -} - -// check to see if data is in list -// set mCurrentp and mQueuep to the target of search if found, otherwise set mCurrentp to mQueuep -// return TRUE if found, FALSE if not found -template -BOOL LLLinkedQueue::checkData(const DATA_TYPE data) const -{ - LLLinkedQueueNode *currentp = mHead.mNextp; - - while (currentp) - { - if (currentp->mData == data) - { - return TRUE; - } - currentp = currentp->mNextp; - } - return FALSE; -} - -template -BOOL LLLinkedQueue::pop(DATA_TYPE &data) -{ - LLLinkedQueueNode *currentp; - - currentp = mHead.mNextp; - if (!currentp) - { - return FALSE; - } - - mHead.mNextp = currentp->mNextp; - if (currentp->mNextp) - { - currentp->mNextp->mPrevp = currentp->mPrevp; - } - else - { - mTail.mPrevp = currentp->mPrevp; - } - - data = currentp->mData; - delete currentp; - mLength--; - return TRUE; -} - -template -BOOL LLLinkedQueue::peek(DATA_TYPE &data) -{ - LLLinkedQueueNode *currentp; - - currentp = mHead.mNextp; - if (!currentp) - { - return FALSE; - } - data = currentp->mData; - return TRUE; -} - - -////////////////////////////////////////////////////////////////////////////////////////// -// private members -////////////////////////////////////////////////////////////////////////////////////////// - - -// add node to end of list -// set mCurrentp to mQueuep -template -void LLLinkedQueue::addNodeAtEnd(LLLinkedQueueNode *nodep) -{ - // add the node to the end of the list - nodep->mNextp = NULL; - nodep->mPrevp = mTail.mPrevp; - mTail.mPrevp = nodep; - - // if there's something in the list, fix its back pointer - if (nodep->mPrevp) - { - nodep->mPrevp->mNextp = nodep; - } - else // otherwise fix the head node - { - mHead.mNextp = nodep; - } - mLength++; -} - -#endif diff --git a/indra/llcommon/lllog.cpp b/indra/llcommon/lllog.cpp deleted file mode 100755 index fc4058b5c9..0000000000 --- a/indra/llcommon/lllog.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file lllog.cpp - * @author Don - * @date 2007-11-27 - * @brief Class to log messages to syslog for streambase to process. - * - * $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 "linden_common.h" -#include "lllog.h" - -#include "llapp.h" -#include "llsd.h" -#include "llsdserialize.h" - - -class LLLogImpl -{ -public: - LLLogImpl(LLApp* app) : mApp(app) {} - ~LLLogImpl() {} - - void log(const std::string &message, LLSD& info); - bool useLegacyLogMessage(const std::string &message); - -private: - LLApp* mApp; -}; - - -//@brief Function to log a message to syslog for streambase to collect. -void LLLogImpl::log(const std::string &message, LLSD& info) -{ - static S32 sequence = 0; - LLSD log_config = mApp->getOption("log-messages"); - if (log_config.has(message)) - { - LLSD message_config = log_config[message]; - if (message_config.has("use-syslog")) - { - if (! message_config["use-syslog"].asBoolean()) - { - return; - } - } - } - llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message - << " " << LLSDNotationStreamer(info) << llendl; -} - -//@brief Function to check if specified legacy log message should be sent. -bool LLLogImpl::useLegacyLogMessage(const std::string &message) -{ - LLSD log_config = mApp->getOption("log-messages"); - if (log_config.has(message)) - { - LLSD message_config = log_config[message]; - if (message_config.has("use-legacy")) - { - return message_config["use-legacy"].asBoolean(); - } - } - return true; -} - - -LLLog::LLLog(LLApp* app) -{ - mImpl = new LLLogImpl(app); -} - -LLLog::~LLLog() -{ - delete mImpl; - mImpl = NULL; -} - -void LLLog::log(const std::string &message, LLSD& info) -{ - if (mImpl) mImpl->log(message, info); -} - -bool LLLog::useLegacyLogMessage(const std::string &message) -{ - if (mImpl) - { - return mImpl->useLegacyLogMessage(message); - } - return true; -} - diff --git a/indra/llcommon/lllog.h b/indra/llcommon/lllog.h deleted file mode 100755 index 7964412e83..0000000000 --- a/indra/llcommon/lllog.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file lllog.h - * @author Don - * @date 2007-11-27 - * @brief Class to log messages to syslog for streambase to process. - * - * $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 LL_LLLOG_H -#define LL_LLLOG_H - -#include - -class LLLogImpl; -class LLApp; -class LLSD; - -class LL_COMMON_API LLLog -{ -public: - LLLog(LLApp* app); - virtual ~LLLog(); - - virtual void log(const std::string &message, LLSD& info); - virtual bool useLegacyLogMessage(const std::string &message); - -private: - LLLogImpl* mImpl; -}; - -#endif /* LL_LLLOG_H */ - diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h deleted file mode 100755 index 9f32598e61..0000000000 --- a/indra/llcommon/lllslconstants.h +++ /dev/null @@ -1,213 +0,0 @@ -/** - * @file lllslconstants.h - * @author James Cook - * @brief Constants used in lsl. - * - * $LicenseInfo:firstyear=2006&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_LLLSLCONSTANTS_H -#define LL_LLLSLCONSTANTS_H - -// LSL: Return flags for llGetAgentInfo -const U32 AGENT_FLYING = 0x0001; -const U32 AGENT_ATTACHMENTS = 0x0002; -const U32 AGENT_SCRIPTED = 0x0004; -const U32 AGENT_MOUSELOOK = 0x0008; -const U32 AGENT_SITTING = 0x0010; -const U32 AGENT_ON_OBJECT = 0x0020; -const U32 AGENT_AWAY = 0x0040; -const U32 AGENT_WALKING = 0x0080; -const U32 AGENT_IN_AIR = 0x0100; -const U32 AGENT_TYPING = 0x0200; -const U32 AGENT_CROUCHING = 0x0400; -const U32 AGENT_BUSY = 0x0800; -const U32 AGENT_ALWAYS_RUN = 0x1000; -const U32 AGENT_AUTOPILOT = 0x2000; - -const S32 LSL_REMOTE_DATA_CHANNEL = 1; -const S32 LSL_REMOTE_DATA_REQUEST = 2; -const S32 LSL_REMOTE_DATA_REPLY = 3; - -// Constants used in extended LSL primitive setter and getters -const S32 LSL_PRIM_TYPE_LEGACY = 1; // No longer supported. -const S32 LSL_PRIM_MATERIAL = 2; -const S32 LSL_PRIM_PHYSICS = 3; -const S32 LSL_PRIM_TEMP_ON_REZ = 4; -const S32 LSL_PRIM_PHANTOM = 5; -const S32 LSL_PRIM_POSITION = 6; -const S32 LSL_PRIM_SIZE = 7; -const S32 LSL_PRIM_ROTATION = 8; -const S32 LSL_PRIM_TYPE = 9; // Replacement for LSL_PRIM_TYPE_LEGACY -const S32 LSL_PRIM_TEXTURE = 17; -const S32 LSL_PRIM_COLOR = 18; -const S32 LSL_PRIM_BUMP_SHINY = 19; -const S32 LSL_PRIM_FULLBRIGHT = 20; -const S32 LSL_PRIM_FLEXIBLE = 21; -const S32 LSL_PRIM_TEXGEN = 22; -const S32 LSL_PRIM_POINT_LIGHT = 23; -const S32 LSL_PRIM_CAST_SHADOWS = 24; -const S32 LSL_PRIM_GLOW = 25; - -const S32 LSL_PRIM_TYPE_BOX = 0; -const S32 LSL_PRIM_TYPE_CYLINDER= 1; -const S32 LSL_PRIM_TYPE_PRISM = 2; -const S32 LSL_PRIM_TYPE_SPHERE = 3; -const S32 LSL_PRIM_TYPE_TORUS = 4; -const S32 LSL_PRIM_TYPE_TUBE = 5; -const S32 LSL_PRIM_TYPE_RING = 6; -const S32 LSL_PRIM_TYPE_SCULPT = 7; - -const S32 LSL_PRIM_HOLE_DEFAULT = 0x00; -const S32 LSL_PRIM_HOLE_CIRCLE = 0x10; -const S32 LSL_PRIM_HOLE_SQUARE = 0x20; -const S32 LSL_PRIM_HOLE_TRIANGLE= 0x30; - -const S32 LSL_PRIM_MATERIAL_STONE = 0; -const S32 LSL_PRIM_MATERIAL_METAL = 1; -const S32 LSL_PRIM_MATERIAL_GLASS = 2; -const S32 LSL_PRIM_MATERIAL_WOOD = 3; -const S32 LSL_PRIM_MATERIAL_FLESH = 4; -const S32 LSL_PRIM_MATERIAL_PLASTIC = 5; -const S32 LSL_PRIM_MATERIAL_RUBBER = 6; -const S32 LSL_PRIM_MATERIAL_LIGHT = 7; - -const S32 LSL_PRIM_SHINY_NONE = 0; -const S32 LSL_PRIM_SHINY_LOW = 1; -const S32 LSL_PRIM_SHINY_MEDIUM = 2; -const S32 LSL_PRIM_SHINY_HIGH = 3; - -const S32 LSL_PRIM_TEXGEN_DEFAULT = 0; -const S32 LSL_PRIM_TEXGEN_PLANAR = 1; - -const S32 LSL_PRIM_BUMP_NONE = 0; -const S32 LSL_PRIM_BUMP_BRIGHT = 1; -const S32 LSL_PRIM_BUMP_DARK = 2; -const S32 LSL_PRIM_BUMP_WOOD = 3; -const S32 LSL_PRIM_BUMP_BARK = 4; -const S32 LSL_PRIM_BUMP_BRICKS = 5; -const S32 LSL_PRIM_BUMP_CHECKER = 6; -const S32 LSL_PRIM_BUMP_CONCRETE = 7; -const S32 LSL_PRIM_BUMP_TILE = 8; -const S32 LSL_PRIM_BUMP_STONE = 9; -const S32 LSL_PRIM_BUMP_DISKS = 10; -const S32 LSL_PRIM_BUMP_GRAVEL = 11; -const S32 LSL_PRIM_BUMP_BLOBS = 12; -const S32 LSL_PRIM_BUMP_SIDING = 13; -const S32 LSL_PRIM_BUMP_LARGETILE = 14; -const S32 LSL_PRIM_BUMP_STUCCO = 15; -const S32 LSL_PRIM_BUMP_SUCTION = 16; -const S32 LSL_PRIM_BUMP_WEAVE = 17; - -const S32 LSL_PRIM_SCULPT_TYPE_SPHERE = 1; -const S32 LSL_PRIM_SCULPT_TYPE_TORUS = 2; -const S32 LSL_PRIM_SCULPT_TYPE_PLANE = 3; -const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4; -const S32 LSL_PRIM_SCULPT_TYPE_MASK = 7; -const S32 LSL_PRIM_SCULPT_FLAG_INVERT = 64; -const S32 LSL_PRIM_SCULPT_FLAG_MIRROR = 128; - -const S32 LSL_ALL_SIDES = -1; -const S32 LSL_LINK_ROOT = 1; -const S32 LSL_LINK_FIRST_CHILD = 2; -const S32 LSL_LINK_SET = -1; -const S32 LSL_LINK_ALL_OTHERS = -2; -const S32 LSL_LINK_ALL_CHILDREN = -3; -const S32 LSL_LINK_THIS = -4; - -// LSL constants for llSetForSell -const S32 SELL_NOT = 0; -const S32 SELL_ORIGINAL = 1; -const S32 SELL_COPY = 2; -const S32 SELL_CONTENTS = 3; - -// LSL constants for llSetPayPrice -const S32 PAY_PRICE_HIDE = -1; -const S32 PAY_PRICE_DEFAULT = -2; -const S32 MAX_PAY_BUTTONS = 4; -const S32 PAY_BUTTON_DEFAULT_0 = 1; -const S32 PAY_BUTTON_DEFAULT_1 = 5; -const S32 PAY_BUTTON_DEFAULT_2 = 10; -const S32 PAY_BUTTON_DEFAULT_3 = 20; - -// lsl email registration. -const S32 EMAIL_REG_SUBSCRIBE_OBJECT = 0x01; -const S32 EMAIL_REG_UNSUBSCRIBE_OBJECT = 0x02; -const S32 EMAIL_REG_UNSUBSCRIBE_SIM = 0x04; - -const S32 LIST_STAT_RANGE = 0; -const S32 LIST_STAT_MIN = 1; -const S32 LIST_STAT_MAX = 2; -const S32 LIST_STAT_MEAN = 3; -const S32 LIST_STAT_MEDIAN = 4; -const S32 LIST_STAT_STD_DEV = 5; -const S32 LIST_STAT_SUM = 6; -const S32 LIST_STAT_SUM_SQUARES = 7; -const S32 LIST_STAT_NUM_COUNT = 8; -const S32 LIST_STAT_GEO_MEAN = 9; - -const S32 STRING_TRIM_HEAD = 0x01; -const S32 STRING_TRIM_TAIL = 0x02; -const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; - -// llGetObjectDetails -const S32 OBJECT_UNKNOWN_DETAIL = -1; -const S32 OBJECT_NAME = 1; -const S32 OBJECT_DESC = 2; -const S32 OBJECT_POS = 3; -const S32 OBJECT_ROT = 4; -const S32 OBJECT_VELOCITY = 5; -const S32 OBJECT_OWNER = 6; -const S32 OBJECT_GROUP = 7; -const S32 OBJECT_CREATOR = 8; - -// llTextBox() magic token string - yes this is a hack. sue me. -char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!"; - -// changed() event flags -const U32 CHANGED_NONE = 0x0; -const U32 CHANGED_INVENTORY = 0x1; -const U32 CHANGED_COLOR = 0x2; -const U32 CHANGED_SHAPE = 0x4; -const U32 CHANGED_SCALE = 0x8; -const U32 CHANGED_TEXTURE = 0x10; -const U32 CHANGED_LINK = 0x20; -const U32 CHANGED_ALLOWED_DROP = 0x40; -const U32 CHANGED_OWNER = 0x80; -const U32 CHANGED_REGION = 0x100; -const U32 CHANGED_TELEPORT = 0x200; -const U32 CHANGED_REGION_START = 0x400; -const U32 CHANGED_MEDIA = 0x800; - -// Possible error results -const U32 LSL_STATUS_OK = 0; -const U32 LSL_STATUS_MALFORMED_PARAMS = 1000; -const U32 LSL_STATUS_TYPE_MISMATCH = 1001; -const U32 LSL_STATUS_BOUNDS_ERROR = 1002; -const U32 LSL_STATUS_NOT_FOUND = 1003; -const U32 LSL_STATUS_NOT_SUPPORTED = 1004; -const U32 LSL_STATUS_INTERNAL_ERROR = 1999; - -// Start per-function errors below, starting at 2000: -const U32 LSL_STATUS_WHITELIST_FAILED = 2001; - -#endif diff --git a/indra/llcommon/llmap.h b/indra/llcommon/llmap.h deleted file mode 100755 index 6294a15d3b..0000000000 --- a/indra/llcommon/llmap.h +++ /dev/null @@ -1,245 +0,0 @@ -/** - * @file llmap.h - * @brief LLMap class header file - * - * $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_LLMAP_H -#define LL_LLMAP_H - -// llmap uses the fast stl library code in a manner consistant with LLSkipMap, et. al. - -template class LLMap -{ -private: - typedef typename std::map stl_map_t; - typedef typename stl_map_t::iterator stl_iter_t; - typedef typename stl_map_t::value_type stl_value_t; - - stl_map_t mStlMap; - stl_iter_t mCurIter; // *iterator = pair - MAPPED_TYPE dummy_data; - INDEX_TYPE dummy_index; - -public: - LLMap() : mStlMap() - { - memset((void*)(&dummy_data), 0x0, sizeof(MAPPED_TYPE)); - memset((void*)(&dummy_index), 0x0, sizeof(INDEX_TYPE)); - mCurIter = mStlMap.begin(); - } - ~LLMap() - { - mStlMap.clear(); - } - - // use these functions to itterate through a list - void resetMap() - { - mCurIter = mStlMap.begin(); - } - - // get the current data and bump mCurrentp - // This is kind of screwy since it returns a reference; - // We have to have a dummy value for when we reach the end - // or in case we have an empty list. Presumably, this value - // will initialize to some NULL value that will end the iterator. - // We really shouldn't be using getNextData() or getNextKey() anyway... - MAPPED_TYPE &getNextData() - { - if (mCurIter == mStlMap.end()) - { - return dummy_data; - } - else - { - return (*mCurIter++).second; - } - } - - const INDEX_TYPE &getNextKey() - { - if (mCurIter == mStlMap.end()) - { - return dummy_index; - } - else - { - return (*mCurIter++).first; - } - } - - MAPPED_TYPE &getFirstData() - { - resetMap(); - return getNextData(); - } - - const INDEX_TYPE &getFirstKey() - { - resetMap(); - return getNextKey(); - } - - S32 getLength() - { - return mStlMap.size(); - } - - void addData(const INDEX_TYPE &index, MAPPED_TYPE pointed_to) - { - mStlMap.insert(stl_value_t(index, pointed_to)); - } - - void addData(const INDEX_TYPE &index) - { - mStlMap.insert(stl_value_t(index, dummy_data)); - } - - // if index doesn't exist, then insert a new node and return it - MAPPED_TYPE &getData(const INDEX_TYPE &index) - { - std::pair res; - res = mStlMap.insert(stl_value_t(index, dummy_data)); - return res.first->second; - } - - // if index doesn't exist, then insert a new node, return it, and set b_new_entry to true - MAPPED_TYPE &getData(const INDEX_TYPE &index, BOOL &b_new_entry) - { - std::pair res; - res = mStlMap.insert(stl_value_t(index, dummy_data)); - b_new_entry = res.second; - return res.first->second; - } - - // If there, returns the data. - // If not, returns NULL. - // Never adds entries to the map. - MAPPED_TYPE getIfThere(const INDEX_TYPE &index) - { - stl_iter_t iter; - iter = mStlMap.find(index); - if (iter == mStlMap.end()) - { - return (MAPPED_TYPE)0; - } - else - { - return (*iter).second; - } - } - - - // if index doesn't exist, then make a new node and return it - MAPPED_TYPE &operator[](const INDEX_TYPE &index) - { - return getData(index); - } - - // do a reverse look-up, return NULL if failed - INDEX_TYPE reverseLookup(const MAPPED_TYPE data) - { - stl_iter_t iter; - stl_iter_t end_iter; - iter = mStlMap.begin(); - end_iter = mStlMap.end(); - while (iter != end_iter) - { - if ((*iter).second == data) - return (*iter).first; - iter++; - } - return (INDEX_TYPE)0; - } - - BOOL removeData(const INDEX_TYPE &index) - { - mCurIter = mStlMap.find(index); - if (mCurIter == mStlMap.end()) - { - return FALSE; - } - else - { - stl_iter_t iter = mCurIter++; // incrament mCurIter to the next element - mStlMap.erase(iter); - return TRUE; - } - } - - // does this index exist? - BOOL checkData(const INDEX_TYPE &index) - { - stl_iter_t iter; - iter = mStlMap.find(index); - if (iter == mStlMap.end()) - { - return FALSE; - } - else - { - mCurIter = iter; - return TRUE; - } - } - - BOOL deleteData(const INDEX_TYPE &index) - { - mCurIter = mStlMap.find(index); - if (mCurIter == mStlMap.end()) - { - return FALSE; - } - else - { - stl_iter_t iter = mCurIter++; // incrament mCurIter to the next element - delete (*iter).second; - mStlMap.erase(iter); - return TRUE; - } - } - - void deleteAllData() - { - stl_iter_t iter; - stl_iter_t end_iter; - iter = mStlMap.begin(); - end_iter = mStlMap.end(); - while (iter != end_iter) - { - delete (*iter).second; - iter++; - } - mStlMap.clear(); - mCurIter = mStlMap.end(); - } - - void removeAllData() - { - mStlMap.clear(); - } -}; - - -#endif diff --git a/indra/llcommon/llnametable.h b/indra/llcommon/llnametable.h deleted file mode 100755 index d3283543f3..0000000000 --- a/indra/llcommon/llnametable.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @file llnametable.h - * @brief LLNameTable class is a table to associate pointers with string names - * - * $LicenseInfo:firstyear=2000&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_LLNAMETABLE_H -#define LL_LLNAMETABLE_H - -#include - -#include "string_table.h" - -template -class LLNameTable -{ -public: - LLNameTable() - : mNameMap() - { - } - - ~LLNameTable() - { - } - - void addEntry(const std::string& name, DATA data) - { - addEntry(name.c_str(), data); - } - - void addEntry(const char *name, DATA data) - { - char *tablename = gStringTable.addString(name); - mNameMap[tablename] = data; - } - - BOOL checkName(const std::string& name) const - { - return checkName(name.c_str()); - } - - // "logically const" even though it modifies the global nametable - BOOL checkName(const char *name) const - { - char *tablename = gStringTable.addString(name); - return mNameMap.count(tablename) ? TRUE : FALSE; - } - - DATA resolveName(const std::string& name) const - { - return resolveName(name.c_str()); - } - - // "logically const" even though it modifies the global nametable - DATA resolveName(const char *name) const - { - char *tablename = gStringTable.addString(name); - const_iter_t iter = mNameMap.find(tablename); - if (iter != mNameMap.end()) - return iter->second; - else - return 0; - } - - // O(N)! (currently only used in one place... (newsim/llstate.cpp)) - const char *resolveData(const DATA &data) const - { - const_iter_t iter = mNameMap.begin(); - const_iter_t end = mNameMap.end(); - for (; iter != end; ++iter) - { - if (iter->second == data) - return iter->first; - } - return NULL; - } - - typedef std::map name_map_t; - typedef typename std::map::iterator iter_t; - typedef typename std::map::const_iterator const_iter_t; - name_map_t mNameMap; -}; - -#endif diff --git a/indra/llcommon/lloptioninterface.cpp b/indra/llcommon/lloptioninterface.cpp deleted file mode 100755 index 23fae76dc0..0000000000 --- a/indra/llcommon/lloptioninterface.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file lloptioninterface.cpp - * @brief - * - * $LicenseInfo:firstyear=2009&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 "lloptioninterface.h" - - -LLOptionInterface::~LLOptionInterface() -{ - -} diff --git a/indra/llcommon/lloptioninterface.h b/indra/llcommon/lloptioninterface.h deleted file mode 100755 index 93b465db32..0000000000 --- a/indra/llcommon/lloptioninterface.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file lloptioninterface.h - * @brief - * - * $LicenseInfo:firstyear=2009&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_LLOPTIONINTERFACE_H -#define LL_LLOPTIONINTERFACE_H - -#include "linden_common.h" - -class LLSD; -class LLOptionInterface -{ -public: - virtual ~LLOptionInterface() = 0; - virtual LLSD getOption(const std::string& name) const = 0; -}; - -#endif diff --git a/indra/llcommon/llsecondlifeurls.cpp b/indra/llcommon/llsecondlifeurls.cpp deleted file mode 100755 index 9154e05e43..0000000000 --- a/indra/llcommon/llsecondlifeurls.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @file llsecondlifeurls.cpp - * @brief Urls used in the product - * - * $LicenseInfo:firstyear=2005&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 "linden_common.h" -#include "llsecondlifeurls.h" -/* -const std::string CREATE_ACCOUNT_URL ( - "http://join.secondlife.com/"); - -const std::string MANAGE_ACCOUNT ( - "http://secondlife.com/account/"); // *TODO: NOT USED - -const std::string AUCTION_URL ( - "http://secondlife.com/auctions/auction-detail.php?id="); - -const std::string EVENTS_URL ( - "http://secondlife.com/events/"); -*/ -const std::string TIER_UP_URL ( - "http://secondlife.com/app/landtier"); // *TODO: Translate (simulator) - -const std::string DIRECTX_9_URL ( - "http://secondlife.com/support/"); // *TODO: NOT USED -/* -const std::string LAND_URL ( - "http://secondlife.com/app/landtier"); // *TODO: NOT USED - -const std::string UPGRADE_TO_PREMIUM_URL ( - "http://secondlife.com/app/upgrade/"); // *TODO: NOT USED - -const std::string AMD_AGP_URL ( - "http://secondlife.com/support/"); // *TODO: NOT USED - -const std::string VIA_URL ( - "http://secondlife.com/support/"); // *TODO: NOT USED - -const std::string SUPPORT_URL ( - "http://secondlife.com/support/"); - -const std::string INTEL_CHIPSET_URL ( - "http://secondlife.com/support/"); // *TODO: NOT USED - -const std::string SIS_CHIPSET_URL ( - "http://secondlife.com/support/"); // *TODO: NOT USED - -const std::string BLOGS_URL ( - "http://blog.secondlife.com/"); // *TODO: NOT USED - -const std::string BUY_CURRENCY_URL ( - "http://secondlife.com/app/currency/"); - -const std::string LSL_DOC_URL ( - "http://secondlife.com/app/lsldoc/"); // *TODO: NOT USED - -const std::string SL_KB_URL ( - "http://secondlife.com/knowledgebase/"); // *TODO: NOT USED - -const std::string RELEASE_NOTES_BASE_URL ( - "http://secondlife.com/app/releasenotes/"); -*/ - diff --git a/indra/llcommon/llsecondlifeurls.h b/indra/llcommon/llsecondlifeurls.h deleted file mode 100755 index 62f357ffed..0000000000 --- a/indra/llcommon/llsecondlifeurls.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @file llsecondlifeurls.h - * @brief Global URLs to pages on our web site - * - * $LicenseInfo:firstyear=2004&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_LLSECONDLIFEURLS_H -#define LL_LLSECONDLIFEURLS_H -/* -// Account registration web page -LL_COMMON_API extern const std::string CREATE_ACCOUNT_URL; - -// Manage Account -LL_COMMON_API extern const std::string MANAGE_ACCOUNT; - -LL_COMMON_API extern const std::string AUCTION_URL; - -LL_COMMON_API extern const std::string EVENTS_URL; -*/ -// Tier up to a new land level. -LL_COMMON_API extern const std::string TIER_UP_URL; - - -// Tier up to a new land level. -LL_COMMON_API extern const std::string LAND_URL; - -// How to get DirectX 9 -LL_COMMON_API extern const std::string DIRECTX_9_URL; - -/* -// Upgrade from basic membership to premium membership -LL_COMMON_API extern const std::string UPGRADE_TO_PREMIUM_URL; - - -// Out of date VIA chipset -LL_COMMON_API extern const std::string VIA_URL; - -// Support URL -LL_COMMON_API extern const std::string SUPPORT_URL; - -// Linden Blogs page -LL_COMMON_API extern const std::string BLOGS_URL; - -// Currency page -LL_COMMON_API extern const std::string BUY_CURRENCY_URL; - -// LSL script wiki -LL_COMMON_API extern const std::string LSL_DOC_URL; - -// SL KnowledgeBase page -LL_COMMON_API extern const std::string SL_KB_URL; - -// Release Notes Redirect URL for Server and Viewer -LL_COMMON_API extern const std::string RELEASE_NOTES_BASE_URL; -*/ -#endif diff --git a/indra/llcommon/llstatenums.h b/indra/llcommon/llstatenums.h deleted file mode 100755 index ab9b6709e8..0000000000 --- a/indra/llcommon/llstatenums.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file llstatenums.h - * - * $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_LLSTATENUMS_H -#define LL_LLSTATENUMS_H - -enum ESimStatID -{ - LL_SIM_STAT_TIME_DILATION = 0, - LL_SIM_STAT_FPS = 1, - LL_SIM_STAT_PHYSFPS = 2, - LL_SIM_STAT_AGENTUPS = 3, - LL_SIM_STAT_FRAMEMS = 4, - LL_SIM_STAT_NETMS = 5, - LL_SIM_STAT_SIMOTHERMS = 6, - LL_SIM_STAT_SIMPHYSICSMS = 7, - LL_SIM_STAT_AGENTMS = 8, - LL_SIM_STAT_IMAGESMS = 9, - LL_SIM_STAT_SCRIPTMS = 10, - LL_SIM_STAT_NUMTASKS = 11, - LL_SIM_STAT_NUMTASKSACTIVE = 12, - LL_SIM_STAT_NUMAGENTMAIN = 13, - LL_SIM_STAT_NUMAGENTCHILD = 14, - LL_SIM_STAT_NUMSCRIPTSACTIVE = 15, - LL_SIM_STAT_LSLIPS = 16, - LL_SIM_STAT_INPPS = 17, - LL_SIM_STAT_OUTPPS = 18, - LL_SIM_STAT_PENDING_DOWNLOADS = 19, - LL_SIM_STAT_PENDING_UPLOADS = 20, - LL_SIM_STAT_VIRTUAL_SIZE_KB = 21, - LL_SIM_STAT_RESIDENT_SIZE_KB = 22, - LL_SIM_STAT_PENDING_LOCAL_UPLOADS = 23, - LL_SIM_STAT_TOTAL_UNACKED_BYTES = 24, - LL_SIM_STAT_PHYSICS_PINNED_TASKS = 25, - LL_SIM_STAT_PHYSICS_LOD_TASKS = 26, - LL_SIM_STAT_SIMPHYSICSSTEPMS = 27, - LL_SIM_STAT_SIMPHYSICSSHAPEMS = 28, - LL_SIM_STAT_SIMPHYSICSOTHERMS = 29, - LL_SIM_STAT_SIMPHYSICSMEMORY = 30, - LL_SIM_STAT_SCRIPT_EPS = 31, - LL_SIM_STAT_SIMSPARETIME = 32, - LL_SIM_STAT_SIMSLEEPTIME = 33, - LL_SIM_STAT_IOPUMPTIME = 34, - LL_SIM_STAT_PCTSCRIPTSRUN = 35, - LL_SIM_STAT_REGION_IDLE = 36, // dataserver only - LL_SIM_STAT_REGION_IDLE_POSSIBLE = 37, // dataserver only - LL_SIM_STAT_SIMAISTEPTIMEMS = 38, - LL_SIM_STAT_SKIPPEDAISILSTEPS_PS = 39, - LL_SIM_STAT_PCTSTEPPEDCHARACTERS = 40 - -}; - -#endif diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 424138dad1..143e71f40c 100755 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -33,7 +33,6 @@ #include #include #include -#include #include // Use to compare the first element only of a pair @@ -125,7 +124,7 @@ struct DeletePairedPointerArray // compiler, the second unary_function template parameter can be set // to void. // -// Here's a snippit showing how you use this object: +// Here's a snippet showing how you use this object: // // typedef std::map map_type; // map_type widget_map; @@ -170,6 +169,49 @@ struct CopyNewPointer } }; +template +void delete_and_clear(std::list& list) +{ + std::for_each(list.begin(), list.end(), DeletePointer()); + list.clear(); +} + +template +void delete_and_clear(std::vector& vector) +{ + std::for_each(vector.begin(), vector.end(), DeletePointer()); + vector.clear(); +} + +template +void delete_and_clear(std::set& set) +{ + std::for_each(set.begin(), set.end(), DeletePointer()); + set.clear(); +} + +template +void delete_and_clear(std::map& map) +{ + std::for_each(map.begin(), map.end(), DeletePairedPointer()); + map.clear(); +} + +template +void delete_and_clear(T*& ptr) +{ + delete ptr; + ptr = NULL; +} + + +template +void delete_and_clear_array(T*& ptr) +{ + delete[] ptr; + ptr = NULL; +} + // Simple function to help with finding pointers in maps. // For example: // typedef map_t; @@ -229,7 +271,6 @@ inline T get_if_there(const std::map& inmap, const K& key, T default_value) } }; -// Useful for replacing the removeObj() functionality of LLDynamicArray // Example: // for (std::vector::iterator iter = mList.begin(); iter != mList.end(); ) // { @@ -238,8 +279,8 @@ inline T get_if_there(const std::map& inmap, const K& key, T default_value) // else // ++iter; // } -template -inline Iter vector_replace_with_last(std::vector& invec, Iter iter) +template +inline typename std::vector::iterator vector_replace_with_last(std::vector& invec, typename std::vector::iterator iter) { typename std::vector::iterator last = invec.end(); --last; if (iter == invec.end()) @@ -259,7 +300,6 @@ inline Iter vector_replace_with_last(std::vector& invec, Iter iter) } }; -// Useful for replacing the removeObj() functionality of LLDynamicArray // Example: // vector_replace_with_last(mList, x); template @@ -522,4 +562,151 @@ namespace std }; } // std + +/** + * Implementation for ll_template_cast() (q.v.). + * + * Default implementation: trying to cast two completely unrelated types + * returns 0. Typically you'd specify T and U as pointer types, but in fact T + * can be any type that can be initialized with 0. + */ +template +struct ll_template_cast_impl +{ + T operator()(U) + { + return 0; + } +}; + +/** + * ll_template_cast(some_value) is for use in a template function when + * some_value might be of arbitrary type, but you want to recognize type T + * specially. + * + * It's designed for use with pointer types. Example: + * @code + * struct SpecialClass + * { + * void someMethod(const std::string&) const; + * }; + * + * template + * void somefunc(const REALCLASS& instance) + * { + * const SpecialClass* ptr = ll_template_cast(&instance); + * if (ptr) + * { + * ptr->someMethod("Call method only available on SpecialClass"); + * } + * } + * @endcode + * + * Why is this better than dynamic_cast<>? Because unless OtherClass is + * polymorphic, the following won't even compile (gcc 4.0.1): + * @code + * OtherClass other; + * SpecialClass* ptr = dynamic_cast(&other); + * @endcode + * to say nothing of this: + * @code + * void function(int); + * SpecialClass* ptr = dynamic_cast(&function); + * @endcode + * ll_template_cast handles these kinds of cases by returning 0. + */ +template +T ll_template_cast(U value) +{ + return ll_template_cast_impl()(value); +} + +/** + * Implementation for ll_template_cast() (q.v.). + * + * Implementation for identical types: return same value. + */ +template +struct ll_template_cast_impl +{ + T operator()(T value) + { + return value; + } +}; + +/** + * LL_TEMPLATE_CONVERTIBLE(dest, source) asserts that, for a value @c s of + * type @c source, ll_template_cast(s) will return @c s -- + * presuming that @c source can be converted to @c dest by the normal rules of + * C++. + * + * By default, ll_template_cast(s) will return 0 unless @c s's + * type is literally identical to @c dest. (This is because of the + * straightforward application of template specialization rules.) That can + * lead to surprising results, e.g.: + * + * @code + * Foo myFoo; + * const Foo* fooptr = ll_template_cast(&myFoo); + * @endcode + * + * Here @c fooptr will be 0 because &myFoo is of type Foo* + * -- @em not const Foo*. (Declaring const Foo myFoo; would + * force the compiler to do the right thing.) + * + * More disappointingly: + * @code + * struct Base {}; + * struct Subclass: public Base {}; + * Subclass object; + * Base* ptr = ll_template_cast(&object); + * @endcode + * + * Here @c ptr will be 0 because &object is of type + * Subclass* rather than Base*. We @em want this cast to + * succeed, but without our help ll_template_cast can't recognize it. + * + * The following would suffice: + * @code + * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*); + * ... + * Base* ptr = ll_template_cast(&object); + * @endcode + * + * However, as noted earlier, this is easily fooled: + * @code + * const Base* ptr = ll_template_cast(&object); + * @endcode + * would still produce 0 because we haven't yet seen: + * @code + * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*); + * @endcode + * + * @TODO + * This macro should use Boost type_traits facilities for stripping and + * re-adding @c const and @c volatile qualifiers so that invoking + * LL_TEMPLATE_CONVERTIBLE(dest, source) will automatically generate all + * permitted permutations. It's really not fair to the coder to require + * separate: + * @code + * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*); + * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*); + * LL_TEMPLATE_CONVERTIBLE(const Base*, const Subclass*); + * @endcode + * + * (Naturally we omit LL_TEMPLATE_CONVERTIBLE(Base*, const Subclass*) + * because that's not permitted by normal C++ assignment anyway.) + */ +#define LL_TEMPLATE_CONVERTIBLE(DEST, SOURCE) \ +template <> \ +struct ll_template_cast_impl \ +{ \ + DEST operator()(SOURCE wrapper) \ + { \ + return wrapper; \ + } \ +} + + #endif // LL_LLSTL_H diff --git a/indra/llcommon/llstringtable.cpp b/indra/llcommon/llstringtable.cpp index 7ad3805351..f288999964 100755 --- a/indra/llcommon/llstringtable.cpp +++ b/indra/llcommon/llstringtable.cpp @@ -317,7 +317,7 @@ void LLStringTable::removeString(const char *str) mUniqueEntries--; if (mUniqueEntries < 0) { - llerror("LLStringTable:removeString trying to remove too many strings!", 0); + LL_ERRS() << "LLStringTable:removeString trying to remove too many strings!" << LL_ENDL; } delete iter->second; mStringHash.erase(iter); @@ -343,7 +343,7 @@ void LLStringTable::removeString(const char *str) mUniqueEntries--; if (mUniqueEntries < 0) { - llerror("LLStringTable:removeString trying to remove too many strings!", 0); + LL_ERRS() << "LLStringTable:removeString trying to remove too many strings!" << LL_ENDL; } strlist->remove(entry); delete entry; diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 25383fc4d8..8f5a886a37 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -43,7 +43,6 @@ // // Locally used constants // -const U32 SEC_PER_DAY = 86400; const F64 SEC_TO_MICROSEC = 1000000.f; const U64 SEC_TO_MICROSEC_U64 = 1000000; const F64 USEC_TO_SEC_F64 = 0.000001; @@ -204,6 +203,8 @@ F64 calc_clock_frequency(unsigned int uiMeasureMSecs) return 1000000.0; // microseconds, so 1 MHz. } +const U64 SEC_TO_MICROSEC_U64 = 1000000; + U64 get_clock_count() { // Linux clocks are in microseconds @@ -226,7 +227,7 @@ void update_clock_frequencies() // returns a U64 number that represents the number of // microseconds since the unix epoch - Jan 1, 1970 -U64 totalTime() +LLUnitImplicit totalTime() { U64 current_clock_count = get_clock_count(); if (!gTotalTimeClockCount) @@ -263,7 +264,7 @@ U64 totalTime() } // Return the total clock tick count in microseconds. - return (U64)(gTotalTimeClockCount*gClocksToMicroseconds); + return LLUnits::Microseconds::fromValue(gTotalTimeClockCount*gClocksToMicroseconds); } @@ -375,7 +376,7 @@ LLUnitImplicit LLTimer::getElapsedTimeAndResetF32() /////////////////////////////////////////////////////////////////////////////// -void LLTimer::setTimerExpirySec(F32 expiration) +void LLTimer::setTimerExpirySec(LLUnitImplicit expiration) { mExpirationTicks = get_clock_count() + (U64)((F32)(expiration * gClockFrequency)); diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index f2dc59e405..1f2c56432b 100755 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -91,7 +91,7 @@ public: void stop() { mStarted = FALSE; } void reset(); // Resets the timer void setLastClockCount(U64 current_count); // Sets the timer so that the next elapsed call will be relative to this time - void setTimerExpirySec(F32 expiration); + void setTimerExpirySec(LLUnitImplicit expiration); BOOL checkExpirationAndReset(F32 expiration); BOOL hasExpired() const; LLUnitImplicit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset @@ -171,6 +171,6 @@ LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_dayli LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring); -U64 LL_COMMON_API totalTime(); // Returns current system time in microseconds +LLUnitImplicit LL_COMMON_API totalTime(); // Returns current system time in microseconds #endif diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index d6d8d9da6a..781a4ab731 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -29,7 +29,7 @@ #include "stdtypes.h" #include "llpreprocessor.h" -#include "llerrorlegacy.h" +#include "llerror.h" template struct LLUnit @@ -266,13 +266,29 @@ LLUnit operator + (SCALAR_TYPE first, LLUnit -LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) +LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) +{ + LLUnitImplicit result(first); + result += second; + return result; +} + +template +LLUnitImplicit operator + (LLUnit first, LLUnitImplicit second) { LLUnitImplicit result(first); result += second; return result; } +template +LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) +{ + LLUnitImplicit result(first); + result += LLUnitImplicit(second); + return result; +} + template LLUnitImplicit operator + (LLUnitImplicit first, SCALAR_TYPE second) { @@ -281,10 +297,10 @@ LLUnitImplicit operator + (LLUnitImplicit -LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) +template +LLUnitImplicit operator + (SCALAR_TYPE first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } @@ -324,6 +340,22 @@ LLUnitImplicit operator - (LLUnitImplicit +LLUnitImplicit operator - (LLUnit first, LLUnitImplicit second) +{ + LLUnitImplicit result(first); + result -= second; + return result; +} + +template +LLUnitImplicit operator - (LLUnitImplicit first, LLUnit second) +{ + LLUnitImplicit result(first); + result -= LLUnitImplicit(second); + return result; +} + template LLUnitImplicit operator - (LLUnitImplicit first, SCALAR_TYPE second) { @@ -343,18 +375,6 @@ LLUnitImplicit operator - (SCALAR_TYPE first, LLUnitImp // // operator * // -template -LLUnit operator * (SCALAR_TYPE first, LLUnit second) -{ - return LLUnit((STORAGE_TYPE)(first * second.value())); -} - -template -LLUnit operator * (LLUnit first, SCALAR_TYPE second) -{ - return LLUnit((STORAGE_TYPE)(first.value() * second)); -} - template LLUnit operator * (LLUnit, LLUnit) { @@ -364,15 +384,15 @@ LLUnit operator * (LLUnit, } template -LLUnitImplicit operator * (SCALAR_TYPE first, LLUnitImplicit second) +LLUnit operator * (LLUnit first, SCALAR_TYPE second) { - return LLUnitImplicit(first * second.value()); + return LLUnit((STORAGE_TYPE)(first.value() * second)); } template -LLUnitImplicit operator * (LLUnitImplicit first, SCALAR_TYPE second) +LLUnit operator * (SCALAR_TYPE first, LLUnit second) { - return LLUnitImplicit(first.value() * second); + return LLUnit((STORAGE_TYPE)(first * second.value())); } template @@ -383,6 +403,19 @@ LLUnitImplicit operator * (LLUnitImplicit(); } +template +LLUnitImplicit operator * (LLUnitImplicit first, SCALAR_TYPE second) +{ + return LLUnitImplicit(first.value() * second); +} + +template +LLUnitImplicit operator * (SCALAR_TYPE first, LLUnitImplicit second) +{ + return LLUnitImplicit(first * second.value()); +} + + // // operator / // @@ -416,6 +449,18 @@ STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUni return STORAGE_TYPE1(first.value() / first.convert(second)); } +template +STORAGE_TYPE1 operator / (LLUnit first, LLUnitImplicit second) +{ + return STORAGE_TYPE1(first.value() / first.convert(second)); +} + +template +STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUnit second) +{ + return STORAGE_TYPE1(first.value() / first.convert(second)); +} + #define COMPARISON_OPERATORS(op) \ template \ bool operator op (SCALAR_TYPE first, LLUnit second) \ @@ -591,6 +636,7 @@ LL_DECLARE_DERIVED_UNIT(Mibibits, * 1024, Gibibits, "Gib"); LL_DECLARE_BASE_UNIT(Seconds, "s"); LL_DECLARE_DERIVED_UNIT(Seconds, * 60, Minutes, "min"); LL_DECLARE_DERIVED_UNIT(Minutes, * 60, Hours, "h"); +LL_DECLARE_DERIVED_UNIT(Hours, * 24, Days, "d"); LL_DECLARE_DERIVED_UNIT(Seconds, / 1000, Milliseconds, "ms"); LL_DECLARE_DERIVED_UNIT(Milliseconds, / 1000, Microseconds, "\x09\x3cs"); LL_DECLARE_DERIVED_UNIT(Microseconds, / 1000, Nanoseconds, "ns"); diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h deleted file mode 100755 index ef68a0eaf5..0000000000 --- a/indra/llcommon/llversionserver.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @file llversionserver.h - * @brief - * - * $LicenseInfo:firstyear=2002&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_LLVERSIONSERVER_H -#define LL_LLVERSIONSERVER_H - -const S32 LL_VERSION_MAJOR = 2; -const S32 LL_VERSION_MINOR = 1; -const S32 LL_VERSION_PATCH = 0; -const S32 LL_VERSION_BUILD = 264760; - -const char * const LL_CHANNEL = "Second Life Server"; - - -#endif diff --git a/indra/llcommon/roles_constants.h b/indra/llcommon/roles_constants.h deleted file mode 100755 index effd15ea72..0000000000 --- a/indra/llcommon/roles_constants.h +++ /dev/null @@ -1,192 +0,0 @@ -/** - * @file roles_constants.h - * @brief General Roles Constants - * - * $LicenseInfo:firstyear=2006&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_ROLES_CONSTANTS_H -#define LL_ROLES_CONSTANTS_H - -// This value includes the everyone group. -const S32 MAX_ROLES = 10; - -enum LLRoleMemberChangeType -{ - RMC_ADD, - RMC_REMOVE, - RMC_NONE -}; - -enum LLRoleChangeType -{ - RC_UPDATE_NONE, - RC_UPDATE_DATA, - RC_UPDATE_POWERS, - RC_UPDATE_ALL, - RC_CREATE, - RC_DELETE -}; - -// -// Powers -// - -// KNOWN HOLES: use these for any single bit powers you need -// bit 0x1 << 46 -// bit 0x1 << 49 and above - -// These powers were removed to make group roles simpler -// bit 0x1 << 41 (GP_ACCOUNTING_VIEW) -// bit 0x1 << 46 (GP_PROPOSAL_VIEW) - -const U64 GP_NO_POWERS = 0x0; -const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL; - -// Membership -const U64 GP_MEMBER_INVITE = 0x1 << 1; // Invite member -const U64 GP_MEMBER_EJECT = 0x1 << 2; // Eject member from group -const U64 GP_MEMBER_OPTIONS = 0x1 << 3; // Toggle "Open enrollment" and change "Signup Fee" -const U64 GP_MEMBER_VISIBLE_IN_DIR = 0x1LL << 47; - -// Roles -const U64 GP_ROLE_CREATE = 0x1 << 4; // Create new roles -const U64 GP_ROLE_DELETE = 0x1 << 5; // Delete roles -const U64 GP_ROLE_PROPERTIES = 0x1 << 6; // Change Role Names, Titles, and Descriptions (Of roles the user is in, only, or any role in group?) -const U64 GP_ROLE_ASSIGN_MEMBER_LIMITED = 0x1 << 7; // Assign Member to a Role that the assigner is in -const U64 GP_ROLE_ASSIGN_MEMBER = 0x1 << 8; // Assign Member to Role -const U64 GP_ROLE_REMOVE_MEMBER = 0x1 << 9; // Remove Member from Role -const U64 GP_ROLE_CHANGE_ACTIONS = 0x1 << 10; // Change actions a role can perform - -// Group Identity -const U64 GP_GROUP_CHANGE_IDENTITY = 0x1 << 11; // Charter, insignia, 'Show In Group List', 'Publish on the web', 'Mature', all 'Show Member In Group Profile' checkboxes - -// Parcel Management -const U64 GP_LAND_DEED = 0x1 << 12; // Deed Land and Buy Land for Group -const U64 GP_LAND_RELEASE = 0x1 << 13; // Release Land (to Gov. Linden) -const U64 GP_LAND_SET_SALE_INFO = 0x1 << 14; // Set for sale info (Toggle "For Sale", Set Price, Set Target, Toggle "Sell objects with the land") -const U64 GP_LAND_DIVIDE_JOIN = 0x1 << 15; // Divide and Join Parcels - -// Parcel Identity -const U64 GP_LAND_FIND_PLACES = 0x1 << 17; // Toggle "Show in Find Places" and Set Category. -const U64 GP_LAND_CHANGE_IDENTITY = 0x1 << 18; // Change Parcel Identity: Parcel Name, Parcel Description, Snapshot, 'Publish on the web', and 'Mature' checkbox -const U64 GP_LAND_SET_LANDING_POINT = 0x1 << 19; // Set Landing Point - -// Parcel Settings -const U64 GP_LAND_CHANGE_MEDIA = 0x1 << 20; // Change Media Settings -const U64 GP_LAND_EDIT = 0x1 << 21; // Toggle Edit Land -const U64 GP_LAND_OPTIONS = 0x1 << 22; // Toggle Set Home Point, Fly, Outside Scripts, Create/Edit Objects, Landmark, and Damage checkboxes - -// Parcel Powers -const U64 GP_LAND_ALLOW_EDIT_LAND = 0x1 << 23; // Bypass Edit Land Restriction -const U64 GP_LAND_ALLOW_FLY = 0x1 << 24; // Bypass Fly Restriction -const U64 GP_LAND_ALLOW_CREATE = 0x1 << 25; // Bypass Create/Edit Objects Restriction -const U64 GP_LAND_ALLOW_LANDMARK = 0x1 << 26; // Bypass Landmark Restriction -const U64 GP_LAND_ALLOW_SET_HOME = 0x1 << 28; // Bypass Set Home Point Restriction -const U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land - - -// Parcel Access -const U64 GP_LAND_MANAGE_ALLOWED = 0x1 << 29; // Manage Allowed List -const U64 GP_LAND_MANAGE_BANNED = 0x1 << 30; // Manage Banned List -const U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings -const U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land - -// Parcel Content -const U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group -const U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group -const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group - -// Select a power-bit based on an object's relationship to a parcel. -const U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED - | GP_LAND_RETURN_GROUP_SET - | GP_LAND_RETURN_NON_GROUP; - -const U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees - -// Object Management -const U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object -const U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod) -const U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale - -// Accounting -const U64 GP_ACCOUNTING_ACCOUNTABLE = 0x1LL << 40; // Pay Group Liabilities and Receive Group Dividends - -// Notices -const U64 GP_NOTICES_SEND = 0x1LL << 42; // Send Notices -const U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice History - -// Proposals -// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856: -const U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal -// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856: -const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal - -// Group chat moderation related -const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session -const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk -const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session - -const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE - | GP_LAND_ALLOW_SET_HOME - | GP_NOTICES_RECEIVE - | GP_SESSION_JOIN - | GP_SESSION_VOICE - ; - -const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBER - | GP_GROUP_CHANGE_IDENTITY - | GP_LAND_ADMIN - | GP_LAND_ALLOW_EDIT_LAND - | GP_LAND_ALLOW_FLY - | GP_LAND_ALLOW_CREATE - | GP_LAND_ALLOW_LANDMARK - | GP_LAND_CHANGE_IDENTITY - | GP_LAND_CHANGE_MEDIA - | GP_LAND_DEED - | GP_LAND_DIVIDE_JOIN - | GP_LAND_EDIT - | GP_LAND_FIND_PLACES - | GP_LAND_GARDENING - | GP_LAND_MANAGE_ALLOWED - | GP_LAND_MANAGE_BANNED - | GP_LAND_MANAGE_PASSES - | GP_LAND_OPTIONS - | GP_LAND_RELEASE - | GP_LAND_RETURN_GROUP_OWNED - | GP_LAND_RETURN_GROUP_SET - | GP_LAND_RETURN_NON_GROUP - | GP_LAND_SET_LANDING_POINT - | GP_LAND_SET_SALE_INFO - | GP_MEMBER_EJECT - | GP_MEMBER_INVITE - | GP_MEMBER_OPTIONS - | GP_MEMBER_VISIBLE_IN_DIR - | GP_NOTICES_SEND - | GP_OBJECT_DEED - | GP_OBJECT_MANIPULATE - | GP_OBJECT_SET_SALE - | GP_ROLE_ASSIGN_MEMBER_LIMITED - | GP_ROLE_PROPERTIES - | GP_SESSION_MODERATOR - ; -#endif diff --git a/indra/llcommon/stdenums.h b/indra/llcommon/stdenums.h deleted file mode 100755 index efcbe76795..0000000000 --- a/indra/llcommon/stdenums.h +++ /dev/null @@ -1,137 +0,0 @@ -/** - * @file stdenums.h - * @brief Enumerations for indra. - * - * $LicenseInfo:firstyear=2002&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_STDENUMS_H -#define LL_STDENUMS_H - -//---------------------------------------------------------------------------- -// DEPRECATED - create new, more specific files for shared enums/constants -//---------------------------------------------------------------------------- - -// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim) -enum EDragAndDropType -{ - DAD_NONE = 0, - DAD_TEXTURE = 1, - DAD_SOUND = 2, - DAD_CALLINGCARD = 3, - DAD_LANDMARK = 4, - DAD_SCRIPT = 5, - DAD_CLOTHING = 6, - DAD_OBJECT = 7, - DAD_NOTECARD = 8, - DAD_CATEGORY = 9, - DAD_ROOT_CATEGORY = 10, - DAD_BODYPART = 11, - DAD_ANIMATION = 12, - DAD_GESTURE = 13, - DAD_LINK = 14, - DAD_MESH = 15, - DAD_WIDGET = 16, - DAD_PERSON = 17, - DAD_COUNT = 18, // number of types in this enum -}; - -// Reasons for drags to be denied. -// ordered by priority for multi-drag -enum EAcceptance -{ - ACCEPT_POSTPONED, // we are asynchronously determining acceptance - ACCEPT_NO, // Uninformative, general purpose denial. - ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it. - ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item - ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here. - ACCEPT_YES_COPY_MULTI, // We'll take a copy of multiple items - ACCEPT_YES_MULTI // Accepted. OK to drag and drop multiple items here. -}; - -// This is used by the DeRezObject message to determine where to put -// derezed tasks. -enum EDeRezDestination -{ - DRD_SAVE_INTO_AGENT_INVENTORY = 0, - DRD_ACQUIRE_TO_AGENT_INVENTORY = 1, // try to leave copy in world - DRD_SAVE_INTO_TASK_INVENTORY = 2, - DRD_ATTACHMENT = 3, - DRD_TAKE_INTO_AGENT_INVENTORY = 4, // delete from world - DRD_FORCE_TO_GOD_INVENTORY = 5, // force take copy - DRD_TRASH = 6, - DRD_ATTACHMENT_TO_INV = 7, - DRD_ATTACHMENT_EXISTS = 8, - DRD_RETURN_TO_OWNER = 9, // back to owner's inventory - DRD_RETURN_TO_LAST_OWNER = 10, // deeded object back to last owner's inventory - - DRD_COUNT = 11 -}; - - -// This is used by the return to owner code to determine the reason -// that this object is being returned. -enum EReturnReason -{ - RR_GENERIC = 0, - RR_SANDBOX = 1, - RR_PARCEL_OWNER = 2, - RR_PARCEL_AUTO = 3, - RR_PARCEL_FULL = 4, - RR_OFF_WORLD = 5, - - RR_COUNT = 6 -}; - -// This is used for filling in the first byte of the ExtraID field of -// the ObjectProperties message. -enum EObjectPropertiesExtraID -{ - OPEID_NONE = 0, - OPEID_ASSET_ID = 1, - OPEID_FROM_TASK_ID = 2, - - OPEID_COUNT = 3 -}; - -enum EAddPosition -{ - ADD_TOP, - ADD_BOTTOM, - ADD_DEFAULT -}; - -enum LLGroupChange -{ - GC_PROPERTIES, - GC_MEMBER_DATA, - GC_ROLE_DATA, - GC_ROLE_MEMBER_DATA, - GC_TITLES, - GC_ALL -}; - -//---------------------------------------------------------------------------- -// DEPRECATED - create new, more specific files for shared enums/constants -//---------------------------------------------------------------------------- - -#endif diff --git a/indra/llcommon/string_table.h b/indra/llcommon/string_table.h deleted file mode 100755 index fe6416fb50..0000000000 --- a/indra/llcommon/string_table.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @file string_table.h - * @brief Legacy wrapper header. - * - * $LicenseInfo:firstyear=2000&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 "llstringtable.h" diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp index afc0c18cd0..9bfd567068 100755 --- a/indra/llcommon/tests/bitpack_test.cpp +++ b/indra/llcommon/tests/bitpack_test.cpp @@ -28,7 +28,7 @@ #include "linden_common.h" -#include "../bitpack.h" +#include "../llbitpack.h" #include "../test/lltut.h" diff --git a/indra/llcommon/timing.h b/indra/llcommon/timing.h deleted file mode 100755 index c408d4c446..0000000000 --- a/indra/llcommon/timing.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @file timing.h - * @brief Cross-platform routines for doing timing. - * - * $LicenseInfo:firstyear=2000&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_TIMING_H -#define LL_TIMING_H - - -#if LL_LINUX || LL_DARWIN || LL_SOLARIS -#include -#endif - - -const F32 SEC_TO_MICROSEC = 1000000.f; -const U64 SEC_TO_MICROSEC_U64 = 1000000; -const U32 SEC_PER_DAY = 86400; - -// functionality has been moved lltimer.{cpp,h}. This file will be deprecated in the future. - -#endif diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h index 1510d7e0b3..abd6426d68 100755 --- a/indra/llcrashlogger/llcrashlogger.h +++ b/indra/llcrashlogger/llcrashlogger.h @@ -34,6 +34,11 @@ #include "llsd.h" #include "llcontrol.h" +// Crash reporter behavior +const S32 CRASH_BEHAVIOR_ASK = 0; +const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; +const S32 CRASH_BEHAVIOR_NEVER_SEND = 2; + class LLCrashLogger : public LLApp { public: diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index e45c809e7e..0a1f93bd80 100755 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -19,6 +19,7 @@ include_directories( set(llinventory_SOURCE_FILES llcategory.cpp lleconomy.cpp + llfoldertype.cpp llinventory.cpp llinventorydefines.cpp llinventorytype.cpp @@ -36,6 +37,7 @@ set(llinventory_HEADER_FILES llcategory.h lleconomy.h + llfoldertype.h llinventory.h llinventorydefines.h llinventorytype.h diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp new file mode 100755 index 0000000000..f6d0f5bce8 --- /dev/null +++ b/indra/llinventory/llfoldertype.cpp @@ -0,0 +1,168 @@ +/** + * @file llfoldertype.cpp + * @brief Implementatino of LLFolderType functionality. + * + * $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 "linden_common.h" + +#include "llfoldertype.h" +#include "lldictionary.h" +#include "llmemory.h" +#include "llsingleton.h" + +///---------------------------------------------------------------------------- +/// Class LLFolderType +///---------------------------------------------------------------------------- +struct FolderEntry : public LLDictionaryEntry +{ + FolderEntry(const std::string &type_name, // 8 character limit! + bool is_protected) // can the viewer change categories of this type? + : + LLDictionaryEntry(type_name), + mIsProtected(is_protected) + { + llassert(type_name.length() <= 8); + } + + const bool mIsProtected; +}; + +class LLFolderDictionary : public LLSingleton, + public LLDictionary +{ +public: + LLFolderDictionary(); +protected: + virtual LLFolderType::EType notFound() const + { + return LLFolderType::FT_NONE; + } +}; + +LLFolderDictionary::LLFolderDictionary() +{ + // TYPE NAME PROTECTED + // |-----------|---------| + addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", TRUE)); + addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", TRUE)); + addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", TRUE)); + addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", TRUE)); + addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE)); + addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE)); + addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE)); + addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE)); + addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE)); + addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE)); + addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE)); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", TRUE)); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", TRUE)); + addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", TRUE)); + addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", TRUE)); + addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", TRUE)); + + for (S32 ensemble_num = S32(LLFolderType::FT_ENSEMBLE_START); ensemble_num <= S32(LLFolderType::FT_ENSEMBLE_END); ensemble_num++) + { + addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", FALSE)); + } + + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", TRUE)); + addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", FALSE)); + addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", TRUE)); + + addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE)); + + addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE)); + addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE)); + addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); + + addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE)); +}; + +// static +LLFolderType::EType LLFolderType::lookup(const std::string& name) +{ + return LLFolderDictionary::getInstance()->lookup(name); +} + +// static +const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) +{ + const FolderEntry *entry = LLFolderDictionary::getInstance()->lookup(folder_type); + if (entry) + { + return entry->mName; + } + else + { + return badLookup(); + } +} + +// static +// Only ensembles and plain folders aren't protected. "Protected" means +// you can't change certain properties such as their type. +bool LLFolderType::lookupIsProtectedType(EType folder_type) +{ + const LLFolderDictionary *dict = LLFolderDictionary::getInstance(); + const FolderEntry *entry = dict->lookup(folder_type); + if (entry) + { + return entry->mIsProtected; + } + return true; +} + +// static +bool LLFolderType::lookupIsEnsembleType(EType folder_type) +{ + return (folder_type >= FT_ENSEMBLE_START && + folder_type <= FT_ENSEMBLE_END); +} + +// static +LLAssetType::EType LLFolderType::folderTypeToAssetType(LLFolderType::EType folder_type) +{ + if (LLAssetType::lookup(LLAssetType::EType(folder_type)) == LLAssetType::badLookup()) + { + llwarns << "Converting to unknown asset type " << folder_type << llendl; + } + return (LLAssetType::EType)folder_type; +} + +// static +LLFolderType::EType LLFolderType::assetTypeToFolderType(LLAssetType::EType asset_type) +{ + if (LLFolderType::lookup(LLFolderType::EType(asset_type)) == LLFolderType::badLookup()) + { + llwarns << "Converting to unknown folder type " << asset_type << llendl; + } + return (LLFolderType::EType)asset_type; +} + +// static +const std::string &LLFolderType::badLookup() +{ + static const std::string sBadLookup = "llfoldertype_bad_lookup"; + return sBadLookup; +} diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h new file mode 100755 index 0000000000..a0c847914f --- /dev/null +++ b/indra/llinventory/llfoldertype.h @@ -0,0 +1,111 @@ +/** + * @file llfoldertype.h + * @brief Declaration of LLFolderType. + * + * $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_LLFOLDERTYPE_H +#define LL_LLFOLDERTYPE_H + +#include +#include "llassettype.h" + +// This class handles folder types (similar to assettype, except for folders) +// and operations on those. +class LL_COMMON_API LLFolderType +{ +public: + // ! BACKWARDS COMPATIBILITY ! Folder type enums must match asset type enums. + enum EType + { + FT_TEXTURE = 0, + + FT_SOUND = 1, + + FT_CALLINGCARD = 2, + + FT_LANDMARK = 3, + + FT_CLOTHING = 5, + + FT_OBJECT = 6, + + FT_NOTECARD = 7, + + FT_ROOT_INVENTORY = 8, + // We'd really like to change this to 9 since AT_CATEGORY is 8, + // but "My Inventory" has been type 8 for a long time. + + FT_LSL_TEXT = 10, + + FT_BODYPART = 13, + + FT_TRASH = 14, + + FT_SNAPSHOT_CATEGORY = 15, + + FT_LOST_AND_FOUND = 16, + + FT_ANIMATION = 20, + + FT_GESTURE = 21, + + FT_FAVORITE = 23, + + FT_ENSEMBLE_START = 26, + FT_ENSEMBLE_END = 45, + // This range is reserved for special clothing folder types. + + FT_CURRENT_OUTFIT = 46, + FT_OUTFIT = 47, + FT_MY_OUTFITS = 48, + + FT_MESH = 49, + + FT_INBOX = 50, + FT_OUTBOX = 51, + + FT_BASIC_ROOT = 52, + + FT_COUNT, + + FT_NONE = -1 + }; + + static EType lookup(const std::string& type_name); + static const std::string& lookup(EType folder_type); + + static bool lookupIsProtectedType(EType folder_type); + static bool lookupIsEnsembleType(EType folder_type); + + static LLAssetType::EType folderTypeToAssetType(LLFolderType::EType folder_type); + static LLFolderType::EType assetTypeToFolderType(LLAssetType::EType asset_type); + + static const std::string& badLookup(); // error string when a lookup fails + +protected: + LLFolderType() {} + ~LLFolderType() {} +}; + +#endif // LL_LLFOLDERTYPE_H diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 99716ed7be..47b06af5b8 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -27,7 +27,6 @@ #ifndef LL_LLINVENTORY_H #define LL_LLINVENTORY_H -#include "lldarray.h" #include "llfoldertype.h" #include "llinventorytype.h" #include "llpermissions.h" @@ -124,7 +123,7 @@ protected: class LLInventoryItem : public LLInventoryObject { public: - typedef LLDynamicArray > item_array_t; + typedef std::vector > item_array_t; //-------------------------------------------------------------------- // Initialization @@ -235,7 +234,7 @@ protected: class LLInventoryCategory : public LLInventoryObject { public: - typedef LLDynamicArray > cat_array_t; + typedef std::vector > cat_array_t; //-------------------------------------------------------------------- // Initialization diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 37c603348e..23a4e4b077 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -136,7 +136,7 @@ LLParcel::LLParcel(const LLUUID &owner_id, // virtual LLParcel::~LLParcel() { - // user list cleaned up by LLDynamicArray destructor. + // user list cleaned up by std::vector destructor. } void LLParcel::init(const LLUUID &owner_id, @@ -1082,7 +1082,7 @@ void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group) mGroupID.setNull(); } mSaleTimerExpires.start(); - mSaleTimerExpires.setTimerExpirySec(DEFAULT_USEC_SALE_TIMEOUT / SEC_TO_MICROSEC); + mSaleTimerExpires.setTimerExpirySec(LLUnits::Microseconds::fromValue(DEFAULT_USEC_SALE_TIMEOUT)); mStatus = OS_LEASE_PENDING; mClaimDate = time(NULL); setAuctionID(0); diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 41914446d1..e4ab46929f 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -44,7 +44,6 @@ #include "m3math.h" #include "llmatrix3a.h" #include "lloctree.h" -#include "lldarray.h" #include "llvolume.h" #include "llvolumeoctree.h" #include "llstl.h" diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 164b8d6652..a4291df7db 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -42,7 +42,6 @@ class LLVolumeFace; class LLVolume; class LLVolumeTriangle; -#include "lldarray.h" #include "lluuid.h" #include "v4color.h" //#include "vmath.h" diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index d193e367eb..ca48e613d2 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -27,6 +27,7 @@ set(llmessage_SOURCE_FILES llares.cpp llareslistener.cpp llassetstorage.cpp + llavatarname.cpp llavatarnamecache.cpp llblowfishcipher.cpp llbuffer.cpp @@ -114,6 +115,7 @@ set(llmessage_HEADER_FILES llares.h llareslistener.h llassetstorage.h + llavatarname.h llavatarnamecache.h llblowfishcipher.h llbuffer.h @@ -128,6 +130,7 @@ set(llmessage_HEADER_FILES lldbstrings.h lldispatcher.h lleventflags.h + llextendedstatus.h llfiltersd2xmlrpc.h llfollowcamparams.h llhost.h diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 563ff9e077..6ffd7ad309 100755 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -34,11 +34,11 @@ #include "lltimer.h" #include "llnamevalue.h" #include "llhost.h" -#include "stdenums.h" // for EDragAndDropType #include "lltransfermanager.h" // For LLTSCode enum #include "llassettype.h" #include "llstring.h" #include "llextendedstatus.h" +#include "llxfer.h" // Forward declarations class LLMessageSystem; @@ -51,6 +51,15 @@ class LLSD; // HTTP Uploads also timeout if they take longer than this. const F32 LL_ASSET_STORAGE_TIMEOUT = 5 * 60.0f; + +// Specific error codes +const int LL_ERR_ASSET_REQUEST_FAILED = -1; +//const int LL_ERR_ASSET_REQUEST_INVALID = -2; +const int LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE = -3; +const int LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE = -4; +const int LL_ERR_INSUFFICIENT_PERMISSIONS = -5; +const int LL_ERR_PRICE_MISMATCH = -23018; + class LLAssetInfo { protected: diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp new file mode 100755 index 0000000000..642bd82e90 --- /dev/null +++ b/indra/llmessage/llavatarname.cpp @@ -0,0 +1,239 @@ +/** + * @file llavatarname.cpp + * @brief Represents name-related data for an avatar, such as the + * username/SLID ("bobsmith123" or "james.linden") and the display + * name ("James Cook") + * + * $LicenseInfo:firstyear=2010&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 "linden_common.h" + +#include "llavatarname.h" + +#include "lldate.h" +#include "llframetimer.h" +#include "llsd.h" + +// Store these in pre-built std::strings to avoid memory allocations in +// LLSD map lookups +static const std::string USERNAME("username"); +static const std::string DISPLAY_NAME("display_name"); +static const std::string LEGACY_FIRST_NAME("legacy_first_name"); +static const std::string LEGACY_LAST_NAME("legacy_last_name"); +static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default"); +static const std::string DISPLAY_NAME_EXPIRES("display_name_expires"); +static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update"); + +bool LLAvatarName::sUseDisplayNames = true; + +// Minimum time-to-live (in seconds) for a name entry. +// Avatar name should always guarantee to expire reasonably soon by default +// so if the failure to get a valid expiration time was due to something temporary +// we will eventually request and get the right data. +const F64 MIN_ENTRY_LIFETIME = 60.0; + +LLAvatarName::LLAvatarName() +: mUsername(), + mDisplayName(), + mLegacyFirstName(), + mLegacyLastName(), + mIsDisplayNameDefault(false), + mIsTemporaryName(false), + mExpires(F64_MAX), + mNextUpdate(0.0) +{ } + +bool LLAvatarName::operator<(const LLAvatarName& rhs) const +{ + if (mUsername == rhs.mUsername) + return mDisplayName < rhs.mDisplayName; + else + return mUsername < rhs.mUsername; +} + +//static +void LLAvatarName::setUseDisplayNames(bool use) +{ + sUseDisplayNames = use; +} +//static +bool LLAvatarName::useDisplayNames() +{ + return sUseDisplayNames; +} + +LLSD LLAvatarName::asLLSD() const +{ + LLSD sd; + sd[USERNAME] = mUsername; + sd[DISPLAY_NAME] = mDisplayName; + sd[LEGACY_FIRST_NAME] = mLegacyFirstName; + sd[LEGACY_LAST_NAME] = mLegacyLastName; + sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault; + sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires); + sd[DISPLAY_NAME_NEXT_UPDATE] = LLDate(mNextUpdate); + return sd; +} + +void LLAvatarName::fromLLSD(const LLSD& sd) +{ + mUsername = sd[USERNAME].asString(); + mDisplayName = sd[DISPLAY_NAME].asString(); + mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString(); + mLegacyLastName = sd[LEGACY_LAST_NAME].asString(); + mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean(); + LLDate expires = sd[DISPLAY_NAME_EXPIRES]; + mExpires = expires.secondsSinceEpoch(); + LLDate next_update = sd[DISPLAY_NAME_NEXT_UPDATE]; + mNextUpdate = next_update.secondsSinceEpoch(); + + // Some avatars don't have explicit display names set. Force a legible display name here. + if (mDisplayName.empty()) + { + mDisplayName = mUsername; + } +} + +// Transform a string (typically provided by the legacy service) into a decent +// avatar name instance. +void LLAvatarName::fromString(const std::string& full_name) +{ + mDisplayName = full_name; + std::string::size_type index = full_name.find(' '); + if (index != std::string::npos) + { + // The name is in 2 parts (first last) + mLegacyFirstName = full_name.substr(0, index); + mLegacyLastName = full_name.substr(index+1); + if (mLegacyLastName != "Resident") + { + mUsername = mLegacyFirstName + "." + mLegacyLastName; + mDisplayName = full_name; + LLStringUtil::toLower(mUsername); + } + else + { + // Very old names do have a dummy "Resident" last name + // that we choose to hide from users. + mUsername = mLegacyFirstName; + mDisplayName = mLegacyFirstName; + } + } + else + { + mLegacyFirstName = full_name; + mLegacyLastName = ""; + mUsername = full_name; + mDisplayName = full_name; + } + mIsDisplayNameDefault = true; + mIsTemporaryName = true; + setExpires(MIN_ENTRY_LIFETIME); +} + +void LLAvatarName::setExpires(F64 expires) +{ + mExpires = LLFrameTimer::getTotalSeconds() + expires; +} + +std::string LLAvatarName::getCompleteName() const +{ + std::string name; + if (sUseDisplayNames) + { + if (mUsername.empty() || mIsDisplayNameDefault) + { + // If this particular display name is defaulted (i.e. based on user name), + // then display only the easier to read instance of the person's name. + name = mDisplayName; + } + else + { + name = mDisplayName + " (" + mUsername + ")"; + } + } + else + { + name = getUserName(); + } + return name; +} + +std::string LLAvatarName::getLegacyName() const +{ + if (mLegacyFirstName.empty() && mLegacyLastName.empty()) // display names disabled? + { + return mDisplayName; + } + + std::string name; + name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() ); + name = mLegacyFirstName; + name += " "; + name += mLegacyLastName; + return name; +} + +std::string LLAvatarName::getDisplayName() const +{ + if (sUseDisplayNames) + { + return mDisplayName; + } + else + { + return getUserName(); + } +} + +std::string LLAvatarName::getUserName() const +{ + std::string name; + if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) + { + if (mLegacyFirstName.empty()) + { + // If we cannot create a user name from the legacy strings, use the display name + name = mDisplayName; + } + else + { + // The last name might be empty if it defaulted to "Resident" + name = mLegacyFirstName; + } + } + else + { + name = mLegacyFirstName + " " + mLegacyLastName; + } + return name; +} + +void LLAvatarName::dump() const +{ + LL_DEBUGS("AvNameCache") << "LLAvatarName: " + << "user '" << mUsername << "' " + << "display '" << mDisplayName << "' " + << "expires in " << mExpires - LLFrameTimer::getTotalSeconds() << " seconds" + << LL_ENDL; +} + diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h new file mode 100755 index 0000000000..5d2fccc5ba --- /dev/null +++ b/indra/llmessage/llavatarname.h @@ -0,0 +1,133 @@ +/** + * @file llavatarname.h + * @brief Represents name-related data for an avatar, such as the + * username/SLID ("bobsmith123" or "james.linden") and the display + * name ("James Cook") + * + * $LicenseInfo:firstyear=2010&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 LLAVATARNAME_H +#define LLAVATARNAME_H + +#include + +class LLSD; + +class LL_COMMON_API LLAvatarName +{ +public: + LLAvatarName(); + + bool operator<(const LLAvatarName& rhs) const; + + // Conversion to and from LLSD (cache file or server response) + LLSD asLLSD() const; + void fromLLSD(const LLSD& sd); + + // Used only in legacy mode when the display name capability is not provided server side + // or to otherwise create a temporary valid item. + void fromString(const std::string& full_name); + + // Set the name object to become invalid in "expires" seconds from now + void setExpires(F64 expires); + + // Set and get the display name flag set by the user in preferences. + static void setUseDisplayNames(bool use); + static bool useDisplayNames(); + + // A name object is valid if not temporary and not yet expired (default is expiration not checked) + bool isValidName(F64 max_unrefreshed = 0.0f) const { return !mIsTemporaryName && (mExpires >= max_unrefreshed); } + + // Return true if the name is made up from legacy or temporary data + bool isDisplayNameDefault() const { return mIsDisplayNameDefault; } + + // For normal names, returns "James Linden (james.linden)" + // When display names are disabled returns just "James Linden" + std::string getCompleteName() const; + + // Returns "James Linden" or "bobsmith123 Resident" for backwards + // compatibility with systems like voice and muting + // *TODO: Eliminate this in favor of username only + std::string getLegacyName() const; + + // "José Sanchez" or "James Linden", UTF-8 encoded Unicode + // Takes the display name preference into account. This is truly the name that should + // be used for all UI where an avatar name has to be used unless we truly want something else (rare) + std::string getDisplayName() const; + + // Returns "James Linden" or "bobsmith123 Resident" + // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name + // Also used for backwards compatibility with systems like voice and muting + std::string getUserName() const; + + // Returns "james.linden" or the legacy name for very old names + std::string getAccountName() const { return mUsername; } + + // Debug print of the object + void dump() const; + + // Names can change, so need to keep track of when name was + // last checked. + // Unix time-from-epoch seconds for efficiency + F64 mExpires; + + // You can only change your name every N hours, so record + // when the next update is allowed + // Unix time-from-epoch seconds + F64 mNextUpdate; + +private: + // "bobsmith123" or "james.linden", US-ASCII only + std::string mUsername; + + // "José Sanchez" or "James Linden", UTF-8 encoded Unicode + // Contains data whether or not user has explicitly set + // a display name; may duplicate their username. + std::string mDisplayName; + + // For "James Linden", "James" + // For "bobsmith123", "bobsmith123" + // Used to communicate with legacy systems like voice and muting which + // rely on old-style names. + // *TODO: Eliminate this in favor of username only + std::string mLegacyFirstName; + + // For "James Linden", "Linden" + // For "bobsmith123", "Resident" + // see above for rationale + std::string mLegacyLastName; + + // If true, both display name and SLID were generated from + // a legacy first and last name, like "James Linden (james.linden)" + bool mIsDisplayNameDefault; + + // Under error conditions, we may insert "dummy" records with + // names like "???" into caches as placeholders. These can be + // shown in UI, but are not serialized. + bool mIsTemporaryName; + + // Global flag indicating if display name should be used or not + // This will affect the output of the high level "get" methods + static bool sUseDisplayNames; +}; + +#endif diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 430d6358f7..11d4e1b11c 100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -34,7 +34,6 @@ #include "llerror.h" #include "lltimer.h" -#include "timing.h" #include "net.h" #include "llhost.h" #include "llpacketack.h" @@ -51,6 +50,8 @@ const F32 LL_AVERAGED_PING_MIN = 100; // msec // IW: increased to avoid ret const U32 INITIAL_PING_VALUE_MSEC = 1000; // initial value for the ping delay, or for ping delay for an unknown circuit const TPACKETID LL_MAX_OUT_PACKET_ID = 0x01000000; +const int LL_ERR_CIRCUIT_GONE = -23017; +const int LL_ERR_TCP_TIMEOUT = -23016; // 0 - flags // [1,4] - packetid diff --git a/indra/llmessage/llextendedstatus.h b/indra/llmessage/llextendedstatus.h new file mode 100755 index 0000000000..8ce173d1ff --- /dev/null +++ b/indra/llmessage/llextendedstatus.h @@ -0,0 +1,67 @@ +/** + * @file llextendedstatus.h + * @date August 2007 + * @brief extended status codes for curl/vfs/resident asset storage and delivery + * + * $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 LL_LLEXTENDEDSTATUS_H +#define LL_LLEXTENDEDSTATUS_H + + +typedef S32 LLExtStat; + + +// Status provider groups - Top bits indicate which status type it is +// Zero is common status code (next section) +const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below +const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy +const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs + + +// Common Status Codes +// +const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry! +const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID +const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider +const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced +const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist +const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open + + +// curl status codes: +// +// Mask off LL_EXSTAT_CURL_RESULT for original result and +// see: libraries/include/curl/curl.h + + +// Memory-Resident status codes: +// None at present + + +// VFS status codes: +const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001; +const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002; + + +#endif // LL_LLEXTENDEDSTATUS_H diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 7dcf160c9b..9a4d22ab0b 100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -36,6 +36,7 @@ #include "llproxy.h" #include "llvfile.h" #include "llvfs.h" +#include "llxfer.h" #ifdef LL_STANDALONE # include @@ -43,6 +44,8 @@ # include "zlib/zlib.h" #endif +const char* const LOCAL_ASSET_URL_FORMAT = "http://%s:12041/asset"; + const U32 MAX_RUNNING_REQUESTS = 1; const F32 MAX_PROCESSING_TIME = 0.005f; const S32 CURL_XFER_BUFFER_SIZE = 65536; diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index ae8e0087c1..70a91d8a6f 100755 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -27,9 +27,9 @@ #ifndef LL_LLMESSAGETEMPLATE_H #define LL_LLMESSAGETEMPLATE_H -#include "lldarray.h" #include "message.h" // TODO: babbage: Remove... #include "llstl.h" +#include "llindexedvector.h" class LLMsgVarData { @@ -102,7 +102,7 @@ public: } S32 mBlockNumber; - typedef LLDynamicArrayIndexed msg_var_data_map_t; + typedef LLIndexedVector msg_var_data_map_t; msg_var_data_map_t mMemberVarData; char *mName; S32 mTotalSize; @@ -225,7 +225,7 @@ public: friend std::ostream& operator<<(std::ostream& s, LLMessageBlock &msg); - typedef LLDynamicArrayIndexed message_variable_map_t; + typedef LLIndexedVector message_variable_map_t; message_variable_map_t mMemberVariables; char *mName; EMsgBlockType mType; @@ -391,7 +391,7 @@ public: } public: - typedef LLDynamicArrayIndexed message_block_map_t; + typedef LLIndexedVector message_block_map_t; message_block_map_t mMemberBlocks; char *mName; EMsgFrequency mFrequency; diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index d799403029..f2bdcfad53 100755 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -33,7 +33,7 @@ #include "u64.h" #include "llstring.h" -#include "string_table.h" +#include "llstringtable.h" // Anonymous enumeration to provide constants in this file. // *NOTE: These values may be used in sscanf statements below as their diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h index 273de475f8..f8b556b5fe 100755 --- a/indra/llmessage/llnamevalue.h +++ b/indra/llmessage/llnamevalue.h @@ -41,7 +41,7 @@ // SitObject STRING // SitPosition VEC3 -#include "string_table.h" +#include "llstringtable.h" #include "llmath.h" #include "v3math.h" #include "lldbstrings.h" diff --git a/indra/llmessage/llpacketbuffer.cpp b/indra/llmessage/llpacketbuffer.cpp index e69631eb3b..22e4dc1e8d 100755 --- a/indra/llmessage/llpacketbuffer.cpp +++ b/indra/llmessage/llpacketbuffer.cpp @@ -29,7 +29,7 @@ #include "llpacketbuffer.h" #include "net.h" -#include "timing.h" +#include "lltimer.h" #include "llhost.h" /////////////////////////////////////////////////////////// diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index fc6e9c5193..a8c568a365 100755 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -41,7 +41,6 @@ #include "llproxy.h" #include "llrand.h" #include "message.h" -#include "timing.h" #include "u64.h" /////////////////////////////////////////////////////////// diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index f9348eb11f..edf5eeb82d 100755 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h @@ -32,6 +32,10 @@ #include "llextendedstatus.h" const S32 LL_XFER_LARGE_PAYLOAD = 7680; +const S32 LL_ERR_FILE_EMPTY = -44; +const int LL_ERR_FILE_NOT_FOUND = -43; +const int LL_ERR_CANNOT_OPEN_FILE = -42; +const int LL_ERR_EOF = -39; typedef enum ELLXferStatus { e_LL_XFER_UNINITIALIZED, diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 00b9d81611..e74eb74763 100755 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -677,7 +677,7 @@ void LLXferManager::processReceiveData (LLMessageSystem *mesgsys, void ** /*user ack_info.mID = id; ack_info.mPacketNum = decodePacketNum(packetnum); ack_info.mRemoteHost = mesgsys->getSender(); - mXferAckQueue.push(ack_info); + mXferAckQueue.push_back(ack_info); } if (isLastPacket(packetnum)) @@ -1088,15 +1088,15 @@ void LLXferManager::retransmitUnackedPackets () // so we don't blow through bandwidth. // - while (mXferAckQueue.getLength()) + while (mXferAckQueue.size()) { if (mAckThrottle.checkOverflow(1000.0f*8.0f)) { break; } - //llinfos << "Confirm packet queue length:" << mXferAckQueue.getLength() << llendl; - LLXferAckInfo ack_info; - mXferAckQueue.pop(ack_info); + //llinfos << "Confirm packet queue length:" << mXferAckQueue.size() << llendl; + LLXferAckInfo ack_info = mXferAckQueue.front(); + mXferAckQueue.pop_front(); //llinfos << "Sending confirm packet" << llendl; sendConfirmPacket(gMessageSystem, ack_info.mID, ack_info.mPacketNum, ack_info.mRemoteHost); mAckThrottle.throttleOverflow(1000.f*8.f); // Assume 1000 bytes/packet diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index b84bccb5b7..b3d110e7a1 100755 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -41,7 +41,7 @@ class LLVFS; #include "message.h" #include "llassetstorage.h" #include "lldir.h" -#include "lllinkedqueue.h" +#include #include "llthrottle.h" class LLHostStatus @@ -80,7 +80,7 @@ class LLXferManager S32 mMaxIncomingXfers; BOOL mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth - LLLinkedQueue mXferAckQueue; + std::deque mXferAckQueue; LLThrottle mAckThrottle; public: diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index ae95087377..4a4cc57e20 100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -47,10 +47,8 @@ // linden library headers #include "indra_constants.h" -#include "lldarray.h" #include "lldir.h" #include "llerror.h" -#include "llerrorlegacy.h" #include "llfasttimer.h" #include "llhttpclient.h" #include "llhttpnodeadapter.h" @@ -73,7 +71,6 @@ #include "lltransfermanager.h" #include "lluuid.h" #include "llxfermanager.h" -#include "timing.h" #include "llquaternion.h" #include "u64.h" #include "v3dmath.h" @@ -120,7 +117,7 @@ namespace { LL_WARNS("Messaging") << "error status " << status << " for message " << mMessageName - << " reason " << reason << llendl; + << " reason " << reason << LL_ENDL; } // TODO: Map status in to useful error code. if(NULL != mCallback) mCallback(mCallbackData, LL_ERR_TCP_TIMEOUT); @@ -155,7 +152,7 @@ void LLMessageHandlerBridge::post(LLHTTPNode::ResponsePtr response, std::string name = context["request"]["wildcard"]["message-name"]; char* namePtr = LLMessageStringTable::getInstance()->getString(name.c_str()); - lldebugs << "Setting mLastSender " << input["sender"].asString() << llendl; + lldebugs << "Setting mLastSender " << input["sender"].asString() << LL_ENDL; gMessageSystem->mLastSender = LLHost(input["sender"].asString()); gMessageSystem->mPacketsIn += 1; gMessageSystem->mLLSDMessageReader->setMessage(namePtr, input["body"]); @@ -284,14 +281,14 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, mbError = TRUE; mErrorCode = error; } -// LL_DEBUGS("Messaging") << << "*** port: " << mPort << llendl; +// LL_DEBUGS("Messaging") << << "*** port: " << mPort << LL_ENDL; // // Create the data structure that we can poll on // if (!gAPRPoolp) { - LL_ERRS("Messaging") << "No APR pool before message system initialization!" << llendl; + LL_ERRS("Messaging") << "No APR pool before message system initialization!" << LL_ENDL; ll_init_apr(); } apr_socket_t *aprSocketp = NULL; @@ -329,7 +326,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure { if(filename.empty()) { - LL_ERRS("Messaging") << "No template filename specified" << llendl; + LL_ERRS("Messaging") << "No template filename specified" << LL_ENDL; mbError = TRUE; return; } @@ -338,9 +335,9 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure if(!_read_file_into_string(template_body, filename)) { if (failure_is_fatal) { - LL_ERRS("Messaging") << "Failed to open template: " << filename << llendl; + LL_ERRS("Messaging") << "Failed to open template: " << filename << LL_ENDL; } else { - LL_WARNS("Messaging") << "Failed to open template: " << filename << llendl; + LL_WARNS("Messaging") << "Failed to open template: " << filename << LL_ENDL; } mbError = TRUE; return; @@ -566,7 +563,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) // Ones that are non-zero but below the minimum packet size are worrisome. if (receive_size > 0) { - LL_WARNS("Messaging") << "Invalid (too short) packet discarded " << receive_size << llendl; + LL_WARNS("Messaging") << "Invalid (too short) packet discarded " << receive_size << LL_ENDL; callExceptionFunc(MX_PACKET_TOO_SHORT); } // no data in packet receive buffer @@ -592,7 +589,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) // the next one LL_WARNS("Messaging") << "Malformed packet received. Packet size " << receive_size << " with invalid no. of acks " << acks - << llendl; + << LL_ENDL; valid_packet = FALSE; continue; } @@ -620,7 +617,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) memcpy(&mem_id, &mTrueReceiveBuffer[true_rcv_size], /* Flawfinder: ignore*/ sizeof(TPACKETID)); packet_id = ntohl(mem_id); - //LL_INFOS("Messaging") << "got ack: " << packet_id << llendl; + //LL_INFOS("Messaging") << "got ack: " << packet_id << LL_ENDL; cdp->ackReliablePacket(packet_id); } if (!cdp->getUnackedPacketCount()) @@ -652,14 +649,14 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) // LL_WARNS("Messaging") << "DISCARDED PACKET HOST MISMATCH! HOST: " // << host << " CIRCUIT: " // << mCircuitInfo.mCurrentCircuit->mHost - // << llendl; + // << LL_ENDL; //} // *************************************** //mCircuitInfo.mCurrentCircuit->mAcks.put(mCurrentRecvPacketID); cdp->collectRAck(mCurrentRecvPacketID); } - LL_DEBUGS("Messaging") << "Discarding duplicate resend from " << host << llendl; + LL_DEBUGS("Messaging") << "Discarding duplicate resend from " << host << LL_ENDL; if(mVerboseLog) { std::ostringstream str; @@ -671,7 +668,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) << " resent " << ((acks > 0) ? "acks" : "") << " DISCARD DUPLICATE"; - LL_INFOS("Messaging") << str.str() << llendl; + LL_INFOS("Messaging") << str.str() << LL_ENDL; } mPacketsIn++; valid_packet = FALSE; @@ -750,7 +747,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) { if (mbProtected && (!cdp)) { - LL_WARNS("Messaging") << "Invalid Packet from invalid circuit " << host << llendl; + LL_WARNS("Messaging") << "Invalid Packet from invalid circuit " << host << LL_ENDL; mOffCircuitPackets++; } else @@ -820,7 +817,7 @@ void LLMessageSystem::processAcks() if (!mDenyTrustedCircuitSet.empty()) { - LL_INFOS("Messaging") << "Sending queued DenyTrustedCircuit messages." << llendl; + LL_INFOS("Messaging") << "Sending queued DenyTrustedCircuit messages." << LL_ENDL; for (host_set_t::iterator hostit = mDenyTrustedCircuitSet.begin(); hostit != mDenyTrustedCircuitSet.end(); ++hostit) { reallySendDenyTrustedCircuit(*hostit); @@ -894,7 +891,7 @@ LLSD LLMessageSystem::getBuiltMessageLLSD() const else { // TODO: implement as below? - llerrs << "Message not built as LLSD." << llendl; + llerrs << "Message not built as LLSD." << LL_ENDL; } return result; } @@ -1147,7 +1144,7 @@ LLHTTPClient::ResponderPtr LLMessageSystem::createResponder(const std::string& n // explicitly sent as reliable, so they don't have a callback // LL_WARNS("Messaging") << "LLMessageSystem::sendMessage: Sending unreliable " // << mMessageBuilder->getMessageName() << " message via HTTP" -// << llendl; +// << LL_ENDL; return new LLFnPtrResponder( NULL, NULL, @@ -1183,11 +1180,11 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) if(mVerboseLog) { LL_INFOS_ONCE("Messaging") << "MSG: -> " << host << "\tUNKNOWN CIRCUIT:\t" - << mMessageBuilder->getMessageName() << llendl; + << mMessageBuilder->getMessageName() << LL_ENDL; } LL_WARNS_ONCE("Messaging") << "sendMessage - Trying to send " << mMessageBuilder->getMessageName() << " on unknown circuit " - << host << llendl; + << host << LL_ENDL; return 0; } else @@ -1206,11 +1203,11 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) if(mVerboseLog) { LL_INFOS("Messaging") << "MSG: -> " << host << "\tDEAD CIRCUIT\t\t" - << mMessageBuilder->getMessageName() << llendl; + << mMessageBuilder->getMessageName() << LL_ENDL; } LL_WARNS("Messaging") << "sendMessage - Trying to send message " << mMessageBuilder->getMessageName() << " to dead circuit " - << host << llendl; + << host << LL_ENDL; return 0; } } @@ -1255,7 +1252,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) LL_WARNS("Messaging") << "sendMessage - Trying to send " << ((buffer_length > 4000) ? "EXTRA " : "") << "BIG message " << mMessageBuilder->getMessageName() << " - " - << buffer_length << llendl; + << buffer_length << LL_ENDL; } } if (mSendReliable) @@ -1317,7 +1314,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) // append_acout_count is incorrect or that // MAX_BUFFER_SIZE has fallen below MTU which is bad // and probably programmer error. - LL_ERRS("Messaging") << "Buffer packing failed due to size.." << llendl; + LL_ERRS("Messaging") << "Buffer packing failed due to size.." << LL_ENDL; } } @@ -1358,7 +1355,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) std::ostream_iterator append(str, " "); std::copy(acks.begin(), acks.end(), append); } - LL_INFOS("Messaging") << str.str() << llendl; + LL_INFOS("Messaging") << str.str() << LL_ENDL; } @@ -1382,7 +1379,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re << nullToEmpty(mMessageReader->getMessageName()) << (recv_reliable ? " reliable" : "") << " REJECTED"; - LL_INFOS("Messaging") << str.str() << llendl; + LL_INFOS("Messaging") << str.str() << LL_ENDL; } // nope! // cout << "Rejecting unexpected message " << mCurrentMessageTemplate->mName << " from " << hex << ip << " , " << dec << port << endl; @@ -1390,7 +1387,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re // Keep track of rejected messages as well if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM) { - LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << llendl; + LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << LL_ENDL; } else { @@ -1409,7 +1406,7 @@ S32 LLMessageSystem::sendMessage( { if (!(host.isOk())) { - LL_WARNS("Messaging") << "trying to send message to invalid host" << llendl; + LL_WARNS("Messaging") << "trying to send message to invalid host" << LL_ENDL; return 0; } @@ -1427,14 +1424,14 @@ void LLMessageSystem::logTrustedMsgFromUntrustedCircuit( const LLHost& host ) LL_WARNS("Messaging") << "Received trusted message on untrusted circuit. " << "Will reply with deny. " << "Message: " << nullToEmpty(mMessageReader->getMessageName()) - << " Host: " << host << llendl; + << " Host: " << host << LL_ENDL; } if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM) { LL_WARNS("Messaging") << "got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" - << llendl; + << LL_ENDL; } else { @@ -1452,7 +1449,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r { if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM) { - LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << llendl; + LL_WARNS("Messaging") << "Got more than " << MAX_MESSAGE_COUNT_NUM << " packets without clearing counts" << LL_ENDL; } else { @@ -1481,7 +1478,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r << (recv_reliable ? " reliable" : "") << (recv_resent ? " resent" : "") << (recv_acks ? " acks" : ""); - LL_INFOS("Messaging") << str.str() << llendl; + LL_INFOS("Messaging") << str.str() << LL_ENDL; } } @@ -1491,54 +1488,54 @@ void LLMessageSystem::sanityCheck() // if (!mCurrentRMessageData) // { -// LL_ERRS("Messaging") << "mCurrentRMessageData is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentRMessageData is NULL" << LL_ENDL; // } // if (!mCurrentRMessageTemplate) // { -// LL_ERRS("Messaging") << "mCurrentRMessageTemplate is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentRMessageTemplate is NULL" << LL_ENDL; // } // if (!mCurrentRTemplateBlock) // { -// LL_ERRS("Messaging") << "mCurrentRTemplateBlock is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentRTemplateBlock is NULL" << LL_ENDL; // } // if (!mCurrentRDataBlock) // { -// LL_ERRS("Messaging") << "mCurrentRDataBlock is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentRDataBlock is NULL" << LL_ENDL; // } // if (!mCurrentSMessageData) // { -// LL_ERRS("Messaging") << "mCurrentSMessageData is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentSMessageData is NULL" << LL_ENDL; // } // if (!mCurrentSMessageTemplate) // { -// LL_ERRS("Messaging") << "mCurrentSMessageTemplate is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentSMessageTemplate is NULL" << LL_ENDL; // } // if (!mCurrentSTemplateBlock) // { -// LL_ERRS("Messaging") << "mCurrentSTemplateBlock is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentSTemplateBlock is NULL" << LL_ENDL; // } // if (!mCurrentSDataBlock) // { -// LL_ERRS("Messaging") << "mCurrentSDataBlock is NULL" << llendl; +// LL_ERRS("Messaging") << "mCurrentSDataBlock is NULL" << LL_ENDL; // } } void LLMessageSystem::showCircuitInfo() { - LL_INFOS("Messaging") << mCircuitInfo << llendl; + LL_INFOS("Messaging") << mCircuitInfo << LL_ENDL; } void LLMessageSystem::dumpCircuitInfo() { - lldebugst(LLERR_CIRCUIT_INFO) << mCircuitInfo << llendl; + LL_DEBUGS("Messaging") << mCircuitInfo << LL_ENDL; } /* virtual */ @@ -1582,7 +1579,7 @@ void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted) void LLMessageSystem::disableCircuit(const LLHost &host) { - LL_INFOS("Messaging") << "LLMessageSystem::disableCircuit for " << host << llendl; + LL_INFOS("Messaging") << "LLMessageSystem::disableCircuit for " << host << LL_ENDL; U32 code = gMessageSystem->findCircuitCode( host ); // Don't need to do this, as we're removing the circuit info anyway - djs 01/28/03 @@ -1595,7 +1592,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host) code_session_map_t::iterator it = mCircuitCodes.find(code); if(it != mCircuitCodes.end()) { - LL_INFOS("Messaging") << "Circuit " << code << " removed from list" << llendl; + LL_INFOS("Messaging") << "Circuit " << code << " removed from list" << LL_ENDL; //mCircuitCodes.removeData(code); mCircuitCodes.erase(it); } @@ -1611,7 +1608,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host) U32 old_port = (U32)(ip_port & (U64)0xFFFFFFFF); U32 old_ip = (U32)(ip_port >> 32); - LL_INFOS("Messaging") << "Host " << LLHost(old_ip, old_port) << " circuit " << code << " removed from lookup table" << llendl; + LL_INFOS("Messaging") << "Host " << LLHost(old_ip, old_port) << " circuit " << code << " removed from lookup table" << LL_ENDL; gMessageSystem->mIPPortToCircuitCode.erase(ip_port); } mCircuitInfo.removeCircuitData(host); @@ -1621,7 +1618,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host) // Sigh, since we can open circuits which don't have circuit // codes, it's possible for this to happen... - LL_WARNS("Messaging") << "Couldn't find circuit code for " << host << llendl; + LL_WARNS("Messaging") << "Couldn't find circuit code for " << host << LL_ENDL; } } @@ -1652,7 +1649,7 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) if (!host.isOk()) { - LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << llendl; + LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << LL_ENDL; return TRUE; } @@ -1663,7 +1660,7 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) } else { - LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << llendl; + LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << LL_ENDL; return FALSE; } } @@ -1674,7 +1671,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) if (!host.isOk()) { - LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << llendl; + LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << LL_ENDL; return FALSE; } @@ -1685,7 +1682,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) } else { - LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << llendl; + LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << LL_ENDL; return FALSE; } } @@ -1699,7 +1696,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host) } else { - LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << llendl; + LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << LL_ENDL; return FALSE; } } @@ -1851,18 +1848,18 @@ void LLMessageSystem::processAssignCircuitCode(LLMessageSystem* msg, void**) { LL_WARNS("Messaging") << "AssignCircuitCode, bad session id. Expecting " << msg->getMySessionID() << " but got " << session_id - << llendl; + << LL_ENDL; return; } U32 code; msg->getU32Fast(_PREHASH_CircuitCode, _PREHASH_Code, code); if (!code) { - LL_ERRS("Messaging") << "Assigning circuit code of zero!" << llendl; + LL_ERRS("Messaging") << "Assigning circuit code of zero!" << LL_ENDL; } msg->mOurCircuitCode = code; - LL_INFOS("Messaging") << "Circuit code " << code << " assigned." << llendl; + LL_INFOS("Messaging") << "Circuit code " << code << " assigned." << LL_ENDL; } */ @@ -1886,20 +1883,20 @@ bool LLMessageSystem::addCircuitCode(U32 code, const LLUUID& session_id) { if(!code) { - LL_WARNS("Messaging") << "addCircuitCode: zero circuit code" << llendl; + LL_WARNS("Messaging") << "addCircuitCode: zero circuit code" << LL_ENDL; return false; } code_session_map_t::iterator it = mCircuitCodes.find(code); if(it == mCircuitCodes.end()) { - LL_INFOS("Messaging") << "New circuit code " << code << " added" << llendl; + LL_INFOS("Messaging") << "New circuit code " << code << " added" << LL_ENDL; //msg->mCircuitCodes[circuit_code] = circuit_code; mCircuitCodes.insert(code_session_map_t::value_type(code, session_id)); } else { - LL_INFOS("Messaging") << "Duplicate circuit code " << code << " added" << llendl; + LL_INFOS("Messaging") << "Duplicate circuit code " << code << " added" << LL_ENDL; } return true; } @@ -1933,7 +1930,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, // Whoah, abort! We don't know anything about this circuit code. LL_WARNS("Messaging") << "UseCircuitCode for " << circuit_code_in << " received without AddCircuitCode message - aborting" - << llendl; + << LL_ENDL; return; } @@ -1945,7 +1942,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, { LL_WARNS("Messaging") << "UseCircuitCode unmatched session id. Got " << session_id << " but expected " << (*it).second - << llendl; + << LL_ENDL; return; } @@ -1958,7 +1955,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, if ((ip_port_old == ip_port_in) && (circuit_code_old == circuit_code_in)) { // Current information is the same as incoming info, ignore - LL_INFOS("Messaging") << "Got duplicate UseCircuitCode for circuit " << circuit_code_in << " to " << msg->getSender() << llendl; + LL_INFOS("Messaging") << "Got duplicate UseCircuitCode for circuit " << circuit_code_in << " to " << msg->getSender() << LL_ENDL; return; } @@ -1968,27 +1965,27 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, msg->mIPPortToCircuitCode.erase(ip_port_old); U32 old_port = (U32)(ip_port_old & (U64)0xFFFFFFFF); U32 old_ip = (U32)(ip_port_old >> 32); - LL_INFOS("Messaging") << "Removing derelict lookup entry for circuit " << circuit_code_old << " to " << LLHost(old_ip, old_port) << llendl; + LL_INFOS("Messaging") << "Removing derelict lookup entry for circuit " << circuit_code_old << " to " << LLHost(old_ip, old_port) << LL_ENDL; } if (circuit_code_old) { LLHost cur_host(ip, port); - LL_WARNS("Messaging") << "Disabling existing circuit for " << cur_host << llendl; + LL_WARNS("Messaging") << "Disabling existing circuit for " << cur_host << LL_ENDL; msg->disableCircuit(cur_host); if (circuit_code_old == circuit_code_in) { - LL_WARNS("Messaging") << "Asymmetrical circuit to ip/port lookup!" << llendl; - LL_WARNS("Messaging") << "Multiple circuit codes for " << cur_host << " probably!" << llendl; - LL_WARNS("Messaging") << "Permanently disabling circuit" << llendl; + LL_WARNS("Messaging") << "Asymmetrical circuit to ip/port lookup!" << LL_ENDL; + LL_WARNS("Messaging") << "Multiple circuit codes for " << cur_host << " probably!" << LL_ENDL; + LL_WARNS("Messaging") << "Permanently disabling circuit" << LL_ENDL; return; } else { LL_WARNS("Messaging") << "Circuit code changed for " << msg->getSender() << " from " << circuit_code_old << " to " - << circuit_code_in << llendl; + << circuit_code_in << LL_ENDL; } } @@ -2030,7 +2027,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, LL_INFOS("Messaging") << "Circuit code " << circuit_code_in << " from " << msg->getSender() << " for agent " << id << " in session " - << session_id << llendl; + << session_id << LL_ENDL; const LLUseCircuitCodeResponder* responder = (const LLUseCircuitCodeResponder*) user; @@ -2041,7 +2038,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, } else { - LL_WARNS("Messaging") << "Got zero circuit code in use_circuit_code" << llendl; + LL_WARNS("Messaging") << "Got zero circuit code in use_circuit_code" << LL_ENDL; } } @@ -2063,7 +2060,7 @@ void LLMessageSystem::processError(LLMessageSystem* msg, void**) LL_WARNS("Messaging") << "Message error from " << msg->getSender() << " - " << error_code << " " << error_token << " " << error_id << " \"" - << error_system << "\" \"" << error_message << "\"" << llendl; + << error_system << "\" \"" << error_message << "\"" << LL_ENDL; } @@ -2099,7 +2096,7 @@ void LLMessageSystem::dispatch( gMessageSystem->mMessageTemplates.end()) && !LLMessageConfig::isValidMessage(msg_name)) { - LL_WARNS("Messaging") << "Ignoring unknown message " << msg_name << llendl; + LL_WARNS("Messaging") << "Ignoring unknown message " << msg_name << LL_ENDL; responsep->notFound("Invalid message name"); return; } @@ -2110,12 +2107,12 @@ void LLMessageSystem::dispatch( if (!handler) { LL_WARNS("Messaging") << "LLMessageService::dispatch > no handler for " - << path << llendl; + << path << LL_ENDL; return; } // enable this for output of message names - //LL_INFOS("Messaging") << "< \"" << msg_name << "\"" << llendl; - //lldebugs << "data: " << LLSDNotationStreamer(message) << llendl; + //LL_INFOS("Messaging") << "< \"" << msg_name << "\"" << LL_ENDL; + //LL_DEBUGS() << "data: " << LLSDNotationStreamer(message) << LL_ENDL; handler->post(responsep, context, message); } @@ -2233,7 +2230,7 @@ S32 LLMessageSystem::sendError( else { LL_WARNS("Messaging") << "Data and message were too large -- data removed." - << llendl; + << LL_ENDL; addBinaryData("Data", NULL, 0); } return sendReliable(host); @@ -2253,7 +2250,7 @@ void process_packet_ack(LLMessageSystem *msgsystem, void** /*user_data*/) for (S32 i = 0; i < ack_count; i++) { msgsystem->getU32Fast(_PREHASH_Packets, _PREHASH_ID, packet_id, i); -// LL_DEBUGS("Messaging") << "ack recvd' from " << host << " for packet " << (TPACKETID)packet_id << llendl; +// LL_DEBUGS("Messaging") << "ack recvd' from " << host << " for packet " << (TPACKETID)packet_id << LL_ENDL; cdp->ackReliablePacket(packet_id); } if (!cdp->getUnackedPacketCount()) @@ -2274,12 +2271,12 @@ void process_log_messages(LLMessageSystem* msg, void**) if (log_message) { - LL_INFOS("Messaging") << "Starting logging via message" << llendl; + LL_INFOS("Messaging") << "Starting logging via message" << LL_ENDL; msg->startLogging(); } else { - LL_INFOS("Messaging") << "Stopping logging via message" << llendl; + LL_INFOS("Messaging") << "Stopping logging via message" << LL_ENDL; msg->stopLogging(); } }*/ @@ -2299,7 +2296,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) if (!cdp) { LL_WARNS("Messaging") << "Attempt to create trusted circuit without circuit data: " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; return; } @@ -2318,13 +2315,13 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) if( msg->getBlockUntrustedInterface() ) { LL_WARNS("Messaging") << "Ignoring CreateTrustedCircuit on public interface from host: " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; return; } else { LL_WARNS("Messaging") << "Processing CreateTrustedCircuit on public interface from host: " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; } } @@ -2340,7 +2337,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) if(msg->isMatchingDigestForWindowAndUUIDs(their_digest, TRUST_TIME_WINDOW, local_id, remote_id)) { cdp->setTrusted(TRUE); - LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << llendl; + LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << LL_ENDL; return; } else if (cdp->getTrusted()) @@ -2350,13 +2347,13 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) // the message system is being slow. Don't bother sending the deny, as it may continually // ping-pong back and forth on a very hosed circuit. LL_WARNS("Messaging") << "Ignoring bad digest from known trusted circuit: " << their_digest - << " host: " << msg->getSender() << llendl; + << " host: " << msg->getSender() << LL_ENDL; return; } else { LL_WARNS("Messaging") << "Bad digest from known circuit: " << their_digest - << " host: " << msg->getSender() << llendl; + << " host: " << msg->getSender() << LL_ENDL; msg->sendDenyTrustedCircuit(msg->getSender()); return; } @@ -2392,13 +2389,13 @@ void process_deny_trusted_circuit(LLMessageSystem *msg, void **) if( msg->getBlockUntrustedInterface() ) { LL_WARNS("Messaging") << "Ignoring DenyTrustedCircuit on public interface from host: " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; return; } else { LL_WARNS("Messaging") << "Processing DenyTrustedCircuit on public interface from host: " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; } } @@ -2411,7 +2408,7 @@ void process_deny_trusted_circuit(LLMessageSystem *msg, void **) // *TODO: probably should keep a count of number of resends // per circuit, and stop resending after a while. LL_INFOS("Messaging") << "Got DenyTrustedCircuit. Sending CreateTrustedCircuit to " - << msg->getSender() << llendl; + << msg->getSender() << LL_ENDL; msg->sendCreateTrustedCircuit(msg->getSender(), local_id, remote_id); } @@ -2527,11 +2524,11 @@ bool start_messaging_system( if (gMessageSystem->mMessageFileVersionNumber != gPrehashVersionNumber) { LL_INFOS("AppInit") << "Message template version does not match prehash version number" << LL_ENDL; - LL_INFOS("AppInit") << "Run simulator with -prehash command line option to rebuild prehash data" << llendl; + LL_INFOS("AppInit") << "Run simulator with -prehash command line option to rebuild prehash data" << LL_ENDL; } else { - LL_DEBUGS("AppInit") << "Message template version matches prehash version number" << llendl; + LL_DEBUGS("AppInit") << "Message template version matches prehash version number" << LL_ENDL; } } @@ -2577,7 +2574,7 @@ void LLMessageSystem::startLogging() str << "\t<-\tincoming message" <\toutgoing message" << std::endl; str << " <> host size zero id name"; - LL_INFOS("Messaging") << str.str() << llendl; + LL_INFOS("Messaging") << str.str() << LL_ENDL; } void LLMessageSystem::stopLogging() @@ -2585,7 +2582,7 @@ void LLMessageSystem::stopLogging() if(mVerboseLog) { mVerboseLog = FALSE; - LL_INFOS("Messaging") << "END MESSAGE LOG" << llendl; + LL_INFOS("Messaging") << "END MESSAGE LOG" << LL_ENDL; } } @@ -2693,7 +2690,7 @@ void end_messaging_system(bool print_summary) { std::ostringstream str; gMessageSystem->summarizeLogs(str); - LL_INFOS("Messaging") << str.str().c_str() << llendl; + LL_INFOS("Messaging") << str.str().c_str() << LL_ENDL; } delete gMessageSystem; @@ -2746,7 +2743,7 @@ void LLMessageSystem::dumpReceiveCounts() if(mNumMessageCounts > 0) { - LL_DEBUGS("Messaging") << "Dump: " << mNumMessageCounts << " messages processed in " << mReceiveTime << " seconds" << llendl; + LL_DEBUGS("Messaging") << "Dump: " << mNumMessageCounts << " messages processed in " << mReceiveTime << " seconds" << LL_ENDL; for (message_template_name_map_t::const_iterator iter = mMessageTemplates.begin(), end = mMessageTemplates.end(); iter != end; iter++) @@ -2755,7 +2752,7 @@ void LLMessageSystem::dumpReceiveCounts() if (mt->mReceiveCount > 0) { LL_INFOS("Messaging") << "Num: " << std::setw(3) << mt->mReceiveCount << " Bytes: " << std::setw(6) << mt->mReceiveBytes - << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime) << "%" << llendl; + << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime) << "%" << LL_ENDL; } } } @@ -2872,7 +2869,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size) if ((*data_size ) < LL_MINIMUM_VALID_PACKET_SIZE) { LL_WARNS("Messaging") << "zeroCodeExpand() called with data_size of " << *data_size - << llendl; + << LL_ENDL; } mTotalBytesIn += *data_size; @@ -2911,7 +2908,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size) { if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-1])) { - LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 1" << llendl; + LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 1" << LL_ENDL; callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE); outptr = mEncodedRecvBuffer; break; @@ -2923,7 +2920,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size) *outptr++ = *inptr++; if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-256])) { - LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 2" << llendl; + LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 2" << LL_ENDL; callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE); outptr = mEncodedRecvBuffer; count = -1; @@ -2942,7 +2939,7 @@ S32 LLMessageSystem::zeroCodeExpand(U8** data, S32* data_size) { if (outptr > (&mEncodedRecvBuffer[MAX_BUFFER_SIZE-(*inptr)])) { - LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 3" << llendl; + LL_WARNS("Messaging") << "attempt to write past reasonable encoded buffer size 3" << LL_ENDL; callExceptionFunc(MX_WROTE_PAST_BUFFER_SIZE); outptr = mEncodedRecvBuffer; } @@ -2966,7 +2963,7 @@ void LLMessageSystem::addTemplate(LLMessageTemplate *templatep) if (mMessageTemplates.count(templatep->mName) > 0) { LL_ERRS("Messaging") << templatep->mName << " already used as a template name!" - << llendl; + << LL_ENDL; } mMessageTemplates[templatep->mName] = templatep; mMessageNumbers[templatep->mMessageNumber] = templatep; @@ -2982,7 +2979,7 @@ void LLMessageSystem::setHandlerFuncFast(const char *name, void (*handler_func)( } else { - LL_ERRS("Messaging") << name << " is not a known message name!" << llendl; + LL_ERRS("Messaging") << name << " is not a known message name!" << LL_ENDL; } } @@ -2995,7 +2992,7 @@ bool LLMessageSystem::callHandler(const char *name, if(iter == mMessageTemplates.end()) { LL_WARNS("Messaging") << "LLMessageSystem::callHandler: unknown message " - << name << llendl; + << name << LL_ENDL; return false; } @@ -3006,7 +3003,7 @@ bool LLMessageSystem::callHandler(const char *name, << name << " from " << (trustedSource ? "trusted " : "untrusted ") - << "source" << llendl; + << "source" << LL_ENDL; return false; } @@ -3142,7 +3139,7 @@ bool LLMessageSystem::generateDigestForWindowAndUUIDs(char* digest, const S32 wi std::string shared_secret = get_shared_secret(); if(shared_secret.empty()) { - LL_ERRS("Messaging") << "Trying to generate complex digest on a machine without a shared secret!" << llendl; + LL_ERRS("Messaging") << "Trying to generate complex digest on a machine without a shared secret!" << LL_ENDL; } U32 now = (U32)time(NULL); @@ -3161,7 +3158,7 @@ bool LLMessageSystem::isMatchingDigestForWindowAndUUIDs(const char* digest, cons std::string shared_secret = get_shared_secret(); if(shared_secret.empty()) { - LL_ERRS("Messaging") << "Trying to compare complex digests on a machine without a shared secret!" << llendl; + LL_ERRS("Messaging") << "Trying to compare complex digests on a machine without a shared secret!" << LL_ENDL; } char our_digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ @@ -3208,7 +3205,7 @@ bool LLMessageSystem::generateDigestForWindow(char* digest, const S32 window) co std::string shared_secret = get_shared_secret(); if(shared_secret.empty()) { - LL_ERRS("Messaging") << "Trying to generate simple digest on a machine without a shared secret!" << llendl; + LL_ERRS("Messaging") << "Trying to generate simple digest on a machine without a shared secret!" << LL_ENDL; } U32 now = (U32)time(NULL); @@ -3227,7 +3224,7 @@ bool LLMessageSystem::isMatchingDigestForWindow(const char* digest, S32 const wi std::string shared_secret = get_shared_secret(); if(shared_secret.empty()) { - LL_ERRS("Messaging") << "Trying to compare simple digests on a machine without a shared secret!" << llendl; + LL_ERRS("Messaging") << "Trying to compare simple digests on a machine without a shared secret!" << LL_ENDL; } char our_digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ @@ -3261,12 +3258,12 @@ void LLMessageSystem::sendCreateTrustedCircuit(const LLHost &host, const LLUUID char digest[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */ if (id1.isNull()) { - LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the local end point ID" << llendl; + LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the local end point ID" << LL_ENDL; return; } if (id2.isNull()) { - LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the remote end point ID" << llendl; + LL_WARNS("Messaging") << "Can't send CreateTrustedCircuit to " << host << " because we don't have the remote end point ID" << LL_ENDL; return; } generateDigestForWindowAndUUIDs(digest, TRUST_TIME_WINDOW, id1, id2); @@ -3274,7 +3271,7 @@ void LLMessageSystem::sendCreateTrustedCircuit(const LLHost &host, const LLUUID nextBlockFast(_PREHASH_DataBlock); addUUIDFast(_PREHASH_EndPointID, id1); addBinaryDataFast(_PREHASH_Digest, digest, MD5HEX_STR_BYTES); - LL_INFOS("Messaging") << "xmitting digest: " << digest << " Host: " << host << llendl; + LL_INFOS("Messaging") << "xmitting digest: " << digest << " Host: " << host << LL_ENDL; sendMessage(host); } @@ -3288,10 +3285,10 @@ void LLMessageSystem::reallySendDenyTrustedCircuit(const LLHost &host) LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (!cdp) { - LL_WARNS("Messaging") << "Not sending DenyTrustedCircuit to host without a circuit." << llendl; + LL_WARNS("Messaging") << "Not sending DenyTrustedCircuit to host without a circuit." << LL_ENDL; return; } - LL_INFOS("Messaging") << "Sending DenyTrustedCircuit to " << host << llendl; + LL_INFOS("Messaging") << "Sending DenyTrustedCircuit to " << host << LL_ENDL; newMessageFast(_PREHASH_DenyTrustedCircuit); nextBlockFast(_PREHASH_DataBlock); addUUIDFast(_PREHASH_EndPointID, cdp->getLocalEndPointID()); @@ -3312,7 +3309,7 @@ void LLMessageSystem::establishBidirectionalTrust(const LLHost &host, S64 frame_ std::string shared_secret = get_shared_secret(); if(shared_secret.empty()) { - LL_ERRS("Messaging") << "Trying to establish bidirectional trust on a machine without a shared secret!" << llendl; + LL_ERRS("Messaging") << "Trying to establish bidirectional trust on a machine without a shared secret!" << LL_ENDL; } LLTimer timeout; @@ -3364,8 +3361,8 @@ void LLMessageSystem::establishBidirectionalTrust(const LLHost &host, S64 frame_ void LLMessageSystem::dumpPacketToLog() { - LL_WARNS("Messaging") << "Packet Dump from:" << mPacketRing.getLastSender() << llendl; - LL_WARNS("Messaging") << "Packet Size:" << mTrueReceiveSize << llendl; + LL_WARNS("Messaging") << "Packet Dump from:" << mPacketRing.getLastSender() << LL_ENDL; + LL_WARNS("Messaging") << "Packet Size:" << mTrueReceiveSize << LL_ENDL; char line_buffer[256]; /* Flawfinder: ignore */ S32 i; S32 cur_line_pos = 0; @@ -3380,13 +3377,13 @@ void LLMessageSystem::dumpPacketToLog() if (cur_line_pos >= 16) { cur_line_pos = 0; - LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << llendl; + LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << LL_ENDL; cur_line++; } } if (cur_line_pos) { - LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << llendl; + LL_WARNS("Messaging") << "PD:" << cur_line << "PD:" << line_buffer << LL_ENDL; } } @@ -3930,7 +3927,7 @@ void LLMessageSystem::getStringFast(const char *block, const char *var, { if(buffer_size <= 0) { - LL_WARNS("Messaging") << "buffer_size <= 0" << llendl; + LL_WARNS("Messaging") << "buffer_size <= 0" << LL_ENDL; } mMessageReader->getString(block, var, buffer_size, s, blocknum); } @@ -4039,7 +4036,7 @@ void LLMessageSystem::banUdpMessage(const std::string& name) } else { - llwarns << "Attempted to ban an unknown message: " << name << "." << llendl; + LL_WARNS() << "Attempted to ban an unknown message: " << name << "." << LL_ENDL; } } const LLHost& LLMessageSystem::getSender() const diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index e94e2282a0..05e384d939 100755 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -45,7 +45,7 @@ #include "llerror.h" #include "net.h" -#include "string_table.h" +#include "llstringtable.h" #include "llcircuit.h" #include "lltimer.h" #include "llpacketring.h" diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index 0f2437479d..beb67bae4e 100755 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -67,5 +67,8 @@ const S32 ETHERNET_MTU_BYTES = 1500; const S32 MTUBITS = MTUBYTES*8; const S32 MTUU32S = MTUBITS/32; +// For automatic port discovery when running multiple viewers on one host +const U32 PORT_DISCOVERY_RANGE_MIN = 13000; +const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50; #endif diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index ad21614258..b07a050617 100755 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -28,7 +28,7 @@ #include "linden_common.h" #include "partsyspacket.h" -#include "imageids.h" +#include "indra_constants.h" // this function is global void gSetInitDataDefaults(LLPartInitData *setMe) diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp index e5d7f19448..cdf5fdb3c6 100755 --- a/indra/llmessage/patch_code.cpp +++ b/indra/llmessage/patch_code.cpp @@ -31,7 +31,7 @@ #include "v3math.h" #include "patch_dct.h" #include "patch_code.h" -#include "bitpack.h" +#include "llbitpack.h" U32 gPatchSize, gWordBits; diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 8173083a85..d1475cf734 100755 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -42,6 +42,7 @@ set(llprimitive_HEADER_FILES CMakeLists.txt legacy_object_types.h + lllslconstants.h llmaterial.h llmaterialid.h llmaterialtable.h diff --git a/indra/llprimitive/lllslconstants.h b/indra/llprimitive/lllslconstants.h new file mode 100755 index 0000000000..9f32598e61 --- /dev/null +++ b/indra/llprimitive/lllslconstants.h @@ -0,0 +1,213 @@ +/** + * @file lllslconstants.h + * @author James Cook + * @brief Constants used in lsl. + * + * $LicenseInfo:firstyear=2006&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_LLLSLCONSTANTS_H +#define LL_LLLSLCONSTANTS_H + +// LSL: Return flags for llGetAgentInfo +const U32 AGENT_FLYING = 0x0001; +const U32 AGENT_ATTACHMENTS = 0x0002; +const U32 AGENT_SCRIPTED = 0x0004; +const U32 AGENT_MOUSELOOK = 0x0008; +const U32 AGENT_SITTING = 0x0010; +const U32 AGENT_ON_OBJECT = 0x0020; +const U32 AGENT_AWAY = 0x0040; +const U32 AGENT_WALKING = 0x0080; +const U32 AGENT_IN_AIR = 0x0100; +const U32 AGENT_TYPING = 0x0200; +const U32 AGENT_CROUCHING = 0x0400; +const U32 AGENT_BUSY = 0x0800; +const U32 AGENT_ALWAYS_RUN = 0x1000; +const U32 AGENT_AUTOPILOT = 0x2000; + +const S32 LSL_REMOTE_DATA_CHANNEL = 1; +const S32 LSL_REMOTE_DATA_REQUEST = 2; +const S32 LSL_REMOTE_DATA_REPLY = 3; + +// Constants used in extended LSL primitive setter and getters +const S32 LSL_PRIM_TYPE_LEGACY = 1; // No longer supported. +const S32 LSL_PRIM_MATERIAL = 2; +const S32 LSL_PRIM_PHYSICS = 3; +const S32 LSL_PRIM_TEMP_ON_REZ = 4; +const S32 LSL_PRIM_PHANTOM = 5; +const S32 LSL_PRIM_POSITION = 6; +const S32 LSL_PRIM_SIZE = 7; +const S32 LSL_PRIM_ROTATION = 8; +const S32 LSL_PRIM_TYPE = 9; // Replacement for LSL_PRIM_TYPE_LEGACY +const S32 LSL_PRIM_TEXTURE = 17; +const S32 LSL_PRIM_COLOR = 18; +const S32 LSL_PRIM_BUMP_SHINY = 19; +const S32 LSL_PRIM_FULLBRIGHT = 20; +const S32 LSL_PRIM_FLEXIBLE = 21; +const S32 LSL_PRIM_TEXGEN = 22; +const S32 LSL_PRIM_POINT_LIGHT = 23; +const S32 LSL_PRIM_CAST_SHADOWS = 24; +const S32 LSL_PRIM_GLOW = 25; + +const S32 LSL_PRIM_TYPE_BOX = 0; +const S32 LSL_PRIM_TYPE_CYLINDER= 1; +const S32 LSL_PRIM_TYPE_PRISM = 2; +const S32 LSL_PRIM_TYPE_SPHERE = 3; +const S32 LSL_PRIM_TYPE_TORUS = 4; +const S32 LSL_PRIM_TYPE_TUBE = 5; +const S32 LSL_PRIM_TYPE_RING = 6; +const S32 LSL_PRIM_TYPE_SCULPT = 7; + +const S32 LSL_PRIM_HOLE_DEFAULT = 0x00; +const S32 LSL_PRIM_HOLE_CIRCLE = 0x10; +const S32 LSL_PRIM_HOLE_SQUARE = 0x20; +const S32 LSL_PRIM_HOLE_TRIANGLE= 0x30; + +const S32 LSL_PRIM_MATERIAL_STONE = 0; +const S32 LSL_PRIM_MATERIAL_METAL = 1; +const S32 LSL_PRIM_MATERIAL_GLASS = 2; +const S32 LSL_PRIM_MATERIAL_WOOD = 3; +const S32 LSL_PRIM_MATERIAL_FLESH = 4; +const S32 LSL_PRIM_MATERIAL_PLASTIC = 5; +const S32 LSL_PRIM_MATERIAL_RUBBER = 6; +const S32 LSL_PRIM_MATERIAL_LIGHT = 7; + +const S32 LSL_PRIM_SHINY_NONE = 0; +const S32 LSL_PRIM_SHINY_LOW = 1; +const S32 LSL_PRIM_SHINY_MEDIUM = 2; +const S32 LSL_PRIM_SHINY_HIGH = 3; + +const S32 LSL_PRIM_TEXGEN_DEFAULT = 0; +const S32 LSL_PRIM_TEXGEN_PLANAR = 1; + +const S32 LSL_PRIM_BUMP_NONE = 0; +const S32 LSL_PRIM_BUMP_BRIGHT = 1; +const S32 LSL_PRIM_BUMP_DARK = 2; +const S32 LSL_PRIM_BUMP_WOOD = 3; +const S32 LSL_PRIM_BUMP_BARK = 4; +const S32 LSL_PRIM_BUMP_BRICKS = 5; +const S32 LSL_PRIM_BUMP_CHECKER = 6; +const S32 LSL_PRIM_BUMP_CONCRETE = 7; +const S32 LSL_PRIM_BUMP_TILE = 8; +const S32 LSL_PRIM_BUMP_STONE = 9; +const S32 LSL_PRIM_BUMP_DISKS = 10; +const S32 LSL_PRIM_BUMP_GRAVEL = 11; +const S32 LSL_PRIM_BUMP_BLOBS = 12; +const S32 LSL_PRIM_BUMP_SIDING = 13; +const S32 LSL_PRIM_BUMP_LARGETILE = 14; +const S32 LSL_PRIM_BUMP_STUCCO = 15; +const S32 LSL_PRIM_BUMP_SUCTION = 16; +const S32 LSL_PRIM_BUMP_WEAVE = 17; + +const S32 LSL_PRIM_SCULPT_TYPE_SPHERE = 1; +const S32 LSL_PRIM_SCULPT_TYPE_TORUS = 2; +const S32 LSL_PRIM_SCULPT_TYPE_PLANE = 3; +const S32 LSL_PRIM_SCULPT_TYPE_CYLINDER = 4; +const S32 LSL_PRIM_SCULPT_TYPE_MASK = 7; +const S32 LSL_PRIM_SCULPT_FLAG_INVERT = 64; +const S32 LSL_PRIM_SCULPT_FLAG_MIRROR = 128; + +const S32 LSL_ALL_SIDES = -1; +const S32 LSL_LINK_ROOT = 1; +const S32 LSL_LINK_FIRST_CHILD = 2; +const S32 LSL_LINK_SET = -1; +const S32 LSL_LINK_ALL_OTHERS = -2; +const S32 LSL_LINK_ALL_CHILDREN = -3; +const S32 LSL_LINK_THIS = -4; + +// LSL constants for llSetForSell +const S32 SELL_NOT = 0; +const S32 SELL_ORIGINAL = 1; +const S32 SELL_COPY = 2; +const S32 SELL_CONTENTS = 3; + +// LSL constants for llSetPayPrice +const S32 PAY_PRICE_HIDE = -1; +const S32 PAY_PRICE_DEFAULT = -2; +const S32 MAX_PAY_BUTTONS = 4; +const S32 PAY_BUTTON_DEFAULT_0 = 1; +const S32 PAY_BUTTON_DEFAULT_1 = 5; +const S32 PAY_BUTTON_DEFAULT_2 = 10; +const S32 PAY_BUTTON_DEFAULT_3 = 20; + +// lsl email registration. +const S32 EMAIL_REG_SUBSCRIBE_OBJECT = 0x01; +const S32 EMAIL_REG_UNSUBSCRIBE_OBJECT = 0x02; +const S32 EMAIL_REG_UNSUBSCRIBE_SIM = 0x04; + +const S32 LIST_STAT_RANGE = 0; +const S32 LIST_STAT_MIN = 1; +const S32 LIST_STAT_MAX = 2; +const S32 LIST_STAT_MEAN = 3; +const S32 LIST_STAT_MEDIAN = 4; +const S32 LIST_STAT_STD_DEV = 5; +const S32 LIST_STAT_SUM = 6; +const S32 LIST_STAT_SUM_SQUARES = 7; +const S32 LIST_STAT_NUM_COUNT = 8; +const S32 LIST_STAT_GEO_MEAN = 9; + +const S32 STRING_TRIM_HEAD = 0x01; +const S32 STRING_TRIM_TAIL = 0x02; +const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; + +// llGetObjectDetails +const S32 OBJECT_UNKNOWN_DETAIL = -1; +const S32 OBJECT_NAME = 1; +const S32 OBJECT_DESC = 2; +const S32 OBJECT_POS = 3; +const S32 OBJECT_ROT = 4; +const S32 OBJECT_VELOCITY = 5; +const S32 OBJECT_OWNER = 6; +const S32 OBJECT_GROUP = 7; +const S32 OBJECT_CREATOR = 8; + +// llTextBox() magic token string - yes this is a hack. sue me. +char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!"; + +// changed() event flags +const U32 CHANGED_NONE = 0x0; +const U32 CHANGED_INVENTORY = 0x1; +const U32 CHANGED_COLOR = 0x2; +const U32 CHANGED_SHAPE = 0x4; +const U32 CHANGED_SCALE = 0x8; +const U32 CHANGED_TEXTURE = 0x10; +const U32 CHANGED_LINK = 0x20; +const U32 CHANGED_ALLOWED_DROP = 0x40; +const U32 CHANGED_OWNER = 0x80; +const U32 CHANGED_REGION = 0x100; +const U32 CHANGED_TELEPORT = 0x200; +const U32 CHANGED_REGION_START = 0x400; +const U32 CHANGED_MEDIA = 0x800; + +// Possible error results +const U32 LSL_STATUS_OK = 0; +const U32 LSL_STATUS_MALFORMED_PARAMS = 1000; +const U32 LSL_STATUS_TYPE_MISMATCH = 1001; +const U32 LSL_STATUS_BOUNDS_ERROR = 1002; +const U32 LSL_STATUS_NOT_FOUND = 1003; +const U32 LSL_STATUS_NOT_SUPPORTED = 1004; +const U32 LSL_STATUS_INTERNAL_ERROR = 1999; + +// Start per-function errors below, starting at 2000: +const U32 LSL_STATUS_WHITELIST_FAILED = 2001; + +#endif diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp index b4539ebee9..4709e769c1 100755 --- a/indra/llprimitive/llmaterialtable.cpp +++ b/indra/llprimitive/llmaterialtable.cpp @@ -27,10 +27,10 @@ #include "linden_common.h" #include "llmaterialtable.h" +#include "indra_constants.h" #include "llstl.h" #include "material_codes.h" #include "sound_ids.h" -#include "imageids.h" LLMaterialTable LLMaterialTable::basic(1); diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 2fa77177f5..1b4c68481f 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -38,7 +38,6 @@ #include "lldatapacker.h" #include "llsdutil_math.h" #include "llprimtexturelist.h" -#include "imageids.h" #include "llmaterialid.h" /** diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 47a21beaaf..9edbbff34c 100755 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -540,7 +540,7 @@ void LLPrimitive::setPosition(const F32 x, const F32 y, const F32 z) } else { - llerrs << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setPosition(x,y,z) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } @@ -553,7 +553,7 @@ void LLPrimitive::setPosition(const LLVector3& pos) } else { - llerrs << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setPosition(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } @@ -565,7 +565,7 @@ void LLPrimitive::setAngularVelocity(const LLVector3& avel) } else { - llerror("Non Finite in LLPrimitive::setAngularVelocity", 0); + LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL; } } @@ -577,7 +577,7 @@ void LLPrimitive::setAngularVelocity(const F32 x, const F32 y, const F32 z) } else { - llerror("Non Finite in LLPrimitive::setAngularVelocity", 0); + LL_ERRS() << "Non Finite in LLPrimitive::setAngularVelocity" << LL_ENDL; } } @@ -589,7 +589,7 @@ void LLPrimitive::setVelocity(const LLVector3& vel) } else { - llerrs << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } @@ -601,7 +601,7 @@ void LLPrimitive::setVelocity(const F32 x, const F32 y, const F32 z) } else { - llerrs << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setVelocity(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } @@ -613,7 +613,7 @@ void LLPrimitive::setVelocityX(const F32 x) } else { - llerror("Non Finite in LLPrimitive::setVelocityX", 0); + LL_ERRS() << "Non Finite in LLPrimitive::setVelocityX" << LL_ENDL; } } @@ -625,7 +625,7 @@ void LLPrimitive::setVelocityY(const F32 y) } else { - llerror("Non Finite in LLPrimitive::setVelocityY", 0); + LL_ERRS() << "Non Finite in LLPrimitive::setVelocityY" << LL_ENDL; } } @@ -637,7 +637,7 @@ void LLPrimitive::setVelocityZ(const F32 z) } else { - llerror("Non Finite in LLPrimitive::setVelocityZ", 0); + LL_ERRS() << "Non Finite in LLPrimitive::setVelocityZ" << LL_ENDL; } } @@ -649,7 +649,7 @@ void LLPrimitive::addVelocity(const LLVector3& vel) } else { - llerror("Non Finite in LLPrimitive::addVelocity", 0); + LL_ERRS() << Non Finite in LLPrimitive::addVelocity" << LL_ENDL; } } @@ -661,7 +661,7 @@ void LLPrimitive::setAcceleration(const LLVector3& accel) } else { - llerrs << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(LLVector3) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } @@ -673,7 +673,7 @@ void LLPrimitive::setAcceleration(const F32 x, const F32 y, const F32 z) } else { - llerrs << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << llendl; + LL_ERRS() << "Non Finite in LLPrimitive::setAcceleration(F32,F32,F32) for " << pCodeToString(mPrimitiveCode) << LL_ENDL; } } #endif // CHECK_FOR_FINITE diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp index 16e5f894e2..b072ce3964 100755 --- a/indra/llprimitive/tests/llmediaentry_test.cpp +++ b/indra/llprimitive/tests/llmediaentry_test.cpp @@ -39,7 +39,7 @@ #include "llsdserialize.h" #include "../llmediaentry.h" -#include "lllslconstants.h" +#include "indra_constants.h" #define DEFAULT_MEDIA_ENTRY "\n\ \n\ diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index c0045c8044..e4279ea1e0 100755 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -58,7 +58,7 @@ LLPostProcess::LLPostProcess(void) : /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender. std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); - LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; + LL_DEBUGS("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; llifstream effectsXML(pathName); diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index c4270a62bd..b3864b3711 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -142,6 +142,7 @@ set(llui_HEADER_FILES llbutton.h llcallbackmap.h llchatentry.h + llchat.h llcheckboxctrl.h llclipboard.h llcombobox.h @@ -281,7 +282,9 @@ if(LL_TESTS) include(LLAddBuildTest) SET(llui_TEST_SOURCE_FILES llurlmatch.cpp - llurlentry.cpp ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") + # INTEGRATION TESTS + set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(LL_TESTS) diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ce4d137478..ed12f686a1 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -591,7 +591,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) // We only handle the click if the click both started and ended within us getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; } return TRUE; } diff --git a/indra/llui/llchat.h b/indra/llui/llchat.h new file mode 100755 index 0000000000..f5b242fdfc --- /dev/null +++ b/indra/llui/llchat.h @@ -0,0 +1,109 @@ +/** + * @file llchat.h + * @author James Cook + * @brief Chat constants and data structures. + * + * $LicenseInfo:firstyear=2006&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_LLCHAT_H +#define LL_LLCHAT_H + +#include "lluuid.h" +#include "v3math.h" + +// enumerations used by the chat system +typedef enum e_chat_source_type +{ + CHAT_SOURCE_SYSTEM = 0, + CHAT_SOURCE_AGENT = 1, + CHAT_SOURCE_OBJECT = 2, + CHAT_SOURCE_UNKNOWN = 3 +} EChatSourceType; + +typedef enum e_chat_type +{ + CHAT_TYPE_WHISPER = 0, + CHAT_TYPE_NORMAL = 1, + CHAT_TYPE_SHOUT = 2, + CHAT_TYPE_START = 4, + CHAT_TYPE_STOP = 5, + CHAT_TYPE_DEBUG_MSG = 6, + CHAT_TYPE_REGION = 7, + CHAT_TYPE_OWNER = 8, + CHAT_TYPE_DIRECT = 9 // From llRegionSayTo() +} EChatType; + +typedef enum e_chat_audible_level +{ + CHAT_AUDIBLE_NOT = -1, + CHAT_AUDIBLE_BARELY = 0, + CHAT_AUDIBLE_FULLY = 1 +} EChatAudible; + +typedef enum e_chat_style +{ + CHAT_STYLE_NORMAL, + CHAT_STYLE_IRC, + CHAT_STYLE_HISTORY +}EChatStyle; + +// A piece of chat +class LLChat +{ +public: + LLChat(const std::string& text = std::string()) + : mText(text), + mFromName(), + mFromID(), + mNotifId(), + mOwnerID(), + mSourceType(CHAT_SOURCE_AGENT), + mChatType(CHAT_TYPE_NORMAL), + mAudible(CHAT_AUDIBLE_FULLY), + mMuted(FALSE), + mTime(0.0), + mTimeStr(), + mPosAgent(), + mURL(), + mChatStyle(CHAT_STYLE_NORMAL), + mSessionID() + { } + + std::string mText; // UTF-8 line of text + std::string mFromName; // agent or object name + LLUUID mFromID; // agent id or object id + LLUUID mNotifId; + LLUUID mOwnerID; + EChatSourceType mSourceType; + EChatType mChatType; + EChatAudible mAudible; + BOOL mMuted; // pass muted chat to maintain list of chatters + F64 mTime; // viewer only, seconds from viewer start + std::string mTimeStr; + LLVector3 mPosAgent; + std::string mURL; + EChatStyle mChatStyle; + LLUUID mSessionID; +}; + +#endif diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp index 14173fdbb0..1d18cb2bb0 100755 --- a/indra/llui/llclipboard.cpp +++ b/indra/llui/llclipboard.cpp @@ -88,6 +88,7 @@ bool LLClipboard::pasteFromClipboard(std::vector& inv_objects) const { bool res = false; S32 count = mObjects.size(); + inv_objects.reserve(inv_objects.size() + count); if (count > 0) { res = true; diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h index fd2e7610df..58d80e2687 100755 --- a/indra/llui/llclipboard.h +++ b/indra/llui/llclipboard.h @@ -31,7 +31,6 @@ #include "llstring.h" #include "lluuid.h" -#include "stdenums.h" #include "llsingleton.h" #include "llassettype.h" #include "llinventory.h" diff --git a/indra/llui/llctrlselectioninterface.h b/indra/llui/llctrlselectioninterface.h index 2cdcbd88fe..a7b089c8f9 100755 --- a/indra/llui/llctrlselectioninterface.h +++ b/indra/llui/llctrlselectioninterface.h @@ -28,8 +28,8 @@ #define LLCTRLSELECTIONINTERFACE_H #include "stdtypes.h" -#include "stdenums.h" #include "llstring.h" +#include "llui.h" class LLSD; class LLUUID; diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 5f69c6af31..a36bc4743e 100755 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -365,13 +365,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) mDragLastScreenY += delta_y; getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" <setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; handled = TRUE; } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 97a52fada4..43c22f8bf3 100755 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -520,7 +520,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) if (!item_pair->first) { - llwarning("Attempt to selet an item pair containing null panel item", 0); + LL_WARNS() << "Attempt to selet an item pair containing null panel item" << LL_ENDL; return; } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d06e2c9334..11802904e4 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -653,7 +653,7 @@ void LLFloater::onVisibilityChange ( BOOL new_visibility ) void LLFloater::openFloater(const LLSD& key) { - llinfos << "Opening floater " << getName() << llendl; + LL_INFOS() << "Opening floater " << getName() << LL_ENDL; mKey = key; // in case we need to open ourselves again if (getSoundFlags() != SILENT @@ -706,7 +706,7 @@ void LLFloater::openFloater(const LLSD& key) void LLFloater::closeFloater(bool app_quitting) { - llinfos << "Closing floater " << getName() << llendl; + LL_INFOS() << "Closing floater " << getName() << LL_ENDL; if (app_quitting) { LLFloater::sQuitting = true; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 8aa1eb7cd5..5628baa4a1 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -255,8 +255,6 @@ LLFolderView::~LLFolderView( void ) mRenamer = NULL; mStatusTextBox = NULL; - mAutoOpenItems.removeAllNodes(); - if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); mAutoOpenItems.removeAllNodes(); @@ -736,7 +734,7 @@ void LLFolderView::removeSelectedItems() } else { - llinfos << "Cannot delete " << item->getName() << llendl; + LL_INFOS() << "Cannot delete " << item->getName() << LL_ENDL; return; } } @@ -762,20 +760,21 @@ void LLFolderView::removeSelectedItems() } else if (count > 1) { - LLDynamicArray listeners; + std::vector listeners; LLFolderViewModelItem* listener; setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel->hasFocus()); + listeners.reserve(count); for(S32 i = 0; i < count; ++i) { listener = items[i]->getViewModelItem(); - if(listener && (listeners.find(listener) == LLDynamicArray::FAIL)) + if(listener && (std::find(listeners.begin(), listeners.end(), listener) == listeners.end())) { - listeners.put(listener); + listeners.push_back(listener); } } - listener = static_cast(listeners.get(0)); + listener = static_cast(listeners.at(0)); if(listener) { listener->removeBatch(listeners); @@ -1282,7 +1281,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) if (uni_char > 0x7f) { - llwarns << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << llendl; + LL_WARNS() << "LLFolderView::handleUnicodeCharHere - Don't handle non-ascii yet, aborting" << LL_ENDL; return FALSE; } @@ -1744,14 +1743,14 @@ void LLFolderView::update() void LLFolderView::dumpSelectionInformation() { - llinfos << "LLFolderView::dumpSelectionInformation()" << llendl; - llinfos << "****************************************" << llendl; + LL_INFOS() << "LLFolderView::dumpSelectionInformation()" << LL_NEWLINE + << "****************************************" << LL_ENDL; selected_items_t::iterator item_it; for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { - llinfos << " " << (*item_it)->getName() << llendl; + LL_INFOS() << " " << (*item_it)->getName() << LL_ENDL; } - llinfos << "****************************************" << llendl; + LL_INFOS() << "****************************************" << LL_ENDL; } void LLFolderView::updateRenamerPosition() diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 11fccdace4..652e22c7bc 100755 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -39,7 +39,6 @@ #include "lluictrl.h" #include "v4color.h" -#include "stdenums.h" #include "lldepthstack.h" #include "lleditmenuhandler.h" #include "llfontgl.h" diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index c7910cb883..b5ac7db4e7 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -636,7 +636,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } if (handled) { - lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << llendl; } return handled; @@ -1753,7 +1753,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, { handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << llendl; } return TRUE; diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index efa0925a4a..a19bb99d9d 100755 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -31,7 +31,6 @@ #include "v4color.h" #include "lluictrl.h" #include "lluiimage.h" -#include "stdenums.h" class LLTextBox; class LLUICtrlFactory; diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 795dacdbb0..0d232cc2cf 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -94,7 +94,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename ) file.open(filename); /* Flawfinder: ignore */ if( file.fail() ) { - llinfos << "LLKeywords::loadFromFile() Unable to open file: " << filename << llendl; + LL_INFOS() << "LLKeywords::loadFromFile() Unable to open file: " << filename << LL_ENDL; return mLoaded; } @@ -102,7 +102,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename ) file >> buffer; if( strcmp( buffer, "llkeywords" ) ) { - llinfos << filename << " does not appear to be a keyword file" << llendl; + LL_INFOS() << filename << " does not appear to be a keyword file" << LL_ENDL; return mLoaded; } @@ -112,7 +112,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename ) file >> version_num; if( strcmp(buffer, "version") || version_num != (U32)KEYWORD_FILE_CURRENT_VERSION ) { - llinfos << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << llendl; + LL_INFOS() << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << LL_ENDL; return mLoaded; } @@ -342,7 +342,7 @@ LLColor3 LLKeywords::readColor( const std::string& s ) S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b ); if( values_read != 3 ) { - llinfos << " poorly formed color in keyword file" << llendl; + LL_INFOS() << " poorly formed color in keyword file" << LL_ENDL; } return LLColor3( r, g, b ); } @@ -553,7 +553,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW S32 seg_start = cur - base; S32 seg_end = seg_start + seg_len; - // llinfos << "Seg: [" << word.c_str() << "]" << llendl; + // LL_INFOS() << "Seg: [" << word.c_str() << "]" << LL_ENDL; insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); } @@ -620,10 +620,10 @@ void LLKeywords::insertSegment(std::vector& seg_list, LLTextSe #ifdef _DEBUG void LLKeywords::dump() { - llinfos << "LLKeywords" << llendl; + LL_INFOS() << "LLKeywords" << LL_ENDL; - llinfos << "LLKeywords::sWordTokenMap" << llendl; + LL_INFOS() << "LLKeywords::sWordTokenMap" << LL_ENDL; word_token_map_t::iterator word_token_iter = mWordTokenMap.begin(); while( word_token_iter != mWordTokenMap.end() ) { @@ -632,7 +632,7 @@ void LLKeywords::dump() ++word_token_iter; } - llinfos << "LLKeywords::sLineTokenList" << llendl; + LL_INFOS() << "LLKeywords::sLineTokenList" << LL_ENDL; for (token_list_t::iterator iter = mLineTokenList.begin(); iter != mLineTokenList.end(); ++iter) { @@ -641,7 +641,7 @@ void LLKeywords::dump() } - llinfos << "LLKeywords::sDelimiterTokenList" << llendl; + LL_INFOS() << "LLKeywords::sDelimiterTokenList" << LL_ENDL; for (token_list_t::iterator iter = mDelimiterTokenList.begin(); iter != mDelimiterTokenList.end(); ++iter) { @@ -652,12 +652,12 @@ void LLKeywords::dump() void LLKeywordToken::dump() { - llinfos << "[" << + LL_INFOS() << "[" << mColor.mV[VX] << ", " << mColor.mV[VY] << ", " << mColor.mV[VZ] << "] [" << wstring_to_utf8str(mToken) << "]" << - llendl; + LL_ENDL; } #endif // DEBUG diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 5478e85e13..f2e9843bf3 100755 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -855,14 +855,14 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) mKeystrokeTimer.reset(); getWindow()->setCursor(UI_CURSOR_IBEAM); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; handled = TRUE; } if( !handled ) { getWindow()->setCursor(UI_CURSOR_IBEAM); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; handled = TRUE; } diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 8c2be44904..8aefef07e2 100755 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -181,7 +181,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask) if( childrenHandleHover(x, y, mask) == NULL ) { getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; } return TRUE; } diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index 70bcfb5b4f..17d07f4dae 100755 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -356,12 +356,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask) onCommit(); getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; } return TRUE; } diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 820e7cb26a..7488af2e05 100755 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -45,33 +45,6 @@ LLResMgr::LLResMgr() void LLResMgr::setLocale( LLLOCALE_ID locale_id ) { mLocale = locale_id; - - //RN: for now, use normal 'C' locale for everything but specific UI input/output routines -// switch( locale_id ) -// { -// case LLLOCALE_USA: -//#if LL_WINDOWS -// // Windows doesn't use ISO country codes. -// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-usa" ) << llendl; -//#else -// // posix version should work everywhere else. -// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_US" ) << llendl; -//#endif -// break; -// case LLLOCALE_UK: -//#if LL_WINDOWS -// // Windows doesn't use ISO country codes. -// llinfos << "Setting locale to " << setlocale( LC_ALL, "english-uk" ) << llendl; -//#else -// // posix version should work everywhere else. -// llinfos << "Setting locale to " << setlocale( LC_ALL, "en_GB" ) << llendl; -//#endif -// break; -// default: -// llassert(0); -// setLocale(LLLOCALE_USA); -// break; -// } } char LLResMgr::getDecimalPoint() const diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index bef1854748..f92e8f41ea 100755 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) } getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; handled = TRUE; } else @@ -393,7 +393,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) if( !handled ) { getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; handled = TRUE; } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 3b5fb2adfb..93eea75952 100755 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -155,7 +155,6 @@ LLScrollContainer::~LLScrollContainer( void ) // virtual void LLScrollContainer::scrollHorizontal( S32 new_pos ) { - //llinfos << "LLScrollContainer::scrollHorizontal()" << llendl; if( mScrolledView ) { LLRect doc_rect = mScrolledView->getRect(); @@ -167,7 +166,6 @@ void LLScrollContainer::scrollHorizontal( S32 new_pos ) // virtual void LLScrollContainer::scrollVertical( S32 new_pos ) { - // llinfos << "LLScrollContainer::scrollVertical() " << new_pos << llendl; if( mScrolledView ) { LLRect doc_rect = mScrolledView->getRect(); diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h index b67236c939..f64cf43a8e 100755 --- a/indra/llui/llscrollcontainer.h +++ b/indra/llui/llscrollcontainer.h @@ -31,7 +31,6 @@ #ifndef LL_V4COLOR_H #include "v4color.h" #endif -#include "stdenums.h" #include "llcoord.h" #include "llscrollbar.h" diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 7f04c92b27..f335b5dec3 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1464,8 +1464,6 @@ void LLScrollListCtrl::drawItems() mLineHeight ); item->setRect(item_rect); - //llinfos << item_rect.getWidth() << llendl; - max_columns = llmax(max_columns, item->getNumColumns()); LLColor4 fg_color; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 8fa06cc499..40a49074c1 100755 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -34,7 +34,6 @@ #include "lluictrl.h" #include "llctrlselectioninterface.h" -//#include "lldarray.h" #include "llfontgl.h" #include "llui.h" #include "llstring.h" // LLWString diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index db72234f94..ddddbe6f30 100755 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -188,12 +188,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue ); } getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; } return TRUE; } diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 2543bd8f0a..1af36c6fdb 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -152,9 +152,9 @@ LLStatBar::LLStatBar(const Params& p) mCurMaxBar(p.bar_max), mCurMinBar(0), mDecimalDigits(p.decimal_digits), - mNumFrames(p.num_frames), + mNumHistoryFrames(p.num_frames), + mNumShortHistoryFrames(p.num_frames_short), mMaxHeight(p.max_height), - mPerSec(p.show_per_sec), mDisplayBar(p.show_bar), mDisplayHistory(p.show_history), mOrientation(p.orientation), @@ -221,36 +221,28 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) void LLStatBar::draw() { - F32 current = 0, - min = 0, - max = 0, - mean = 0; + F32 current = 0, + min = 0, + max = 0, + mean = 0; bool show_data = false; LLLocalClipRect _(getLocalRect()); LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + S32 num_frames = mDisplayHistory ? mNumHistoryFrames : mNumShortHistoryFrames; + std::string unit_label; if (mCountFloatp) { LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); unit_label = mUnitLabel.empty() ? mCountFloatp->getUnitLabel() : mUnitLabel; - if (mPerSec) - { - unit_label += "/s"; - current = last_frame_recording.getPerSec(*mCountFloatp); - min = frame_recording.getPeriodMinPerSec(*mCountFloatp, mNumFrames); - max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, mNumFrames); - mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, mNumFrames); - } - else - { - current = last_frame_recording.getSum(*mCountFloatp); - min = frame_recording.getPeriodMin(*mCountFloatp, mNumFrames); - max = frame_recording.getPeriodMax(*mCountFloatp, mNumFrames); - mean = frame_recording.getPeriodMean(*mCountFloatp, mNumFrames); - } + unit_label += "/s"; + current = last_frame_recording.getPerSec(*mCountFloatp); + min = frame_recording.getPeriodMinPerSec(*mCountFloatp, num_frames); + max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, num_frames); + mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, num_frames); // always show count-style data show_data = true; @@ -262,11 +254,11 @@ void LLStatBar::draw() // only show data if there is an event in the relevant time period current = last_frame_recording.getMean(*mEventFloatp); - min = frame_recording.getPeriodMin(*mEventFloatp, mNumFrames); - max = frame_recording.getPeriodMax(*mEventFloatp, mNumFrames); - mean = frame_recording.getPeriodMean(*mEventFloatp, mNumFrames); - - show_data = frame_recording.getSampleCount(*mEventFloatp, mNumFrames) != 0; + min = frame_recording.getPeriodMin(*mEventFloatp, num_frames); + max = frame_recording.getPeriodMax(*mEventFloatp, num_frames); + mean = frame_recording.getPeriodMean(*mEventFloatp, num_frames); + + show_data = frame_recording.getSampleCount(*mEventFloatp, num_frames) != 0; } else if (mSampleFloatp) { @@ -275,9 +267,9 @@ void LLStatBar::draw() unit_label = mUnitLabel.empty() ? mSampleFloatp->getUnitLabel() : mUnitLabel; current = last_frame_recording.getMean(*mSampleFloatp); - min = frame_recording.getPeriodMin(*mSampleFloatp, mNumFrames); - max = frame_recording.getPeriodMax(*mSampleFloatp, mNumFrames); - mean = frame_recording.getPeriodMean(*mSampleFloatp, mNumFrames); + min = frame_recording.getPeriodMin(*mSampleFloatp, num_frames); + max = frame_recording.getPeriodMax(*mSampleFloatp, num_frames); + mean = frame_recording.getPeriodMean(*mSampleFloatp, num_frames); // always show sample data if we've ever grabbed any samples show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue(); @@ -472,18 +464,16 @@ void LLStatBar::draw() S32 i; gGL.color4f( 1.f, 0.f, 0.f, 1.f ); gGL.begin( LLRender::QUADS ); - const S32 max_frame = llmin(mNumFrames, num_values); + const S32 max_frame = llmin(num_frames, num_values); U32 num_samples = 0; for (i = 1; i <= max_frame; i++) { - F32 offset = ((F32)i / (F32)mNumFrames) * span; + F32 offset = ((F32)i / (F32)num_frames) * span; LLTrace::Recording& recording = frame_recording.getPrevRecording(i); if (mCountFloatp) { - value = mPerSec - ? recording.getPerSec(*mCountFloatp) - : recording.getSum(*mCountFloatp); + value = recording.getPerSec(*mCountFloatp); num_samples = recording.getSampleCount(*mCountFloatp); } else if (mEventFloatp) diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index fc925b1a74..5aed98fecf 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -46,12 +46,12 @@ public: Optional decimal_digits; - Optional show_per_sec, - show_bar, + Optional show_bar, show_history, scale_range; Optional num_frames, + num_frames_short, max_height; Optional stat; Optional orientation; @@ -63,11 +63,11 @@ public: bar_max("bar_max", 0.f), tick_spacing("tick_spacing", 0.f), decimal_digits("decimal_digits", 3), - show_per_sec("show_per_sec", true), show_bar("show_bar", false), show_history("show_history", false), scale_range("scale_range", true), num_frames("num_frames", 200), + num_frames_short("num_frames_short", 20), max_height("max_height", 100), stat("stat"), orientation("orientation", VERTICAL) @@ -96,10 +96,10 @@ private: mLabelSpacing; F32 mTickValue; U32 mDecimalDigits; - S32 mNumFrames; + S32 mNumHistoryFrames, + mNumShortHistoryFrames; S32 mMaxHeight; - bool mPerSec, // Use the per sec stats. - mDisplayBar, // Display the bar graph. + bool mDisplayBar, // Display the bar graph. mDisplayHistory, mAutoScaleMax, mAutoScaleMin; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 834f213097..eb5a04d8e5 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -781,7 +781,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 969e072704..49b6980c81 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -32,10 +32,8 @@ #include "llrect.h" #include "llkeywords.h" #include "llframetimer.h" -#include "lldarray.h" #include "llstyle.h" #include "lleditmenuhandler.h" -#include "lldarray.h" #include "llviewborder.h" // for params #include "lltextbase.h" #include "lltextvalidate.h" diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 4ebfd0fd6e..f3ed3fcb49 100755 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -55,6 +55,52 @@ class LLWindow; class LLView; class LLHelp; + +// this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim) +enum EDragAndDropType +{ + DAD_NONE = 0, + DAD_TEXTURE = 1, + DAD_SOUND = 2, + DAD_CALLINGCARD = 3, + DAD_LANDMARK = 4, + DAD_SCRIPT = 5, + DAD_CLOTHING = 6, + DAD_OBJECT = 7, + DAD_NOTECARD = 8, + DAD_CATEGORY = 9, + DAD_ROOT_CATEGORY = 10, + DAD_BODYPART = 11, + DAD_ANIMATION = 12, + DAD_GESTURE = 13, + DAD_LINK = 14, + DAD_MESH = 15, + DAD_WIDGET = 16, + DAD_PERSON = 17, + DAD_COUNT = 18, // number of types in this enum +}; + +// Reasons for drags to be denied. +// ordered by priority for multi-drag +enum EAcceptance +{ + ACCEPT_POSTPONED, // we are asynchronously determining acceptance + ACCEPT_NO, // Uninformative, general purpose denial. + ACCEPT_NO_LOCKED, // Operation would be valid, but permissions are set to disallow it. + ACCEPT_YES_COPY_SINGLE, // We'll take a copy of a single item + ACCEPT_YES_SINGLE, // Accepted. OK to drag and drop single item here. + ACCEPT_YES_COPY_MULTI, // We'll take a copy of multiple items + ACCEPT_YES_MULTI // Accepted. OK to drag and drop multiple items here. +}; + +enum EAddPosition +{ + ADD_TOP, + ADD_BOTTOM, + ADD_DEFAULT +}; + + void make_ui_sound(const char* name); void make_ui_sound_deferred(const char * name); diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index cb40c85582..07e02de6d8 100755 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -42,12 +42,12 @@ // LLUIString mMessage("Welcome [USERNAME] to [SECONDLIFE]!"); // mMessage.setArg("[USERNAME]", "Steve"); // mMessage.setArg("[SECONDLIFE]", "Second Life"); -// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life" +// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Steve to Second Life" // mMessage.setArg("[USERNAME]", "Joe"); -// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life" +// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Welcome Joe to Second Life" // mMessage = "Bienvenido a la [SECONDLIFE] [USERNAME]" // mMessage.setArg("[SECONDLIFE]", "Segunda Vida"); -// llinfos << mMessage.getString() << llendl; // outputs "Bienvenido a la Segunda Vida Joe" +// LL_INFOS() << mMessage.getString() << LL_ENDL; // outputs "Bienvenido a la Segunda Vida Joe" // Implementation Notes: // Attempting to have operator[](const std::string& s) return mArgs[s] fails because we have diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 8c6c32178a..d4684e2e1e 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -32,6 +32,7 @@ #include "lluicolor.h" #include "llstyle.h" +#include "llavatarname.h" #include "llhost.h" // for resolving parcel name by parcel id #include diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 0568fa889a..cd23ce7df1 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -42,7 +42,6 @@ #include "llui.h" #include "lluistring.h" #include "llviewquery.h" -#include "stdenums.h" #include "lluistring.h" #include "llcursortypes.h" #include "lluictrlfactory.h" @@ -67,6 +66,7 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE; const U32 GL_NAME_UI_RESERVED = 2; + // maintains render state during traversal of UI tree class LLViewDrawContext { diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index 2c016d2560..a0a13267ac 100755 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -37,9 +37,9 @@ #include "llpointer.h" #include "llsd.h" #include "llrefcount.h" -#include "stdenums.h" #include "llstring.h" #include "lltrace.h" +#include "llui.h" #include class LLScrollListItem; diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index 67dce8c073..f19fdf4890 100755 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -15,7 +15,6 @@ set(llvfs_SOURCE_FILES lldir.cpp lldiriterator.cpp lllfsthread.cpp - llpidlock.cpp llvfile.cpp llvfs.cpp llvfsthread.cpp @@ -28,7 +27,6 @@ set(llvfs_HEADER_FILES lldirguard.h lldiriterator.h lllfsthread.h - llpidlock.h llvfile.h llvfs.h llvfsthread.h diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 6899e9a44a..b7e71b87a8 100755 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -926,22 +926,22 @@ bool LLDir::setCacheDir(const std::string &path) void LLDir::dumpCurrentDirectories() { - LL_DEBUGS2("AppInit","Directories") << "Current Directories:" << LL_ENDL; - - LL_DEBUGS2("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL; - LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << "Current Directories:" << LL_ENDL; + + LL_DEBUGS("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL; + LL_DEBUGS("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL; } std::string LLDir::add(const std::string& path, const std::string& name) const diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp deleted file mode 100755 index 3b83d1b9e3..0000000000 --- a/indra/llvfs/llpidlock.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/** - * @file llformat.cpp - * @date January 2007 - * @brief string formatting utility - * - * $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 "linden_common.h" - -#include "llpidlock.h" -#include "lldir.h" -#include "llsd.h" -#include "llsdserialize.h" -#include "llnametable.h" -#include "llframetimer.h" - -#if LL_WINDOWS //For windows platform. - -#include "llwin32headerslean.h" - -namespace { - inline DWORD getpid() { - return GetCurrentProcessId(); - } -} - -bool isProcessAlive(U32 pid) -{ - return (bool) GetProcessVersion((DWORD)pid); -} - -#else //Everyone Else -bool isProcessAlive(U32 pid) -{ - return (bool) kill( (pid_t)pid, 0); -} -#endif //Everyone else. - - - -class LLPidLockFile -{ - public: - LLPidLockFile( ) : - mAutosave(false), - mSaving(false), - mWaiting(false), - mPID(getpid()), - mNameTable(NULL), - mClean(true) - { - mLockName = gDirUtilp->getTempDir() + gDirUtilp->getDirDelimiter() + "savelock"; - } - bool requestLock(LLNameTable *name_table, bool autosave, - bool force_immediate=FALSE, F32 timeout=300.0); - bool checkLock(); - void releaseLock(); - - private: - void writeLockFile(LLSD pids); - public: - static LLPidLockFile& instance(); // return the singleton black list file - - bool mAutosave; - bool mSaving; - bool mWaiting; - LLFrameTimer mTimer; - U32 mPID; - std::string mLockName; - std::string mSaveName; - LLSD mPIDS_sd; - LLNameTable *mNameTable; - bool mClean; -}; - -LLPidLockFile& LLPidLockFile::instance() -{ - static LLPidLockFile the_file; - return the_file; -} - -void LLPidLockFile::writeLockFile(LLSD pids) -{ - llofstream ofile(mLockName); - - if (!LLSDSerialize::toXML(pids,ofile)) - { - llwarns << "Unable to write concurrent save lock file." << llendl; - } - ofile.close(); -} - -bool LLPidLockFile::requestLock(LLNameTable *name_table, bool autosave, - bool force_immediate, F32 timeout) -{ - bool readyToSave = FALSE; - - if (mSaving) return FALSE; //Bail out if we're currently saving. Will not queue another save. - - if (!mWaiting){ - mNameTable=name_table; - mAutosave = autosave; - } - - LLSD out_pids; - out_pids.append( (LLSD::Integer)mPID ); - - llifstream ifile(mLockName); - - if (ifile.is_open()) - { //If file exists, we need to decide whether or not to continue. - if ( force_immediate - || mTimer.hasExpired() ) //Only deserialize if we REALLY need to. - { - - LLSD in_pids; - - LLSDSerialize::fromXML(in_pids, ifile); - - //Clean up any dead PIDS that might be in there. - for (LLSD::array_iterator i=in_pids.beginArray(); - i !=in_pids.endArray(); - ++i) - { - U32 stored_pid=(*i).asInteger(); - - if (isProcessAlive(stored_pid)) - { - out_pids.append( (*i) ); - } - } - - readyToSave=TRUE; - } - ifile.close(); - } - else - { - readyToSave=TRUE; - } - - if (!mWaiting) //Not presently waiting to save. Queue up. - { - mTimer.resetWithExpiry(timeout); - mWaiting=TRUE; - } - - if (readyToSave) - { //Potential race condition won't kill us. Ignore it. - writeLockFile(out_pids); - mSaving=TRUE; - } - - return readyToSave; -} - -bool LLPidLockFile::checkLock() -{ - return mWaiting; -} - -void LLPidLockFile::releaseLock() -{ - llifstream ifile(mLockName); - LLSD in_pids; - LLSD out_pids; - bool write_file=FALSE; - - LLSDSerialize::fromXML(in_pids, ifile); - - //Clean up this PID and any dead ones. - for (LLSD::array_iterator i=in_pids.beginArray(); - i !=in_pids.endArray(); - ++i) - { - U32 stored_pid=(*i).asInteger(); - - if (stored_pid != mPID && isProcessAlive(stored_pid)) - { - out_pids.append( (*i) ); - write_file=TRUE; - } - } - ifile.close(); - - if (write_file) - { - writeLockFile(out_pids); - } - else - { - unlink(mLockName.c_str()); - } - - mSaving=FALSE; - mWaiting=FALSE; -} - -//LLPidLock - -void LLPidLock::initClass() { - (void) LLPidLockFile::instance(); -} - -bool LLPidLock::checkLock() -{ - return LLPidLockFile::instance().checkLock(); -} - -bool LLPidLock::requestLock(LLNameTable *name_table, bool autosave, - bool force_immediate, F32 timeout) -{ - return LLPidLockFile::instance().requestLock(name_table,autosave,force_immediate,timeout); -} - -void LLPidLock::releaseLock() -{ - return LLPidLockFile::instance().releaseLock(); -} - -bool LLPidLock::isClean() -{ - return LLPidLockFile::instance().mClean; -} - -//getters -LLNameTable * LLPidLock::getNameTable() -{ - return LLPidLockFile::instance().mNameTable; -} - -bool LLPidLock::getAutosave() -{ - return LLPidLockFile::instance().mAutosave; -} - -bool LLPidLock::getClean() -{ - return LLPidLockFile::instance().mClean; -} - -std::string LLPidLock::getSaveName() -{ - return LLPidLockFile::instance().mSaveName; -} - -//setters -void LLPidLock::setClean(bool clean) -{ - LLPidLockFile::instance().mClean=clean; -} - -void LLPidLock::setSaveName(std::string savename) -{ - LLPidLockFile::instance().mSaveName=savename; -} diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h deleted file mode 100755 index d3295f4911..0000000000 --- a/indra/llvfs/llpidlock.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file llpidlock.h - * @brief System information debugging classes. - * - * $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_PIDLOCK_H -#define LL_PIDLOCK_H -#include "llnametable.h" - -class LLSD; -class LLFrameTimer; - -#if !LL_WINDOWS //For non-windows platforms. -#include -#endif - -namespace LLPidLock -{ - void initClass(); // { (void) LLPidLockFile::instance(); } - - bool requestLock( LLNameTable *name_table=NULL, bool autosave=TRUE, - bool force_immediate=FALSE, F32 timeout=300.0); - bool checkLock(); - void releaseLock(); - bool isClean(); - - //getters - LLNameTable * getNameTable(); - bool getAutosave(); - bool getClean(); - std::string getSaveName(); - - //setters - void setClean(bool clean); - void setSaveName(std::string savename); -}; - -#endif // LL_PIDLOCK_H diff --git a/indra/llvfs/llvfs.h b/indra/llvfs/llvfs.h index 63f0f28933..39f31a221b 100755 --- a/indra/llvfs/llvfs.h +++ b/indra/llvfs/llvfs.h @@ -29,7 +29,6 @@ #include #include "lluuid.h" -#include "linked_lists.h" #include "llassettype.h" #include "llthread.h" diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 4c6e706119..8713ef21a3 100755 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -38,6 +38,7 @@ include_directories(SYSTEM ) set(llwindow_SOURCE_FILES + llcursortypes.cpp llkeyboard.cpp llkeyboardheadless.cpp llwindowheadless.cpp @@ -48,6 +49,7 @@ set(llwindow_SOURCE_FILES set(llwindow_HEADER_FILES CMakeLists.txt + llcursortypes.h llkeyboard.h llkeyboardheadless.h llwindowheadless.h diff --git a/indra/llwindow/llcursortypes.cpp b/indra/llwindow/llcursortypes.cpp new file mode 100755 index 0000000000..ec60097195 --- /dev/null +++ b/indra/llwindow/llcursortypes.cpp @@ -0,0 +1,91 @@ +/** + * @file llcursortypes.cpp + * @brief Cursor types and lookup of types from a string + * + * $LicenseInfo:firstyear=2008&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 "linden_common.h" + +#include "llcursortypes.h" + +ECursorType getCursorFromString(const std::string& cursor_string) +{ + static std::map cursor_string_table; + if (cursor_string_table.empty()) + { + cursor_string_table["UI_CURSOR_ARROW"] = UI_CURSOR_ARROW; + cursor_string_table["UI_CURSOR_WAIT"] = UI_CURSOR_WAIT; + cursor_string_table["UI_CURSOR_HAND"] = UI_CURSOR_HAND; + cursor_string_table["UI_CURSOR_IBEAM"] = UI_CURSOR_IBEAM; + cursor_string_table["UI_CURSOR_CROSS"] = UI_CURSOR_CROSS; + cursor_string_table["UI_CURSOR_SIZENWSE"] = UI_CURSOR_SIZENWSE; + cursor_string_table["UI_CURSOR_SIZENESW"] = UI_CURSOR_SIZENESW; + cursor_string_table["UI_CURSOR_SIZEWE"] = UI_CURSOR_SIZEWE; + cursor_string_table["UI_CURSOR_SIZENS"] = UI_CURSOR_SIZENS; + cursor_string_table["UI_CURSOR_NO"] = UI_CURSOR_NO; + cursor_string_table["UI_CURSOR_WORKING"] = UI_CURSOR_WORKING; + cursor_string_table["UI_CURSOR_TOOLGRAB"] = UI_CURSOR_TOOLGRAB; + cursor_string_table["UI_CURSOR_TOOLLAND"] = UI_CURSOR_TOOLLAND; + cursor_string_table["UI_CURSOR_TOOLFOCUS"] = UI_CURSOR_TOOLFOCUS; + cursor_string_table["UI_CURSOR_TOOLCREATE"] = UI_CURSOR_TOOLCREATE; + cursor_string_table["UI_CURSOR_ARROWDRAG"] = UI_CURSOR_ARROWDRAG; + cursor_string_table["UI_CURSOR_ARROWCOPY"] = UI_CURSOR_ARROWCOPY; + cursor_string_table["UI_CURSOR_ARROWDRAGMULTI"] = UI_CURSOR_ARROWDRAGMULTI; + cursor_string_table["UI_CURSOR_ARROWCOPYMULTI"] = UI_CURSOR_ARROWCOPYMULTI; + cursor_string_table["UI_CURSOR_NOLOCKED"] = UI_CURSOR_NOLOCKED; + cursor_string_table["UI_CURSOR_ARROWLOCKED"] = UI_CURSOR_ARROWLOCKED; + cursor_string_table["UI_CURSOR_GRABLOCKED"] = UI_CURSOR_GRABLOCKED; + cursor_string_table["UI_CURSOR_TOOLTRANSLATE"] = UI_CURSOR_TOOLTRANSLATE; + cursor_string_table["UI_CURSOR_TOOLROTATE"] = UI_CURSOR_TOOLROTATE; + cursor_string_table["UI_CURSOR_TOOLSCALE"] = UI_CURSOR_TOOLSCALE; + cursor_string_table["UI_CURSOR_TOOLCAMERA"] = UI_CURSOR_TOOLCAMERA; + cursor_string_table["UI_CURSOR_TOOLPAN"] = UI_CURSOR_TOOLPAN; + cursor_string_table["UI_CURSOR_TOOLZOOMIN"] = UI_CURSOR_TOOLZOOMIN; + cursor_string_table["UI_CURSOR_TOOLPICKOBJECT3"] = UI_CURSOR_TOOLPICKOBJECT3; + cursor_string_table["UI_CURSOR_TOOLPLAY"] = UI_CURSOR_TOOLPLAY; + cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE; + cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN; + cursor_string_table["UI_CURSOR_PIPETTE"] = UI_CURSOR_PIPETTE; + cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT; + cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY; + cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN; + cursor_string_table["UI_CURSOR_TOOLPATHFINDING"] = UI_CURSOR_TOOLPATHFINDING; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTART"] = UI_CURSOR_TOOLPATHFINDING_PATH_START; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTARTADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END; + cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHENDADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD; + cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO; + } + + std::map::const_iterator iter = cursor_string_table.find(cursor_string); + + if (iter != cursor_string_table.end()) + { + return (ECursorType)iter->second; + } + + return UI_CURSOR_ARROW; +} + + + diff --git a/indra/llwindow/llcursortypes.h b/indra/llwindow/llcursortypes.h new file mode 100755 index 0000000000..cb6d6636a0 --- /dev/null +++ b/indra/llwindow/llcursortypes.h @@ -0,0 +1,79 @@ +/** + * @file llcursortypes.h + * @brief Cursor types + * + * $LicenseInfo:firstyear=2008&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_LLCURSORTYPES_H +#define LL_LLCURSORTYPES_H + +// If you add types here, add them in LLCursor::getCursorFromString +enum ECursorType { + UI_CURSOR_ARROW, + UI_CURSOR_WAIT, + UI_CURSOR_HAND, + UI_CURSOR_IBEAM, + UI_CURSOR_CROSS, + UI_CURSOR_SIZENWSE, + UI_CURSOR_SIZENESW, + UI_CURSOR_SIZEWE, + UI_CURSOR_SIZENS, + UI_CURSOR_NO, + UI_CURSOR_WORKING, + UI_CURSOR_TOOLGRAB, + UI_CURSOR_TOOLLAND, + UI_CURSOR_TOOLFOCUS, + UI_CURSOR_TOOLCREATE, + UI_CURSOR_ARROWDRAG, + UI_CURSOR_ARROWCOPY, // drag with copy + UI_CURSOR_ARROWDRAGMULTI, + UI_CURSOR_ARROWCOPYMULTI, // drag with copy + UI_CURSOR_NOLOCKED, + UI_CURSOR_ARROWLOCKED, + UI_CURSOR_GRABLOCKED, + UI_CURSOR_TOOLTRANSLATE, + UI_CURSOR_TOOLROTATE, + UI_CURSOR_TOOLSCALE, + UI_CURSOR_TOOLCAMERA, + UI_CURSOR_TOOLPAN, + UI_CURSOR_TOOLZOOMIN, + UI_CURSOR_TOOLPICKOBJECT3, + UI_CURSOR_TOOLPLAY, + UI_CURSOR_TOOLPAUSE, + UI_CURSOR_TOOLMEDIAOPEN, + UI_CURSOR_PIPETTE, + UI_CURSOR_TOOLSIT, + UI_CURSOR_TOOLBUY, + UI_CURSOR_TOOLOPEN, + UI_CURSOR_TOOLPATHFINDING, + UI_CURSOR_TOOLPATHFINDING_PATH_START, + UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD, + UI_CURSOR_TOOLPATHFINDING_PATH_END, + UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD, + UI_CURSOR_TOOLNO, + UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) +}; + +LL_COMMON_API ECursorType getCursorFromString(const std::string& cursor_string); + +#endif // LL_LLCURSORTYPES_H diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index 8b356ba138..41d4d41e83 100755 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -258,7 +258,7 @@ BOOL LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask) handled = mCallbacks->handleTranslatedKeyUp(translated_key, translated_mask); } - lldebugst(LLERR_USER_INPUT) << "keyup -" << translated_key << "-" << llendl; + LL_DEBUGS("UserInput") << "keyup -" << translated_key << "-" << llendl; return handled; } diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 276074d4ca..c066b89c90 100755 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -30,7 +30,7 @@ #include #include -#include "string_table.h" +#include "llstringtable.h" #include "lltimer.h" #include "indra_constants.h" diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 93b9d36939..6a8f0b59d1 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -39,7 +39,6 @@ #include "llerror.h" #include "llkeyboard.h" -#include "linked_lists.h" #include "llwindowcallbacks.h" diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index ee7d1d50b7..2b8e449193 100755 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -29,8 +29,6 @@ #include "llboost.h" #include "llevent.h" -#include "llnametable.h" -#include "llmap.h" #include "llstring.h" #include "llrect.h" #include "llrefcount.h" diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h index bdcb56f1f3..69fbc95bb0 100755 --- a/indra/llxml/llxmltree.h +++ b/indra/llxml/llxmltree.h @@ -32,7 +32,7 @@ #include #include "llstring.h" #include "llxmlparser.h" -#include "string_table.h" +#include "llstringtable.h" class LLColor4; class LLColor4U; diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 1bb38bbf65..019d227842 100755 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -25,7 +25,6 @@ FS (f|F) #include "indra.y.hpp" #include "lltimer.h" #include "indra_constants.h" -#include "llagentconstants.h" #include "lllslconstants.h" #include "lluuid.h" #include "llassetstorage.h" diff --git a/indra/lscript/lscript_compile/lscript_bytecode.cpp b/indra/lscript/lscript_compile/lscript_bytecode.cpp index 95b2f35a94..b6c3dd3a86 100755 --- a/indra/lscript/lscript_compile/lscript_bytecode.cpp +++ b/indra/lscript/lscript_compile/lscript_bytecode.cpp @@ -40,8 +40,8 @@ LLScriptJumpTable::LLScriptJumpTable() LLScriptJumpTable::~LLScriptJumpTable() { - mLabelMap.deleteAllData(); - mJumpMap.deleteAllData(); + delete_and_clear(mLabelMap); + delete_and_clear(mJumpMap); } void LLScriptJumpTable::addLabel(char *name, S32 offset) @@ -203,17 +203,14 @@ void LLScriptByteCodeChunk::addJump(char *name) void LLScriptByteCodeChunk::connectJumps() { - char *jump; - S32 offset, jumppos; - if (mJumpTable) { - for (jump = mJumpTable->mJumpMap.getFirstKey(); - jump; - jump = mJumpTable->mJumpMap.getNextKey()) + for(std::map::iterator it = mJumpTable->mJumpMap.begin(), end_it = mJumpTable->mJumpMap.end(); + it != end_it; + ++it) { - jumppos = *mJumpTable->mJumpMap[jump]; - offset = *mJumpTable->mLabelMap[jump] - jumppos; + S32 jumppos = *it->second; + S32 offset = *mJumpTable->mLabelMap[it->first] - jumppos; jumppos = jumppos - 4; integer2bytestream(mCodeChunk, jumppos, offset); } diff --git a/indra/lscript/lscript_compile/lscript_bytecode.h b/indra/lscript/lscript_compile/lscript_bytecode.h index 0933c78b6f..1908bebcb9 100755 --- a/indra/lscript/lscript_compile/lscript_bytecode.h +++ b/indra/lscript/lscript_compile/lscript_bytecode.h @@ -29,6 +29,7 @@ #include "lscript_byteconvert.h" #include "lscript_scope.h" +#include class LLScriptJumpTable { @@ -39,8 +40,8 @@ public: void addLabel(char *name, S32 offset); void addJump(char *name, S32 offset); - LLMap mLabelMap; - LLMap mJumpMap; + std::map mLabelMap; + std::map mJumpMap; }; class LLScriptByteCodeChunk diff --git a/indra/lscript/lscript_compile/lscript_scope.h b/indra/lscript/lscript_compile/lscript_scope.h index 5b2a73ad92..ffff91c81b 100755 --- a/indra/lscript/lscript_compile/lscript_scope.h +++ b/indra/lscript/lscript_compile/lscript_scope.h @@ -27,8 +27,8 @@ #ifndef LL_LSCRIPT_SCOPE_H #define LL_LSCRIPT_SCOPE_H -#include "string_table.h" -#include "llmap.h" +#include +#include "llstringtable.h" #include "lscript_byteformat.h" typedef enum e_lscript_identifier_type @@ -301,13 +301,13 @@ public: ~LLScriptScope() { - mEntryMap.deleteAllData(); + delete_and_clear(mEntryMap); } LLScriptScopeEntry *addEntry(const char *identifier, LSCRIPTIdentifierType idtype, LSCRIPTType type) { const char *name = mSTable->addString(identifier); - if (!mEntryMap.checkData(name)) + if (mEntryMap.find(name) == mEntryMap.end()) { if (idtype == LIT_FUNCTION) mEntryMap[name] = new LLScriptScopeEntry(name, idtype, type, mFunctionCount++); @@ -324,18 +324,10 @@ public: } } - BOOL checkEntry(const char *identifier) + bool checkEntry(const char *identifier) { const char *name = mSTable->addString(identifier); - if (mEntryMap.checkData(name)) - { - return TRUE; - } - else - { - // identifier already exists at this scope - return FALSE; - } + return mEntryMap.find(name) != mEntryMap.end(); } LLScriptScopeEntry *findEntry(const char *identifier) @@ -345,10 +337,11 @@ public: while (scope) { - if (scope->mEntryMap.checkData(name)) + entry_map_t::iterator found_it = mEntryMap.find(name); + if (found_it != mEntryMap.end()) { // cool, we found it at this scope - return scope->mEntryMap[name]; + return found_it->second; } scope = scope->mParentScope; } @@ -362,24 +355,25 @@ public: while (scope) { - if (scope->mEntryMap.checkData(name)) + entry_map_t::iterator found_it = scope->mEntryMap.find(name); + if (found_it != scope->mEntryMap.end()) { // need to check type, and if type is function we need to check both types if (idtype == LIT_FUNCTION) { - if (scope->mEntryMap[name]->mIDType == LIT_FUNCTION) + if (found_it->second->mIDType == LIT_FUNCTION) { - return scope->mEntryMap[name]; + return (found_it->second); } - else if (scope->mEntryMap[name]->mIDType == LIT_LIBRARY_FUNCTION) + else if (found_it->second->mIDType == LIT_LIBRARY_FUNCTION) { - return scope->mEntryMap[name]; + return (found_it->second); } } - else if (scope->mEntryMap[name]->mIDType == idtype) + else if (found_it->second->mIDType == idtype) { // cool, we found it at this scope - return scope->mEntryMap[name]; + return (found_it->second); } } scope = scope->mParentScope; @@ -392,11 +386,12 @@ public: mParentScope = scope; } - LLMap mEntryMap; - LLScriptScope *mParentScope; - LLStringTable *mSTable; - S32 mFunctionCount; - S32 mStateCount; + typedef std::map entry_map_t; + entry_map_t mEntryMap; + LLScriptScope* mParentScope; + LLStringTable* mSTable; + S32 mFunctionCount; + S32 mStateCount; }; extern LLStringTable *gScopeStringTable; diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h index bf29f44518..047c220b17 100755 --- a/indra/lscript/lscript_compile/lscript_tree.h +++ b/indra/lscript/lscript_compile/lscript_tree.h @@ -29,7 +29,6 @@ #include "v3math.h" #include "llquaternion.h" -#include "linked_lists.h" #include "lscript_error.h" #include "lscript_typecheck.h" #include "lscript_byteformat.h" @@ -2304,20 +2303,20 @@ public: LLScriptAllocationManager() {} ~LLScriptAllocationManager() { - mAllocationList.deleteAllData(); + deleteAllocations(); } void addAllocation(LLScriptFilePosition *ptr) { - mAllocationList.addData(ptr); + mAllocationList.push_front(ptr); } void deleteAllocations() { - mAllocationList.deleteAllData(); + delete_and_clear(mAllocationList); } - LLLinkedList mAllocationList; + std::list mAllocationList; }; extern LLScriptAllocationManager *gAllocationManager; diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h index fc491ead0f..576c2ca2b7 100755 --- a/indra/lscript/lscript_execute.h +++ b/indra/lscript/lscript_execute.h @@ -27,9 +27,10 @@ #ifndef LL_LSCRIPT_EXECUTE_H #define LL_LSCRIPT_EXECUTE_H +#include "stdtypes.h" #include "lscript_byteconvert.h" -#include "linked_lists.h" #include "lscript_library.h" +#include "llstl.h" class LLTimer; @@ -262,7 +263,7 @@ public: S32 i, number = bytestream2integer(src, offset); for (i = 0; i < number; i++) { - mEventDataList.addData(new LLScriptDataCollection(src, offset)); + mEventDataList.push_front(new LLScriptDataCollection(src, offset)); } } @@ -271,32 +272,32 @@ public: S32 i, number = bytestream2integer(src, offset); for (i = 0; i < number; i++) { - mEventDataList.addData(new LLScriptDataCollection(src, offset)); + mEventDataList.push_front(new LLScriptDataCollection(src, offset)); } } ~LLScriptEventData() { - mEventDataList.deleteAllData(); + delete_and_clear(mEventDataList); } void addEventData(LLScriptDataCollection *data) { - if (mEventDataList.getLength() < MAX_EVENTS_IN_QUEUE) - mEventDataList.addDataAtEnd(data); + if (mEventDataList.size() < MAX_EVENTS_IN_QUEUE) + mEventDataList.push_back(data); else delete data; } LLScriptDataCollection *getNextEvent(LSCRIPTStateEventType type) { - LLScriptDataCollection *temp; - for (temp = mEventDataList.getFirstData(); - temp; - temp = mEventDataList.getNextData()) + for (std::list::iterator it = mEventDataList.begin(), end_it = mEventDataList.end(); + it != end_it; + ++it) { + LLScriptDataCollection* temp = *it; if (temp->mType == type) { - mEventDataList.removeCurrentData(); + mEventDataList.erase(it); return temp; } } @@ -305,24 +306,24 @@ public: LLScriptDataCollection *getNextEvent() { LLScriptDataCollection *temp; - temp = mEventDataList.getFirstData(); + temp = mEventDataList.front(); if (temp) { - mEventDataList.removeCurrentData(); + mEventDataList.pop_front(); return temp; } return NULL; } void removeEventType(LSCRIPTStateEventType type) { - LLScriptDataCollection *temp; - for (temp = mEventDataList.getFirstData(); - temp; - temp = mEventDataList.getNextData()) + for (std::list::iterator it = mEventDataList.begin(), end_it = mEventDataList.end(); + it != end_it; + ++it) { - if (temp->mType == type) + if ((*it)->mType == type) { - mEventDataList.deleteCurrentData(); + delete *it; + mEventDataList.erase(it); } } } @@ -332,12 +333,11 @@ public: S32 size = 0; // number in linked list size += 4; - LLScriptDataCollection *temp; - for (temp = mEventDataList.getFirstData(); - temp; - temp = mEventDataList.getNextData()) + for (std::list::iterator it = mEventDataList.begin(), end_it = mEventDataList.end(); + it != end_it; + ++it) { - size += temp->getSavedSize(); + size += (*it)->getSavedSize(); } return size; } @@ -346,19 +346,18 @@ public: { S32 offset = 0; // number in linked list - S32 number = mEventDataList.getLength(); + S32 number = mEventDataList.size(); integer2bytestream(dest, offset, number); - LLScriptDataCollection *temp; - for (temp = mEventDataList.getFirstData(); - temp; - temp = mEventDataList.getNextData()) + for (std::list::iterator it = mEventDataList.begin(), end_it = mEventDataList.end(); + it != end_it; + ++it) { - offset += temp->write2bytestream(dest + offset); + offset += (*it)->write2bytestream(dest + offset); } return offset; } - LLLinkedList mEventDataList; + std::list mEventDataList; }; class LLScriptExecute @@ -474,9 +473,9 @@ public: virtual ~LLScriptExecuteLSL2(); virtual S32 getVersion() const {return get_register(mBuffer, LREG_VN);} - virtual void deleteAllEvents() {mEventData.mEventDataList.deleteAllData();} + virtual void deleteAllEvents() {delete_and_clear(mEventData.mEventDataList);} virtual void addEvent(LLScriptDataCollection* event); - virtual U32 getEventCount() {return mEventData.mEventDataList.getLength();} + virtual U32 getEventCount() {return mEventData.mEventDataList.size();} virtual void removeEventType(LSCRIPTStateEventType event_type); virtual S32 getFaults() {return get_register(mBuffer, LREG_FR);} virtual void setFault(LSCRIPTRunTimeFaults fault) {set_fault(mBuffer, fault);} diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp index e9b4d1fcbb..70cdecbb18 100755 --- a/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/indra/lscript/lscript_execute/lscript_execute.cpp @@ -417,10 +417,13 @@ void LLScriptExecuteLSL2::callEventHandler(LSCRIPTStateEventType event, const LL void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice) { S32 major_version = getMajorVersion(); - LLScriptDataCollection* eventdata; - for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData()) + for (std::list::iterator it = mEventData.mEventDataList.begin(), end_it = mEventData.mEventDataList.end(); + it != end_it; + ++it) { + LLScriptDataCollection* eventdata = *it; + if (eventdata->mType == event) { // push a zero to be popped @@ -458,7 +461,8 @@ void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, co S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event); set_ip(mBuffer, opcode_start); - mEventData.mEventDataList.deleteCurrentData(); + delete *it; + mEventData.mEventDataList.erase(it); break; } } diff --git a/indra/lscript/lscript_execute/lscript_readlso.h b/indra/lscript/lscript_execute/lscript_readlso.h index a545a9daf8..f3b2b66746 100755 --- a/indra/lscript/lscript_execute/lscript_readlso.h +++ b/indra/lscript/lscript_execute/lscript_readlso.h @@ -28,7 +28,6 @@ #define LL_LSCRIPT_READLSO_H #include "lscript_byteconvert.h" -#include "linked_lists.h" // list of op code print functions void print_noop(LLFILE *fp, U8 *buffer, S32 &offset, S32 tabs); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3689c2856d..1b779e5c99 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -682,6 +682,7 @@ set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake groupchatlistener.h + llaccountingcost.h llaccountingcostmanager.h llagent.h llagentaccess.h @@ -1221,7 +1222,6 @@ set(viewer_HEADER_FILES llvosky.h llvosurfacepatch.h llvotree.h - llvotreenew.h llvovolume.h llvowater.h llvowlsky.h @@ -1250,6 +1250,7 @@ set(viewer_HEADER_FILES macmain.h noise.h pipeline.h + roles_constants.h VertexCache.h VorbisFramework.h ) diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 92a241857e..b500c37098 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,6 +42,7 @@ tags + SceneLoadTiming Downloaded, now compiling + Script compilation service not available Script not found on server. Problem downloading Insufficient permissions to download a script. -- cgit v1.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/llappearance/llavatarappearance.cpp | 156 ++++++------ indra/llappearance/llavatarjoint.cpp | 2 +- indra/llappearance/llavatarjointmesh.cpp | 4 +- indra/llappearance/lldriverparam.cpp | 6 +- indra/llappearance/lllocaltextureobject.cpp | 2 +- indra/llappearance/llpolymesh.cpp | 72 +++--- indra/llappearance/llpolymorph.cpp | 22 +- indra/llappearance/llpolyskeletaldistortion.cpp | 16 +- indra/llappearance/lltexglobalcolor.cpp | 2 +- indra/llappearance/lltexlayer.cpp | 32 +-- indra/llappearance/lltexlayerparams.cpp | 16 +- indra/llappearance/llwearable.cpp | 80 +++--- indra/llappearance/llwearabledata.cpp | 8 +- indra/llaudio/llaudiodecodemgr.cpp | 56 ++--- indra/llaudio/llaudioengine.cpp | 50 ++-- indra/llaudio/llaudioengine_fmodex.cpp | 30 +-- indra/llaudio/llstreamingaudio_fmodex.cpp | 26 +- indra/llaudio/llvorbisencode.cpp | 20 +- indra/llcharacter/llbvhloader.cpp | 44 ++-- indra/llcharacter/llcharacter.cpp | 32 +-- indra/llcharacter/lleditingmotion.cpp | 10 +- indra/llcharacter/llgesture.cpp | 16 +- indra/llcharacter/llhandmotion.cpp | 4 +- indra/llcharacter/llheadrotmotion.cpp | 22 +- indra/llcharacter/lljoint.cpp | 2 +- indra/llcharacter/llkeyframemotion.cpp | 174 ++++++------- indra/llcharacter/llkeyframemotionparam.cpp | 18 +- indra/llcharacter/llkeyframestandmotion.cpp | 6 +- indra/llcharacter/llkeyframewalkmotion.cpp | 4 +- indra/llcharacter/llmotion.h | 8 +- indra/llcharacter/llmotioncontroller.cpp | 22 +- indra/llcharacter/llmultigesture.cpp | 28 +-- indra/llcharacter/llstatemachine.cpp | 12 +- indra/llcharacter/lltargetingmotion.cpp | 2 +- indra/llcharacter/llvisualparam.cpp | 8 +- indra/llcommon/llallocator_heap_profile.cpp | 2 +- indra/llcommon/llapp.cpp | 56 ++--- indra/llcommon/llapr.cpp | 4 +- indra/llcommon/llbase32.cpp | 4 +- indra/llcommon/llbitpack.h | 4 +- indra/llcommon/llcrc.cpp | 4 +- indra/llcommon/llcrc.h | 2 +- indra/llcommon/lldate.cpp | 4 +- indra/llcommon/lldictionary.h | 2 +- indra/llcommon/llerror.cpp | 4 +- indra/llcommon/llerror.h | 8 +- indra/llcommon/llerrorthread.cpp | 24 +- indra/llcommon/llfasttimer.cpp | 2 +- indra/llcommon/llformat.h | 2 +- indra/llcommon/llframetimer.cpp | 8 +- indra/llcommon/llheartbeat.cpp | 8 +- indra/llcommon/llliveappconfig.cpp | 10 +- indra/llcommon/llmemory.cpp | 88 +++---- indra/llcommon/llmemorystream.cpp | 2 +- indra/llcommon/llmetricperformancetester.cpp | 10 +- indra/llcommon/llmetrics.cpp | 4 +- indra/llcommon/llmetrics.h | 2 +- indra/llcommon/llmutex.cpp | 4 +- indra/llcommon/llpointer.h | 2 +- indra/llcommon/llpriqueuemap.h | 6 +- indra/llcommon/llprocessor.cpp | 2 +- indra/llcommon/llqueuedthread.cpp | 16 +- indra/llcommon/llrefcount.cpp | 10 +- indra/llcommon/llregistry.h | 4 +- indra/llcommon/llsafehandle.h | 2 +- indra/llcommon/llsdserialize.cpp | 68 +++--- indra/llcommon/llsdserialize_xml.cpp | 6 +- indra/llcommon/llsingleton.h | 4 +- indra/llcommon/llstring.cpp | 4 +- indra/llcommon/llsys.cpp | 16 +- indra/llcommon/llsys.h | 4 +- indra/llcommon/llthread.cpp | 12 +- indra/llcommon/llthreadlocalstorage.cpp | 8 +- indra/llcommon/llthreadlocalstorage.h | 4 +- indra/llcommon/llthreadsafequeue.cpp | 2 +- indra/llcommon/lltimer.cpp | 2 +- indra/llcommon/lltrace.cpp | 2 +- indra/llcommon/lltracethreadrecorder.cpp | 2 +- indra/llcommon/lluri.cpp | 12 +- indra/llcommon/lluuid.cpp | 8 +- indra/llcommon/llworkerthread.cpp | 24 +- indra/llcommon/u64.cpp | 2 +- indra/llcrashlogger/llcrashlogger.cpp | 10 +- indra/llimage/llimage.cpp | 56 ++--- indra/llimage/llimagebmp.cpp | 4 +- indra/llimage/llimagedimensionsinfo.cpp | 16 +- indra/llimage/llimagedxt.cpp | 22 +- indra/llimage/llimagejpeg.cpp | 4 +- indra/llimage/llimagetga.cpp | 10 +- indra/llimage/llimageworker.cpp | 2 +- indra/llimagej2coj/llimagej2coj.cpp | 10 +- indra/llinventory/llcategory.h | 2 +- indra/llinventory/lleconomy.cpp | 44 ++-- indra/llinventory/llfoldertype.cpp | 4 +- indra/llinventory/llinventory.cpp | 74 +++--- indra/llinventory/lllandmark.cpp | 20 +- indra/llinventory/llnotecard.cpp | 36 +-- indra/llinventory/llparcel.cpp | 12 +- indra/llinventory/llpermissions.cpp | 14 +- indra/llinventory/llsaleinfo.cpp | 12 +- indra/llinventory/lltransactionflags.cpp | 8 +- indra/llkdu/llimagej2ckdu.cpp | 12 +- indra/llmath/llcalc.cpp | 6 +- indra/llmath/llcoordframe.cpp | 54 ++--- indra/llmath/llline.cpp | 4 +- indra/llmath/lloctree.h | 34 +-- indra/llmath/llvolume.cpp | 98 ++++---- indra/llmath/llvolumemgr.cpp | 14 +- indra/llmath/llvolumeoctree.cpp | 6 +- indra/llmath/llvolumeoctree.h | 4 +- indra/llmath/v4color.cpp | 6 +- indra/llmath/xform.cpp | 4 +- indra/llmath/xform.h | 4 +- indra/llmessage/llares.cpp | 50 ++-- indra/llmessage/llareslistener.cpp | 2 +- indra/llmessage/llassetstorage.cpp | 104 ++++---- indra/llmessage/llblowfishcipher.cpp | 10 +- indra/llmessage/llbuffer.cpp | 4 +- indra/llmessage/llbufferstream.cpp | 2 +- indra/llmessage/llcachename.cpp | 30 +-- indra/llmessage/llcircuit.cpp | 80 +++--- indra/llmessage/llcurl.cpp | 40 +-- indra/llmessage/lldatapacker.cpp | 74 +++--- indra/llmessage/lldatapacker.h | 8 +- indra/llmessage/lldispatcher.cpp | 2 +- indra/llmessage/llfiltersd2xmlrpc.cpp | 76 +++--- indra/llmessage/llhost.cpp | 18 +- indra/llmessage/llhttpassetstorage.cpp | 98 ++++---- indra/llmessage/llhttpclient.cpp | 30 +-- indra/llmessage/llhttpnode.cpp | 10 +- indra/llmessage/llhttpsender.cpp | 4 +- indra/llmessage/llinstantmessage.cpp | 6 +- indra/llmessage/lliobuffer.cpp | 2 +- indra/llmessage/lliohttpserver.cpp | 54 ++--- indra/llmessage/lliopipe.cpp | 2 +- indra/llmessage/lliosocket.cpp | 46 ++-- indra/llmessage/llmail.cpp | 38 +-- indra/llmessage/llmessageconfig.cpp | 12 +- indra/llmessage/llmessagetemplate.cpp | 8 +- indra/llmessage/llmessagetemplate.h | 6 +- indra/llmessage/llmessagetemplateparser.cpp | 78 +++--- indra/llmessage/llnamevalue.cpp | 36 +-- indra/llmessage/llpacketbuffer.cpp | 2 +- indra/llmessage/llpacketring.cpp | 6 +- indra/llmessage/llpartdata.cpp | 4 +- indra/llmessage/llpumpio.cpp | 134 +++++----- indra/llmessage/llregionhandle.h | 4 +- indra/llmessage/llregionpresenceverifier.cpp | 14 +- indra/llmessage/llsdappservices.cpp | 8 +- indra/llmessage/llsdmessage.cpp | 2 +- indra/llmessage/llsdmessagebuilder.cpp | 6 +- indra/llmessage/llsdmessagereader.cpp | 12 +- indra/llmessage/llsdrpcclient.cpp | 16 +- indra/llmessage/llsdrpcclient.h | 8 +- indra/llmessage/llsdrpcserver.cpp | 12 +- indra/llmessage/llsdrpcserver.h | 4 +- indra/llmessage/llservice.cpp | 12 +- indra/llmessage/llservicebuilder.cpp | 18 +- indra/llmessage/lltemplatemessagebuilder.cpp | 70 +++--- indra/llmessage/lltemplatemessagereader.cpp | 116 ++++----- indra/llmessage/llthrottle.cpp | 10 +- indra/llmessage/lltransfermanager.cpp | 118 ++++----- indra/llmessage/lltransfersourceasset.cpp | 24 +- indra/llmessage/lltransfersourcefile.cpp | 16 +- indra/llmessage/lltransfertargetfile.cpp | 16 +- indra/llmessage/lltransfertargetvfile.cpp | 20 +- indra/llmessage/lltrustedmessageservice.cpp | 6 +- indra/llmessage/llurlrequest.cpp | 32 +-- indra/llmessage/lluseroperation.cpp | 6 +- indra/llmessage/llxfer.cpp | 24 +- indra/llmessage/llxfer_file.cpp | 44 ++-- indra/llmessage/llxfer_mem.cpp | 4 +- indra/llmessage/llxfer_vfile.cpp | 8 +- indra/llmessage/llxfermanager.cpp | 86 +++---- indra/llmessage/machine.cpp | 4 +- indra/llmessage/message.cpp | 6 +- indra/llmessage/message.h | 22 +- indra/llmessage/message_string_table.cpp | 4 +- indra/llmessage/net.cpp | 58 ++--- indra/llmessage/partsyspacket.cpp | 2 +- indra/llmessage/patch_code.cpp | 4 +- indra/llplugin/llplugincookiestore.cpp | 4 +- indra/llplugin/llpluginmessagepipe.cpp | 2 +- indra/llplugin/llpluginprocessparent.cpp | 6 +- indra/llprimitive/llmaterial.cpp | 4 +- indra/llprimitive/llmaterialtable.cpp | 4 +- indra/llprimitive/llmodel.cpp | 32 +-- indra/llprimitive/llprimitive.cpp | 30 +-- indra/llprimitive/llprimtexturelist.cpp | 2 +- indra/llprimitive/lltextureanim.cpp | 4 +- indra/llprimitive/lltextureentry.cpp | 4 +- indra/llprimitive/lltreeparams.cpp | 2 +- indra/llprimitive/llvolumemessage.cpp | 54 ++--- indra/llrender/llcubemap.cpp | 2 +- indra/llrender/llfontfreetype.cpp | 10 +- indra/llrender/llfontgl.cpp | 8 +- indra/llrender/llfontregistry.cpp | 30 +-- indra/llrender/llgl.cpp | 48 ++-- indra/llrender/llgldbg.cpp | 82 +++---- indra/llrender/llglslshader.cpp | 32 +-- indra/llrender/llgltexture.h | 2 +- indra/llrender/llimagegl.cpp | 86 +++---- indra/llrender/llimagegl.h | 2 +- indra/llrender/llpostprocess.cpp | 2 +- indra/llrender/llrender.cpp | 78 +++--- indra/llrender/llrender2dutils.cpp | 10 +- indra/llrender/llrendertarget.cpp | 24 +- indra/llrender/llshadermgr.cpp | 12 +- indra/llrender/llvertexbuffer.cpp | 102 ++++---- indra/llrender/llvertexbuffer.h | 2 +- indra/llui/llaccordionctrl.cpp | 4 +- indra/llui/llbadge.cpp | 4 +- indra/llui/llbutton.cpp | 8 +- indra/llui/llcommandmanager.cpp | 6 +- indra/llui/llcontainerview.cpp | 2 +- indra/llui/lldraghandle.cpp | 4 +- indra/llui/llflatlistview.cpp | 2 +- indra/llui/llfloater.cpp | 14 +- indra/llui/llfloaterreg.cpp | 8 +- indra/llui/llfocusmgr.cpp | 4 +- indra/llui/llfolderviewitem.cpp | 4 +- indra/llui/llfunctorregistry.h | 8 +- indra/llui/lllineeditor.cpp | 12 +- indra/llui/llmenubutton.cpp | 2 +- indra/llui/llmenugl.cpp | 16 +- indra/llui/llmodaldialog.cpp | 8 +- indra/llui/llmultifloater.cpp | 2 +- indra/llui/llmultislider.cpp | 6 +- indra/llui/llmultisliderctrl.cpp | 2 +- indra/llui/llnotifications.cpp | 38 +-- indra/llui/llpanel.cpp | 18 +- indra/llui/llradiogroup.cpp | 4 +- indra/llui/llresmgr.cpp | 2 +- indra/llui/llscrollbar.cpp | 4 +- indra/llui/llscrollcontainer.cpp | 2 +- indra/llui/llscrollingpanellist.cpp | 2 +- indra/llui/llscrolllistitem.cpp | 2 +- indra/llui/llslider.cpp | 4 +- indra/llui/llsliderctrl.cpp | 2 +- indra/llui/llspinctrl.cpp | 4 +- indra/llui/lltabcontainer.cpp | 2 +- indra/llui/lltextbase.cpp | 20 +- indra/llui/lltexteditor.cpp | 22 +- indra/llui/lltextparser.cpp | 2 +- indra/llui/lltoolbar.cpp | 4 +- indra/llui/lltooltip.cpp | 2 +- indra/llui/lltrans.cpp | 12 +- indra/llui/lltransutil.cpp | 4 +- indra/llui/llui.cpp | 10 +- indra/llui/llui.h | 6 +- indra/llui/lluicolortable.cpp | 10 +- indra/llui/lluictrl.cpp | 6 +- indra/llui/lluictrlfactory.cpp | 4 +- indra/llui/lluictrlfactory.h | 6 +- indra/llui/llundo.cpp | 2 +- indra/llui/llurlentry.cpp | 4 +- indra/llui/llview.cpp | 28 +-- indra/llui/llview.h | 6 +- indra/llvfs/lldir.cpp | 30 +-- indra/llvfs/lldir_win32.cpp | 14 +- indra/llvfs/lldirguard.h | 2 +- indra/llvfs/lldiriterator.cpp | 16 +- indra/llvfs/lllfsthread.cpp | 20 +- indra/llvfs/llvfile.cpp | 32 +-- indra/llvfs/llvfs.cpp | 200 +++++++-------- indra/llvfs/llvfsthread.cpp | 26 +- indra/llwindow/lldragdropwin32.cpp | 10 +- indra/llwindow/lldxhardware.cpp | 32 +-- indra/llwindow/llkeyboard.cpp | 8 +- indra/llwindow/llkeyboardwin32.cpp | 2 +- indra/llwindow/llmousehandler.cpp | 4 +- indra/llwindow/llwindow.cpp | 8 +- indra/llwindow/llwindowwin32.cpp | 96 ++++---- indra/llxml/llcontrol.cpp | 66 ++--- indra/llxml/llcontrol.h | 10 +- indra/llxml/llxmlnode.cpp | 94 +++---- indra/llxml/llxmlparser.cpp | 2 +- indra/llxml/llxmltree.cpp | 40 +-- indra/llxml/llxmltree.h | 2 +- indra/lscript/lscript_compile/lscript_bytecode.cpp | 2 +- .../lscript_execute/llscriptresourceconsumer.cpp | 2 +- indra/lscript/lscript_execute/lscript_execute.cpp | 22 +- indra/lscript/lscript_execute/lscript_readlso.cpp | 4 +- indra/lscript/lscript_library.h | 16 +- indra/lscript/lscript_library/lscript_alloc.cpp | 2 +- indra/lscript/lscript_library/lscript_library.cpp | 2 +- indra/media_plugins/webkit/media_plugin_webkit.cpp | 16 +- indra/newview/llaccountingcostmanager.cpp | 8 +- indra/newview/llagent.cpp | 100 ++++---- indra/newview/llagentcamera.cpp | 8 +- indra/newview/llagentlistener.cpp | 8 +- indra/newview/llagentpicksinfo.cpp | 2 +- indra/newview/llagentpilot.cpp | 34 +-- indra/newview/llagentwearables.cpp | 118 ++++----- indra/newview/llagentwearablesfetch.cpp | 40 +-- indra/newview/llappearancemgr.cpp | 236 +++++++++--------- indra/newview/llappviewer.cpp | 230 +++++++++--------- indra/newview/llappviewerwin32.cpp | 42 ++-- indra/newview/llassetuploadqueue.cpp | 10 +- indra/newview/llassetuploadresponders.cpp | 46 ++-- indra/newview/llattachmentsmgr.cpp | 2 +- indra/newview/llavataractions.cpp | 2 +- indra/newview/llavatariconctrl.cpp | 4 +- indra/newview/llavatarpropertiesprocessor.cpp | 4 +- indra/newview/llbuycurrencyhtml.cpp | 2 +- indra/newview/llcallbacklist.cpp | 30 +-- indra/newview/llcallingcard.cpp | 34 +-- indra/newview/llcaphttpsender.cpp | 4 +- indra/newview/llchannelmanager.cpp | 4 +- indra/newview/llchatbar.cpp | 14 +- indra/newview/llchiclet.cpp | 6 +- indra/newview/llchiclet.h | 8 +- indra/newview/llchicletbar.cpp | 22 +- indra/newview/llclassifiedstatsresponder.cpp | 2 +- indra/newview/llcofwearables.cpp | 4 +- indra/newview/llcommandlineparser.cpp | 16 +- indra/newview/llcompilequeue.cpp | 34 +-- indra/newview/llconversationlog.cpp | 8 +- indra/newview/llconversationmodel.cpp | 6 +- indra/newview/lldaycyclemanager.cpp | 2 +- indra/newview/lldebugmessagebox.cpp | 6 +- indra/newview/lldrawable.cpp | 40 +-- indra/newview/lldrawable.h | 8 +- indra/newview/lldrawpool.cpp | 12 +- indra/newview/lldrawpoolalpha.cpp | 2 +- indra/newview/lldrawpoolavatar.cpp | 6 +- indra/newview/lldrawpoolbump.cpp | 20 +- indra/newview/lldrawpoolwater.cpp | 2 +- indra/newview/lldrawpoolwlsky.cpp | 14 +- indra/newview/lldynamictexture.cpp | 2 +- indra/newview/llenvmanager.cpp | 18 +- indra/newview/llestateinfomodel.cpp | 10 +- indra/newview/lleventnotifier.cpp | 2 +- indra/newview/lleventpoll.cpp | 42 ++-- indra/newview/llexternaleditor.cpp | 18 +- indra/newview/llface.cpp | 82 +++---- indra/newview/llface.h | 2 +- indra/newview/llfasttimerview.cpp | 6 +- indra/newview/llfavoritesbar.cpp | 22 +- indra/newview/llfeaturemanager.cpp | 18 +- indra/newview/llfilepicker.cpp | 16 +- indra/newview/llfloaterabout.cpp | 6 +- indra/newview/llfloaterauction.cpp | 22 +- indra/newview/llfloateravatarpicker.cpp | 8 +- indra/newview/llfloateravatartextures.cpp | 6 +- indra/newview/llfloaterbulkpermission.cpp | 16 +- indra/newview/llfloaterbump.cpp | 4 +- indra/newview/llfloaterbuy.cpp | 6 +- indra/newview/llfloaterbuycontents.cpp | 6 +- indra/newview/llfloaterbuycurrencyhtml.cpp | 2 +- indra/newview/llfloaterbuyland.cpp | 2 +- indra/newview/llfloaterbvhpreview.cpp | 10 +- indra/newview/llfloaterdeleteenvpreset.cpp | 4 +- indra/newview/llfloaterdisplayname.cpp | 2 +- indra/newview/llfloatereditdaycycle.cpp | 22 +- indra/newview/llfloatereditsky.cpp | 6 +- indra/newview/llfloatereditwater.cpp | 6 +- indra/newview/llfloatergodtools.cpp | 8 +- indra/newview/llfloatergroupinvite.cpp | 2 +- indra/newview/llfloaterimcontainer.cpp | 14 +- indra/newview/llfloaterimnearbychat.cpp | 14 +- indra/newview/llfloaterimnearbychathandler.cpp | 18 +- indra/newview/llfloaterimsession.cpp | 14 +- indra/newview/llfloaterland.cpp | 12 +- indra/newview/llfloaterlandholdings.cpp | 2 +- indra/newview/llfloatermodelpreview.cpp | 130 +++++----- indra/newview/llfloatermodeluploadbase.cpp | 2 +- indra/newview/llfloaternotificationsconsole.cpp | 2 +- indra/newview/llfloaterobjectweights.cpp | 2 +- indra/newview/llfloaterpathfindingconsole.cpp | 2 +- indra/newview/llfloaterpreference.cpp | 2 +- indra/newview/llfloaterproperties.cpp | 10 +- indra/newview/llfloaterregiondebugconsole.cpp | 4 +- indra/newview/llfloaterregioninfo.cpp | 80 +++--- indra/newview/llfloaterreporter.cpp | 22 +- indra/newview/llfloaterscriptlimits.cpp | 60 ++--- indra/newview/llfloatersettingsdebug.cpp | 4 +- indra/newview/llfloatersidepanelcontainer.h | 2 +- indra/newview/llfloatersnapshot.cpp | 76 +++--- indra/newview/llfloatertools.cpp | 6 +- indra/newview/llfloatertranslationsettings.cpp | 2 +- indra/newview/llfloateruipreview.cpp | 8 +- indra/newview/llfloaterwebcontent.cpp | 8 +- indra/newview/llfloaterwebprofile.cpp | 6 +- indra/newview/llfollowcam.cpp | 6 +- indra/newview/llfriendcard.cpp | 24 +- indra/newview/llgesturelistener.cpp | 8 +- indra/newview/llgesturemgr.cpp | 28 +-- indra/newview/llgiveinventory.cpp | 10 +- indra/newview/llgroupactions.cpp | 8 +- indra/newview/llgroupmgr.cpp | 112 ++++----- indra/newview/llhomelocationresponder.cpp | 4 +- indra/newview/llhudeffect.cpp | 2 +- indra/newview/llhudeffectbeam.cpp | 10 +- indra/newview/llhudeffectlookat.cpp | 12 +- indra/newview/llhudeffectpointat.cpp | 8 +- indra/newview/llhudeffecttrail.cpp | 4 +- indra/newview/llhudmanager.cpp | 14 +- indra/newview/llhudnametag.cpp | 2 +- indra/newview/llhudobject.cpp | 6 +- indra/newview/llhudtext.cpp | 2 +- indra/newview/llimview.cpp | 50 ++-- indra/newview/llinspectavatar.cpp | 2 +- indra/newview/llinspecttoast.cpp | 4 +- indra/newview/llinventorybridge.cpp | 94 +++---- indra/newview/llinventoryfilter.cpp | 6 +- indra/newview/llinventoryfunctions.cpp | 4 +- indra/newview/llinventoryitemslist.cpp | 4 +- indra/newview/llinventorymodel.cpp | 270 ++++++++++----------- indra/newview/llinventorymodelbackgroundfetch.cpp | 20 +- indra/newview/llinventoryobserver.cpp | 26 +- indra/newview/llinventorypanel.cpp | 8 +- indra/newview/lljoystickbutton.cpp | 14 +- indra/newview/lllandmarkactions.cpp | 6 +- indra/newview/lllandmarklist.cpp | 8 +- indra/newview/lllistcontextmenu.cpp | 2 +- indra/newview/lllocalbitmaps.cpp | 32 +-- indra/newview/lllocationhistory.cpp | 14 +- indra/newview/lllocationinputctrl.cpp | 4 +- indra/newview/lllogchat.cpp | 4 +- indra/newview/lllogininstance.cpp | 36 +-- indra/newview/llmainlooprepeater.cpp | 2 +- indra/newview/llmanip.cpp | 4 +- indra/newview/llmaniprotate.cpp | 8 +- indra/newview/llmanipscale.cpp | 6 +- indra/newview/llmaniptranslate.cpp | 24 +- indra/newview/llmarketplacefunctions.cpp | 26 +- indra/newview/llmediactrl.cpp | 8 +- indra/newview/llmeshrepository.cpp | 98 ++++---- indra/newview/llmimetypes.cpp | 4 +- indra/newview/llmoveview.cpp | 8 +- indra/newview/llmutelist.cpp | 28 +-- indra/newview/llnamelistctrl.cpp | 8 +- indra/newview/llnavigationbar.cpp | 4 +- indra/newview/llnotificationhandlerutil.cpp | 6 +- indra/newview/lloutfitslist.cpp | 4 +- indra/newview/llpanelavatar.cpp | 2 +- indra/newview/llpanelblockedlist.cpp | 2 +- indra/newview/llpanelclassified.cpp | 22 +- indra/newview/llpaneleditwearable.cpp | 48 ++-- indra/newview/llpanelface.cpp | 14 +- indra/newview/llpanelgroup.cpp | 2 +- indra/newview/llpanelgroupgeneral.cpp | 6 +- indra/newview/llpanelgroupinvite.cpp | 2 +- indra/newview/llpanelgrouplandmoney.cpp | 38 +-- indra/newview/llpanelgroupnotices.cpp | 16 +- indra/newview/llpanelgrouproles.cpp | 84 +++---- indra/newview/llpanelland.cpp | 2 +- indra/newview/llpanellandmarkinfo.cpp | 4 +- indra/newview/llpanellandmarks.cpp | 14 +- indra/newview/llpanellogin.cpp | 10 +- indra/newview/llpanelmaininventory.cpp | 6 +- indra/newview/llpanelmarketplaceinboxinventory.cpp | 4 +- indra/newview/llpanelobject.cpp | 22 +- indra/newview/llpanelobjectinventory.cpp | 46 ++-- indra/newview/llpaneloutfitedit.cpp | 14 +- indra/newview/llpanelpeople.cpp | 26 +- indra/newview/llpanelpermissions.cpp | 12 +- indra/newview/llpanelpicks.cpp | 14 +- indra/newview/llpanelplaces.cpp | 12 +- indra/newview/llpanelprimmediacontrols.cpp | 4 +- indra/newview/llpanelprofile.cpp | 12 +- indra/newview/llpanelsnapshot.cpp | 2 +- indra/newview/llpanelsnapshotoptions.cpp | 2 +- indra/newview/llpanelsnapshotpostcard.cpp | 2 +- indra/newview/llpanelteleporthistory.cpp | 2 +- indra/newview/llpanelvolume.cpp | 4 +- indra/newview/llpanelwearing.cpp | 2 +- indra/newview/llpatchvertexarray.cpp | 2 +- indra/newview/llpathfindingmanager.cpp | 20 +- indra/newview/llpathfindingnavmesh.cpp | 10 +- indra/newview/llphysicsmotion.cpp | 2 +- indra/newview/llplacesfolderview.cpp | 2 +- indra/newview/llplacesinventorybridge.cpp | 2 +- indra/newview/llpostcard.cpp | 18 +- indra/newview/llpreview.cpp | 4 +- indra/newview/llpreviewgesture.cpp | 16 +- indra/newview/llpreviewnotecard.cpp | 32 +-- indra/newview/llpreviewscript.cpp | 70 +++--- indra/newview/llproductinforequest.cpp | 6 +- indra/newview/llregioninfomodel.cpp | 6 +- indra/newview/llremoteparcelrequest.cpp | 4 +- indra/newview/llscreenchannel.cpp | 16 +- indra/newview/llscriptfloater.cpp | 14 +- indra/newview/llsechandler_basic.cpp | 6 +- indra/newview/llselectmgr.cpp | 66 ++--- indra/newview/llsidepanelappearance.cpp | 2 +- indra/newview/llsidepanelinventory.cpp | 2 +- indra/newview/llsidepaneliteminfo.cpp | 12 +- indra/newview/llsidepaneltaskinfo.cpp | 10 +- indra/newview/llspatialpartition.cpp | 38 +-- indra/newview/llspatialpartition.h | 4 +- indra/newview/llspeakers.cpp | 24 +- indra/newview/llspeakingindicatormanager.cpp | 2 +- indra/newview/llstartup.cpp | 46 ++-- indra/newview/llstatusbar.cpp | 2 +- indra/newview/llsurface.cpp | 20 +- indra/newview/llsurfacepatch.cpp | 2 +- indra/newview/llsyswellwindow.cpp | 14 +- indra/newview/llteleporthistory.cpp | 10 +- indra/newview/llteleporthistorystorage.cpp | 12 +- indra/newview/lltextureatlas.cpp | 6 +- indra/newview/lltexturecache.cpp | 70 +++--- indra/newview/lltexturectrl.cpp | 8 +- indra/newview/lltexturefetch.cpp | 176 +++++++------- indra/newview/lltextureinfo.cpp | 4 +- indra/newview/lltexturestats.cpp | 2 +- indra/newview/lltexturestatsuploader.cpp | 4 +- indra/newview/lltextureview.cpp | 6 +- indra/newview/lltoastalertpanel.cpp | 4 +- indra/newview/lltoastgroupnotifypanel.cpp | 2 +- indra/newview/lltoastimpanel.cpp | 6 +- indra/newview/lltoastscripttextbox.cpp | 2 +- indra/newview/lltool.cpp | 26 +- indra/newview/lltoolbarview.cpp | 20 +- indra/newview/lltoolbrush.cpp | 4 +- indra/newview/lltooldraganddrop.cpp | 82 +++---- indra/newview/lltoolfocus.cpp | 8 +- indra/newview/lltoolgrab.cpp | 28 +-- indra/newview/lltoolgun.cpp | 4 +- indra/newview/lltoolmgr.cpp | 2 +- indra/newview/lltoolobjpicker.cpp | 4 +- indra/newview/lltoolpie.cpp | 12 +- indra/newview/lltoolplacer.cpp | 6 +- indra/newview/lltoolselectland.cpp | 8 +- indra/newview/lltoolselectrect.cpp | 4 +- indra/newview/lltracker.cpp | 2 +- indra/newview/lltranslate.cpp | 2 +- indra/newview/lluploadfloaterobservers.cpp | 4 +- indra/newview/llurl.cpp | 14 +- indra/newview/llurldispatcher.cpp | 2 +- indra/newview/llurlhistory.cpp | 10 +- indra/newview/llurlwhitelist.cpp | 2 +- indra/newview/llviewerassetstorage.cpp | 22 +- indra/newview/llvieweraudio.cpp | 8 +- indra/newview/llviewerchat.cpp | 2 +- indra/newview/llviewercontrol.cpp | 12 +- indra/newview/llviewerdisplay.cpp | 12 +- indra/newview/llviewerdisplayname.cpp | 12 +- indra/newview/llviewerfoldertype.cpp | 12 +- indra/newview/llviewergenericmessage.cpp | 6 +- indra/newview/llviewergesture.cpp | 4 +- indra/newview/llviewerinventory.cpp | 46 ++-- indra/newview/llviewerjointattachment.cpp | 6 +- indra/newview/llviewerjointmesh.cpp | 2 +- indra/newview/llviewerjoystick.cpp | 16 +- indra/newview/llviewerkeyboard.cpp | 18 +- indra/newview/llviewermedia.cpp | 100 ++++---- indra/newview/llviewermedia_streamingaudio.cpp | 14 +- indra/newview/llviewermediafocus.cpp | 28 +-- indra/newview/llviewermenu.cpp | 86 +++---- indra/newview/llviewermenufile.cpp | 60 ++--- indra/newview/llviewermessage.cpp | 24 +- indra/newview/llviewerobject.cpp | 202 +++++++-------- indra/newview/llviewerobjectlist.cpp | 114 ++++----- indra/newview/llviewerobjectlist.h | 2 +- indra/newview/llvieweroctree.cpp | 20 +- indra/newview/llviewerparcelmedia.cpp | 4 +- indra/newview/llviewerparcelmgr.cpp | 50 ++-- indra/newview/llviewerparceloverlay.cpp | 2 +- indra/newview/llviewerpartsim.cpp | 20 +- indra/newview/llviewerpartsource.cpp | 4 +- indra/newview/llviewerregion.cpp | 60 ++--- indra/newview/llviewershadermgr.cpp | 2 +- indra/newview/llviewerstats.cpp | 22 +- indra/newview/llviewerstatsrecorder.cpp | 16 +- indra/newview/llviewertexlayer.cpp | 24 +- indra/newview/llviewertexteditor.cpp | 10 +- indra/newview/llviewertexture.cpp | 72 +++--- indra/newview/llviewertexture.h | 2 +- indra/newview/llviewertexturelist.cpp | 22 +- indra/newview/llviewerthrottle.cpp | 6 +- indra/newview/llviewerwearable.cpp | 16 +- indra/newview/llviewerwindow.cpp | 114 ++++----- indra/newview/llvlcomposition.cpp | 12 +- indra/newview/llvlmanager.cpp | 2 +- indra/newview/llvoavatar.cpp | 240 +++++++++--------- indra/newview/llvoavatarself.cpp | 108 ++++----- indra/newview/llvocache.cpp | 54 ++--- indra/newview/llvograss.cpp | 18 +- indra/newview/llvoicevisualizer.cpp | 6 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvopartgroup.cpp | 4 +- indra/newview/llvosurfacepatch.cpp | 4 +- indra/newview/llvotree.cpp | 18 +- indra/newview/llvovolume.cpp | 32 +-- indra/newview/llvowlsky.cpp | 12 +- indra/newview/llwatchdog.cpp | 4 +- indra/newview/llwaterparammanager.cpp | 4 +- indra/newview/llwearableitemslist.cpp | 18 +- indra/newview/llwearablelist.cpp | 4 +- indra/newview/llweb.cpp | 2 +- indra/newview/llwebprofile.cpp | 24 +- indra/newview/llwldaycycle.cpp | 30 +-- indra/newview/llwlparammanager.cpp | 16 +- indra/newview/llworld.cpp | 62 ++--- indra/newview/llworldmapmessage.cpp | 2 +- indra/newview/llworldmapview.cpp | 2 +- indra/newview/llxmlrpctransaction.cpp | 20 +- indra/newview/pipeline.cpp | 126 +++++----- indra/viewer_components/login/lllogin.cpp | 2 +- indra/win_crash_logger/llcrashloggerwindows.cpp | 8 +- indra/win_crash_logger/win_crash_logger.cpp | 6 +- 603 files changed, 6290 insertions(+), 6290 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 8126d620ec..104594c554 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -319,14 +319,14 @@ void LLAvatarAppearance::initClass() BOOL success = sXMLTree.parseFile( xmlFile, FALSE ); if (!success) { - llerrs << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL; + LL_ERRS() << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL; } // now sanity check xml file LLXmlTreeNode* root = sXMLTree.getRoot(); if (!root) { - llerrs << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL; + LL_ERRS() << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL; return; } @@ -335,14 +335,14 @@ void LLAvatarAppearance::initClass() //------------------------------------------------------------------------- if( !root->hasName( "linden_avatar" ) ) { - llerrs << "Invalid avatar file header: " << xmlFile << LL_ENDL; + LL_ERRS() << "Invalid avatar file header: " << xmlFile << LL_ENDL; } std::string version; static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { - llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL; + LL_ERRS() << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL; } S32 wearable_def_version = 1; @@ -355,7 +355,7 @@ void LLAvatarAppearance::initClass() LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" ); if (!skeleton_node) { - llerrs << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL; + LL_ERRS() << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL; return; } @@ -363,14 +363,14 @@ void LLAvatarAppearance::initClass() static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name"); if (!skeleton_node->getFastAttributeString(file_name_string, skeleton_file_name)) { - llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL; + LL_ERRS() << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL; } std::string skeleton_path; skeleton_path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,skeleton_file_name); if (!parseSkeletonFile(skeleton_path)) { - llerrs << "Error parsing skeleton file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton file: " << skeleton_path << LL_ENDL; } // Process XML data @@ -383,7 +383,7 @@ void LLAvatarAppearance::initClass() sAvatarSkeletonInfo = new LLAvatarSkeletonInfo; if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot())) { - llerrs << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL; } // parse avatar_lad.xml if (sAvatarXmlInfo) @@ -393,27 +393,27 @@ void LLAvatarAppearance::initClass() sAvatarXmlInfo = new LLAvatarXmlInfo; if (!sAvatarXmlInfo->parseXmlSkeletonNode(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlMeshNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlColorNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlLayerNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlDriverNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } if (!sAvatarXmlInfo->parseXmlMorphNodes(root)) { - llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; + LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL; } } @@ -526,7 +526,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) if (!parsesuccess) { - llerrs << "Can't parse skeleton file: " << filename << LL_ENDL; + LL_ERRS() << "Can't parse skeleton file: " << filename << LL_ENDL; return FALSE; } @@ -534,13 +534,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) LLXmlTreeNode* root = sSkeletonXMLTree.getRoot(); if (!root) { - llerrs << "No root node found in avatar skeleton file: " << filename << LL_ENDL; + LL_ERRS() << "No root node found in avatar skeleton file: " << filename << LL_ENDL; return FALSE; } if( !root->hasName( "linden_skeleton" ) ) { - llerrs << "Invalid avatar skeleton file header: " << filename << LL_ENDL; + LL_ERRS() << "Invalid avatar skeleton file header: " << filename << LL_ENDL; return FALSE; } @@ -548,7 +548,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { - llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL; + LL_ERRS() << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL; return FALSE; } @@ -567,7 +567,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent joint = getCharacterJoint(joint_num); if (!joint) { - llwarns << "Too many bones" << LL_ENDL; + LL_WARNS() << "Too many bones" << LL_ENDL; return FALSE; } joint->setName( info->mName ); @@ -576,7 +576,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent { if (volume_num >= (S32)mNumCollisionVolumes) { - llwarns << "Too many bones" << LL_ENDL; + LL_WARNS() << "Too many bones" << LL_ENDL; return FALSE; } joint = (&mCollisionVolumes[volume_num]); @@ -646,7 +646,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) //------------------------------------------------------------------------- if (!allocateCharacterJoints(info->mNumBones)) { - llerrs << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL; + LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL; return FALSE; } @@ -657,7 +657,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) { if (!allocateCollisionVolumes(info->mNumCollisionVolumes)) { - llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL; + LL_ERRS() << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL; return FALSE; } } @@ -670,7 +670,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) LLAvatarBoneInfo *info = *iter; if (!setupBone(info, NULL, current_volume_num, current_joint_num)) { - llerrs << "Error parsing bone in skeleton file" << LL_ENDL; + LL_ERRS() << "Error parsing bone in skeleton file" << LL_ENDL; return FALSE; } } @@ -730,17 +730,17 @@ void LLAvatarAppearance::buildCharacter() stop_glerror(); // gPrintMessagesThisFrame = TRUE; - lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; + LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; if (!status) { if (isSelf()) { - llerrs << "Unable to load user's avatar" << LL_ENDL; + LL_ERRS() << "Unable to load user's avatar" << LL_ENDL; } else { - llwarns << "Unable to load other's avatar" << LL_ENDL; + LL_WARNS() << "Unable to load other's avatar" << LL_ENDL; } return; } @@ -789,7 +789,7 @@ void LLAvatarAppearance::buildCharacter() mEyeLeftp && mEyeRightp)) { - llerrs << "Failed to create avatar." << LL_ENDL; + LL_ERRS() << "Failed to create avatar." << LL_ENDL; return; } @@ -810,21 +810,21 @@ BOOL LLAvatarAppearance::loadAvatar() // avatar_skeleton.xml if( !buildSkeleton(sAvatarSkeletonInfo) ) { - llwarns << "avatar file: buildSkeleton() failed" << LL_ENDL; + LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL; return FALSE; } // avatar_lad.xml : if( !loadSkeletonNode() ) { - llwarns << "avatar file: loadNodeSkeleton() failed" << LL_ENDL; + LL_WARNS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL; return FALSE; } // avatar_lad.xml : if( !loadMeshNodes() ) { - llwarns << "avatar file: loadNodeMesh() failed" << LL_ENDL; + LL_WARNS() << "avatar file: loadNodeMesh() failed" << LL_ENDL; return FALSE; } @@ -834,13 +834,13 @@ BOOL LLAvatarAppearance::loadAvatar() mTexSkinColor = new LLTexGlobalColor( this ); if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) ) { - llwarns << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"skin_color\" not found" << LL_ENDL; + LL_WARNS() << " name=\"skin_color\" not found" << LL_ENDL; return FALSE; } if( sAvatarXmlInfo->mTexHairColorInfo ) @@ -848,13 +848,13 @@ BOOL LLAvatarAppearance::loadAvatar() mTexHairColor = new LLTexGlobalColor( this ); if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) ) { - llwarns << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"hair_color\" not found" << LL_ENDL; + LL_WARNS() << " name=\"hair_color\" not found" << LL_ENDL; return FALSE; } if( sAvatarXmlInfo->mTexEyeColorInfo ) @@ -862,26 +862,26 @@ BOOL LLAvatarAppearance::loadAvatar() mTexEyeColor = new LLTexGlobalColor( this ); if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) ) { - llwarns << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL; return FALSE; } } else { - llwarns << " name=\"eye_color\" not found" << LL_ENDL; + LL_WARNS() << " name=\"eye_color\" not found" << LL_ENDL; return FALSE; } // avatar_lad.xml : if (sAvatarXmlInfo->mLayerInfoList.empty()) { - llwarns << "avatar file: missing node" << LL_ENDL; + LL_WARNS() << "avatar file: missing node" << LL_ENDL; return FALSE; } if (sAvatarXmlInfo->mMorphMaskInfoList.empty()) { - llwarns << "avatar file: missing node" << LL_ENDL; + LL_WARNS() << "avatar file: missing node" << LL_ENDL; return FALSE; } @@ -923,14 +923,14 @@ BOOL LLAvatarAppearance::loadAvatar() LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam; if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false)) { - llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL; + LL_WARNS() << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL; continue; } } else { delete driver_param; - llwarns << "avatar file: driver_param->parseData() failed" << LL_ENDL; + LL_WARNS() << "avatar file: driver_param->parseData() failed" << LL_ENDL; return FALSE; } } @@ -1050,17 +1050,17 @@ BOOL LLAvatarAppearance::loadMeshNodes() } else { - llwarns << "Avatar file: has invalid lod setting " << lod << LL_ENDL; + LL_WARNS() << "Avatar file: has invalid lod setting " << lod << LL_ENDL; return FALSE; } } else { - llwarns << "Ignoring unrecognized mesh type: " << type << LL_ENDL; + LL_WARNS() << "Ignoring unrecognized mesh type: " << type << LL_ENDL; return FALSE; } - // llinfos << "Parsing mesh data for " << type << "..." << LL_ENDL; + // LL_INFOS() << "Parsing mesh data for " << type << "..." << LL_ENDL; // If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings. // Do not touch!!! @@ -1090,7 +1090,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() if( !poly_mesh ) { - llwarns << "Failed to load mesh of type " << type << LL_ENDL; + LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL; return FALSE; } @@ -1150,7 +1150,7 @@ BOOL LLAvatarAppearance::loadLayersets() { stop_glerror(); delete layer_set; - llwarns << "avatar file: layer_set->setInfo() failed" << LL_ENDL; + LL_WARNS() << "avatar file: layer_set->setInfo() failed" << LL_ENDL; return FALSE; } @@ -1173,7 +1173,7 @@ BOOL LLAvatarAppearance::loadLayersets() // if no baked texture was found, warn and cleanup if (baked_index == BAKED_NUM_INDICES) { - llwarns << " has invalid body_region attribute" << LL_ENDL; + LL_WARNS() << " has invalid body_region attribute" << LL_ENDL; delete layer_set; return FALSE; } @@ -1191,7 +1191,7 @@ BOOL LLAvatarAppearance::loadLayersets() } else { - llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL; + LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL; success = FALSE; } } @@ -1287,7 +1287,7 @@ BOOL LLAvatarAppearance::isValid() const // This should only be called on ourself. if (!isSelf()) { - llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL; + LL_ERRS() << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL; } return TRUE; } @@ -1476,7 +1476,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { - llwarns << "Bone without name" << LL_ENDL; + LL_WARNS() << "Bone without name" << LL_ENDL; return FALSE; } } @@ -1491,28 +1491,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) } else { - llwarns << "Invalid node " << node->getName() << LL_ENDL; + LL_WARNS() << "Invalid node " << node->getName() << LL_ENDL; return FALSE; } static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos"); if (!node->getFastAttributeVector3(pos_string, mPos)) { - llwarns << "Bone without position" << LL_ENDL; + LL_WARNS() << "Bone without position" << LL_ENDL; return FALSE; } static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot"); if (!node->getFastAttributeVector3(rot_string, mRot)) { - llwarns << "Bone without rotation" << LL_ENDL; + LL_WARNS() << "Bone without rotation" << LL_ENDL; return FALSE; } static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); if (!node->getFastAttributeVector3(scale_string, mScale)) { - llwarns << "Bone without scale" << LL_ENDL; + LL_WARNS() << "Bone without scale" << LL_ENDL; return FALSE; } @@ -1521,7 +1521,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot"); if (!node->getFastAttributeVector3(pivot_string, mPivot)) { - llwarns << "Bone without pivot" << LL_ENDL; + LL_WARNS() << "Bone without pivot" << LL_ENDL; return FALSE; } } @@ -1549,7 +1549,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones"); if (!node->getFastAttributeS32(num_bones_string, mNumBones)) { - llwarns << "Couldn't find number of bones." << LL_ENDL; + LL_WARNS() << "Couldn't find number of bones." << LL_ENDL; return FALSE; } @@ -1563,7 +1563,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node) if (!info->parseXml(child)) { delete info; - llwarns << "Error parsing bone in skeleton file" << LL_ENDL; + LL_WARNS() << "Error parsing bone in skeleton file" << LL_ENDL; return FALSE; } mBoneInfoList.push_back(info); @@ -1580,7 +1580,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro LLXmlTreeNode* node = root->getChildByName( "skeleton" ); if( !node ) { - llwarns << "avatar file: missing " << LL_ENDL; + LL_WARNS() << "avatar file: missing " << LL_ENDL; return FALSE; } @@ -1595,11 +1595,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro { if (child->getChildByName("param_morph")) { - llwarns << "Can't specify morph param in skeleton definition." << LL_ENDL; + LL_WARNS() << "Can't specify morph param in skeleton definition." << LL_ENDL; } else { - llwarns << "Unknown param type." << LL_ENDL; + LL_WARNS() << "Unknown param type." << LL_ENDL; } continue; } @@ -1624,7 +1624,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!child->getFastAttributeString(name_string, info->mName)) { - llwarns << "No name supplied for attachment point." << LL_ENDL; + LL_WARNS() << "No name supplied for attachment point." << LL_ENDL; delete info; continue; } @@ -1632,7 +1632,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint"); if (!child->getFastAttributeString(joint_string, info->mJointName)) { - llwarns << "No bone declared in attachment point " << info->mName << LL_ENDL; + LL_WARNS() << "No bone declared in attachment point " << info->mName << LL_ENDL; delete info; continue; } @@ -1658,7 +1658,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id"); if (!child->getFastAttributeS32(id_string, info->mAttachmentID)) { - llwarns << "No id supplied for attachment point " << info->mName << LL_ENDL; + LL_WARNS() << "No id supplied for attachment point " << info->mName << LL_ENDL; delete info; continue; } @@ -1693,7 +1693,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle type_string = LLXmlTree::addAttributeString("type"); if( !node->getFastAttributeString( type_string, info->mType ) ) { - llwarns << "Avatar file: is missing type attribute. Ignoring element. " << LL_ENDL; + LL_WARNS() << "Avatar file: is missing type attribute. Ignoring element. " << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1701,7 +1701,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod"); if (!node->getFastAttributeS32( lod_string, info->mLOD )) { - llwarns << "Avatar file: is missing lod attribute. Ignoring element. " << LL_ENDL; + LL_WARNS() << "Avatar file: is missing lod attribute. Ignoring element. " << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1709,7 +1709,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name"); if( !node->getFastAttributeString( file_name_string, info->mMeshFileName ) ) { - llwarns << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL; + LL_WARNS() << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL; delete info; return FALSE; // Ignore this element } @@ -1740,11 +1740,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) { if (child->getChildByName("param_skeleton")) { - llwarns << "Can't specify skeleton param in a mesh definition." << LL_ENDL; + LL_WARNS() << "Can't specify skeleton param in a mesh definition." << LL_ENDL; } else { - llwarns << "Unknown param type." << LL_ENDL; + LL_WARNS() << "Unknown param type." << LL_ENDL; } continue; } @@ -1785,14 +1785,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexSkinColorInfo) { - llwarns << "avatar file: multiple instances of skin_color" << LL_ENDL; + LL_WARNS() << "avatar file: multiple instances of skin_color" << LL_ENDL; return FALSE; } mTexSkinColorInfo = new LLTexGlobalColorInfo; if( !mTexSkinColorInfo->parseXml( color_node ) ) { delete_and_clear(mTexSkinColorInfo); - llwarns << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1800,14 +1800,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexHairColorInfo) { - llwarns << "avatar file: multiple instances of hair_color" << LL_ENDL; + LL_WARNS() << "avatar file: multiple instances of hair_color" << LL_ENDL; return FALSE; } mTexHairColorInfo = new LLTexGlobalColorInfo; if( !mTexHairColorInfo->parseXml( color_node ) ) { delete_and_clear(mTexHairColorInfo); - llwarns << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1815,13 +1815,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root { if (mTexEyeColorInfo) { - llwarns << "avatar file: multiple instances of eye_color" << LL_ENDL; + LL_WARNS() << "avatar file: multiple instances of eye_color" << LL_ENDL; return FALSE; } mTexEyeColorInfo = new LLTexGlobalColorInfo; if( !mTexEyeColorInfo->parseXml( color_node ) ) { - llwarns << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL; + LL_WARNS() << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1847,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root else { delete layer_info; - llwarns << "avatar file: layer_set->parseXml() failed" << LL_ENDL; + LL_WARNS() << "avatar file: layer_set->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1876,7 +1876,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo else { delete driver_info; - llwarns << "avatar file: driver_param->parseXml() failed" << LL_ENDL; + LL_WARNS() << "avatar file: driver_param->parseXml() failed" << LL_ENDL; return FALSE; } } @@ -1905,7 +1905,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle name_string = LLXmlTree::addAttributeString("morph_name"); if (!grand_child->getFastAttributeString(name_string, info->mName)) { - llwarns << "No name supplied for morph mask." << LL_ENDL; + LL_WARNS() << "No name supplied for morph mask." << LL_ENDL; delete info; continue; } @@ -1913,7 +1913,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region"); if (!grand_child->getFastAttributeString(region_string, info->mRegion)) { - llwarns << "No region supplied for morph mask." << LL_ENDL; + LL_WARNS() << "No region supplied for morph mask." << LL_ENDL; delete info; continue; } @@ -1921,7 +1921,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer"); if (!grand_child->getFastAttributeString(layer_string, info->mLayer)) { - llwarns << "No layer supplied for morph mask." << LL_ENDL; + LL_WARNS() << "No layer supplied for morph mask." << LL_ENDL; delete info; continue; } diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index 6ab341af64..2ee3c65a01 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -238,7 +238,7 @@ LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume() /*virtual*/ U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) { - llerrs << "Cannot call render() on LLAvatarJointCollisionVolume" << llendl; + LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL; return 0; } diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp index e50ef8d485..520ad775db 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -88,7 +88,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint) mJoint = joint; if ( !mJoint ) { - llinfos << "Can't find joint" << llendl; + LL_INFOS() << "Can't find joint" << LL_ENDL; } // compute the inverse root skin matrix @@ -304,7 +304,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh ) U32 jn; for (jn = 0; jn < numJointNames; jn++) { - //llinfos << "Setting up joint " << jointNames[jn] << llendl; + //LL_INFOS() << "Setting up joint " << jointNames[jn] << LL_ENDL; LLAvatarJoint* joint = (LLAvatarJoint*)(getRoot()->findJoint(jointNames[jn]) ); mSkinJoints[jn].setupSkinJoint( joint ); } diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 1f7e8b8652..c66a428374 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -89,7 +89,7 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node) } else { - llerrs << " Unable to resolve driven parameter: " << driven_id << llendl; + LL_ERRS() << " Unable to resolve driven parameter: " << driven_id << LL_ENDL; return FALSE; } } @@ -139,9 +139,9 @@ void LLDriverParamInfo::toStream(std::ostream &out) } else { - llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " + LL_WARNS() << "could not get parameter " << driven.mDrivenID << " from avatar " << mDriverParam->getAvatarAppearance() - << " for driver parameter " << getID() << llendl; + << " for driver parameter " << getID() << LL_ENDL; } out << std::endl; } diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index 7e36a06797..f49cf21512 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -64,7 +64,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) : LLTexLayer* original_layer = lto.getTexLayer(index); if (!original_layer) { - llerrs << "could not clone Local Texture Object: unable to extract texlayer!" << llendl; + LL_ERRS() << "could not clone Local Texture Object: unable to extract texlayer!" << LL_ENDL; continue; } diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index 1e87dae485..0a7a8d27bb 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -277,13 +277,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) //------------------------------------------------------------------------- if(fileName.empty()) { - llerrs << "Filename is Empty!" << llendl; + LL_ERRS() << "Filename is Empty!" << LL_ENDL; return FALSE; } LLFILE* fp = LLFile::fopen(fileName, "rb"); /*Flawfinder: ignore*/ if (!fp) { - llerrs << "can't open: " << fileName << llendl; + LL_ERRS() << "can't open: " << fileName << LL_ENDL; return FALSE; } @@ -293,7 +293,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) char header[128]; /*Flawfinder: ignore*/ if (fread(header, sizeof(char), 128, fp) != 128) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } //------------------------------------------------------------------------- @@ -302,7 +302,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) BOOL status = FALSE; if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/ { - lldebugs << "Loading " << fileName << llendl; + LL_DEBUGS() << "Loading " << fileName << LL_ENDL; //---------------------------------------------------------------- // File Header (seek past it) @@ -316,7 +316,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) size_t numRead = fread(&hasWeights, sizeof(U8), 1, fp); if (numRead != 1) { - llerrs << "can't read HasWeights flag from " << fileName << llendl; + LL_ERRS() << "can't read HasWeights flag from " << fileName << LL_ENDL; return FALSE; } if (!isLOD()) @@ -331,7 +331,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) numRead = fread(&hasDetailTexCoords, sizeof(U8), 1, fp); if (numRead != 1) { - llerrs << "can't read HasDetailTexCoords flag from " << fileName << llendl; + LL_ERRS() << "can't read HasDetailTexCoords flag from " << fileName << LL_ENDL; return FALSE; } @@ -343,7 +343,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(position.mV, sizeof(float), 3); if (numRead != 3) { - llerrs << "can't read Position from " << fileName << llendl; + LL_ERRS() << "can't read Position from " << fileName << LL_ENDL; return FALSE; } setPosition( position ); @@ -356,7 +356,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(rotationAngles.mV, sizeof(float), 3); if (numRead != 3) { - llerrs << "can't read RotationAngles from " << fileName << llendl; + LL_ERRS() << "can't read RotationAngles from " << fileName << LL_ENDL; return FALSE; } @@ -365,7 +365,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) if (numRead != 1) { - llerrs << "can't read RotationOrder from " << fileName << llendl; + LL_ERRS() << "can't read RotationOrder from " << fileName << LL_ENDL; return FALSE; } @@ -384,7 +384,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(scale.mV, sizeof(float), 3); if (numRead != 3) { - llerrs << "can't read Scale from " << fileName << llendl; + LL_ERRS() << "can't read Scale from " << fileName << LL_ENDL; return FALSE; } setScale( scale ); @@ -405,7 +405,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&numVertices, sizeof(U16), 1); if (numRead != 1) { - llerrs << "can't read NumVertices from " << fileName << llendl; + LL_ERRS() << "can't read NumVertices from " << fileName << LL_ENDL; return FALSE; } @@ -420,7 +420,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&mBaseCoords[i], sizeof(float), 3); if (numRead != 3) { - llerrs << "can't read Coordinates from " << fileName << llendl; + LL_ERRS() << "can't read Coordinates from " << fileName << LL_ENDL; return FALSE; } } @@ -434,7 +434,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&mBaseNormals[i], sizeof(float), 3); if (numRead != 3) { - llerrs << " can't read Normals from " << fileName << llendl; + LL_ERRS() << " can't read Normals from " << fileName << LL_ENDL; return FALSE; } } @@ -448,7 +448,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&mBaseBinormals[i], sizeof(float), 3); if (numRead != 3) { - llerrs << " can't read Binormals from " << fileName << llendl; + LL_ERRS() << " can't read Binormals from " << fileName << LL_ENDL; return FALSE; } } @@ -460,7 +460,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(mTexCoords, sizeof(float), 2*numVertices); if (numRead != numVertices) { - llerrs << "can't read TexCoords from " << fileName << llendl; + LL_ERRS() << "can't read TexCoords from " << fileName << LL_ENDL; return FALSE; } @@ -473,7 +473,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(mDetailTexCoords, sizeof(float), 2*numVertices); if (numRead != numVertices) { - llerrs << "can't read DetailTexCoords from " << fileName << llendl; + LL_ERRS() << "can't read DetailTexCoords from " << fileName << LL_ENDL; return FALSE; } } @@ -487,7 +487,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(mWeights, sizeof(float), numVertices); if (numRead != numVertices) { - llerrs << "can't read Weights from " << fileName << llendl; + LL_ERRS() << "can't read Weights from " << fileName << LL_ENDL; return FALSE; } } @@ -501,7 +501,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&numFaces, sizeof(U16), 1); if (numRead != 1) { - llerrs << "can't read NumFaces from " << fileName << llendl; + LL_ERRS() << "can't read NumFaces from " << fileName << LL_ENDL; return FALSE; } allocateFaceData( numFaces ); @@ -519,7 +519,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(face, sizeof(U16), 3); if (numRead != 3) { - llerrs << "can't read Face[" << i << "] from " << fileName << llendl; + LL_ERRS() << "can't read Face[" << i << "] from " << fileName << LL_ENDL; return FALSE; } if (mReferenceData) @@ -559,10 +559,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) numTris++; } - lldebugs << "verts: " << numVertices + LL_DEBUGS() << "verts: " << numVertices << ", faces: " << numFaces << ", tris: " << numTris - << llendl; + << LL_ENDL; //---------------------------------------------------------------- // NumSkinJoints @@ -576,7 +576,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) llendianswizzle(&numSkinJoints, sizeof(U16), 1); if (numRead != 1) { - llerrs << "can't read NumSkinJoints from " << fileName << llendl; + LL_ERRS() << "can't read NumSkinJoints from " << fileName << LL_ENDL; return FALSE; } allocateJointNames( numSkinJoints ); @@ -592,7 +592,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) jointName[sizeof(jointName)-1] = '\0'; // ensure nul-termination if (numRead != 1) { - llerrs << "can't read Skin[" << i << "].Name from " << fileName << llendl; + LL_ERRS() << "can't read Skin[" << i << "].Name from " << fileName << LL_ENDL; return FALSE; } @@ -687,12 +687,12 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) S32 remapDst; if (fread(&remapSrc, sizeof(S32), 1, fp) != 1) { - llerrs << "can't read source vertex in vertex remap data" << llendl; + LL_ERRS() << "can't read source vertex in vertex remap data" << LL_ENDL; break; } if (fread(&remapDst, sizeof(S32), 1, fp) != 1) { - llerrs << "can't read destination vertex in vertex remap data" << llendl; + LL_ERRS() << "can't read destination vertex in vertex remap data" << LL_ENDL; break; } llendianswizzle(&remapSrc, sizeof(S32), 1); @@ -707,7 +707,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName ) } else { - llerrs << "invalid mesh file header: " << fileName << llendl; + LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL; status = FALSE; } @@ -824,7 +824,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m LLPolyMeshSharedData* meshSharedData = get_if_there(sGlobalSharedMeshList, name, (LLPolyMeshSharedData*)NULL); if (meshSharedData) { -// llinfos << "Polymesh " << name << " found in global mesh table." << llendl; +// LL_INFOS() << "Polymesh " << name << " found in global mesh table." << LL_ENDL; LLPolyMesh *poly_mesh = new LLPolyMesh(meshSharedData, reference_mesh); return poly_mesh; } @@ -848,7 +848,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m LLPolyMesh *poly_mesh = new LLPolyMesh(mesh_data, reference_mesh); -// llinfos << "Polymesh " << name << " added to global mesh table." << llendl; +// LL_INFOS() << "Polymesh " << name << " added to global mesh table." << LL_ENDL; sGlobalSharedMeshList[name] = poly_mesh->mSharedData; return poly_mesh; @@ -882,10 +882,10 @@ void LLPolyMesh::dumpDiagInfo() std::string buf; - llinfos << "-----------------------------------------------------" << llendl; - llinfos << " Global PolyMesh Table (DEBUG only)" << llendl; - llinfos << " Verts Faces Mem(KB) Name" << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; + LL_INFOS() << " Global PolyMesh Table (DEBUG only)" << LL_ENDL; + LL_INFOS() << " Verts Faces Mem(KB) Name" << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage for(LLPolyMeshSharedDataTable::iterator iter = sGlobalSharedMeshList.begin(); @@ -899,17 +899,17 @@ void LLPolyMesh::dumpDiagInfo() U32 num_kb = mesh->getNumKB(); buf = llformat("%8d %8d %8d %s", num_verts, num_faces, num_kb, mesh_name.c_str()); - llinfos << buf << llendl; + LL_INFOS() << buf << LL_ENDL; total_verts += num_verts; total_faces += num_faces; total_kb += num_kb; } - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; buf = llformat("%8d %8d %8d TOTAL", total_verts, total_faces, total_kb ); - llinfos << buf << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << buf << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; } //----------------------------------------------------------------------------- diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 6bda38bd97..e0790f8b5b 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -113,7 +113,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&numVertices, sizeof(S32), 1); if (numRead != 1) { - llwarns << "Can't read number of morph target vertices" << llendl; + LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL; return FALSE; } @@ -150,13 +150,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&mVertexIndices[v], sizeof(U32), 1); if (numRead != 1) { - llwarns << "Can't read morph target vertex number" << llendl; + LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL; return FALSE; } if (mVertexIndices[v] > 10000) { - llerrs << "Bad morph index: " << mVertexIndices[v] << llendl; + LL_ERRS() << "Bad morph index: " << mVertexIndices[v] << LL_ENDL; } @@ -164,7 +164,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&mCoords[v], sizeof(F32), 3); if (numRead != 3) { - llwarns << "Can't read morph target vertex coordinates" << llendl; + LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL; return FALSE; } @@ -184,7 +184,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&mNormals[v], sizeof(F32), 3); if (numRead != 3) { - llwarns << "Can't read morph target normal" << llendl; + LL_WARNS() << "Can't read morph target normal" << LL_ENDL; return FALSE; } @@ -192,7 +192,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&mBinormals[v], sizeof(F32), 3); if (numRead != 3) { - llwarns << "Can't read morph target binormal" << llendl; + LL_WARNS() << "Can't read morph target binormal" << LL_ENDL; return FALSE; } @@ -201,7 +201,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) llendianswizzle(&mTexCoords[v].mV, sizeof(F32), 2); if (numRead != 2) { - llwarns << "Can't read morph target uv" << llendl; + LL_WARNS() << "Can't read morph target uv" << LL_ENDL; return FALSE; } @@ -269,7 +269,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mMorphName ) ) { - llwarns << "Avatar file: is missing name attribute" << llendl; + LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; return FALSE; // Continue, ignoring this tag } @@ -280,8 +280,8 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node) if (NULL == paramNode) { - llwarns << "Failed to getChildByName(\"param_morph\")" - << llendl; + LL_WARNS() << "Failed to getChildByName(\"param_morph\")" + << LL_ENDL; return FALSE; } @@ -377,7 +377,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) } if (!mMorphData) { - llwarns << "No morph target named " << morph_param_name << " found in mesh." << llendl; + LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL; return FALSE; // Continue, ignoring this tag } return TRUE; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 8f1f413e02..68119a8562 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -55,8 +55,8 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) if (NULL == skeletalParam) { - llwarns << "Failed to getChildByName(\"param_skeleton\")" - << llendl; + LL_WARNS() << "Failed to getChildByName(\"param_skeleton\")" + << LL_ENDL; return FALSE; } @@ -72,14 +72,14 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!bone->getFastAttributeString(name_string, name)) { - llwarns << "No bone name specified for skeletal param." << llendl; + LL_WARNS() << "No bone name specified for skeletal param." << LL_ENDL; continue; } static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale"); if (!bone->getFastAttributeVector3(scale_string, scale)) { - llwarns << "No scale specified for bone " << name << "." << llendl; + LL_WARNS() << "No scale specified for bone " << name << "." << LL_ENDL; continue; } @@ -93,7 +93,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) } else { - llwarns << "Unrecognized element " << bone->getName() << " in skeletal distortion" << llendl; + LL_WARNS() << "Unrecognized element " << bone->getName() << " in skeletal distortion" << LL_ENDL; continue; } } @@ -132,13 +132,13 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) LLJoint* joint = mAvatar->getJoint(bone_info->mBoneName); if (!joint) { - llwarns << "Joint " << bone_info->mBoneName << " not found." << llendl; + LL_WARNS() << "Joint " << bone_info->mBoneName << " not found." << LL_ENDL; continue; } if (mJointScales.find(joint) != mJointScales.end()) { - llwarns << "Scale deformation already supplied for joint " << joint->getName() << "." << llendl; + LL_WARNS() << "Scale deformation already supplied for joint " << joint->getName() << "." << LL_ENDL; } // store it @@ -161,7 +161,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) { if (mJointOffsets.find(joint) != mJointOffsets.end()) { - llwarns << "Offset deformation already supplied for joint " << joint->getName() << "." << llendl; + LL_WARNS() << "Offset deformation already supplied for joint " << joint->getName() << "." << LL_ENDL; } mJointOffsets[joint] = bone_info->mPositionDeformation; } diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index f38b982104..77be545e05 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -128,7 +128,7 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { - llwarns << " element is missing name attribute." << llendl; + LL_WARNS() << " element is missing name attribute." << LL_ENDL; return FALSE; } // sub-element diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 6c584c239c..7521e74d7c 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -210,7 +210,7 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle body_region_string = LLXmlTree::addAttributeString("body_region"); if( !node->getFastAttributeString( body_region_string, mBodyRegion ) ) { - llwarns << " is missing body_region attribute" << llendl; + LL_WARNS() << " is missing body_region attribute" << LL_ENDL; return FALSE; } @@ -735,13 +735,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) } if (mLocalTexture == TEX_NUM_INDICES) { - llwarns << " element has invalid local_texture attribute: " << mName << " " << local_texture_name << llendl; + LL_WARNS() << " element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL; return FALSE; } } else { - llwarns << " element is missing a required attribute. " << mName << llendl; + LL_WARNS() << " element is missing a required attribute. " << mName << LL_ENDL; return FALSE; } } @@ -804,7 +804,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance); if (!param_color->setInfo(color_info, TRUE)) { - llwarns << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << llendl; + LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL; delete param_color; success = FALSE; } @@ -818,7 +818,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance); if (!param_alpha->setInfo(alpha_info, TRUE)) { - llwarns << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << llendl; + LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL; delete param_alpha; success = FALSE; } @@ -851,7 +851,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab // Not a critical warning, but could be useful for debugging later issues. -Nyx if (mInfo != NULL) { - llwarns << "mInfo != NULL" << llendl; + LL_WARNS() << "mInfo != NULL" << LL_ENDL; } mInfo = info; //mID = info->mID; // No ID @@ -1204,7 +1204,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) } else { - llinfos << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << llendl; + LL_INFOS() << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << LL_ENDL; } // if( mTexLayerSet->getAvatarAppearance()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) ) { @@ -1292,7 +1292,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) if( !success ) { - llinfos << "LLTexLayer::render() partial: " << getInfo()->mName << llendl; + LL_INFOS() << "LLTexLayer::render() partial: " << getInfo()->mName << LL_ENDL; } return success; } @@ -1429,7 +1429,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC { if (!force_render && !hasMorph()) { - lldebugs << "skipping renderMorphMasks for " << getUUID() << llendl; + LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL; return; } LLFastTimer t(FTM_RENDER_MORPH_MASKS); @@ -1470,7 +1470,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC success &= param->render( x, y, width, height ); if (!success && !force_render) { - lldebugs << "Failed to render param " << param->getID() << " ; skipping morph mask." << llendl; + LL_DEBUGS() << "Failed to render param " << param->getID() << " ; skipping morph mask." << LL_ENDL; return; } } @@ -1512,8 +1512,8 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } else { - llwarns << "Skipping rendering of " << getInfo()->mStaticImageFileName - << "; expected 1 or 4 components." << llendl; + LL_WARNS() << "Skipping rendering of " << getInfo()->mStaticImageFileName + << "; expected 1 or 4 components." << LL_ENDL; } } } @@ -1892,18 +1892,18 @@ LLTexLayerStaticImageList::~LLTexLayerStaticImageList() void LLTexLayerStaticImageList::dumpByteCount() const { - llinfos << "Avatar Static Textures " << + LL_INFOS() << "Avatar Static Textures " << "KB GL:" << (mGLBytes / 1024) << - "KB TGA:" << (mTGABytes / 1024) << "KB" << llendl; + "KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL; } void LLTexLayerStaticImageList::deleteCachedImages() { if( mGLBytes || mTGABytes ) { - llinfos << "Clearing Static Textures " << + LL_INFOS() << "Clearing Static Textures " << "KB GL:" << (mGLBytes / 1024) << - "KB TGA:" << (mTGABytes / 1024) << "KB" << llendl; + "KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL; //mStaticImageLists uses LLPointers, clear() will cause deletion diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 674e8c3c06..f800b31694 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -50,7 +50,7 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) : } else { - llerrs << "LLTexLayerParam constructor passed with NULL reference for layer!" << llendl; + LL_ERRS() << "LLTexLayerParam constructor passed with NULL reference for layer!" << LL_ENDL; } } @@ -87,7 +87,7 @@ void LLTexLayerParamAlpha::dumpCacheByteCount() { S32 gl_bytes = 0; getCacheByteCount( &gl_bytes); - llinfos << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << llendl; + LL_INFOS() << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << LL_ENDL; } // static @@ -279,7 +279,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) if (mStaticImageTGA.isNull()) { - llwarns << "Unable to load static file: " << info->mStaticImageFileName << llendl; + LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL; mStaticImageInvalid = TRUE; // don't try again. return FALSE; } @@ -310,7 +310,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) mStaticImageRaw = new LLImageRaw; mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight); mNeedsCreateTexture = TRUE; - lldebugs << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << llendl; + LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL; } if (mCachedProcessedTexture) @@ -381,7 +381,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) } // else // { -// llwarns << " element is missing tga_file attribute." << llendl; +// LL_WARNS() << " element is missing tga_file attribute." << LL_ENDL; // } static LLStdStringHandle multiply_blend_string = LLXmlTree::addAttributeString("multiply_blend"); @@ -482,7 +482,7 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) } } -// llinfos << "param " << mName << " = " << new_weight << llendl; +// LL_INFOS() << "param " << mName << " = " << new_weight << LL_ENDL; } } @@ -557,13 +557,13 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node) } if (!mNumColors) { - llwarns << " is missing sub-elements" << llendl; + LL_WARNS() << " is missing sub-elements" << LL_ENDL; return FALSE; } if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1)) { - llwarns << " with operation\"blend\" must have exactly one " << llendl; + LL_WARNS() << " with operation\"blend\" must have exactly one " << LL_ENDL; return FALSE; } diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index cb80313b0b..389505fa34 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -150,7 +150,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp) { if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true)) { - llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl; + LL_WARNS() << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL; continue; } } @@ -174,7 +174,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp) } else { - llerrs << "could not find layerset for LTO in wearable!" << llendl; + LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL; } } @@ -208,7 +208,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // read header and version if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Failed to read wearable asset input stream." << llendl; + LL_WARNS() << "Failed to read wearable asset input stream." << LL_ENDL; return LLWearable::FAILURE; } if ( 1 != sscanf( /* Flawfinder: ignore */ @@ -226,15 +226,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // these wearables get re-saved with version definition 22. if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion && mDefinitionVersion != 24 ) { - llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl; + LL_WARNS() << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << LL_ENDL; return LLWearable::FAILURE; } // name may be empty if (!input_stream.good()) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading name" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading name" << LL_ENDL; return LLWearable::FAILURE; } input_stream.getline(buffer, PARSE_BUFFER_SIZE); @@ -243,8 +243,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // description may be empty if (!input_stream.good()) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading description" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading description" << LL_ENDL; return LLWearable::FAILURE; } input_stream.getline(buffer, PARSE_BUFFER_SIZE); @@ -253,15 +253,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // permissions may have extra empty lines before the correct line if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading permissions" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading permissions" << LL_ENDL; return LLWearable::FAILURE; } S32 perm_version = -1; if ( 1 != sscanf( buffer, " permissions %d\n", &perm_version ) || perm_version != 0 ) { - llwarns << "Bad Wearable asset: missing valid permissions" << llendl; + LL_WARNS() << "Bad Wearable asset: missing valid permissions" << LL_ENDL; return LLWearable::FAILURE; } if( !mPermissions.importLegacyStream( input_stream ) ) @@ -272,15 +272,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // sale info if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading sale info" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading sale info" << LL_ENDL; return LLWearable::FAILURE; } S32 sale_info_version = -1; if ( 1 != sscanf( buffer, " sale_info %d\n", &sale_info_version ) || sale_info_version != 0 ) { - llwarns << "Bad Wearable asset: missing valid sale_info" << llendl; + LL_WARNS() << "Bad Wearable asset: missing valid sale_info" << LL_ENDL; return LLWearable::FAILURE; } // Sale info used to contain next owner perm. It is now in the @@ -306,14 +306,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // wearable type if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading type" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading type" << LL_ENDL; return LLWearable::FAILURE; } S32 type = -1; if ( 1 != sscanf( buffer, "type %d\n", &type ) ) { - llwarns << "Bad Wearable asset: bad type" << llendl; + LL_WARNS() << "Bad Wearable asset: bad type" << LL_ENDL; return LLWearable::FAILURE; } if( 0 <= type && type < LLWearableType::WT_COUNT ) @@ -323,36 +323,36 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, else { mType = LLWearableType::WT_COUNT; - llwarns << "Bad Wearable asset: bad type #" << type << llendl; + LL_WARNS() << "Bad Wearable asset: bad type #" << type << LL_ENDL; return LLWearable::FAILURE; } // parameters header if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading parameters header" << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading parameters header" << LL_ENDL; return LLWearable::FAILURE; } S32 num_parameters = -1; if ( 1 != sscanf( buffer, "parameters %d\n", &num_parameters ) ) { - llwarns << "Bad Wearable asset: missing parameters block" << llendl; + LL_WARNS() << "Bad Wearable asset: missing parameters block" << LL_ENDL; return LLWearable::FAILURE; } if ( num_parameters > MAX_WEARABLE_ASSET_PARAMETERS ) { - llwarns << "Bad Wearable asset: too many parameters, " - << num_parameters << llendl; + LL_WARNS() << "Bad Wearable asset: too many parameters, " + << num_parameters << LL_ENDL; return LLWearable::FAILURE; } if( num_parameters != mVisualParamIndexMap.size() ) { - llwarns << "Wearable parameter mismatch. Reading in " + LL_WARNS() << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. type: " - << getType() << llendl; + << getType() << LL_ENDL; } // parameters @@ -361,15 +361,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, { if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading parameter #" << i << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading parameter #" << i << LL_ENDL; return LLWearable::FAILURE; } S32 param_id = 0; F32 param_weight = 0.f; if ( 2 != sscanf( buffer, "%d %f\n", ¶m_id, ¶m_weight ) ) { - llwarns << "Bad Wearable asset: bad parameter, #" << i << llendl; + LL_WARNS() << "Bad Wearable asset: bad parameter, #" << i << LL_ENDL; return LLWearable::FAILURE; } mSavedVisualParamMap[param_id] = param_weight; @@ -378,20 +378,20 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, // textures header if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading textures header" << i << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading textures header" << i << LL_ENDL; return LLWearable::FAILURE; } S32 num_textures = -1; if ( 1 != sscanf( buffer, "textures %d\n", &num_textures) ) { - llwarns << "Bad Wearable asset: missing textures block" << llendl; + LL_WARNS() << "Bad Wearable asset: missing textures block" << LL_ENDL; return LLWearable::FAILURE; } if ( num_textures > MAX_WEARABLE_ASSET_TEXTURES ) { - llwarns << "Bad Wearable asset: too many textures, " - << num_textures << llendl; + LL_WARNS() << "Bad Wearable asset: too many textures, " + << num_textures << LL_ENDL; return LLWearable::FAILURE; } @@ -400,8 +400,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, { if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE)) { - llwarns << "Bad Wearable asset: early end of input stream " - << "while reading textures #" << i << llendl; + LL_WARNS() << "Bad Wearable asset: early end of input stream " + << "while reading textures #" << i << LL_ENDL; return LLWearable::FAILURE; } S32 te = 0; @@ -410,14 +410,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, "%d %36s\n", &te, uuid_buffer) ) { - llwarns << "Bad Wearable asset: bad texture, #" << i << llendl; + LL_WARNS() << "Bad Wearable asset: bad texture, #" << i << LL_ENDL; return LLWearable::FAILURE; } if( !LLUUID::validate( uuid_buffer ) ) { - llwarns << "Bad Wearable asset: bad texture uuid: " - << uuid_buffer << llendl; + LL_WARNS() << "Bad Wearable asset: bad texture uuid: " + << uuid_buffer << LL_ENDL; return LLWearable::FAILURE; } LLUUID id = LLUUID(uuid_buffer); @@ -656,7 +656,7 @@ void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_ba } else { - llerrs << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl; + LL_ERRS() << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL; } } @@ -669,7 +669,7 @@ F32 LLWearable::getVisualParamWeight(S32 param_index) const } else { - llwarns << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl; + LL_WARNS() << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL; } return (F32)-1.0; } diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp index 68fdcca782..089370dbc4 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -75,13 +75,13 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { - llwarns << "invalid type, type " << type << " index " << index << llendl; + LL_WARNS() << "invalid type, type " << type << " index " << index << LL_ENDL; return; } wearableentry_vec_t& wearable_vec = wearable_iter->second; if (index>=wearable_vec.size()) { - llwarns << "invalid index, type " << type << " index " << index << llendl; + LL_WARNS() << "invalid index, type " << type << " index " << index << LL_ENDL; } else { @@ -99,7 +99,7 @@ U32 LLWearableData::pushWearable(const LLWearableType::EType type, if (wearable == NULL) { // no null wearables please! - llwarns << "Null wearable sent for type " << type << llendl; + LL_WARNS() << "Null wearable sent for type " << type << LL_ENDL; return MAX_CLOTHING_PER_TYPE; } if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE) @@ -221,7 +221,7 @@ U32 LLWearableData::getWearableIndex(const LLWearable *wearable) const wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { - llwarns << "tried to get wearable index with an invalid type!" << llendl; + LL_WARNS() << "tried to get wearable index with an invalid type!" << LL_ENDL; return MAX_CLOTHING_PER_TYPE; } const wearableentry_vec_t& wearable_vec = wearable_iter->second; diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index e7b9fa6b18..79eb58d24d 100755 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -137,7 +137,7 @@ S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence) origin = -1; break; default: - llerrs << "Invalid whence argument to vfs_seek" << llendl; + LL_ERRS() << "Invalid whence argument to vfs_seek" << LL_ENDL; return -1; } @@ -199,12 +199,12 @@ BOOL LLVorbisDecodeState::initDecode() vfs_callbacks.close_func = vfs_close; vfs_callbacks.tell_func = vfs_tell; - //llinfos << "Initing decode from vfile: " << mUUID << llendl; + //LL_INFOS() << "Initing decode from vfile: " << mUUID << LL_ENDL; mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND); if (!mInFilep || !mInFilep->getSize()) { - llwarns << "unable to open vorbis source vfile for reading" << llendl; + LL_WARNS() << "unable to open vorbis source vfile for reading" << LL_ENDL; delete mInFilep; mInFilep = NULL; return FALSE; @@ -213,7 +213,7 @@ BOOL LLVorbisDecodeState::initDecode() S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks); if(r < 0) { - llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl; + LL_WARNS() << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL; return(FALSE); } @@ -231,36 +231,36 @@ BOOL LLVorbisDecodeState::initDecode() if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS ) { abort_decode = true; - llwarns << "Bad channel count: " << vi->channels << llendl; + LL_WARNS() << "Bad channel count: " << vi->channels << LL_ENDL; } } else // !vi { abort_decode = true; - llwarns << "No default bitstream found" << llendl; + LL_WARNS() << "No default bitstream found" << LL_ENDL; } if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES || (size_t)sample_count <= 0) { abort_decode = true; - llwarns << "Illegal sample count: " << sample_count << llendl; + LL_WARNS() << "Illegal sample count: " << sample_count << LL_ENDL; } if( size_guess > LLVORBIS_CLIP_REJECT_SIZE || size_guess < 0) { abort_decode = true; - llwarns << "Illegal sample size: " << size_guess << llendl; + LL_WARNS() << "Illegal sample size: " << size_guess << LL_ENDL; } if( abort_decode ) { - llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl; + LL_WARNS() << "Canceling initDecode. Bad asset: " << mUUID << LL_ENDL; vorbis_comment* comment = ov_comment(&mVF,-1); if (comment && comment->vendor) { - llwarns << "Bad asset encoded by: " << comment->vendor << llendl; + LL_WARNS() << "Bad asset encoded by: " << comment->vendor << LL_ENDL; } delete mInFilep; mInFilep = NULL; @@ -361,12 +361,12 @@ BOOL LLVorbisDecodeState::decodeSection() { if (!mInFilep) { - llwarns << "No VFS file to decode in vorbis!" << llendl; + LL_WARNS() << "No VFS file to decode in vorbis!" << LL_ENDL; return TRUE; } if (mDone) { -// llwarns << "Already done with decode, aborting!" << llendl; +// LL_WARNS() << "Already done with decode, aborting!" << LL_ENDL; return TRUE; } char pcmout[4096]; /*Flawfinder: ignore*/ @@ -379,14 +379,14 @@ BOOL LLVorbisDecodeState::decodeSection() eof = TRUE; mDone = TRUE; mValid = TRUE; -// llinfos << "Vorbis EOF" << llendl; +// LL_INFOS() << "Vorbis EOF" << LL_ENDL; } else if (ret < 0) { /* error in the stream. Not a problem, just reporting it in case we (the app) cares. In this case, we don't. */ - llwarns << "BAD vorbis decode in decodeSection." << llendl; + LL_WARNS() << "BAD vorbis decode in decodeSection." << LL_ENDL; mValid = FALSE; mDone = TRUE; @@ -395,7 +395,7 @@ BOOL LLVorbisDecodeState::decodeSection() } else { -// llinfos << "Vorbis read " << ret << "bytes" << llendl; +// LL_INFOS() << "Vorbis read " << ret << "bytes" << LL_ENDL; /* we don't bother dealing with sample rate changes, etc, but. you'll have to*/ std::copy(pcmout, pcmout+ret, std::back_inserter(mWAVBuffer)); @@ -407,7 +407,7 @@ BOOL LLVorbisDecodeState::finishDecode() { if (!isValid()) { - llwarns << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << llendl; + LL_WARNS() << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL; return TRUE; // We've finished } @@ -482,7 +482,7 @@ BOOL LLVorbisDecodeState::finishDecode() if (36 == data_length) { - llwarns << "BAD Vorbis decode in finishDecode!" << llendl; + LL_WARNS() << "BAD Vorbis decode in finishDecode!" << LL_ENDL; mValid = FALSE; return TRUE; // we've finished } @@ -499,7 +499,7 @@ BOOL LLVorbisDecodeState::finishDecode() { if (mBytesRead == 0) { - llwarns << "Unable to write file in LLVorbisDecodeState::finishDecode" << llendl; + LL_WARNS() << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL; mValid = FALSE; return TRUE; // we've finished } @@ -517,7 +517,7 @@ BOOL LLVorbisDecodeState::finishDecode() LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV); output.write(&mWAVBuffer[0], mWAVBuffer.size()); #endif - //llinfos << "Finished decode for " << getUUID() << llendl; + //LL_INFOS() << "Finished decode for " << getUUID() << LL_ENDL; return TRUE; } @@ -526,7 +526,7 @@ void LLVorbisDecodeState::flushBadFile() { if (mInFilep) { - llwarns << "Flushing bad vorbis file from VFS for " << mUUID << llendl; + LL_WARNS() << "Flushing bad vorbis file from VFS for " << mUUID << LL_ENDL; mInFilep->remove(); } } @@ -570,7 +570,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) if (mCurrentDecodep->isDone() && !mCurrentDecodep->isValid()) { // We had an error when decoding, abort. - llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl; + LL_WARNS() << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL; mCurrentDecodep->flushBadFile(); LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID()); adp->setHasValidData(false); @@ -592,7 +592,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID()); if (!adp) { - llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl; + LL_WARNS() << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << LL_ENDL; } else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone()) { @@ -603,12 +603,12 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) // At this point, we could see if anyone needs this sound immediately, but // I'm not sure that there's a reason to - we need to poll all of the playing // sounds anyway. - //llinfos << "Finished the vorbis decode, now what?" << llendl; + //LL_INFOS() << "Finished the vorbis decode, now what?" << LL_ENDL; } else { adp->setHasCompletedDecode(true); - llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl; + LL_INFOS() << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << LL_ENDL; } mCurrentDecodep = NULL; } @@ -634,7 +634,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) continue; } - lldebugs << "Decoding " << uuid << " from audio queue!" << llendl; + LL_DEBUGS() << "Decoding " << uuid << " from audio queue!" << LL_ENDL; std::string uuid_str; std::string d_path; @@ -677,19 +677,19 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) if (gAudiop->hasDecodedFile(uuid)) { // Already have a decoded version, don't need to decode it. - //llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl; + //LL_INFOS() << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL; return TRUE; } if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND)) { // Just put it on the decode queue. - //llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl; + //LL_INFOS() << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL; mImpl->mDecodeQueue.push_back(uuid); return TRUE; } - //llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl; + //LL_INFOS() << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL; return FALSE; } diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 9c72515a0f..399333d994 100755 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -123,7 +123,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata) // Initialize the decode manager gAudioDecodeMgrp = new LLAudioDecodeMgr; - llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl; + LL_INFOS() << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL; return true; } @@ -308,7 +308,7 @@ void LLAudioEngine::idle(F32 max_decode_time) LLAudioChannel *channelp = getFreeChannel(max_priority); if (channelp) { - //llinfos << "Replacing source in channel due to priority!" << llendl; + //LL_INFOS() << "Replacing source in channel due to priority!" << LL_ENDL; max_sourcep->setChannel(channelp); channelp->setSource(max_sourcep); if (max_sourcep->isSyncSlave()) @@ -479,7 +479,7 @@ void LLAudioEngine::idle(F32 max_decode_time) { if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) { - //llinfos << "Flushing unused buffer!" << llendl; + //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL; mBuffers[i]->mAudioDatap->mBufferp = NULL; delete mBuffers[i]; mBuffers[i] = NULL; @@ -591,8 +591,8 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer() if (buffer_id >= 0) { - lldebugs << "Taking over unused buffer " << buffer_id << llendl; - //llinfos << "Flushing unused buffer!" << llendl; + LL_DEBUGS() << "Taking over unused buffer " << buffer_id << LL_ENDL; + //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL; mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; delete mBuffers[buffer_id]; mBuffers[buffer_id] = createBuffer(); @@ -684,7 +684,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid) // At some point we need to have the audio/asset system check the static VFS // before it goes off and fetches stuff from the server. - //llwarns << "Used internal preload for non-local sound" << llendl; + //LL_WARNS() << "Used internal preload for non-local sound" << LL_ENDL; return false; } @@ -815,7 +815,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i const S32 type, const LLVector3d &pos_global) { // Create a new source (since this can't be associated with an existing source. - //llinfos << "Localized: " << audio_uuid << llendl; + //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL; if (mMuted) { @@ -982,7 +982,7 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp) iter = mAllSources.find(asp->getID()); if (iter == mAllSources.end()) { - llwarns << "Cleaning up unknown audio source!" << llendl; + LL_WARNS() << "Cleaning up unknown audio source!" << LL_ENDL; return; } delete asp; @@ -1019,10 +1019,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid) void LLAudioEngine::startNextTransfer() { - //llinfos << "LLAudioEngine::startNextTransfer()" << llendl; + //LL_INFOS() << "LLAudioEngine::startNextTransfer()" << LL_ENDL; if (mCurrentTransfer.notNull() || getMuted()) { - //llinfos << "Transfer in progress, aborting" << llendl; + //LL_INFOS() << "Transfer in progress, aborting" << LL_ENDL; return; } @@ -1203,7 +1203,7 @@ void LLAudioEngine::startNextTransfer() if (asset_id.notNull()) { - llinfos << "Getting asset data for: " << asset_id << llendl; + LL_INFOS() << "Getting asset data for: " << asset_id << LL_ENDL; gAudiop->mCurrentTransfer = asset_id; gAudiop->mCurrentTransferTimer.reset(); gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, @@ -1211,7 +1211,7 @@ void LLAudioEngine::startNextTransfer() } else { - //llinfos << "No pending transfers?" << llendl; + //LL_INFOS() << "No pending transfers?" << LL_ENDL; } } @@ -1221,7 +1221,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E { if (result_code) { - llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; + LL_INFOS() << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL; // Need to mark data as bad to avoid constant rerequests. LLAudioData *adp = gAudiop->getAudioData(uuid); if (adp) @@ -1238,11 +1238,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E if (!adp) { // Should never happen - llwarns << "Got asset callback without audio data for " << uuid << llendl; + LL_WARNS() << "Got asset callback without audio data for " << uuid << LL_ENDL; } else { - // llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl; + // LL_INFOS() << "Got asset callback with good audio data for " << uuid << ", making decode request" << LL_ENDL; adp->setHasValidData(true); adp->setHasLocalData(true); gAudioDecodeMgrp->addDecodeRequest(uuid); @@ -1321,7 +1321,7 @@ void LLAudioSource::update() } else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done { - llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl; + LL_WARNS() << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL; mCorrupted = true ; } } @@ -1357,7 +1357,7 @@ bool LLAudioSource::setupChannel() if (!adp->getBuffer()) { // We're not ready to play back the sound yet, so don't try and allocate a channel for it. - //llwarns << "Aborting, no buffer" << llendl; + //LL_WARNS() << "Aborting, no buffer" << LL_ENDL; return false; } @@ -1375,7 +1375,7 @@ bool LLAudioSource::setupChannel() // Ugh, we don't have any free channels. // Now we have to reprioritize. // For now, just don't play the sound. - //llwarns << "Aborting, no free channels" << llendl; + //LL_WARNS() << "Aborting, no free channels" << LL_ENDL; return false; } @@ -1474,7 +1474,7 @@ bool LLAudioSource::isDone() const { // We don't have a channel assigned, and it's been // over 15 seconds since we tried to play it. Don't bother. - //llinfos << "No channel assigned, source is done" << llendl; + //LL_INFOS() << "No channel assigned, source is done" << LL_ENDL; return true; } else @@ -1640,7 +1640,7 @@ LLAudioChannel::LLAudioChannel() : LLAudioChannel::~LLAudioChannel() { // Need to disconnect any sources which are using this channel. - //llinfos << "Cleaning up audio channel" << llendl; + //LL_INFOS() << "Cleaning up audio channel" << LL_ENDL; if (mCurrentSourcep) { mCurrentSourcep->setChannel(NULL); @@ -1651,12 +1651,12 @@ LLAudioChannel::~LLAudioChannel() void LLAudioChannel::setSource(LLAudioSource *sourcep) { - //llinfos << this << ": setSource(" << sourcep << ")" << llendl; + //LL_INFOS() << this << ": setSource(" << sourcep << ")" << LL_ENDL; if (!sourcep) { // Clearing the source for this channel, don't need to do anything. - //llinfos << "Clearing source for channel" << llendl; + //LL_INFOS() << "Clearing source for channel" << LL_ENDL; cleanup(); mCurrentSourcep = NULL; mWaiting = false; @@ -1666,7 +1666,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep) if (sourcep == mCurrentSourcep) { // Don't reallocate the channel, this will make FMOD goofy. - //llinfos << "Calling setSource with same source!" << llendl; + //LL_INFOS() << "Calling setSource with same source!" << LL_ENDL; } mCurrentSourcep = sourcep; @@ -1768,7 +1768,7 @@ bool LLAudioData::load() if (mBufferp) { // We already have this sound in a buffer, don't do anything. - llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl; + LL_INFOS() << "Already have a buffer for this sound, don't bother loading!" << LL_ENDL; return true; } @@ -1776,7 +1776,7 @@ bool LLAudioData::load() if (!mBufferp) { // No free buffers, abort. - llinfos << "Not able to allocate a new audio buffer, aborting." << llendl; + LL_INFOS() << "Not able to allocate a new audio buffer, aborting." << LL_ENDL; return true; } diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index e9b74b8f41..6bbabbed5a 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -67,7 +67,7 @@ inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string) { if(result == FMOD_OK) return false; - lldebugs << string << " Error: " << FMOD_ErrorString(result) << llendl; + LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL; return true; } @@ -75,11 +75,11 @@ void* F_STDCALL decode_alloc(unsigned int size, FMOD_MEMORY_TYPE type, const cha { if(type & FMOD_MEMORY_STREAM_DECODE) { - llinfos << "Decode buffer size: " << size << llendl; + LL_INFOS() << "Decode buffer size: " << size << LL_ENDL; } else if(type & FMOD_MEMORY_STREAM_FILE) { - llinfos << "Strean buffer size: " << size << llendl; + LL_INFOS() << "Strean buffer size: " << size << LL_ENDL; } return new char[size]; } @@ -305,7 +305,7 @@ void LLAudioEngine_FMODEX::allocateListener(void) mListenerp = (LLListener *) new LLListener_FMODEX(mSystem); if (!mListenerp) { - llwarns << "Listener creation failed" << llendl; + LL_WARNS() << "Listener creation failed" << LL_ENDL; } } @@ -314,16 +314,16 @@ void LLAudioEngine_FMODEX::shutdown() { stopInternetStream(); - llinfos << "About to LLAudioEngine::shutdown()" << llendl; + LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL; LLAudioEngine::shutdown(); - llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl; + LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << LL_ENDL; if ( mSystem ) // speculative fix for MAINT-2657 { mSystem->close(); mSystem->release(); } - llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl; + LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << LL_ENDL; delete mListenerp; mListenerp = NULL; @@ -472,7 +472,7 @@ bool LLAudioChannelFMODEX::updateBuffer() { // This is bad, there should ALWAYS be a sound associated with a legit // buffer. - llerrs << "No FMOD sound!" << llendl; + LL_ERRS() << "No FMOD sound!" << LL_ENDL; return false; } @@ -485,7 +485,7 @@ bool LLAudioChannelFMODEX::updateBuffer() Check_FMOD_Error(result, "FMOD::System::playSound"); } - //llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl; + //LL_INFOS() << "Setting up channel " << std::hex << mChannelID << std::dec << LL_ENDL; } // If we have a source for the channel, we need to update its gain. @@ -502,8 +502,8 @@ bool LLAudioChannelFMODEX::updateBuffer() { S32 index; mChannelp->getIndex(&index); - llwarns << "Channel " << index << "Source ID: " << mCurrentSourcep->getID() - << " at " << mCurrentSourcep->getPositionGlobal() << llendl; + LL_WARNS() << "Channel " << index << "Source ID: " << mCurrentSourcep->getID() + << " at " << mCurrentSourcep->getPositionGlobal() << LL_ENDL; }*/ } @@ -573,11 +573,11 @@ void LLAudioChannelFMODEX::cleanup() { if (!mChannelp) { - //llinfos << "Aborting cleanup with no channel handle." << llendl; + //LL_INFOS() << "Aborting cleanup with no channel handle." << LL_ENDL; return; } - //llinfos << "Cleaning up channel: " << mChannelID << llendl; + //LL_INFOS() << "Cleaning up channel: " << mChannelID << LL_ENDL; Check_FMOD_Error(mChannelp->stop(),"FMOD::Channel::stop"); mCurrentBufferp = NULL; @@ -589,7 +589,7 @@ void LLAudioChannelFMODEX::play() { if (!mChannelp) { - llwarns << "Playing without a channel handle, aborting" << llendl; + LL_WARNS() << "Playing without a channel handle, aborting" << LL_ENDL; return; } @@ -697,7 +697,7 @@ bool LLAudioBufferFMODEX::loadWAV(const std::string& filename) if (result != FMOD_OK) { // We failed to load the file for some reason. - llwarns << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << llendl; + LL_WARNS() << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << LL_ENDL; // // If we EVER want to load wav files provided by end users, we need diff --git a/indra/llaudio/llstreamingaudio_fmodex.cpp b/indra/llaudio/llstreamingaudio_fmodex.cpp index 42f30aa1c4..9c9e85c00c 100644 --- a/indra/llaudio/llstreamingaudio_fmodex.cpp +++ b/indra/llaudio/llstreamingaudio_fmodex.cpp @@ -91,7 +91,7 @@ void LLStreamingAudio_FMODEX::start(const std::string& url) { //if (!mInited) //{ - // llwarns << "startInternetStream before audio initialized" << llendl; + // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL; // return; //} @@ -100,13 +100,13 @@ void LLStreamingAudio_FMODEX::start(const std::string& url) if (!url.empty()) { - llinfos << "Starting internet stream: " << url << llendl; + LL_INFOS() << "Starting internet stream: " << url << LL_ENDL; mCurrentInternetStreamp = new LLAudioStreamManagerFMODEX(mSystem,url); mURL = url; } else { - llinfos << "Set internet stream to null" << llendl; + LL_INFOS() << "Set internet stream to null" << LL_ENDL; mURL.clear(); } } @@ -121,7 +121,7 @@ void LLStreamingAudio_FMODEX::update() LLAudioStreamManagerFMODEX *streamp = *iter; if (streamp->stopStream()) { - llinfos << "Closed dead stream" << llendl; + LL_INFOS() << "Closed dead stream" << LL_ENDL; delete streamp; mDeadStreams.erase(iter++); } @@ -181,7 +181,7 @@ void LLStreamingAudio_FMODEX::update() { if (!strcmp(tag.name, "Sample Rate Change")) { - llinfos << "Stream forced changing sample rate to " << *((float *)tag.data) << llendl; + LL_INFOS() << "Stream forced changing sample rate to " << *((float *)tag.data) << LL_ENDL; mFMODInternetStreamChannelp->setFrequency(*((float *)tag.data)); } continue; @@ -195,9 +195,9 @@ void LLStreamingAudio_FMODEX::update() mFMODInternetStreamChannelp->getPaused(&paused); if(!paused) { - llinfos << "Stream starvation detected! Pausing stream until buffer nearly full." << llendl; - llinfos << " (diskbusy="<setPaused(true); } } @@ -220,14 +220,14 @@ void LLStreamingAudio_FMODEX::stop() if (mCurrentInternetStreamp) { - llinfos << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << llendl; + LL_INFOS() << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << LL_ENDL; if (mCurrentInternetStreamp->stopStream()) { delete mCurrentInternetStreamp; } else { - llwarns << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << llendl; + LL_WARNS() << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << LL_ENDL; mDeadStreams.push_back(mCurrentInternetStreamp); } mCurrentInternetStreamp = NULL; @@ -314,9 +314,9 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con if (result!= FMOD_OK) { - llwarns << "Couldn't open fmod stream, error " + LL_WARNS() << "Couldn't open fmod stream, error " << FMOD_ErrorString(result) - << llendl; + << LL_ENDL; mReady = false; return; } @@ -329,7 +329,7 @@ FMOD::Channel *LLAudioStreamManagerFMODEX::startStream() // We need a live and opened stream before we try and play it. if (!mInternetStream || getOpenState() != FMOD_OPENSTATE_READY) { - llwarns << "No internet stream to start playing!" << llendl; + LL_WARNS() << "No internet stream to start playing!" << LL_ENDL; return NULL; } diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index dfd5da12b3..2e1ed9b505 100755 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -127,7 +127,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro return(LLVORBISENC_CHUNK_SIZE_ERR); } -// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl; +// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL; if (!(strncmp((char *)&(wav_header[0]),"fmt ",4))) { @@ -224,7 +224,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname std::string error_msg; if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg))) { - llwarns << error_msg << ": " << in_fname << llendl; + LL_WARNS() << error_msg << ": " << in_fname << LL_ENDL; return(format_error); } @@ -237,8 +237,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname infile.open(in_fname,LL_APR_RB); if (!infile.getFileHandle()) { - llwarns << "Couldn't open temporary ogg file for writing: " << in_fname - << llendl; + LL_WARNS() << "Couldn't open temporary ogg file for writing: " << in_fname + << LL_ENDL; return(LLVORBISENC_SOURCE_OPEN_ERR); } @@ -246,8 +246,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname outfile.open(out_fname,LL_APR_WPB); if (!outfile.getFileHandle()) { - llwarns << "Couldn't open upload sound file for reading: " << in_fname - << llendl; + LL_WARNS() << "Couldn't open upload sound file for reading: " << in_fname + << LL_ENDL; return(LLVORBISENC_DEST_OPEN_ERR); } @@ -265,7 +265,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname + ((U32) wav_header[5] << 8) + wav_header[4]; -// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl; +// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL; if (!(strncmp((char *)&(wav_header[0]),"fmt ",4))) { @@ -308,8 +308,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname // vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) || // vorbis_encode_setup_init(&vi)) { - llwarns << "unable to initialize vorbis codec at quality " << quality << llendl; - // llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl; + LL_WARNS() << "unable to initialize vorbis codec at quality " << quality << LL_ENDL; + // LL_WARNS() << "unable to initialize vorbis codec at bitrate " << bitrate << LL_ENDL; return(LLVORBISENC_DEST_OPEN_ERR); } @@ -498,7 +498,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname libvorbis. They're never freed or manipulated directly */ // fprintf(stderr,"Vorbis encoding: Done.\n"); - llinfos << "Vorbis encoding: Done." << llendl; + LL_INFOS() << "Vorbis encoding: Done." << LL_ENDL; #endif return(LLVORBISENC_NOERR); diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 2a0df26384..8ecd7d1090 100755 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -130,14 +130,14 @@ LLQuaternion::Order bvhStringToOrder( char *str ) if (mStatus == LLBVHLoader::ST_NO_XLT_FILE) { - llwarns << "NOTE: No translation table found." << llendl; + LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; return; } else { if (mStatus != LLBVHLoader::ST_OK) { - llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; return; } } @@ -147,7 +147,7 @@ LLQuaternion::Order bvhStringToOrder( char *str ) mStatus = loadBVHFile(buffer, error_text, error_line); if (mStatus != LLBVHLoader::ST_OK) { - llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; return; } @@ -163,10 +163,10 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error errorLine = 0; mStatus = loadTranslationTable("anim.ini"); loadStatus = mStatus; - llinfos<<"Load Status 00 : "<< loadStatus << llendl; + LL_INFOS()<<"Load Status 00 : "<< loadStatus << LL_ENDL; if (mStatus == E_ST_NO_XLT_FILE) { - //llwarns << "NOTE: No translation table found." << llendl; + //LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; loadStatus = mStatus; return; } @@ -174,7 +174,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error { if (mStatus != E_ST_OK) { - //llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + //LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; errorLine = getLineNumber(); loadStatus = mStatus; return; @@ -187,7 +187,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error if (mStatus != E_ST_OK) { - //llwarns << "ERROR: [line: " << getLineNumber() << "] " << mStatus << llendl; + //LL_WARNS() << "ERROR: [line: " << getLineNumber() << "] " << mStatus << LL_ENDL; loadStatus = mStatus; errorLine = getLineNumber(); return; @@ -225,7 +225,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) if (!fp) return E_ST_NO_XLT_FILE; - llinfos << "NOTE: Loading translation table: " << fileName << llendl; + LL_INFOS() << "NOTE: Loading translation table: " << fileName << LL_ENDL; //-------------------------------------------------------------------- // register file to be closed on function exit @@ -289,7 +289,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) return E_ST_NO_XLT_EMOTE; mEmoteName.assign( emote_str ); -// llinfos << "NOTE: Emote: " << mEmoteName.c_str() << llendl; +// LL_INFOS() << "NOTE: Emote: " << mEmoteName.c_str() << LL_ENDL; continue; } @@ -304,7 +304,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) return E_ST_NO_XLT_PRIORITY; mPriority = priority; -// llinfos << "NOTE: Priority: " << mPriority << llendl; +// LL_INFOS() << "NOTE: Priority: " << mPriority << LL_ENDL; continue; } @@ -697,7 +697,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & if ( !strstr(line.c_str(), "HIERARCHY") ) { -// llinfos << line << llendl; +// LL_INFOS() << line << LL_ENDL; return E_ST_NO_HIER; } @@ -1044,7 +1044,7 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( trans.mIgnore ) { - //llinfos << "NOTE: Ignoring " << joint->mName.c_str() << llendl; + //LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL; joint->mIgnore = TRUE; continue; } @@ -1054,7 +1054,7 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mOutName.empty() ) { - //llinfos << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << llendl; + //LL_INFOS() << "NOTE: Changing " << joint->mName.c_str() << " to " << trans.mOutName.c_str() << LL_ENDL; joint->mOutName = trans.mOutName; } @@ -1071,25 +1071,25 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( trans.mRelativePositionKey ) { -// llinfos << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << llendl; +// LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL; joint->mRelativePositionKey = TRUE; } if ( trans.mRelativeRotationKey ) { -// llinfos << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << llendl; +// LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL; joint->mRelativeRotationKey = TRUE; } if ( trans.mRelativePosition.magVec() > 0.0f ) { joint->mRelativePosition = trans.mRelativePosition; -// llinfos << "NOTE: Removing " << +// LL_INFOS() << "NOTE: Removing " << // joint->mRelativePosition.mV[0] << " " << // joint->mRelativePosition.mV[1] << " " << // joint->mRelativePosition.mV[2] << // " from all position keys in " << -// joint->mOutName.c_str() << llendl; +// joint->mOutName.c_str() << LL_ENDL; } //---------------------------------------------------------------- @@ -1103,9 +1103,9 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mMergeParentName.empty() ) { -// llinfos << "NOTE: Merging " << joint->mOutName.c_str() << +// LL_INFOS() << "NOTE: Merging " << joint->mOutName.c_str() << // " with parent " << -// trans.mMergeParentName.c_str() << llendl; +// trans.mMergeParentName.c_str() << LL_ENDL; joint->mMergeParentName = trans.mMergeParentName; } @@ -1114,8 +1114,8 @@ void LLBVHLoader::applyTranslations() //---------------------------------------------------------------- if ( ! trans.mMergeChildName.empty() ) { -// llinfos << "NOTE: Merging " << joint->mName.c_str() << -// " with child " << trans.mMergeChildName.c_str() << llendl; +// LL_INFOS() << "NOTE: Merging " << joint->mName.c_str() << +// " with child " << trans.mMergeChildName.c_str() << LL_ENDL; joint->mMergeChildName = trans.mMergeChildName; } @@ -1310,7 +1310,7 @@ void LLBVHLoader::optimize() // don't output joints with no motion if (!(pos_changed || rot_changed)) { - //llinfos << "Ignoring joint " << joint->mName << llendl; + //LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL; joint->mIgnore = TRUE; } } diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 045b4abf50..0eed3356e4 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -106,7 +106,7 @@ LLJoint *LLCharacter::getJoint( const std::string &name ) if (!joint) { - llwarns << "Failed to find joint." << llendl; + LL_WARNS() << "Failed to find joint." << LL_ENDL; } return joint; } @@ -181,7 +181,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id) //----------------------------------------------------------------------------- void LLCharacter::requestStopMotion( LLMotion* motion) { -// llinfos << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << llendl; +// LL_INFOS() << "DEBUG: Char::onDeactivateMotion( " << motionName << " )" << LL_ENDL; } @@ -242,14 +242,14 @@ void LLCharacter::dumpCharacter( LLJoint* joint ) // handle top level entry into recursion if (joint == NULL) { - llinfos << "DEBUG: Dumping Character @" << this << llendl; + LL_INFOS() << "DEBUG: Dumping Character @" << this << LL_ENDL; dumpCharacter( getRootJoint() ); - llinfos << "DEBUG: Done." << llendl; + LL_INFOS() << "DEBUG: Done." << LL_ENDL; return; } // print joint info - llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl; + LL_INFOS() << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << LL_ENDL; // recurse for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin(); @@ -313,7 +313,7 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL name_iter->second->setWeight(weight, upload_bake); return TRUE; } - llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; return FALSE; } @@ -328,7 +328,7 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake) index_iter->second->setWeight(weight, upload_bake); return TRUE; } - llwarns << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << llendl; + LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL; return FALSE; } @@ -345,7 +345,7 @@ F32 LLCharacter::getVisualParamWeight(LLVisualParam *which_param) } else { - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter*, index= " << index << LL_ENDL; return 0.f; } } @@ -363,7 +363,7 @@ F32 LLCharacter::getVisualParamWeight(const char* param_name) { return name_iter->second->getWeight(); } - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL; return 0.f; } @@ -379,7 +379,7 @@ F32 LLCharacter::getVisualParamWeight(S32 index) } else { - llwarns << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << llendl; + LL_WARNS() << "LLCharacter::getVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL; return 0.f; } } @@ -413,7 +413,7 @@ LLVisualParam* LLCharacter::getVisualParam(const char *param_name) { return name_iter->second; } - llwarns << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << llendl; + LL_WARNS() << "LLCharacter::getVisualParam() Invalid visual parameter: " << param_name << LL_ENDL; return NULL; } @@ -438,8 +438,8 @@ void LLCharacter::addSharedVisualParam(LLVisualParam *param) } else { - llwarns << "Shared visual parameter " << param->getName() << " does not already exist with ID " << - param->getID() << llendl; + LL_WARNS() << "Shared visual parameter " << param->getName() << " does not already exist with ID " << + param->getID() << LL_ENDL; } } @@ -454,8 +454,8 @@ void LLCharacter::addVisualParam(LLVisualParam *param) idxres = mVisualParamIndexMap.insert(visual_param_index_map_t::value_type(index, param)); if (!idxres.second) { - llwarns << "Visual parameter " << param->getName() << " already exists with same ID as " << - param->getName() << llendl; + LL_WARNS() << "Visual parameter " << param->getName() << " already exists with same ID as " << + param->getName() << LL_ENDL; visual_param_index_map_t::iterator index_iter = idxres.first; index_iter->second = param; } @@ -475,7 +475,7 @@ void LLCharacter::addVisualParam(LLVisualParam *param) name_iter->second = param; } } - //llinfos << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << llendl; + //LL_INFOS() << "Adding Visual Param '" << param->getName() << "' ( " << index << " )" << LL_ENDL; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index ff7ad1c289..86ed5e9e0d 100755 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -89,7 +89,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte !mCharacter->getJoint("mElbowLeft") || !mCharacter->getJoint("mWristLeft")) { - llwarns << "Invalid skeleton for editing motion!" << llendl; + LL_WARNS() << "Invalid skeleton for editing motion!" << LL_ENDL; return STATUS_FAILURE; } @@ -102,7 +102,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte if ( ! mParentState->getJoint() ) { - llinfos << getName() << ": Can't get parent joint." << llendl; + LL_INFOS() << getName() << ": Can't get parent joint." << LL_ENDL; return STATUS_FAILURE; } @@ -215,14 +215,14 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) if (!target.isFinite()) { // Don't error out here, set a fail-safe target vector - llwarns << "Non finite target in editing motion with target distance of " << target_dist << - " and focus point " << focus_pt << llendl; + LL_WARNS() << "Non finite target in editing motion with target distance of " << target_dist << + " and focus point " << focus_pt << LL_ENDL; target.setVec(1.f, 1.f, 1.f); } mTarget.setPosition( target + mParentJoint.getPosition()); -// llinfos << "Point At: " << mTarget.getPosition() << llendl; +// LL_INFOS() << "Point At: " << mTarget.getPosition() << LL_ENDL; // update the ikSolver if (!mTarget.getPosition().isExactlyZero()) diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index aeb65eb10f..1549c41e62 100755 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -93,14 +93,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs) BOOL LLGesture::trigger(KEY key, MASK mask) { - llwarns << "Parent class trigger called: you probably didn't mean this." << llendl; + LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return FALSE; } BOOL LLGesture::trigger(const std::string& trigger_string) { - llwarns << "Parent class trigger called: you probably didn't mean this." << llendl; + LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return FALSE; } @@ -130,7 +130,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size) if (tmp + sizeof(mKey) + sizeof(mMask) + 16 > buffer + max_size) { - llwarns << "Attempt to read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Attempt to read past end of buffer, bad data!!!!" << LL_ENDL; return buffer; } @@ -155,7 +155,7 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size) if (tmp > buffer + max_size) { - llwarns << "Read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Read past end of buffer, bad data!!!!" << LL_ENDL; return tmp; } @@ -273,7 +273,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask) } else { - llwarns << "NULL gesture in gesture list (" << i << ")" << llendl; + LL_WARNS() << "NULL gesture in gesture list (" << i << ")" << LL_ENDL; } } return FALSE; @@ -306,7 +306,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) if (tmp + sizeof(count) > buffer + max_size) { - llwarns << "Invalid max_size" << llendl; + LL_WARNS() << "Invalid max_size" << LL_ENDL; return buffer; } @@ -314,7 +314,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) if (count > MAX_GESTURES) { - llwarns << "Unreasonably large gesture list count in deserialize: " << count << llendl; + LL_WARNS() << "Unreasonably large gesture list count in deserialize: " << count << LL_ENDL; return tmp; } @@ -327,7 +327,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size) mList[i] = create_gesture(&tmp, max_size - (S32)(tmp - buffer)); if (tmp - buffer > max_size) { - llwarns << "Deserialization read past end of buffer, bad data!!!!" << llendl; + LL_WARNS() << "Deserialization read past end of buffer, bad data!!!!" << LL_ENDL; return tmp; } } diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index 696dba0d95..b3bf5a9a91 100755 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp @@ -192,7 +192,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) } else { - llwarns << "Requested hand pose out of range. Ignoring requested pose." << llendl; + LL_WARNS() << "Requested hand pose out of range. Ignoring requested pose." << LL_ENDL; } } @@ -200,7 +200,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) mCharacter->removeAnimationData("Hand Pose Priority"); // if (requestedHandPose) -// llinfos << "Hand Pose " << *requestedHandPose << llendl; +// LL_INFOS() << "Hand Pose " << *requestedHandPose << LL_ENDL; // if we are still blending... if (mCurrentPose != mNewPose) diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 4a8af2f00c..83c0b0aff4 100755 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -104,49 +104,49 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte mPelvisJoint = character->getJoint("mPelvis"); if ( ! mPelvisJoint ) { - llinfos << getName() << ": Can't get pelvis joint." << llendl; + LL_INFOS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } mRootJoint = character->getJoint("mRoot"); if ( ! mRootJoint ) { - llinfos << getName() << ": Can't get root joint." << llendl; + LL_INFOS() << getName() << ": Can't get root joint." << LL_ENDL; return STATUS_FAILURE; } mTorsoJoint = character->getJoint("mTorso"); if ( ! mTorsoJoint ) { - llinfos << getName() << ": Can't get torso joint." << llendl; + LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL; return STATUS_FAILURE; } mHeadJoint = character->getJoint("mHead"); if ( ! mHeadJoint ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } mTorsoState->setJoint( character->getJoint("mTorso") ); if ( ! mTorsoState->getJoint() ) { - llinfos << getName() << ": Can't get torso joint." << llendl; + LL_INFOS() << getName() << ": Can't get torso joint." << LL_ENDL; return STATUS_FAILURE; } mNeckState->setJoint( character->getJoint("mNeck") ); if ( ! mNeckState->getJoint() ) { - llinfos << getName() << ": Can't get neck joint." << llendl; + LL_INFOS() << getName() << ": Can't get neck joint." << LL_ENDL; return STATUS_FAILURE; } mHeadState->setJoint( character->getJoint("mHead") ); if ( ! mHeadState->getJoint() ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } @@ -191,7 +191,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) { LLVector3 headLookAt = *targetPos; -// llinfos << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << llendl; +// LL_INFOS() << "Look At: " << headLookAt + mHeadJoint->getWorldPosition() << LL_ENDL; F32 lookatDistance = headLookAt.normVec(); @@ -310,21 +310,21 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character) mHeadJoint = character->getJoint("mHead"); if ( ! mHeadJoint ) { - llinfos << getName() << ": Can't get head joint." << llendl; + LL_INFOS() << getName() << ": Can't get head joint." << LL_ENDL; return STATUS_FAILURE; } mLeftEyeState->setJoint( character->getJoint("mEyeLeft") ); if ( ! mLeftEyeState->getJoint() ) { - llinfos << getName() << ": Can't get left eyeball joint." << llendl; + LL_INFOS() << getName() << ": Can't get left eyeball joint." << LL_ENDL; return STATUS_FAILURE; } mRightEyeState->setJoint( character->getJoint("mEyeRight") ); if ( ! mRightEyeState->getJoint() ) { - llinfos << getName() << ": Can't get Right eyeball joint." << llendl; + LL_INFOS() << getName() << ": Can't get Right eyeball joint." << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 83bd62e8fa..1492cc172c 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -438,7 +438,7 @@ const LLMatrix4 &LLJoint::getWorldMatrix() //-------------------------------------------------------------------- void LLJoint::setWorldMatrix( const LLMatrix4& mat ) { -llinfos << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << llendl; +LL_INFOS() << "WARNING: LLJoint::setWorldMatrix() not correctly implemented yet" << LL_ENDL; // extract global translation LLVector3 trans( mat.mMatrix[VW][VX], mat.mMatrix[VW][VY], diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 1352c9d592..aa1ef68910 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -92,30 +92,30 @@ U32 LLKeyframeMotion::JointMotionList::dumpDiagInfo() { LLKeyframeMotion::JointMotion* joint_motion_p = mJointMotionArray[i]; - llinfos << "\tJoint " << joint_motion_p->mJointName << llendl; + LL_INFOS() << "\tJoint " << joint_motion_p->mJointName << LL_ENDL; if (joint_motion_p->mUsage & LLJointState::SCALE) { - llinfos << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at " - << joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mScaleCurve.mNumKeys << " scale keys at " + << joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mScaleCurve.mNumKeys * sizeof(ScaleKey); } if (joint_motion_p->mUsage & LLJointState::ROT) { - llinfos << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at " - << joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mRotationCurve.mNumKeys << " rotation keys at " + << joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mRotationCurve.mNumKeys * sizeof(RotationKey); } if (joint_motion_p->mUsage & LLJointState::POS) { - llinfos << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at " - << joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << llendl; + LL_INFOS() << "\t" << joint_motion_p->mPositionCurve.mNumKeys << " position keys at " + << joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey) << " bytes" << LL_ENDL; total_size += joint_motion_p->mPositionCurve.mNumKeys * sizeof(PositionKey); } } - llinfos << "Size: " << total_size << " bytes" << llendl; + LL_INFOS() << "Size: " << total_size << " bytes" << LL_ENDL; return total_size; } @@ -557,7 +557,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact if (!sVFS) { - llerrs << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << llendl; + LL_ERRS() << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << LL_ENDL; } BOOL success = FALSE; @@ -583,18 +583,18 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact if (!success) { - llwarns << "Can't open animation file " << mID << llendl; + LL_WARNS() << "Can't open animation file " << mID << LL_ENDL; mAssetStatus = ASSET_FETCH_FAILED; return STATUS_FAILURE; } - lldebugs << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << llendl; + LL_DEBUGS() << "Loading keyframe data for: " << getName() << ":" << getID() << " (" << anim_file_size << " bytes)" << LL_ENDL; LLDataPackerBinaryBuffer dp(anim_data, anim_file_size); if (!deserialize(dp)) { - llwarns << "Failed to decode asset for animation " << getName() << ":" << getID() << llendl; + LL_WARNS() << "Failed to decode asset for animation " << getName() << ":" << getID() << LL_ENDL; mAssetStatus = ASSET_FETCH_FAILED; return STATUS_FAILURE; } @@ -980,7 +980,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 { case CONSTRAINT_TARGET_TYPE_GROUND: target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos); -// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; case CONSTRAINT_TARGET_TYPE_BODY: target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset); @@ -1082,7 +1082,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // convert intermediate joint positions to world coordinates positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition(); F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f); -// llinfos << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; positions[joint_num] = lerp(positions[joint_num], kinematic_position, LLSmoothInterpolation::getInterpolant(time_constant, FALSE)); } @@ -1113,8 +1113,8 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 if ((iteration_count >= MIN_ITERATION_COUNT) && (num_joints_finished == shared_data->mChainLength - 1)) { -// llinfos << iteration_count << " iterations on " << -// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; +// LL_INFOS() << iteration_count << " iterations on " << +// mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; } } @@ -1230,13 +1230,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU16(version, "version")) { - llwarns << "can't read version number" << llendl; + LL_WARNS() << "can't read version number" << LL_ENDL; return FALSE; } if (!dp.unpackU16(sub_version, "sub_version")) { - llwarns << "can't read sub version number" << llendl; + LL_WARNS() << "can't read sub version number" << LL_ENDL; return FALSE; } @@ -1247,16 +1247,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION) { #if LL_RELEASE - llwarns << "Bad animation version " << version << "." << sub_version << llendl; + LL_WARNS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; return FALSE; #else - llerrs << "Bad animation version " << version << "." << sub_version << llendl; + LL_ERRS() << "Bad animation version " << version << "." << sub_version << LL_ENDL; #endif } if (!dp.unpackS32(temp_priority, "base_priority")) { - llwarns << "can't read animation base_priority" << llendl; + LL_WARNS() << "can't read animation base_priority" << LL_ENDL; return FALSE; } mJointMotionList->mBasePriority = (LLJoint::JointPriority) temp_priority; @@ -1268,7 +1268,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY) { - llwarns << "bad animation base_priority " << mJointMotionList->mBasePriority << llendl; + LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority << LL_ENDL; return FALSE; } @@ -1277,14 +1277,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackF32(mJointMotionList->mDuration, "duration")) { - llwarns << "can't read duration" << llendl; + LL_WARNS() << "can't read duration" << LL_ENDL; return FALSE; } if (mJointMotionList->mDuration > MAX_ANIM_DURATION || !llfinite(mJointMotionList->mDuration)) { - llwarns << "invalid animation duration" << llendl; + LL_WARNS() << "invalid animation duration" << LL_ENDL; return FALSE; } @@ -1293,13 +1293,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name")) { - llwarns << "can't read optional_emote_animation" << llendl; + LL_WARNS() << "can't read optional_emote_animation" << LL_ENDL; return FALSE; } if(mJointMotionList->mEmoteName==mID.asString()) { - llwarns << "Malformed animation mEmoteName==mID" << llendl; + LL_WARNS() << "Malformed animation mEmoteName==mID" << LL_ENDL; return FALSE; } @@ -1309,20 +1309,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mLoopInPoint, "loop_in_point") || !llfinite(mJointMotionList->mLoopInPoint)) { - llwarns << "can't read loop point" << llendl; + LL_WARNS() << "can't read loop point" << LL_ENDL; return FALSE; } if (!dp.unpackF32(mJointMotionList->mLoopOutPoint, "loop_out_point") || !llfinite(mJointMotionList->mLoopOutPoint)) { - llwarns << "can't read loop point" << llendl; + LL_WARNS() << "can't read loop point" << LL_ENDL; return FALSE; } if (!dp.unpackS32(mJointMotionList->mLoop, "loop")) { - llwarns << "can't read loop" << llendl; + LL_WARNS() << "can't read loop" << LL_ENDL; return FALSE; } @@ -1332,14 +1332,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(mJointMotionList->mEaseInDuration, "ease_in_duration") || !llfinite(mJointMotionList->mEaseInDuration)) { - llwarns << "can't read easeIn" << llendl; + LL_WARNS() << "can't read easeIn" << LL_ENDL; return FALSE; } if (!dp.unpackF32(mJointMotionList->mEaseOutDuration, "ease_out_duration") || !llfinite(mJointMotionList->mEaseOutDuration)) { - llwarns << "can't read easeOut" << llendl; + LL_WARNS() << "can't read easeOut" << LL_ENDL; return FALSE; } @@ -1349,13 +1349,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 word; if (!dp.unpackU32(word, "hand_pose")) { - llwarns << "can't read hand pose" << llendl; + LL_WARNS() << "can't read hand pose" << LL_ENDL; return FALSE; } if(word > LLHandMotion::NUM_HAND_POSES) { - llwarns << "invalid LLHandMotion::eHandPose index: " << word << llendl; + LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << LL_ENDL; return FALSE; } @@ -1367,18 +1367,18 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U32 num_motions = 0; if (!dp.unpackU32(num_motions, "num_joints")) { - llwarns << "can't read number of joints" << llendl; + LL_WARNS() << "can't read number of joints" << LL_ENDL; return FALSE; } if (num_motions == 0) { - llwarns << "no joints in animation" << llendl; + LL_WARNS() << "no joints in animation" << LL_ENDL; return FALSE; } else if (num_motions > LL_CHARACTER_MAX_JOINTS) { - llwarns << "too many joints in animation" << llendl; + LL_WARNS() << "too many joints in animation" << LL_ENDL; return FALSE; } @@ -1399,13 +1399,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) std::string joint_name; if (!dp.unpackString(joint_name, "joint_name")) { - llwarns << "can't read joint name" << llendl; + LL_WARNS() << "can't read joint name" << LL_ENDL; return FALSE; } if (joint_name == "mScreen" || joint_name == "mRoot") { - llwarns << "attempted to animate special " << joint_name << " joint" << llendl; + LL_WARNS() << "attempted to animate special " << joint_name << " joint" << LL_ENDL; return FALSE; } @@ -1415,11 +1415,11 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) LLJoint *joint = mCharacter->getJoint( joint_name ); if (joint) { -// llinfos << " joint: " << joint_name << llendl; +// LL_INFOS() << " joint: " << joint_name << LL_ENDL; } else { - llwarns << "joint not found: " << joint_name << llendl; + LL_WARNS() << "joint not found: " << joint_name << LL_ENDL; //return FALSE; } @@ -1436,13 +1436,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 joint_priority; if (!dp.unpackS32(joint_priority, "joint_priority")) { - llwarns << "can't read joint priority." << llendl; + LL_WARNS() << "can't read joint priority." << LL_ENDL; return FALSE; } if (joint_priority < LLJoint::USE_MOTION_PRIORITY) { - llwarns << "joint priority unknown - too low." << llendl; + LL_WARNS() << "joint priority unknown - too low." << LL_ENDL; return FALSE; } @@ -1460,7 +1460,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys") || joint_motion->mRotationCurve.mNumKeys < 0) { - llwarns << "can't read number of rotation keys" << llendl; + LL_WARNS() << "can't read number of rotation keys" << LL_ENDL; return FALSE; } @@ -1485,7 +1485,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(time, "time") || !llfinite(time)) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1494,7 +1494,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1502,7 +1502,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (time < 0 || time > mJointMotionList->mDuration) { - llwarns << "invalid frame time" << llendl; + LL_WARNS() << "invalid frame time" << LL_ENDL; return FALSE; } } @@ -1536,13 +1536,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(rot_key.mRotation.isFinite()) ) { - llwarns << "non-finite angle in rotation key" << llendl; + LL_WARNS() << "non-finite angle in rotation key" << LL_ENDL; success = FALSE; } if (!success) { - llwarns << "can't read rotation key (" << k << ")" << llendl; + LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1554,7 +1554,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys") || joint_motion->mPositionCurve.mNumKeys < 0) { - llwarns << "can't read number of position keys" << llendl; + LL_WARNS() << "can't read number of position keys" << LL_ENDL; return FALSE; } @@ -1579,7 +1579,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(pos_key.mTime, "time") || !llfinite(pos_key.mTime)) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } } @@ -1587,7 +1587,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { if (!dp.unpackU16(time_short, "time")) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1615,13 +1615,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if( !(pos_key.mPosition.isFinite()) ) { - llwarns << "non-finite position in key" << llendl; + LL_WARNS() << "non-finite position in key" << LL_ENDL; success = FALSE; } if (!success) { - llwarns << "can't read position key (" << k << ")" << llendl; + LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL; return FALSE; } @@ -1642,13 +1642,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) S32 num_constraints = 0; if (!dp.unpackS32(num_constraints, "num_constraints")) { - llwarns << "can't read number of constraints" << llendl; + LL_WARNS() << "can't read number of constraints" << LL_ENDL; return FALSE; } if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0) { - llwarns << "Bad number of constraints... ignoring: " << num_constraints << llendl; + LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints << LL_ENDL; } else { @@ -1664,7 +1664,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackU8(byte, "chain_length")) { - llwarns << "can't read constraint chain length" << llendl; + LL_WARNS() << "can't read constraint chain length" << LL_ENDL; delete constraintp; return FALSE; } @@ -1672,21 +1672,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions()) { - llwarns << "invalid constraint chain length" << llendl; + LL_WARNS() << "invalid constraint chain length" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackU8(byte, "constraint_type")) { - llwarns << "can't read constraint type" << llendl; + LL_WARNS() << "can't read constraint type" << LL_ENDL; delete constraintp; return FALSE; } if( byte >= NUM_CONSTRAINT_TYPES ) { - llwarns << "invalid constraint type" << llendl; + LL_WARNS() << "invalid constraint type" << LL_ENDL; delete constraintp; return FALSE; } @@ -1696,7 +1696,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) U8 bin_data[BIN_DATA_LENGTH+1]; if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "source_volume")) { - llwarns << "can't read source volume name" << llendl; + LL_WARNS() << "can't read source volume name" << LL_ENDL; delete constraintp; return FALSE; } @@ -1707,21 +1707,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) { - llwarns << "can't read constraint source offset" << llendl; + LL_WARNS() << "can't read constraint source offset" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mSourceConstraintOffset.isFinite()) ) { - llwarns << "non-finite constraint source offset" << llendl; + LL_WARNS() << "non-finite constraint source offset" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) { - llwarns << "can't read target volume name" << llendl; + LL_WARNS() << "can't read target volume name" << LL_ENDL; delete constraintp; return FALSE; } @@ -1741,28 +1741,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset")) { - llwarns << "can't read constraint target offset" << llendl; + LL_WARNS() << "can't read constraint target offset" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mTargetConstraintOffset.isFinite()) ) { - llwarns << "non-finite constraint target offset" << llendl; + LL_WARNS() << "non-finite constraint target offset" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) { - llwarns << "can't read constraint target direction" << llendl; + LL_WARNS() << "can't read constraint target direction" << LL_ENDL; delete constraintp; return FALSE; } if( !(constraintp->mTargetConstraintDir.isFinite()) ) { - llwarns << "non-finite constraint target direction" << llendl; + LL_WARNS() << "non-finite constraint target direction" << LL_ENDL; delete constraintp; return FALSE; } @@ -1775,28 +1775,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if (!dp.unpackF32(constraintp->mEaseInStartTime, "ease_in_start") || !llfinite(constraintp->mEaseInStartTime)) { - llwarns << "can't read constraint ease in start time" << llendl; + LL_WARNS() << "can't read constraint ease in start time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime)) { - llwarns << "can't read constraint ease in stop time" << llendl; + LL_WARNS() << "can't read constraint ease in stop time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime)) { - llwarns << "can't read constraint ease out start time" << llendl; + LL_WARNS() << "can't read constraint ease out start time" << LL_ENDL; delete constraintp; return FALSE; } if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime)) { - llwarns << "can't read constraint ease out stop time" << llendl; + LL_WARNS() << "can't read constraint ease out stop time" << LL_ENDL; delete constraintp; return FALSE; } @@ -1816,8 +1816,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) LLJoint* parent = joint->getParent(); if (!parent) { - llwarns << "Joint with no parent: " << joint->getName() - << " Emote: " << mJointMotionList->mEmoteName << llendl; + LL_WARNS() << "Joint with no parent: " << joint->getName() + << " Emote: " << mJointMotionList->mEmoteName << LL_ENDL; return FALSE; } joint = parent; @@ -1828,7 +1828,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) if ( !constraint_joint ) { - llwarns << "Invalid joint " << j << llendl; + LL_WARNS() << "Invalid joint " << j << LL_ENDL; return FALSE; } @@ -1840,7 +1840,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } if (constraintp->mJointStateIndices[i] < 0 ) { - llwarns << "No joint index for constraint " << i << llendl; + LL_WARNS() << "No joint index for constraint " << i << LL_ENDL; delete constraintp; return FALSE; } @@ -2161,7 +2161,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, U8* buffer = new U8[size]; file.read((U8*)buffer, size); /*Flawfinder: ignore*/ - lldebugs << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << llendl; + LL_DEBUGS() << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL; LLDataPackerBinaryBuffer dp(buffer, size); if (motionp->deserialize(dp)) @@ -2170,7 +2170,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl; + LL_WARNS() << "Failed to decode asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL; motionp->mAssetStatus = ASSET_FETCH_FAILED; } @@ -2178,13 +2178,13 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << llendl; + LL_WARNS() << "Failed to load asset for animation " << motionp->getName() << ":" << motionp->getID() << LL_ENDL; motionp->mAssetStatus = ASSET_FETCH_FAILED; } } else { - llwarns << "No existing motion for asset data. UUID: " << asset_uuid << llendl; + LL_WARNS() << "No existing motion for asset data. UUID: " << asset_uuid << LL_ENDL; } } @@ -2198,9 +2198,9 @@ void LLKeyframeDataCache::dumpDiagInfo() char buf[1024]; /* Flawfinder: ignore */ - llinfos << "-----------------------------------------------------" << llendl; - llinfos << " Global Motion Table (DEBUG only)" << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; + LL_INFOS() << " Global Motion Table (DEBUG only)" << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage for (keyframe_data_map_t::iterator map_it = sKeyframeDataMap.begin(); @@ -2210,18 +2210,18 @@ void LLKeyframeDataCache::dumpDiagInfo() LLKeyframeMotion::JointMotionList *motion_list_p = map_it->second; - llinfos << "Motion: " << map_it->first << llendl; + LL_INFOS() << "Motion: " << map_it->first << LL_ENDL; joint_motion_kb = motion_list_p->dumpDiagInfo(); total_size += joint_motion_kb; } - llinfos << "-----------------------------------------------------" << llendl; - llinfos << "Motions\tTotal Size" << llendl; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; + LL_INFOS() << "Motions\tTotal Size" << LL_ENDL; snprintf(buf, sizeof(buf), "%d\t\t%d bytes", (S32)sKeyframeDataMap.size(), total_size ); /* Flawfinder: ignore */ - llinfos << buf << llendl; - llinfos << "-----------------------------------------------------" << llendl; + LL_INFOS() << buf << LL_ENDL; + LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; } diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index 82fe8971f5..6ed18bc445 100755 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -168,7 +168,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) { const ParameterizedMotion& paramMotion = *iter2; -// llinfos << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << llendl; +// LL_INFOS() << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << LL_ENDL; paramMotion.mMotion->getPose()->setWeight(0.f); } } @@ -181,7 +181,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) F32* paramValue = (F32 *)mCharacter->getAnimationData(paramName); if (NULL == paramValue) // unexpected, but... { - llwarns << "paramValue == NULL" << llendl; + LL_WARNS() << "paramValue == NULL" << LL_ENDL; continue; } @@ -256,8 +256,8 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) firstPose->setWeight(first_weight * weightFactor); secondPose->setWeight(second_weight * weightFactor); -// llinfos << "Parameter " << *paramName << ": " << *paramValue << llendl; -// llinfos << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << llendl; +// LL_INFOS() << "Parameter " << *paramName << ": " << *paramValue << LL_ENDL; +// LL_INFOS() << "Weights " << firstPose->getWeight() << " " << secondPose->getWeight() << LL_ENDL; } } else if (firstMotion && !secondMotion) @@ -269,7 +269,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) // blend poses mPoseBlender.blendAndApply(); - llinfos << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << llendl; + LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL; return TRUE; } @@ -356,7 +356,7 @@ BOOL LLKeyframeMotionParam::loadMotions() apr_file_t* fp = infile.getFileHandle() ; if (!fp || fileSize == 0) { - llinfos << "ERROR: can't open: " << path << llendl; + LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL; return FALSE; } @@ -395,11 +395,11 @@ BOOL LLKeyframeMotionParam::loadMotions() if ( error ) { - llinfos << "ERROR: error while reading from " << path << llendl; + LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL; return FALSE; } - llinfos << "Loading parametric keyframe data for: " << getName() << llendl; + LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL; //------------------------------------------------------------------------- // parse the text and build keyframe data structures @@ -422,7 +422,7 @@ BOOL LLKeyframeMotionParam::loadMotions() if (num == 0 || num == EOF) break; if ((num != 3)) { - llinfos << "WARNING: can't read parametric motion" << llendl; + LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL; return FALSE; } diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp index 3f91532c8e..fdeddf55e1 100755 --- a/indra/llcharacter/llkeyframestandmotion.cpp +++ b/indra/llcharacter/llkeyframestandmotion.cpp @@ -119,7 +119,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch !mKneeRightState || !mAnkleRightState ) { - llinfos << getName() << ": Can't find necessary joint states" << llendl; + LL_INFOS() << getName() << ": Can't find necessary joint states" << LL_ENDL; return STATUS_FAILURE; } @@ -329,9 +329,9 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) mKneeRightState->setRotation( mKneeRightJoint.getRotation() ); mAnkleRightState->setRotation( mAnkleRightJoint.getRotation() ); - //llinfos << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << llendl; + //LL_INFOS() << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << LL_ENDL; -// llinfos << "DEBUG: " << speed << " : " << mTrackAnkles << llendl; +// LL_INFOS() << "DEBUG: " << speed << " : " << mTrackAnkles << LL_ENDL; return TRUE; } diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index b627110da6..8c9477f80d 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -163,7 +163,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara mPelvisState->setJoint( mPelvisJoint ); if ( !mPelvisJoint ) { - llwarns << getName() << ": Can't get pelvis joint." << llendl; + LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } @@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac mPelvisState->setJoint( pelvisJoint ); if ( !pelvisJoint ) { - llwarns << getName() << ": Can't get pelvis joint." << llendl; + LL_WARNS() << getName() << ": Can't get pelvis joint." << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index 6e532aac2f..5e37f094b8 100755 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -204,10 +204,10 @@ public: LLMotionBlendType getBlendType() { return NORMAL_BLEND; } F32 getMinPixelArea() { return 0.f; } - LLMotionInitStatus onInitialize(LLCharacter*) { llinfos << "LLTestMotion::onInitialize()" << llendl; return STATUS_SUCCESS; } - BOOL onActivate() { llinfos << "LLTestMotion::onActivate()" << llendl; return TRUE; } - BOOL onUpdate(F32 time, U8* joint_mask) { llinfos << "LLTestMotion::onUpdate(" << time << ")" << llendl; return TRUE; } - void onDeactivate() { llinfos << "LLTestMotion::onDeactivate()" << llendl; } + LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; } + BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return TRUE; } + BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return TRUE; } + void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; } }; diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index d1c605451a..b5065c348b 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -77,7 +77,7 @@ LLMotionRegistry::~LLMotionRegistry() //----------------------------------------------------------------------------- BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { - // llinfos << "Registering motion: " << name << llendl; + // LL_INFOS() << "Registering motion: " << name << LL_ENDL; if (!is_in_map(mMotionTable, id)) { mMotionTable[id] = constructor; @@ -232,7 +232,7 @@ void LLMotionController::purgeExcessMotions() if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES) { - LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << llendl; + LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL; } } @@ -360,7 +360,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) switch(stat) { case LLMotion::STATUS_FAILURE: - llinfos << "Motion " << id << " init failed." << llendl; + LL_INFOS() << "Motion " << id << " init failed." << LL_ENDL; sRegistry.markBad(id); delete motion; return NULL; @@ -372,7 +372,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) mLoadedMotions.insert(motion); break; default: - llerrs << "Invalid initialization status" << llendl; + LL_ERRS() << "Invalid initialization status" << LL_ENDL; break; } @@ -418,7 +418,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) return TRUE; } -// llinfos << "Starting motion " << name << llendl; +// LL_INFOS() << "Starting motion " << name << LL_ENDL; return activateMotionInstance(motion, mAnimTime - start_offset); } @@ -781,7 +781,7 @@ void LLMotionController::updateLoadingMotions() } else if (status == LLMotion::STATUS_FAILURE) { - llinfos << "Motion " << motionp->getID() << " init failed." << llendl; + LL_INFOS() << "Motion " << motionp->getID() << " init failed." << LL_ENDL; sRegistry.markBad(motionp->getID()); mLoadingMotions.erase(curiter); motion_set_t::iterator found_it = mDeprecatedMotions.find(motionp); @@ -883,7 +883,7 @@ void LLMotionController::updateMotions(bool force_update) } mHasRunOnce = TRUE; -// llinfos << "Motion controller time " << motionTimer.getElapsedTimeF32() << llendl; +// LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL; } //----------------------------------------------------------------------------- @@ -1039,7 +1039,7 @@ LLMotion* LLMotionController::findMotion(const LLUUID& id) const //----------------------------------------------------------------------------- void LLMotionController::dumpMotions() { - llinfos << "=====================================" << llendl; + LL_INFOS() << "=====================================" << LL_ENDL; for (motion_map_t::iterator iter = mAllMotions.begin(); iter != mAllMotions.end(); iter++) { @@ -1054,7 +1054,7 @@ void LLMotionController::dumpMotions() state_string += std::string("A"); if (mDeprecatedMotions.find(motion) != mDeprecatedMotions.end()) state_string += std::string("D"); - llinfos << gAnimLibrary.animationName(id) << " " << state_string << llendl; + LL_INFOS() << gAnimLibrary.animationName(id) << " " << state_string << LL_ENDL; } } @@ -1113,7 +1113,7 @@ void LLMotionController::pauseAllMotions() { if (!mPaused) { - //llinfos << "Pausing animations..." << llendl; + //LL_INFOS() << "Pausing animations..." << LL_ENDL; mPaused = TRUE; } @@ -1126,7 +1126,7 @@ void LLMotionController::unpauseAllMotions() { if (mPaused) { - //llinfos << "Unpausing animations..." << llendl; + //LL_INFOS() << "Unpausing animations..." << LL_ENDL; mPaused = FALSE; } } diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index e2d284834f..4a06f3da28 100755 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp @@ -146,9 +146,9 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) dp.unpackS32(version, "version"); if (version != GESTURE_VERSION) { - llwarns << "Bad LLMultiGesture version " << version + LL_WARNS() << "Bad LLMultiGesture version " << version << " should be " << GESTURE_VERSION - << llendl; + << LL_ENDL; return FALSE; } @@ -164,7 +164,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) dp.unpackS32(count, "step_count"); if (count < 0) { - llwarns << "Bad LLMultiGesture step count " << count << llendl; + LL_WARNS() << "Bad LLMultiGesture step count " << count << LL_ENDL; return FALSE; } @@ -211,7 +211,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) } default: { - llwarns << "Bad LLMultiGesture step type " << type << llendl; + LL_WARNS() << "Bad LLMultiGesture step type " << type << LL_ENDL; return FALSE; } } @@ -221,10 +221,10 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) void LLMultiGesture::dump() { - llinfos << "key " << S32(mKey) << " mask " << U32(mMask) + LL_INFOS() << "key " << S32(mKey) << " mask " << U32(mMask) << " trigger " << mTrigger << " replace " << mReplaceText - << llendl; + << LL_ENDL; U32 i; for (i = 0; i < mSteps.size(); ++i) { @@ -312,10 +312,10 @@ std::vector LLGestureStepAnimation::getLabel() const void LLGestureStepAnimation::dump() { - llinfos << "step animation " << mAnimName + LL_INFOS() << "step animation " << mAnimName << " id " << mAnimAssetID << " flags " << mFlags - << llendl; + << LL_ENDL; } //--------------------------------------------------------------------------- @@ -374,10 +374,10 @@ std::vector LLGestureStepSound::getLabel() const void LLGestureStepSound::dump() { - llinfos << "step sound " << mSoundName + LL_INFOS() << "step sound " << mSoundName << " id " << mSoundAssetID << " flags " << mFlags - << llendl; + << LL_ENDL; } @@ -430,9 +430,9 @@ std::vector LLGestureStepChat::getLabel() const void LLGestureStepChat::dump() { - llinfos << "step chat " << mChatText + LL_INFOS() << "step chat " << mChatText << " flags " << mFlags - << llendl; + << LL_ENDL; } @@ -503,7 +503,7 @@ std::vector LLGestureStepWait::getLabel() const void LLGestureStepWait::dump() { - llinfos << "step wait " << mWaitSeconds + LL_INFOS() << "step wait " << mWaitSeconds << " flags " << mFlags - << llendl; + << LL_ENDL; } diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index e0454131a5..b917db3117 100755 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -88,7 +88,7 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat Transitions::iterator transition_it = state_transitions->find(&transition); if (transition_it != state_transitions->end()) { - llerrs << "LLStateTable::addDirectedTransition() : transition already exists" << llendl; + LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL; return FALSE; // transition already exists } @@ -210,7 +210,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename) if (!dot_file) { - llwarns << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << llendl; + LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL; return FALSE; } apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n"); @@ -364,7 +364,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d if (NULL == mCurrentState) { - llwarns << "mCurrentState == NULL; aborting processTransition()" << llendl; + LL_WARNS() << "mCurrentState == NULL; aborting processTransition()" << LL_ENDL; return; } @@ -372,7 +372,7 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d if (NULL == new_state) { - llwarns << "new_state == NULL; aborting processTransition()" << llendl; + LL_WARNS() << "new_state == NULL; aborting processTransition()" << LL_ENDL; return; } @@ -385,9 +385,9 @@ void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_d mCurrentState = new_state; mCurrentState->onEntry(user_data); #if FSM_PRINT_STATE_TRANSITIONS - llinfos << "Entering state " << mCurrentState->getName() << + LL_INFOS() << "Entering state " << mCurrentState->getName() << " on transition " << transition.getName() << " from state " << - mLastState->getName() << llendl; + mLastState->getName() << LL_ENDL; #endif } } diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index 633c1d51eb..37e61e936d 100755 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -80,7 +80,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac !mTorsoJoint || !mRightHandJoint) { - llwarns << "Invalid skeleton for targeting motion!" << llendl; + LL_WARNS() << "Invalid skeleton for targeting motion!" << LL_ENDL; return STATUS_FAILURE; } diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index f7cb0f76b7..0df7fb2bc3 100755 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -79,7 +79,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) mDefaultWeight = llclamp( default_weight, mMinWeight, mMaxWeight ); if( default_weight != mDefaultWeight ) { - llwarns << "value_default attribute is out of range in node " << mName << " " << default_weight << llendl; + LL_WARNS() << "value_default attribute is out of range in node " << mName << " " << default_weight << LL_ENDL; } } @@ -101,7 +101,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) } else { - llwarns << "Avatar file: has invalid sex attribute: " << sex << llendl; + LL_WARNS() << "Avatar file: has invalid sex attribute: " << sex << LL_ENDL; return FALSE; } @@ -109,7 +109,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if( !node->getFastAttributeString( name_string, mName ) ) { - llwarns << "Avatar file: is missing name attribute" << llendl; + LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL; return FALSE; } @@ -346,7 +346,7 @@ void LLVisualParam::setParamLocation(EParamLocation loc) } else { - lldebugs << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl; + LL_DEBUGS() << "param location is already " << mParamLocation << ", not slamming to " << loc << LL_ENDL; } } diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index b574ef668b..b2eafde1aa 100755 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -59,7 +59,7 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) { // *TODO - determine if there should be some better error state than // mLines being empty. -brad - llwarns << "invalid heap profile data passed into parser." << llendl; + LL_WARNS() << "invalid heap profile data passed into parser." << LL_ENDL; return; } diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 67a98d5fb8..bd8811040b 100755 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -218,8 +218,8 @@ bool LLApp::parseCommandOptions(int argc, char** argv) { if(argv[ii][0] != '-') { - llinfos << "Did not find option identifier while parsing token: " - << argv[ii] << llendl; + LL_INFOS() << "Did not find option identifier while parsing token: " + << argv[ii] << LL_ENDL; return false; } int offset = 1; @@ -303,7 +303,7 @@ void LLApp::setupErrorHandling() // Install the Google Breakpad crash handler for Windows if(mExceptionHandler == 0) { - llwarns << "adding breakpad exception handler" << llendl; + LL_WARNS() << "adding breakpad exception handler" << LL_ENDL; mExceptionHandler = new google_breakpad::ExceptionHandler( L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL); } @@ -378,7 +378,7 @@ void LLApp::startErrorThread() // if(!mThreadErrorp) { - llinfos << "Starting error thread" << llendl; + LL_INFOS() << "Starting error thread" << LL_ENDL; mThreadErrorp = new LLErrorThread(); mThreadErrorp->setUserData((void *) this); mThreadErrorp->start(); @@ -398,7 +398,7 @@ void LLApp::runErrorHandler() LLApp::sErrorHandler(); } - //llinfos << "App status now STOPPED" << llendl; + //LL_INFOS() << "App status now STOPPED" << LL_ENDL; LLApp::setStopped(); } @@ -443,7 +443,7 @@ void LLApp::setQuitting() if (!isExiting()) { // If we're already exiting, we don't want to reset our state back to quitting. - llinfos << "Setting app state to QUITTING" << llendl; + LL_INFOS() << "Setting app state to QUITTING" << LL_ENDL; setStatus(APP_STATUS_QUITTING); } } @@ -551,7 +551,7 @@ LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *except if (LLApp::isError()) { - llwarns << "Got another fatal signal while in the error handler, die now!" << llendl; + LL_WARNS() << "Got another fatal signal while in the error handler, die now!" << LL_ENDL; retval = EXCEPTION_EXECUTE_HANDLER; return retval; } @@ -597,7 +597,7 @@ BOOL ConsoleCtrlHandler(DWORD fdwCtrlType) // We're already trying to die, just ignore this signal if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Already trying to quit, ignoring signal!" << llendl; + LL_INFOS() << "Signal handler - Already trying to quit, ignoring signal!" << LL_ENDL; } return TRUE; } @@ -629,8 +629,8 @@ pid_t LLApp::fork() if( pid < 0 ) { int system_error = errno; - llwarns << "Unable to fork! Operating system error code: " - << system_error << llendl; + LL_WARNS() << "Unable to fork! Operating system error code: " + << system_error << LL_ENDL; } else if (pid == 0) { @@ -643,7 +643,7 @@ pid_t LLApp::fork() } else { - llinfos << "Forked child process " << pid << llendl; + LL_INFOS() << "Forked child process " << pid << LL_ENDL; } return pid; } @@ -735,7 +735,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << llendl; + LL_INFOS() << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << LL_ENDL; } @@ -744,7 +744,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) case SIGCHLD: if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Got SIGCHLD from " << info->si_pid << llendl; + LL_INFOS() << "Signal handler - Got SIGCHLD from " << info->si_pid << LL_ENDL; } // Check result code for all child procs for which we've @@ -765,7 +765,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) // Abort just results in termination of the app, no funky error handling. if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Got SIGABRT, terminating" << llendl; + LL_WARNS() << "Signal handler - Got SIGABRT, terminating" << LL_ENDL; } clear_signals(); raise(signum); @@ -775,7 +775,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) case SIGTERM: if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Got SIGINT, HUP, or TERM, exiting gracefully" << llendl; + LL_WARNS() << "Signal handler - Got SIGINT, HUP, or TERM, exiting gracefully" << LL_ENDL; } // Graceful exit // Just set our state to quitting, not error @@ -784,7 +784,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) // We're already trying to die, just ignore this signal if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Already trying to quit, ignoring signal!" << llendl; + LL_INFOS() << "Signal handler - Already trying to quit, ignoring signal!" << LL_ENDL; } return; } @@ -806,7 +806,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) // Smackdown treated just like any other app termination, for now if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Handling smackdown signal!" << llendl; + LL_WARNS() << "Signal handler - Handling smackdown signal!" << LL_ENDL; } else { @@ -820,7 +820,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Handling fatal signal!" << llendl; + LL_WARNS() << "Signal handler - Handling fatal signal!" << LL_ENDL; } if (LLApp::isError()) { @@ -830,7 +830,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Got another fatal signal while in the error handler, die now!" << llendl; + LL_WARNS() << "Signal handler - Got another fatal signal while in the error handler, die now!" << LL_ENDL; } raise(signum); return; @@ -838,13 +838,13 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) if (LLApp::sLogInSignal) { - llwarns << "Signal handler - Flagging error status and waiting for shutdown" << llendl; + LL_WARNS() << "Signal handler - Flagging error status and waiting for shutdown" << LL_ENDL; } if (LLApp::isCrashloggerDisabled()) // Don't gracefully handle any signal, crash and core for a gdb post mortem { clear_signals(); - llwarns << "Fatal signal received, not handling the crash here, passing back to operating system" << llendl; + LL_WARNS() << "Fatal signal received, not handling the crash here, passing back to operating system" << LL_ENDL; raise(signum); return; } @@ -859,7 +859,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) if (LLApp::sLogInSignal) { - llwarns << "Signal handler - App is stopped, reraising signal" << llendl; + LL_WARNS() << "Signal handler - App is stopped, reraising signal" << LL_ENDL; } clear_signals(); raise(signum); @@ -867,7 +867,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) } else { if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Unhandled signal " << signum << ", ignoring!" << llendl; + LL_INFOS() << "Signal handler - Unhandled signal " << signum << ", ignoring!" << LL_ENDL; } } } @@ -896,7 +896,7 @@ bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_ --remaining; } - llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL; LLApp::runErrorHandler(); #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -942,7 +942,7 @@ bool unix_post_minidump_callback(const char *dump_dir, strncpy(path, ".dmp", remaining); } - llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL; LLApp::runErrorHandler(); #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -985,16 +985,16 @@ bool windows_post_minidump_callback(const wchar_t* dump_path, strncpy(path, ".dmp", remaining); } - llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + LL_INFOS() << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL; // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. //OSMessageBox("Attach Debugger Now", "Error", OSMB_OK); // *TODO: Translate the signals/exceptions into cross-platform stuff // Windows implementation - llinfos << "Entering Windows Exception Handler..." << llendl; + LL_INFOS() << "Entering Windows Exception Handler..." << LL_ENDL; if (LLApp::isError()) { - llwarns << "Got another fatal signal while in the error handler, die now!" << llendl; + LL_WARNS() << "Got another fatal signal while in the error handler, die now!" << LL_ENDL; } // Flag status to error, so thread_error starts its work diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index b6adb37eba..4346740e47 100755 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -446,7 +446,7 @@ S32 LLAPRFile::read(void *buf, S32 nbytes) { if(!mFile) { - llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ; + LL_WARNS() << "apr mFile is removed by somebody else. Can not read." << LL_ENDL ; return 0; } @@ -468,7 +468,7 @@ S32 LLAPRFile::write(const void *buf, S32 nbytes) { if(!mFile) { - llwarns << "apr mFile is removed by somebody else. Can not write." << llendl ; + LL_WARNS() << "apr mFile is removed by somebody else. Can not write." << LL_ENDL ; return 0; } diff --git a/indra/llcommon/llbase32.cpp b/indra/llcommon/llbase32.cpp index 053ac0d32f..349567c90b 100755 --- a/indra/llcommon/llbase32.cpp +++ b/indra/llcommon/llbase32.cpp @@ -231,8 +231,8 @@ std::string LLBase32::encode(const U8* input, size_t input_size) size_t encoded = base32_encode(&output[0], output_size, input, input_size); - llinfos << "encoded " << encoded << " into buffer of size " - << output_size << llendl; + LL_INFOS() << "encoded " << encoded << " into buffer of size " + << output_size << LL_ENDL; } return output; } diff --git a/indra/llcommon/llbitpack.h b/indra/llcommon/llbitpack.h index fea56a4f1f..f99a354cd4 100755 --- a/indra/llcommon/llbitpack.h +++ b/indra/llcommon/llbitpack.h @@ -165,8 +165,8 @@ public: #ifdef _DEBUG if (mBufferSize > mMaxSize) { - llerrs << "mBufferSize exceeding mMaxSize" << llendl; - llerrs << mBufferSize << " > " << mMaxSize << llendl; + LL_ERRS() << "mBufferSize exceeding mMaxSize" << LL_ENDL; + LL_ERRS() << mBufferSize << " > " << mMaxSize << LL_ENDL; } #endif mLoad = *(mBuffer + mBufferSize++); diff --git a/indra/llcommon/llcrc.cpp b/indra/llcommon/llcrc.cpp index e80da0bb0d..626bb1e564 100755 --- a/indra/llcommon/llcrc.cpp +++ b/indra/llcommon/llcrc.cpp @@ -162,7 +162,7 @@ void LLCRC::update(const std::string& filename) { if (filename.empty()) { - llerrs << "No filename specified" << llendl; + LL_ERRS() << "No filename specified" << LL_ENDL; return; } @@ -185,7 +185,7 @@ void LLCRC::update(const std::string& filename) if (nread < (size_t) size) { - llwarns << "Short read on " << filename << llendl; + LL_WARNS() << "Short read on " << filename << LL_ENDL; } update(data, nread); diff --git a/indra/llcommon/llcrc.h b/indra/llcommon/llcrc.h index 2d291d92a1..3f41b28ffa 100755 --- a/indra/llcommon/llcrc.h +++ b/indra/llcommon/llcrc.h @@ -41,7 +41,7 @@ // crc.update(fgetc(fp)); // } // fclose(fp); -// llinfos << "File crc: " << crc.getCRC() << llendl; +// LL_INFOS() << "File crc: " << crc.getCRC() << LL_ENDL; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LL_COMMON_API LLCRC diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index cec4047c1f..cb6f239396 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -63,8 +63,8 @@ LLDate::LLDate(const std::string& iso8601_date) { if(!fromString(iso8601_date)) { - llwarns << "date " << iso8601_date << " failed to parse; " - << "ZEROING IT OUT" << llendl; + LL_WARNS() << "date " << iso8601_date << " failed to parse; " + << "ZEROING IT OUT" << LL_ENDL; mSecondsSinceEpoch = DATE_EPOCH; } } diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index c752859a36..5800ec5e5d 100755 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -89,7 +89,7 @@ protected: { if (lookup(index)) { - llerrs << "Dictionary entry already added (attempted to add duplicate entry)" << llendl; + LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL; } (*this)[index] = entry; } diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 947aa11e94..652d0e212a 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -321,9 +321,9 @@ namespace if (configuration.isUndefined()) { - llwarns << filename() << " missing, ill-formed," + LL_WARNS() << filename() << " missing, ill-formed," " or simply undefined; not changing configuration" - << llendl; + << LL_ENDL; return false; } } diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 40495b8c7d..ef25a0173c 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -350,11 +350,11 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG; // DEPRECATED: Use the new macros that allow tags and *look* like macros. -#define lldebugs LL_DEBUGS() +//#define lldebugs LL_DEBUGS() #define llinfos LL_INFOS() -#define llwarns LL_WARNS() -#define llerrs LL_ERRS() -#define llcont LL_CONT +//#define llwarns LL_WARNS() +//#define llerrs LL_ERRS() +//#define llcont LL_CONT #define llendl LL_ENDL #endif // LL_LLERROR_H diff --git a/indra/llcommon/llerrorthread.cpp b/indra/llcommon/llerrorthread.cpp index 950fcd6e83..d461f31bbc 100755 --- a/indra/llcommon/llerrorthread.cpp +++ b/indra/llcommon/llerrorthread.cpp @@ -65,7 +65,7 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite exited = true; if (do_logging) { - llinfos << "get_child_status - Child exited cleanly with return of " << process_status << llendl; + LL_INFOS() << "get_child_status - Child exited cleanly with return of " << process_status << LL_ENDL; } return; } @@ -75,15 +75,15 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite exited = true; if (do_logging) { - llinfos << "get_child_status - Child died because of uncaught signal " << process_status << llendl; + LL_INFOS() << "get_child_status - Child died because of uncaught signal " << process_status << LL_ENDL; #ifdef WCOREDUMP if (WCOREDUMP(waitpid_status)) { - llinfos << "get_child_status - Child dumped core" << llendl; + LL_INFOS() << "get_child_status - Child dumped core" << LL_ENDL; } else { - llinfos << "get_child_status - Child didn't dump core" << llendl; + LL_INFOS() << "get_child_status - Child didn't dump core" << LL_ENDL; } #endif } @@ -93,7 +93,7 @@ void get_child_status(const int waitpid_status, int &process_status, bool &exite { // This is weird. I just dump the waitpid status into the status code, // not that there's any way of telling what it is... - llinfos << "get_child_status - Got SIGCHILD but child didn't exit" << llendl; + LL_INFOS() << "get_child_status - Got SIGCHILD but child didn't exit" << LL_ENDL; process_status = waitpid_status; } @@ -106,7 +106,7 @@ void LLErrorThread::run() // This thread sits and waits for the sole purpose // of waiting for the signal/exception handlers to flag the // application state as APP_STATUS_ERROR. - llinfos << "thread_error - Waiting for an error" << llendl; + LL_INFOS() << "thread_error - Waiting for an error" << LL_ENDL; S32 counter = 0; #if !LL_WINDOWS @@ -124,7 +124,7 @@ void LLErrorThread::run() last_sig_child_count = current_sig_child_count; if (LLApp::sLogInSignal) { - llinfos << "thread_error handling SIGCHLD #" << current_sig_child_count << llendl; + LL_INFOS() << "thread_error handling SIGCHLD #" << current_sig_child_count << LL_ENDL; } for (LLApp::child_map::iterator iter = LLApp::sChildMap.begin(); iter != LLApp::sChildMap.end();) { @@ -141,7 +141,7 @@ void LLErrorThread::run() { if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Running child callback" << llendl; + LL_INFOS() << "Signal handler - Running child callback" << LL_ENDL; } child_info.mCallback(child_pid, exited, status); } @@ -172,7 +172,7 @@ void LLErrorThread::run() { if (LLApp::sLogInSignal) { - llinfos << "Signal handler - Running default child callback" << llendl; + LL_INFOS() << "Signal handler - Running default child callback" << LL_ENDL; } LLApp::sDefaultChildCallback(child_pid, true, status); } @@ -188,17 +188,17 @@ void LLErrorThread::run() if (LLApp::isError()) { // The app is in an error state, run the application's error handler. - //llinfos << "thread_error - An error has occurred, running error callback!" << llendl; + //LL_INFOS() << "thread_error - An error has occurred, running error callback!" << LL_ENDL; // Run the error handling callback LLApp::runErrorHandler(); } else { // Everything is okay, a clean exit. - //llinfos << "thread_error - Application exited cleanly" << llendl; + //LL_INFOS() << "thread_error - Application exited cleanly" << LL_ENDL; } - //llinfos << "thread_error - Exiting" << llendl; + //LL_INFOS() << "thread_error - Exiting" << LL_ENDL; LLApp::sErrorThreadRunning = FALSE; } diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 3b17b6022c..8f86a1dfbc 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -400,7 +400,7 @@ void TimeBlock::dumpCurTimes() << std::setprecision(3) << total_time.valueInUnits() << " ms, " << num_calls << " calls"; - llinfos << out_str.str() << llendl; + LL_INFOS() << out_str.str() << LL_ENDL; } } diff --git a/indra/llcommon/llformat.h b/indra/llcommon/llformat.h index a4ec5e01de..fb8e7cd045 100755 --- a/indra/llcommon/llformat.h +++ b/indra/llcommon/llformat.h @@ -29,7 +29,7 @@ #define LL_LLFORMAT_H // Use as follows: -// llinfos << llformat("Test:%d (%.2f %.2f)", idx, x, y) << llendl; +// LL_INFOS() << llformat("Test:%d (%.2f %.2f)", idx, x, y) << LL_ENDL; // // *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun) // should perhaps be replaced with boost::format. diff --git a/indra/llcommon/llframetimer.cpp b/indra/llcommon/llframetimer.cpp index ec64195b21..1af2cb8afd 100755 --- a/indra/llcommon/llframetimer.cpp +++ b/indra/llcommon/llframetimer.cpp @@ -115,10 +115,10 @@ F64 LLFrameTimer::expiresAt() const BOOL LLFrameTimer::checkExpirationAndReset(F32 expiration) { - //llinfos << "LLFrameTimer::checkExpirationAndReset()" << llendl; - //llinfos << " mStartTime:" << mStartTime << llendl; - //llinfos << " sFrameTime:" << sFrameTime << llendl; - //llinfos << " mExpiry: " << mExpiry << llendl; + //LL_INFOS() << "LLFrameTimer::checkExpirationAndReset()" << LL_ENDL; + //LL_INFOS() << " mStartTime:" << mStartTime << LL_ENDL; + //LL_INFOS() << " sFrameTime:" << sFrameTime << LL_ENDL; + //LL_INFOS() << " mExpiry: " << mExpiry << LL_ENDL; if(hasExpired()) { diff --git a/indra/llcommon/llheartbeat.cpp b/indra/llcommon/llheartbeat.cpp index 18a0c489bd..19b7452748 100755 --- a/indra/llcommon/llheartbeat.cpp +++ b/indra/llcommon/llheartbeat.cpp @@ -98,7 +98,7 @@ LLHeartbeat::rawSendWithTimeout(F32 timeout_sec) mTimeoutTimer.setTimerExpirySec(timeout_sec); do { result = rawSend(); - //llinfos << " HEARTSENDc=" << result << llendl; + //LL_INFOS() << " HEARTSENDc=" << result << LL_ENDL; } while (result==1 && !mTimeoutTimer.hasExpired()); return result; @@ -118,7 +118,7 @@ LLHeartbeat::send(F32 timeout_sec) // zero-timeout; we don't care too much whether our // heartbeat was digested. result = rawSend(); - //llinfos << " HEARTSENDb=" << result << llendl; + //LL_INFOS() << " HEARTSENDb=" << result << LL_ENDL; } } @@ -146,14 +146,14 @@ LLHeartbeat::send(F32 timeout_sec) // It's been ages since we successfully had a heartbeat // digested by the watchdog. Sit here and spin a while // in the hope that we can force it through. - llwarns << "Unable to deliver heartbeat to launcher for " << mPanicTimer.getElapsedTimeF32() << " seconds. Going to try very hard for up to " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << llendl; + LL_WARNS() << "Unable to deliver heartbeat to launcher for " << mPanicTimer.getElapsedTimeF32() << " seconds. Going to try very hard for up to " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << LL_ENDL; result = rawSendWithTimeout(mAggressiveHeartbeatMaxBlockingSecs); if (result == 0) { total_success = true; } else { // we couldn't even force it through. That's bad, // but we'll try again in a while. - llwarns << "Could not deliver heartbeat to launcher even after trying very hard for " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << llendl; + LL_WARNS() << "Could not deliver heartbeat to launcher even after trying very hard for " << mAggressiveHeartbeatMaxBlockingSecs << " seconds." << LL_ENDL; } // in any case, reset the panic timer. diff --git a/indra/llcommon/llliveappconfig.cpp b/indra/llcommon/llliveappconfig.cpp index 3a3dfa9f28..7c87c5a1a0 100755 --- a/indra/llcommon/llliveappconfig.cpp +++ b/indra/llcommon/llliveappconfig.cpp @@ -47,8 +47,8 @@ LLLiveAppConfig::~LLLiveAppConfig() // virtual bool LLLiveAppConfig::loadFile() { - llinfos << "LLLiveAppConfig::loadFile(): reading from " - << filename() << llendl; + LL_INFOS() << "LLLiveAppConfig::loadFile(): reading from " + << filename() << LL_ENDL; llifstream file(filename()); LLSD config; if (file.is_open()) @@ -56,15 +56,15 @@ bool LLLiveAppConfig::loadFile() LLSDSerialize::fromXML(config, file); if(!config.isMap()) { - llwarns << "Live app config not an map in " << filename() - << " Ignoring the data." << llendl; + LL_WARNS() << "Live app config not an map in " << filename() + << " Ignoring the data." << LL_ENDL; return false; } file.close(); } else { - llinfos << "Live file " << filename() << " does not exit." << llendl; + LL_INFOS() << "Live file " << filename() << " does not exit." << LL_ENDL; } // *NOTE: we do not handle the else case here because we would not // have attempted to load the file unless LLLiveFile had diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 3fe7470d06..a9256124f2 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -64,7 +64,7 @@ void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) // Redundant, place to set breakpoints. if (ptr%alignment!=0) { - llwarns << "alignment check failed" << llendl; + LL_WARNS() << "alignment check failed" << LL_ENDL; } llassert(ptr%alignment==0); #endif @@ -109,7 +109,7 @@ void LLMemory::updateMemoryInfo() if (!GetProcessMemoryInfo(self, &counters, sizeof(counters))) { - llwarns << "GetProcessMemoryInfo failed" << llendl; + LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL; return ; } @@ -153,7 +153,7 @@ void* LLMemory::tryToAlloc(void* address, U32 size) { if(!VirtualFree(address, 0, MEM_RELEASE)) { - llerrs << "error happens when free some memory reservation." << llendl ; + LL_ERRS() << "error happens when free some memory reservation." << LL_ENDL ; } } return address ; @@ -171,14 +171,14 @@ void LLMemory::logMemoryInfo(BOOL update) LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ; } - llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ; - llinfos << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << llendl ; - llinfos << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << llendl ; - llinfos << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << llendl ; + LL_INFOS() << "Current allocated physical memory(KB): " << sAllocatedMemInKB << LL_ENDL ; + LL_INFOS() << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << LL_ENDL ; + LL_INFOS() << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << LL_ENDL ; + LL_INFOS() << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << LL_ENDL ; - llinfos << "--- private pool information -- " << llendl ; - llinfos << "Total reserved (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024 << llendl ; - llinfos << "Total allocated (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024 << llendl ; + LL_INFOS() << "--- private pool information -- " << LL_ENDL ; + LL_INFOS() << "Total reserved (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024 << LL_ENDL ; + LL_INFOS() << "Total allocated (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024 << LL_ENDL ; } //return 0: everything is normal; @@ -260,7 +260,7 @@ U64 LLMemory::getCurrentRSS() if (!GetProcessMemoryInfo(self, &counters, sizeof(counters))) { - llwarns << "GetProcessMemoryInfo failed" << llendl; + LL_WARNS() << "GetProcessMemoryInfo failed" << LL_ENDL; return 0; } @@ -298,7 +298,7 @@ U32 LLMemory::getWorkingSetSize() // if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1) // { -// llwarns << "Couldn't get page size" << llendl; +// LL_WARNS() << "Couldn't get page size" << LL_ENDL; // return 0; // } else { // return page_size; @@ -317,11 +317,11 @@ U64 LLMemory::getCurrentRSS() // If we ever wanted it, the process virtual size is also available as: // virtualSize = basicInfo.virtual_size; -// llinfos << "resident size is " << residentSize << llendl; +// LL_INFOS() << "resident size is " << residentSize << LL_ENDL; } else { - llwarns << "task_info failed" << llendl; + LL_WARNS() << "task_info failed" << LL_ENDL; } return residentSize; @@ -342,7 +342,7 @@ U64 LLMemory::getCurrentRSS() if (fp == NULL) { - llwarns << "couldn't open " << statPath << llendl; + LL_WARNS() << "couldn't open " << statPath << LL_ENDL; goto bail; } @@ -355,7 +355,7 @@ U64 LLMemory::getCurrentRSS() &rss); if (ret != 1) { - llwarns << "couldn't parse contents of " << statPath << llendl; + LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL; rss = 0; } } @@ -385,12 +385,12 @@ U64 LLMemory::getCurrentRSS() sprintf(path, "/proc/%d/psinfo", (int)getpid()); int proc_fd = -1; if((proc_fd = open(path, O_RDONLY)) == -1){ - llwarns << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << llendl; + LL_WARNS() << "LLmemory::getCurrentRSS() unable to open " << path << ". Returning 0 RSS!" << LL_ENDL; return 0; } psinfo_t proc_psinfo; if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){ - llwarns << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << llendl; + LL_WARNS() << "LLmemory::getCurrentRSS() Unable to read from " << path << ". Returning 0 RSS!" << LL_ENDL; close(proc_fd); return 0; } @@ -823,7 +823,7 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump() total_size += blk_list[i]->getBufferSize() ; if((U32)blk_list[i]->getBuffer() < (U32)blk_list[i-1]->getBuffer() + blk_list[i-1]->getBufferSize()) { - llerrs << "buffer corrupted." << llendl ; + LL_ERRS() << "buffer corrupted." << LL_ENDL ; } } @@ -844,32 +844,32 @@ void LLPrivateMemoryPool::LLMemoryChunk::dump() } else { - llerrs << "gap happens" << llendl ; + LL_ERRS() << "gap happens" << LL_ENDL ; } } #endif #if 0 - llinfos << "---------------------------" << llendl ; - llinfos << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << llendl ; + LL_INFOS() << "---------------------------" << LL_ENDL ; + LL_INFOS() << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << LL_ENDL ; - llinfos << "available blocks ... " << llendl ; + LL_INFOS() << "available blocks ... " << LL_ENDL ; for(S32 i = 0 ; i < mBlockLevels ; i++) { LLMemoryBlock* blk = mAvailBlockList[i] ; while(blk) { - llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ; + LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ; blk = blk->mNext ; } } - llinfos << "free blocks ... " << llendl ; + LL_INFOS() << "free blocks ... " << LL_ENDL ; for(S32 i = 0 ; i < mPartitionLevels ; i++) { LLMemoryBlock* blk = mFreeSpaceList[i] ; while(blk) { - llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ; + LL_INFOS() << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << LL_ENDL ; blk = blk->mNext ; } } @@ -1265,7 +1265,7 @@ char* LLPrivateMemoryPool::allocate(U32 size) if(to_log) { - llwarns << "The memory pool overflows, now using heap directly!" << llendl ; + LL_WARNS() << "The memory pool overflows, now using heap directly!" << LL_ENDL ; to_log = false ; } @@ -1358,7 +1358,7 @@ void LLPrivateMemoryPool::destroyPool() if(mNumOfChunks > 0) { - llwarns << "There is some memory not freed when destroy the memory pool!" << llendl ; + LL_WARNS() << "There is some memory not freed when destroy the memory pool!" << LL_ENDL ; } mNumOfChunks = 0 ; @@ -1376,11 +1376,11 @@ bool LLPrivateMemoryPool::checkSize(U32 asked_size) { if(mReservedPoolSize + asked_size > mMaxPoolSize) { - llinfos << "Max pool size: " << mMaxPoolSize << llendl ; - llinfos << "Total reserved size: " << mReservedPoolSize + asked_size << llendl ; - llinfos << "Total_allocated Size: " << getTotalAllocatedSize() << llendl ; + LL_INFOS() << "Max pool size: " << mMaxPoolSize << LL_ENDL ; + LL_INFOS() << "Total reserved size: " << mReservedPoolSize + asked_size << LL_ENDL ; + LL_INFOS() << "Total_allocated Size: " << getTotalAllocatedSize() << LL_ENDL ; - //llerrs << "The pool is overflowing..." << llendl ; + //LL_ERRS() << "The pool is overflowing..." << LL_ENDL ; return false ; } @@ -1593,7 +1593,7 @@ void LLPrivateMemoryPool::removeFromHashTable(LLMemoryChunk* chunk) void LLPrivateMemoryPool::rehash() { - llinfos << "new hash factor: " << mHashFactor << llendl ; + LL_INFOS() << "new hash factor: " << mHashFactor << LL_ENDL ; mChunkHashList.clear() ; mChunkHashList.resize(mHashFactor) ; @@ -1673,7 +1673,7 @@ void LLPrivateMemoryPool::LLChunkHashElement::remove(LLPrivateMemoryPool::LLMemo } else { - llerrs << "This slot does not contain this chunk!" << llendl ; + LL_ERRS() << "This slot does not contain this chunk!" << LL_ENDL ; } } @@ -1705,12 +1705,12 @@ LLPrivateMemoryPoolManager::~LLPrivateMemoryPoolManager() #if __DEBUG_PRIVATE_MEM__ if(!sMemAllocationTracker.empty()) { - llwarns << "there is potential memory leaking here. The list of not freed memory blocks are from: " <first << " : " << iter->second << llendl ; + LL_INFOS() << k++ << ", " << (U32)iter->first << " : " << iter->second << LL_ENDL ; } sMemAllocationTracker.clear() ; } @@ -1906,7 +1906,7 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr } else { - llerrs << "private pool is used before initialized.!" << llendl ; + LL_ERRS() << "private pool is used before initialized.!" << LL_ENDL ; } } } @@ -1980,7 +1980,7 @@ void LLPrivateMemoryPoolTester::test(U32 min_size, U32 max_size, U32 stride, U32 //allocate space for p ; if(!(p = ::new char**[times]) || !(*p = ::new char*[times * levels])) { - llerrs << "memory initialization for p failed" << llendl ; + LL_ERRS() << "memory initialization for p failed" << LL_ENDL ; } //init @@ -2052,8 +2052,8 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times) { LLTimer timer ; - llinfos << " -**********************- " << llendl ; - llinfos << "test size: " << size << " test times: " << times << llendl ; + LL_INFOS() << " -**********************- " << LL_ENDL ; + LL_INFOS() << "test size: " << size << " test times: " << times << LL_ENDL ; timer.reset() ; char** p = new char*[times] ; @@ -2065,7 +2065,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times) p[i] = ALLOCATE_MEM(sPool, size) ; if(!p[i]) { - llerrs << "allocation failed" << llendl ; + LL_ERRS() << "allocation failed" << LL_ENDL ; } } //de-allocation @@ -2074,7 +2074,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times) FREE_MEM(sPool, p[i]) ; p[i] = NULL ; } - llinfos << "time spent using customized memory pool: " << timer.getElapsedTimeF32() << llendl ; + LL_INFOS() << "time spent using customized memory pool: " << timer.getElapsedTimeF32() << LL_ENDL ; timer.reset() ; @@ -2085,7 +2085,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times) p[i] = ::new char[size] ; if(!p[i]) { - llerrs << "allocation failed" << llendl ; + LL_ERRS() << "allocation failed" << LL_ENDL ; } } //de-allocation @@ -2094,7 +2094,7 @@ void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times) ::delete[] p[i] ; p[i] = NULL ; } - llinfos << "time spent using standard allocator/de-allocator: " << timer.getElapsedTimeF32() << llendl ; + LL_INFOS() << "time spent using standard allocator/de-allocator: " << timer.getElapsedTimeF32() << LL_ENDL ; delete[] p; } diff --git a/indra/llcommon/llmemorystream.cpp b/indra/llcommon/llmemorystream.cpp index 723d94f025..707ac8fd0f 100755 --- a/indra/llcommon/llmemorystream.cpp +++ b/indra/llcommon/llmemorystream.cpp @@ -45,7 +45,7 @@ void LLMemoryStreamBuf::reset(const U8* start, S32 length) int LLMemoryStreamBuf::underflow() { - //lldebugs << "LLMemoryStreamBuf::underflow()" << llendl; + //LL_DEBUGS() << "LLMemoryStreamBuf::underflow()" << LL_ENDL; if(gptr() < egptr()) { return *gptr(); diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index fd89cb818a..88287e5786 100755 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -56,7 +56,7 @@ BOOL LLMetricPerformanceTesterBasic::addTester(LLMetricPerformanceTesterBasic* t std::string name = tester->getTesterName() ; if (getTester(name)) { - llerrs << "Tester name is already used by some other tester : " << name << llendl ; + LL_ERRS() << "Tester name is already used by some other tester : " << name << LL_ENDL ; return FALSE; } @@ -136,7 +136,7 @@ void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std std::ifstream target_is(target.c_str()); if (!base_is.is_open() || !target_is.is_open()) { - llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl; + LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL; base_is.close(); target_is.close(); return; @@ -176,7 +176,7 @@ LLMetricPerformanceTesterBasic::LLMetricPerformanceTesterBasic(std::string name) { if (mName == std::string()) { - llerrs << "LLMetricPerformanceTesterBasic construction invalid : Empty name passed to constructor" << llendl ; + LL_ERRS() << "LLMetricPerformanceTesterBasic construction invalid : Empty name passed to constructor" << LL_ENDL ; } mValidInstance = LLMetricPerformanceTesterBasic::addTester(this) ; @@ -241,7 +241,7 @@ void LLMetricPerformanceTesterBasic::analyzePerformance(std::ofstream* os, LLSD* (F32)((*base)[label][ mMetricStrings[index] ].asReal()), (F32)((*current)[label][ mMetricStrings[index] ].asReal())) ; break; default: - llerrs << "unsupported metric " << mMetricStrings[index] << " LLSD type: " << (S32)(*current)[label][ mMetricStrings[index] ].type() << llendl ; + LL_ERRS() << "unsupported metric " << mMetricStrings[index] << " LLSD type: " << (S32)(*current)[label][ mMetricStrings[index] ].type() << LL_ENDL ; } } } @@ -305,7 +305,7 @@ void LLMetricPerformanceTesterWithSession::analyzePerformance(std::ofstream* os, if (!mBaseSessionp || !mCurrentSessionp) { - llerrs << "Error loading test sessions." << llendl ; + LL_ERRS() << "Error loading test sessions." << LL_ENDL ; } // Compare diff --git a/indra/llcommon/llmetrics.cpp b/indra/llcommon/llmetrics.cpp index 3078139f43..d40afe5160 100755 --- a/indra/llcommon/llmetrics.cpp +++ b/indra/llcommon/llmetrics.cpp @@ -65,7 +65,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location, metrics["location"] = location; metrics["stats"] = stats; - llinfos << "LLMETRICS: " << (LLSDNotationStreamer(metrics)) << llendl; + LL_INFOS() << "LLMETRICS: " << (LLSDNotationStreamer(metrics)) << LL_ENDL; } // Store this: @@ -128,7 +128,7 @@ void LLMetricsImpl::printTotals(LLSD metadata) out_sd["stats"] = stats; - llinfos << "LLMETRICS: AGGREGATE: " << LLSDOStreamer(out_sd) << llendl; + LL_INFOS() << "LLMETRICS: AGGREGATE: " << LLSDOStreamer(out_sd) << LL_ENDL; } LLMetrics::LLMetrics() diff --git a/indra/llcommon/llmetrics.h b/indra/llcommon/llmetrics.h index 4f0ae56338..85a6986049 100755 --- a/indra/llcommon/llmetrics.h +++ b/indra/llcommon/llmetrics.h @@ -38,7 +38,7 @@ public: LLMetrics(); virtual ~LLMetrics(); - // Adds this event to aggregate totals and records details to syslog (llinfos) + // Adds this event to aggregate totals and records details to syslog (LL_INFOS()) virtual void recordEventDetails(const std::string& location, const std::string& mesg, bool success, diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp index ad0287c6d5..252bbd6cd1 100644 --- a/indra/llcommon/llmutex.cpp +++ b/indra/llcommon/llmutex.cpp @@ -82,7 +82,7 @@ void LLMutex::lock() // Have to have the lock before we can access the debug info U32 id = LLThread::currentID(); if (mIsLocked[id] != FALSE) - llerrs << "Already locked in Thread: " << id << llendl; + LL_ERRS() << "Already locked in Thread: " << id << LL_ENDL; mIsLocked[id] = TRUE; #endif @@ -101,7 +101,7 @@ void LLMutex::unlock() // Access the debug info while we have the lock U32 id = LLThread::currentID(); if (mIsLocked[id] != TRUE) - llerrs << "Not locked in Thread: " << id << llendl; + LL_ERRS() << "Not locked in Thread: " << id << LL_ENDL; mIsLocked[id] = FALSE; #endif diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index e09741b0ec..c9ebc70d19 100755 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -156,7 +156,7 @@ protected: temp->unref(); if (mPointer != NULL) { - llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl; + LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL; unref(); } } diff --git a/indra/llcommon/llpriqueuemap.h b/indra/llcommon/llpriqueuemap.h index da997c7b04..d8d3edd48a 100755 --- a/indra/llcommon/llpriqueuemap.h +++ b/indra/llcommon/llpriqueuemap.h @@ -84,7 +84,7 @@ public: pqm_iter iter = mMap.find(LLPQMKey(priority, data)); if (iter != mMap.end()) { - llerrs << "Pushing already existing data onto queue!" << llendl; + LL_ERRS() << "Pushing already existing data onto queue!" << LL_ENDL; } #endif mMap.insert(pqm_pair(LLPQMKey(priority, data), data)); @@ -112,14 +112,14 @@ public: iter = mMap.find(cur_key); if (iter == mMap.end()) { - llwarns << "Data not on priority queue!" << llendl; + LL_WARNS() << "Data not on priority queue!" << LL_ENDL; // OK, try iterating through all of the data and seeing if we just screwed up the priority // somehow. for (iter = mMap.begin(); iter != mMap.end(); iter++) { if ((*(iter)).second == data) { - llerrs << "Data on priority queue but priority not matched!" << llendl; + LL_ERRS() << "Data on priority queue but priority not matched!" << LL_ENDL; } } return; diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index b80e813d84..80b86153e4 100755 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -700,7 +700,7 @@ private: __cpuid(0x1, eax, ebx, ecx, edx); if(feature_infos[0] != (S32)edx) { - llerrs << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << llendl; + LL_ERRS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; } #endif // LL_RELEASE_FOR_DOWNLOAD diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 3689c4728e..176761c17c 100755 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -81,7 +81,7 @@ void LLQueuedThread::shutdown() } if (timeout == 0) { - llwarns << "~LLQueuedThread (" << mName << ") timed out!" << llendl; + LL_WARNS() << "~LLQueuedThread (" << mName << ") timed out!" << LL_ENDL; } } else @@ -102,7 +102,7 @@ void LLQueuedThread::shutdown() } if (active_count) { - llwarns << "~LLQueuedThread() called with active requests: " << active_count << llendl; + LL_WARNS() << "~LLQueuedThread() called with active requests: " << active_count << LL_ENDL; } } @@ -199,11 +199,11 @@ void LLQueuedThread::printQueueStats() if (!mRequestQueue.empty()) { QueuedRequest *req = *mRequestQueue.begin(); - llinfos << llformat("Pending Requests:%d Current status:%d", mRequestQueue.size(), req->getStatus()) << llendl; + LL_INFOS() << llformat("Pending Requests:%d Current status:%d", mRequestQueue.size(), req->getStatus()) << LL_ENDL; } else { - llinfos << "Queued Thread Idle" << llendl; + LL_INFOS() << "Queued Thread Idle" << LL_ENDL; } unlockData(); } @@ -234,7 +234,7 @@ bool LLQueuedThread::addRequest(QueuedRequest* req) mRequestQueue.insert(req); mRequestHash.insert(req); #if _DEBUG -// llinfos << llformat("LLQueuedThread::Added req [%08d]",handle) << llendl; +// LL_INFOS() << llformat("LLQueuedThread::Added req [%08d]",handle) << LL_ENDL; #endif unlockData(); @@ -365,7 +365,7 @@ bool LLQueuedThread::completeRequest(handle_t handle) llassert_always(req->getStatus() != STATUS_QUEUED); llassert_always(req->getStatus() != STATUS_INPROGRESS); #if _DEBUG -// llinfos << llformat("LLQueuedThread::Completed req [%08d]",handle) << llendl; +// LL_INFOS() << llformat("LLQueuedThread::Completed req [%08d]",handle) << LL_ENDL; #endif mRequestHash.erase(handle); req->deleteRequest(); @@ -386,7 +386,7 @@ bool LLQueuedThread::check() { if (entry->getHashKey() > mNextHandle) { - llerrs << "Hash Error" << llendl; + LL_ERRS() << "Hash Error" << LL_ENDL; return false; } entry = entry->getNextEntry(); @@ -520,7 +520,7 @@ void LLQueuedThread::run() } //LLThread::yield(); // thread should yield after each request } - llinfos << "LLQueuedThread " << mName << " EXITING." << llendl; + LL_INFOS() << "LLQueuedThread " << mName << " EXITING." << LL_ENDL; } // virtual diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp index e1876599fc..a638df2c7c 100755 --- a/indra/llcommon/llrefcount.cpp +++ b/indra/llcommon/llrefcount.cpp @@ -76,7 +76,7 @@ LLRefCount::~LLRefCount() { if (mRef != 0) { - llerrs << "deleting non-zero reference" << llendl; + LL_ERRS() << "deleting non-zero reference" << LL_ENDL; } #if LL_REF_COUNT_DEBUG @@ -95,8 +95,8 @@ void LLRefCount::ref() const if(mMutexp->isLocked()) { mCrashAtUnlock = TRUE ; - llerrs << "the mutex is locked by the thread: " << mLockedThreadID - << " Current thread: " << LLThread::currentID() << llendl ; + LL_ERRS() << "the mutex is locked by the thread: " << mLockedThreadID + << " Current thread: " << LLThread::currentID() << LL_ENDL ; } mMutexp->lock() ; @@ -123,8 +123,8 @@ S32 LLRefCount::unref() const if(mMutexp->isLocked()) { mCrashAtUnlock = TRUE ; - llerrs << "the mutex is locked by the thread: " << mLockedThreadID - << " Current thread: " << LLThread::currentID() << llendl ; + LL_ERRS() << "the mutex is locked by the thread: " << mLockedThreadID + << " Current thread: " << LLThread::currentID() << LL_ENDL ; } mMutexp->lock() ; diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h index c8ec0a0bc0..29950c108d 100755 --- a/indra/llcommon/llregistry.h +++ b/indra/llcommon/llregistry.h @@ -62,7 +62,7 @@ public: { if (mMap.insert(std::make_pair(key, value)).second == false) { - llwarns << "Tried to register " << key << " but it was already registered!" << llendl; + LL_WARNS() << "Tried to register " << key << " but it was already registered!" << LL_ENDL; return false; } return true; @@ -307,7 +307,7 @@ public: { if (singleton_t::instance().exists(key)) { - llerrs << "Duplicate registry entry under key \"" << key << "\"" << llendl; + LL_ERRS() << "Duplicate registry entry under key \"" << key << "\"" << LL_ENDL; } singleton_t::instance().mStaticScope->add(key, value); } diff --git a/indra/llcommon/llsafehandle.h b/indra/llcommon/llsafehandle.h index 8d52d9bb15..4226bf04f0 100755 --- a/indra/llcommon/llsafehandle.h +++ b/indra/llcommon/llsafehandle.h @@ -134,7 +134,7 @@ protected: tempp->unref(); if (mPointer != NULL) { - llwarns << "Unreference did assignment to non-NULL because of destructor" << llendl; + LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL; unref(); } } diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index ad4fce6f35..04d7a6ed56 100755 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -81,7 +81,7 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize break; default: - llwarns << "serialize request for unknown ELLSD_Serialize" << llendl; + LL_WARNS() << "serialize request for unknown ELLSD_Serialize" << LL_ENDL; } if (f.notNull()) @@ -169,7 +169,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes) } else { - llwarns << "deserialize request for unknown ELLSD_Serialize" << llendl; + LL_WARNS() << "deserialize request for unknown ELLSD_Serialize" << LL_ENDL; } if (p.notNull()) @@ -179,7 +179,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes) } fail: - llwarns << "deserialize LLSD parse failure" << llendl; + LL_WARNS() << "deserialize LLSD parse failure" << LL_ENDL; return false; } @@ -445,7 +445,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading map." << llendl; + LL_INFOS() << "STREAM FAILURE reading map." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -464,7 +464,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading array." << llendl; + LL_INFOS() << "STREAM FAILURE reading array." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -500,7 +500,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading boolean." << llendl; + LL_INFOS() << "STREAM FAILURE reading boolean." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -526,7 +526,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading boolean." << llendl; + LL_INFOS() << "STREAM FAILURE reading boolean." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -539,7 +539,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const data = integer; if(istr.fail()) { - llinfos << "STREAM FAILURE reading integer." << llendl; + LL_INFOS() << "STREAM FAILURE reading integer." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -553,7 +553,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const data = real; if(istr.fail()) { - llinfos << "STREAM FAILURE reading real." << llendl; + LL_INFOS() << "STREAM FAILURE reading real." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -567,7 +567,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const data = id; if(istr.fail()) { - llinfos << "STREAM FAILURE reading uuid." << llendl; + LL_INFOS() << "STREAM FAILURE reading uuid." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -582,7 +582,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading string." << llendl; + LL_INFOS() << "STREAM FAILURE reading string." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -604,7 +604,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading link." << llendl; + LL_INFOS() << "STREAM FAILURE reading link." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -627,7 +627,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading date." << llendl; + LL_INFOS() << "STREAM FAILURE reading date." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -640,15 +640,15 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading data." << llendl; + LL_INFOS() << "STREAM FAILURE reading data." << LL_ENDL; parse_count = PARSE_FAILURE; } break; default: parse_count = PARSE_FAILURE; - llinfos << "Unrecognized character while parsing: int(" << (int)c - << ")" << llendl; + LL_INFOS() << "Unrecognized character while parsing: int(" << (int)c + << ")" << LL_ENDL; break; } if(PARSE_FAILURE == parse_count) @@ -909,7 +909,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary map." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary map." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -928,7 +928,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary array." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary array." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -953,7 +953,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const data = (S32)ntohl(value_nbo); if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary integer." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary integer." << LL_ENDL; } break; } @@ -965,7 +965,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const data = ll_ntohd(real_nbo); if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary real." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary real." << LL_ENDL; } break; } @@ -977,7 +977,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const data = id; if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary uuid." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary uuid." << LL_ENDL; } break; } @@ -998,8 +998,8 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary (notation-style) string." - << llendl; + LL_INFOS() << "STREAM FAILURE reading binary (notation-style) string." + << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -1018,7 +1018,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary string." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary string." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -1037,7 +1037,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary link." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary link." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -1050,7 +1050,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const data = LLDate(real); if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary date." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary date." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -1079,7 +1079,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const } if(istr.fail()) { - llinfos << "STREAM FAILURE reading binary." << llendl; + LL_INFOS() << "STREAM FAILURE reading binary." << LL_ENDL; parse_count = PARSE_FAILURE; } break; @@ -1087,8 +1087,8 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const default: parse_count = PARSE_FAILURE; - llinfos << "Unrecognized character while parsing: int(" << (int)c - << ")" << llendl; + LL_INFOS() << "Unrecognized character while parsing: int(" << (int)c + << ")" << LL_ENDL; break; } if(PARSE_FAILURE == parse_count) @@ -2017,7 +2017,7 @@ std::string zip_llsd(LLSD& data) S32 ret = deflateInit(&strm, Z_BEST_COMPRESSION); if (ret != Z_OK) { - llwarns << "Failed to compress LLSD block." << llendl; + LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL; return std::string(); } @@ -2044,7 +2044,7 @@ std::string zip_llsd(LLSD& data) if (strm.avail_out >= CHUNK) { free(output); - llwarns << "Failed to compress LLSD block." << llendl; + LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL; return std::string(); } @@ -2056,7 +2056,7 @@ std::string zip_llsd(LLSD& data) else { free(output); - llwarns << "Failed to compress LLSD block." << llendl; + LL_WARNS() << "Failed to compress LLSD block." << LL_ENDL; return std::string(); } } @@ -2073,7 +2073,7 @@ std::string zip_llsd(LLSD& data) LLSD test_sd; if (!unzip_llsd(test_sd, test, result.size())) { - llerrs << "Invalid compression result!" << llendl; + LL_ERRS() << "Invalid compression result!" << LL_ENDL; } #endif @@ -2163,7 +2163,7 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size) if (!LLSDSerialize::fromBinary(data, istr, cur_size)) { - llwarns << "Failed to unzip LLSD block" << llendl; + LL_WARNS() << "Failed to unzip LLSD block" << LL_ENDL; free(result); return false; } diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index 614a2d5636..4e2af0e589 100755 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -406,7 +406,7 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) } if (mEmitErrors) { - llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; + LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << LL_ENDL; } data = LLSD(); return LLSDParser::PARSE_FAILURE; @@ -487,7 +487,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data) { if (mEmitErrors) { - llinfos << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << llendl; + LL_INFOS() << "LLSDXMLParser::Impl::parseLines: XML_STATUS_ERROR" << LL_ENDL; } return LLSDParser::PARSE_FAILURE; } @@ -549,7 +549,7 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, int len) XML_Status status = XML_Parse(mParser, buf, len, false); if (status == XML_STATUS_ERROR) { - llinfos << "Unexpected XML parsing error at start" << llendl; + LL_INFOS() << "Unexpected XML parsing error at start" << LL_ENDL; } } } diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index b9cb8e3d41..6e6291a165 100755 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -143,7 +143,7 @@ public: llassert(false); return NULL; case CONSTRUCTING: - llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << llendl; + LL_ERRS() << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << LL_ENDL; return NULL; case INITIALIZING: // go ahead and flag ourselves as initialized so we can be reentrant during initialization @@ -155,7 +155,7 @@ public: case INITIALIZED: return sData.mInstance; case DELETED: - llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl; + LL_WARNS() << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << LL_ENDL; SingletonLifetimeManager::construct(); // same as first time construction sData.mInitState = INITIALIZED; diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 6f92c7d5d4..e6e80fa279 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -110,7 +110,7 @@ bool _read_file_into_string(std::string& str, const std::string& filename) llifstream ifs(filename, llifstream::binary); if (!ifs.is_open()) { - llinfos << "Unable to open file " << filename << llendl; + LL_INFOS() << "Unable to open file " << filename << LL_ENDL; return false; } @@ -188,7 +188,7 @@ S32 wchar_to_utf8chars(llwchar in_char, char* outchars) } else { - llwarns << "Invalid Unicode character " << cur_char << "!" << llendl; + LL_WARNS() << "Invalid Unicode character " << cur_char << "!" << LL_ENDL; *outchars++ = LL_UNKNOWN_CHAR; } return outchars - base; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 8d2045dfa0..cad02f491a 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -607,7 +607,7 @@ S32 LLOSInfo::getMaxOpenFiles() } else { - llerrs << "LLOSInfo::getMaxOpenFiles: sysconf error for _SC_OPEN_MAX" << llendl; + LL_ERRS() << "LLOSInfo::getMaxOpenFiles: sysconf error for _SC_OPEN_MAX" << LL_ENDL; } } } @@ -666,12 +666,12 @@ U32 LLOSInfo::getProcessVirtualSizeKB() sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid()); int proc_fd = -1; if((proc_fd = open(proc_ps, O_RDONLY)) == -1){ - llwarns << "unable to open " << proc_ps << llendl; + LL_WARNS() << "unable to open " << proc_ps << LL_ENDL; return 0; } psinfo_t proc_psinfo; if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){ - llwarns << "Unable to read " << proc_ps << llendl; + LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL; close(proc_fd); return 0; } @@ -712,12 +712,12 @@ U32 LLOSInfo::getProcessResidentSizeKB() sprintf(proc_ps, "/proc/%d/psinfo", (int)getpid()); int proc_fd = -1; if((proc_fd = open(proc_ps, O_RDONLY)) == -1){ - llwarns << "unable to open " << proc_ps << llendl; + LL_WARNS() << "unable to open " << proc_ps << LL_ENDL; return 0; } psinfo_t proc_psinfo; if(read(proc_fd, &proc_psinfo, sizeof(psinfo_t)) != sizeof(psinfo_t)){ - llwarns << "Unable to read " << proc_ps << llendl; + LL_WARNS() << "Unable to read " << proc_ps << LL_ENDL; close(proc_fd); return 0; } @@ -1449,7 +1449,7 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile) size_t nwrit = fwrite(buffer, sizeof(U8), bytes, dst); if (nwrit < (size_t) bytes) { - llwarns << "Short write on " << tmpfile << ": Wrote " << nwrit << " of " << bytes << " bytes." << llendl; + LL_WARNS() << "Short write on " << tmpfile << ": Wrote " << nwrit << " of " << bytes << " bytes." << LL_ENDL; goto err; } } while(gzeof(src) == 0); @@ -1482,14 +1482,14 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile) { if (gzwrite(dst, buffer, bytes) <= 0) { - llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl; + LL_WARNS() << "gzwrite failed: " << gzerror(dst, NULL) << LL_ENDL; goto err; } } if (ferror(src)) { - llwarns << "Error reading " << srcfile << llendl; + LL_WARNS() << "Error reading " << srcfile << LL_ENDL; goto err; } diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index cfed0fff17..aa60fc9b2e 100755 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -33,7 +33,7 @@ // use an LLCPUInfo object: // // LLCPUInfo info; -// llinfos << info << llendl; +// LL_INFOS() << info << LL_ENDL; // #include "llsd.h" @@ -105,7 +105,7 @@ class LL_COMMON_API LLMemoryInfo Here's how you use an LLMemoryInfo: LLMemoryInfo info; -
llinfos << info << llendl; +
LL_INFOS() << info << LL_ENDL; */ { public: diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index db7ddbbfd3..bcae57fe22 100755 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -108,7 +108,7 @@ LL_COMMON_API void assert_main_thread() static U32 s_thread_id = LLThread::currentID(); if (LLThread::currentID() != s_thread_id) { - llerrs << "Illegal execution outside main thread." << llendl; + LL_ERRS() << "Illegal execution outside main thread." << LL_ENDL; } } @@ -140,7 +140,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap // Run the user supplied function threadp->run(); - //llinfos << "LLThread::staticRun() Exiting: " << threadp->mName << llendl; + //LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL; // We're done with the run function, this thread is done executing now. threadp->mStatus = STOPPED; @@ -197,7 +197,7 @@ void LLThread::shutdown() // First, set the flag that indicates that we're ready to die setQuitting(); - //llinfos << "LLThread::~LLThread() Killing thread " << mName << " Status: " << mStatus << llendl; + //LL_INFOS() << "LLThread::~LLThread() Killing thread " << mName << " Status: " << mStatus << LL_ENDL; // Now wait a bit for the thread to exit // It's unclear whether I should even bother doing this - this destructor // should never get called unless we're already stopped, really... @@ -219,7 +219,7 @@ void LLThread::shutdown() if (!isStopped()) { // This thread just wouldn't stop, even though we gave it time - //llwarns << "LLThread::~LLThread() exiting thread before clean exit!" << llendl; + //LL_WARNS() << "LLThread::~LLThread() exiting thread before clean exit!" << LL_ENDL; // Put a stake in its heart. apr_thread_exit(mAPRThreadp, -1); return; @@ -259,7 +259,7 @@ void LLThread::start() else { mStatus = STOPPED; - llwarns << "failed to start thread " << mName << llendl; + LL_WARNS() << "failed to start thread " << mName << LL_ENDL; ll_apr_warn_status(status); } @@ -416,7 +416,7 @@ LLThreadSafeRefCount::~LLThreadSafeRefCount() { if (mRef != 0) { - llerrs << "deleting non-zero reference" << llendl; + LL_ERRS() << "deleting non-zero reference" << LL_ENDL; } } diff --git a/indra/llcommon/llthreadlocalstorage.cpp b/indra/llcommon/llthreadlocalstorage.cpp index 03c306cc7f..8cef05caac 100644 --- a/indra/llcommon/llthreadlocalstorage.cpp +++ b/indra/llcommon/llthreadlocalstorage.cpp @@ -43,7 +43,7 @@ void LLThreadLocalPointerBase::set( void* value ) if (result != APR_SUCCESS) { ll_apr_warn_status(result); - llerrs << "Failed to set thread local data" << llendl; + LL_ERRS() << "Failed to set thread local data" << LL_ENDL; } } @@ -56,7 +56,7 @@ void* LLThreadLocalPointerBase::get() const if (result != APR_SUCCESS) { ll_apr_warn_status(result); - llerrs << "Failed to get thread local data" << llendl; + LL_ERRS() << "Failed to get thread local data" << LL_ENDL; } return ptr; } @@ -68,7 +68,7 @@ void LLThreadLocalPointerBase::initStorage( ) if (result != APR_SUCCESS) { ll_apr_warn_status(result); - llerrs << "Failed to allocate thread local data" << llendl; + LL_ERRS() << "Failed to allocate thread local data" << LL_ENDL; } } @@ -82,7 +82,7 @@ void LLThreadLocalPointerBase::destroyStorage() if (result != APR_SUCCESS) { ll_apr_warn_status(result); - llerrs << "Failed to delete thread local data" << llendl; + LL_ERRS() << "Failed to delete thread local data" << LL_ENDL; } } } diff --git a/indra/llcommon/llthreadlocalstorage.h b/indra/llcommon/llthreadlocalstorage.h index 3b2f5f4193..177e822227 100644 --- a/indra/llcommon/llthreadlocalstorage.h +++ b/indra/llcommon/llthreadlocalstorage.h @@ -157,14 +157,14 @@ private: #elif LL_DARWIN static void TLSError() { - llerrs << "Could not create thread local storage" << llendl; + LL_ERRS() << "Could not create thread local storage" << LL_ENDL; } static void createTLSKey() { static S32 key_created = pthread_key_create(&sInstanceKey, NULL); if (key_created != 0) { - llerrs << "Could not create thread local storage" << llendl; + LL_ERRS() << "Could not create thread local storage" << LL_ENDL; } } static pthread_key_t sInstanceKey; diff --git a/indra/llcommon/llthreadsafequeue.cpp b/indra/llcommon/llthreadsafequeue.cpp index 8a73e632a9..185f0d63fb 100755 --- a/indra/llcommon/llthreadsafequeue.cpp +++ b/indra/llcommon/llthreadsafequeue.cpp @@ -54,7 +54,7 @@ LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * po LLThreadSafeQueueImplementation::~LLThreadSafeQueueImplementation() { if(mQueue != 0) { - if(apr_queue_size(mQueue) != 0) llwarns << + if(apr_queue_size(mQueue) != 0) LL_WARNS() << "terminating queue which still contains " << apr_queue_size(mQueue) << " elements;" << "memory will be leaked" << LL_ENDL; apr_queue_term(mQueue); diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index f27c433ee1..a2c5f3d699 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -456,7 +456,7 @@ BOOL LLTimer::knownBadTimer() { if (!wcscmp(pci_id, bad_pci_list[check])) { -// llwarns << "unreliable PCI chipset found!! " << pci_id << endl; +// LL_WARNS() << "unreliable PCI chipset found!! " << pci_id << endl; failed = TRUE; break; } diff --git a/indra/llcommon/lltrace.cpp b/indra/llcommon/lltrace.cpp index 3dffbe6d4a..eedf1b06f1 100644 --- a/indra/llcommon/lltrace.cpp +++ b/indra/llcommon/lltrace.cpp @@ -40,7 +40,7 @@ TraceBase::TraceBase( const char* name, const char* description ) #ifndef LL_RELEASE_FOR_DOWNLOAD if (LLTrace::get_master_thread_recorder() != NULL) { - llerrs << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << llendl; + LL_ERRS() << "Attempting to declare trace object after program initialization. Trace objects should be statically initialized." << LL_ENDL; } #endif } diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index e20d8b63de..8c32e1568b 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -174,7 +174,7 @@ ThreadRecorder::active_recording_list_t::reverse_iterator ThreadRecorder::bringU if (it == end_it) { - llwarns << "Recording not active on this thread" << llendl; + LL_WARNS() << "Recording not active on this thread" << LL_ENDL; } return it; diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 37f5b3d6a3..9f12d49244 100755 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -359,7 +359,7 @@ LLURI LLURI::buildHTTP(const std::string& prefix, it != path.endArray(); ++it) { - lldebugs << "PATH: inserting " << it->asString() << llendl; + LL_DEBUGS() << "PATH: inserting " << it->asString() << LL_ENDL; result.mEscapedPath += "/" + escapePathComponent(it->asString()); } } @@ -399,8 +399,8 @@ LLURI LLURI::buildHTTP(const std::string& prefix, } else { - llwarns << "Valid path arguments to buildHTTP are array, string, or undef, you passed type" - << path.type() << llendl; + LL_WARNS() << "Valid path arguments to buildHTTP are array, string, or undef, you passed type" + << path.type() << LL_ENDL; } result.mEscapedOpaque = "//" + result.mEscapedAuthority + result.mEscapedPath; @@ -584,7 +584,7 @@ LLSD LLURI::queryMap() const // static LLSD LLURI::queryMap(std::string escaped_query_string) { - lldebugs << "LLURI::queryMap query params: " << escaped_query_string << llendl; + LL_DEBUGS() << "LLURI::queryMap query params: " << escaped_query_string << LL_ENDL; LLSD result = LLSD::emptyArray(); while(!escaped_query_string.empty()) @@ -610,12 +610,12 @@ LLSD LLURI::queryMap(std::string escaped_query_string) { std::string key = unescape(tuple.substr(0,key_end)); std::string value = unescape(tuple.substr(key_end+1)); - lldebugs << "inserting key " << key << " value " << value << llendl; + LL_DEBUGS() << "inserting key " << key << " value " << value << LL_ENDL; result[key] = value; } else { - lldebugs << "inserting key " << unescape(tuple) << " value true" << llendl; + LL_DEBUGS() << "inserting key " << unescape(tuple) << " value true" << LL_ENDL; result[unescape(tuple)] = true; } } diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index ba4b670b9a..e3671047b4 100755 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -232,7 +232,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit) { if(emit) { - llwarns << "Warning! Using broken UUID string format" << llendl; + LL_WARNS() << "Warning! Using broken UUID string format" << LL_ENDL; } broken_format = TRUE; } @@ -242,7 +242,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit) if(emit) { //don't spam the logs because a resident can't spell. - llwarns << "Bad UUID string: " << in_string << llendl; + LL_WARNS() << "Bad UUID string: " << in_string << LL_ENDL; } setNull(); return FALSE; @@ -281,7 +281,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit) { if(emit) { - llwarns << "Invalid UUID string character" << llendl; + LL_WARNS() << "Invalid UUID string character" << LL_ENDL; } setNull(); return FALSE; @@ -306,7 +306,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit) { if(emit) { - llwarns << "Invalid UUID string character" << llendl; + LL_WARNS() << "Invalid UUID string character" << LL_ENDL; } setNull(); return FALSE; diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index 3d05a30ac2..4c197dc1d6 100755 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -50,8 +50,8 @@ LLWorkerThread::~LLWorkerThread() // Delete any workers in the delete queue (should be safe - had better be!) if (!mDeleteList.empty()) { - llwarns << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size() - << " entries in delete list." << llendl; + LL_WARNS() << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size() + << " entries in delete list." << LL_ENDL; } delete mDeleteMutex; @@ -65,8 +65,8 @@ void LLWorkerThread::clearDeleteList() // Delete any workers in the delete queue (should be safe - had better be!) if (!mDeleteList.empty()) { - llwarns << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size() - << " entries in delete list." << llendl; + LL_WARNS() << "Worker Thread: " << mName << " destroyed with " << mDeleteList.size() + << " entries in delete list." << LL_ENDL; mDeleteMutex->lock(); for (delete_list_t::iterator iter = mDeleteList.begin(); iter != mDeleteList.end(); ++iter) @@ -142,7 +142,7 @@ LLWorkerThread::handle_t LLWorkerThread::addWorkRequest(LLWorkerClass* workercla bool res = addRequest(req); if (!res) { - llerrs << "add called after LLWorkerThread::cleanupClass()" << llendl; + LL_ERRS() << "add called after LLWorkerThread::cleanupClass()" << LL_ENDL; req->deleteRequest(); handle = nullHandle(); } @@ -209,7 +209,7 @@ LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& na { if (!mWorkerThread) { - llerrs << "LLWorkerClass() called with NULL workerthread: " << name << llendl; + LL_ERRS() << "LLWorkerClass() called with NULL workerthread: " << name << LL_ENDL; } } @@ -223,12 +223,12 @@ LLWorkerClass::~LLWorkerClass() LLWorkerThread::WorkRequest* workreq = (LLWorkerThread::WorkRequest*)mWorkerThread->getRequest(mRequestHandle); if (!workreq) { - llerrs << "LLWorkerClass destroyed with stale work handle" << llendl; + LL_ERRS() << "LLWorkerClass destroyed with stale work handle" << LL_ENDL; } if (workreq->getStatus() != LLWorkerThread::STATUS_ABORTED && workreq->getStatus() != LLWorkerThread::STATUS_COMPLETE) { - llerrs << "LLWorkerClass destroyed with active worker! Worker Status: " << workreq->getStatus() << llendl; + LL_ERRS() << "LLWorkerClass destroyed with active worker! Worker Status: " << workreq->getStatus() << LL_ENDL; } } } @@ -238,7 +238,7 @@ void LLWorkerClass::setWorkerThread(LLWorkerThread* workerthread) mMutex.lock(); if (mRequestHandle != LLWorkerThread::nullHandle()) { - llerrs << "LLWorkerClass attempt to change WorkerThread with active worker!" << llendl; + LL_ERRS() << "LLWorkerClass attempt to change WorkerThread with active worker!" << LL_ENDL; } mWorkerThread = workerthread; mMutex.unlock(); @@ -298,10 +298,10 @@ void LLWorkerClass::addWork(S32 param, U32 priority) llassert_always(!(mWorkFlags & (WCF_WORKING|WCF_HAVE_WORK))); if (mRequestHandle != LLWorkerThread::nullHandle()) { - llerrs << "LLWorkerClass attempt to add work with active worker!" << llendl; + LL_ERRS() << "LLWorkerClass attempt to add work with active worker!" << LL_ENDL; } #if _DEBUG -// llinfos << "addWork: " << mWorkerClassName << " Param: " << param << llendl; +// LL_INFOS() << "addWork: " << mWorkerClassName << " Param: " << param << LL_ENDL; #endif startWork(param); clearFlags(WCF_WORK_FINISHED|WCF_WORK_ABORTED); @@ -316,7 +316,7 @@ void LLWorkerClass::abortWork(bool autocomplete) #if _DEBUG // LLWorkerThread::WorkRequest* workreq = mWorkerThread->getRequest(mRequestHandle); // if (workreq) -// llinfos << "abortWork: " << mWorkerClassName << " Param: " << workreq->getParam() << llendl; +// LL_INFOS() << "abortWork: " << mWorkerClassName << " Param: " << workreq->getParam() << LL_ENDL; #endif if (mRequestHandle != LLWorkerThread::nullHandle()) { diff --git a/indra/llcommon/u64.cpp b/indra/llcommon/u64.cpp index eea16c5036..02c2c15d26 100755 --- a/indra/llcommon/u64.cpp +++ b/indra/llcommon/u64.cpp @@ -36,7 +36,7 @@ U64 str_to_U64(const std::string& str) if (!aptr) { - llwarns << "str_to_U64: Bad string to U64 conversion attempt: format\n" << llendl; + LL_WARNS() << "str_to_U64: Bad string to U64 conversion attempt: format\n" << LL_ENDL; } else { diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index fb2d43e3b0..7d70d156e1 100755 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -163,8 +163,8 @@ void LLCrashLogger::gatherFiles() LLCurl::setCAFile(gDirUtilp->getCAFile()); } - llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl; - llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl; + LL_INFOS() << "Using log file from debug log " << mFileMap["SecondLifeLog"] << LL_ENDL; + LL_INFOS() << "Using settings file from debug log " << mFileMap["SettingsXml"] << LL_ENDL; } else { @@ -376,7 +376,7 @@ void LLCrashLogger::updateApplication(const std::string& message) { gServicePump->pump(); gServicePump->callback(); - if (!message.empty()) llinfos << message << llendl; + if (!message.empty()) LL_INFOS() << message << LL_ENDL; } bool LLCrashLogger::init() @@ -405,13 +405,13 @@ bool LLCrashLogger::init() "1 = always send crash report, " "2 = never send crash report)"); - // llinfos << "Loading crash behavior setting" << llendl; + // LL_INFOS() << "Loading crash behavior setting" << LL_ENDL; // mCrashBehavior = loadCrashBehaviorSetting(); // If user doesn't want to send, bail out if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND) { - llinfos << "Crash behavior is never_send, quitting" << llendl; + LL_INFOS() << "Crash behavior is never_send, quitting" << LL_ENDL; return false; } diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 655d7a381a..83638b56a3 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -128,12 +128,12 @@ void LLImageBase::destroyPrivatePool() // virtual void LLImageBase::dump() { - llinfos << "LLImageBase mComponents " << mComponents + LL_INFOS() << "LLImageBase mComponents " << mComponents << " mData " << mData << " mDataSize " << mDataSize << " mWidth " << mWidth << " mHeight " << mHeight - << llendl; + << LL_ENDL; } // virtual @@ -145,13 +145,13 @@ void LLImageBase::sanityCheck() || mComponents > (S8)MAX_IMAGE_COMPONENTS ) { - llerrs << "Failed LLImageBase::sanityCheck " + LL_ERRS() << "Failed LLImageBase::sanityCheck " << "width " << mWidth << "height " << mHeight << "datasize " << mDataSize << "components " << mComponents << "data " << mData - << llendl; + << LL_ENDL; } } @@ -171,7 +171,7 @@ U8* LLImageBase::allocateData(S32 size) size = mWidth * mHeight * mComponents; if (size <= 0) { - llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << llendl; + LL_ERRS() << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << LL_ENDL; } } @@ -179,14 +179,14 @@ U8* LLImageBase::allocateData(S32 size) static const U32 MAX_BUFFER_SIZE = 4096 * 4096 * 16 ; //256 MB if (size < 1 || size > MAX_BUFFER_SIZE) { - llinfos << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << llendl ; + LL_INFOS() << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << LL_ENDL ; if(mAllowOverSize) { - llinfos << "Oversize: " << size << llendl ; + LL_INFOS() << "Oversize: " << size << LL_ENDL ; } else { - llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; + LL_ERRS() << "LLImageBase::allocateData: bad size: " << size << LL_ENDL; } } if (!mData || size != mDataSize) @@ -196,7 +196,7 @@ U8* LLImageBase::allocateData(S32 size) mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); if (!mData) { - llwarns << "Failed to allocate image data size [" << size << "]" << llendl; + LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL; size = 0 ; mWidth = mHeight = 0 ; mBadBufferAllocation = true ; @@ -214,7 +214,7 @@ U8* LLImageBase::reallocateData(S32 size) U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); if (!new_datap) { - llwarns << "Out of memory in LLImageBase::reallocateData" << llendl; + LL_WARNS() << "Out of memory in LLImageBase::reallocateData" << LL_ENDL; return 0; } if (mData) @@ -232,7 +232,7 @@ const U8* LLImageBase::getData() const { if(mBadBufferAllocation) { - llerrs << "Bad memory allocation for the image buffer!" << llendl ; + LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ; } return mData; @@ -242,7 +242,7 @@ U8* LLImageBase::getData() { if(mBadBufferAllocation) { - llerrs << "Bad memory allocation for the image buffer!" << llendl ; + LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ; } return mData; @@ -564,7 +564,7 @@ void LLImageRaw::composite( LLImageRaw* src ) // Src and dst can be any size. Src has 4 components. Dst has 3 components. void LLImageRaw::compositeScaled4onto3(LLImageRaw* src) { - llinfos << "compositeScaled4onto3" << llendl; + LL_INFOS() << "compositeScaled4onto3" << LL_ENDL; LLImageRaw* dst = this; // Just for clarity. @@ -698,7 +698,7 @@ void LLImageRaw::copy(LLImageRaw* src) { if (!src) { - llwarns << "LLImageRaw::copy called with a null src pointer" << llendl; + LL_WARNS() << "LLImageRaw::copy called with a null src pointer" << LL_ENDL; return; } @@ -1215,8 +1215,8 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip llifstream ifs(name, llifstream::binary); if (!ifs.is_open()) { - // SJB: changed from llinfos to lldebugs to reduce spam - lldebugs << "Unable to open image file: " << name << llendl; + // SJB: changed from LL_INFOS() to LL_DEBUGS() to reduce spam + LL_DEBUGS() << "Unable to open image file: " << name << LL_ENDL; return false; } @@ -1230,7 +1230,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip if (!length) { - llinfos << "Zero length file file: " << name << llendl; + LL_INFOS() << "Zero length file file: " << name << LL_ENDL; return false; } @@ -1266,7 +1266,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip if (!success) { deleteData(); - llwarns << "Unable to decode image" << name << llendl; + LL_WARNS() << "Unable to decode image" << name << LL_ENDL; return false; } @@ -1371,11 +1371,11 @@ void LLImageFormatted::dump() { LLImageBase::dump(); - llinfos << "LLImageFormatted" + LL_INFOS() << "LLImageFormatted" << " mDecoding " << mDecoding << " mCodec " << S32(mCodec) << " mDecoded " << mDecoded - << llendl; + << LL_ENDL; } //---------------------------------------------------------------------------- @@ -1458,11 +1458,11 @@ void LLImageFormatted::sanityCheck() if (mCodec >= IMG_CODEC_EOF) { - llerrs << "Failed LLImageFormatted::sanityCheck " + LL_ERRS() << "Failed LLImageFormatted::sanityCheck " << "decoding " << S32(mDecoding) << "decoded " << S32(mDecoded) << "codec " << S32(mCodec) - << llendl; + << LL_ENDL; } } @@ -1638,7 +1638,7 @@ void LLImageBase::generateMip(const U8* indata, U8* mipdata, S32 width, S32 heig *(U8*)data = (U8)(((U32)(indata[0]) + indata[1] + indata[in_width] + indata[in_width+1])>>2); break; default: - llerrs << "generateMmip called with bad num channels" << llendl; + LL_ERRS() << "generateMmip called with bad num channels" << LL_ENDL; } indata += nchannels*2; data += nchannels; @@ -1695,17 +1695,17 @@ F32 LLImageBase::calc_download_priority(F32 virtual_size, F32 visible_pixels, S3 bytes_weight *= bytes_weight; - //llinfos << "VS: " << virtual_size << llendl; + //LL_INFOS() << "VS: " << virtual_size << LL_ENDL; F32 virtual_size_factor = virtual_size / (10.f*10.f); // The goal is for weighted priority to be <= 0 when we've reached a point where // we've sent enough data. - //llinfos << "BytesSent: " << bytes_sent << llendl; - //llinfos << "BytesWeight: " << bytes_weight << llendl; - //llinfos << "PreLog: " << bytes_weight * virtual_size_factor << llendl; + //LL_INFOS() << "BytesSent: " << bytes_sent << LL_ENDL; + //LL_INFOS() << "BytesWeight: " << bytes_weight << LL_ENDL; + //LL_INFOS() << "PreLog: " << bytes_weight * virtual_size_factor << LL_ENDL; w_priority = (F32)log10(bytes_weight * virtual_size_factor); - //llinfos << "PreScale: " << w_priority << llendl; + //LL_INFOS() << "PreScale: " << w_priority << LL_ENDL; // We don't want to affect how MANY bytes we send based on the visible pixels, but the order // in which they're sent. We post-multiply so we don't change the zero point. diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp index 60b1c628d7..8573fe0d91 100755 --- a/indra/llimage/llimagebmp.cpp +++ b/indra/llimage/llimagebmp.cpp @@ -321,7 +321,7 @@ BOOL LLImageBMP::updateData() mColorPalette = new U8[color_palette_size]; if (!mColorPalette) { - llerrs << "Out of memory in LLImageBMP::updateData()" << llendl; + LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL; return FALSE; } memcpy( mColorPalette, mdata + FILE_HEADER_SIZE + BITMAP_HEADER_SIZE + extension_size, color_palette_size ); /* Flawfinder: ignore */ @@ -528,7 +528,7 @@ BOOL LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time) if( (2 == src_components) || (4 == src_components) ) { - llinfos << "Dropping alpha information during BMP encoding" << llendl; + LL_INFOS() << "Dropping alpha information during BMP encoding" << LL_ENDL; } setSize(raw_image->getWidth(), raw_image->getHeight(), dst_components); diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 383ae00fb7..5bf3f29b3c 100755 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -77,7 +77,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() const S32 DATA_LEN = 26; // BMP header (14) + DIB header size (4) + width (4) + height (4) if (!checkFileLength(DATA_LEN)) { - llwarns << "Premature end of file" << llendl; + LL_WARNS() << "Premature end of file" << LL_ENDL; return false; } @@ -89,7 +89,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp() // We only support Windows bitmaps (BM), according to LLImageBMP::updateData(). if (signature[0] != 'B' || signature[1] != 'M') { - llwarns << "Not a BMP" << llendl; + LL_WARNS() << "Not a BMP" << LL_ENDL; return false; } @@ -108,7 +108,7 @@ bool LLImageDimensionsInfo::getImageDimensionsTga() // Make sure the file is long enough. if (!checkFileLength(TGA_FILE_HEADER_SIZE + 1 /* width */ + 1 /* height */)) { - llwarns << "Premature end of file" << llendl; + LL_WARNS() << "Premature end of file" << LL_ENDL; return false; } @@ -127,7 +127,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() // Make sure the file is long enough. if (!checkFileLength(PNG_MAGIC_SIZE + 8 + sizeof(S32) * 2 /* width, height */)) { - llwarns << "Premature end of file" << llendl; + LL_WARNS() << "Premature end of file" << LL_ENDL; return false; } @@ -139,7 +139,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng() // Make sure it's a PNG file. if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) { - llwarns << "Not a PNG" << llendl; + LL_WARNS() << "Not a PNG" << LL_ENDL; return false; } @@ -156,7 +156,7 @@ void on_jpeg_error(j_common_ptr cinfo) { (void) cinfo; sJpegErrorEncountered = true; - llwarns << "Libjpeg has encountered an error!" << llendl; + LL_WARNS() << "Libjpeg has encountered an error!" << LL_ENDL; } bool LLImageDimensionsInfo::getImageDimensionsJpeg() @@ -177,12 +177,12 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() if (fread(signature, sizeof(signature), 1, fp) != 1) { - llwarns << "Premature end of file" << llendl; + LL_WARNS() << "Premature end of file" << LL_ENDL; return false; } if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) { - llwarns << "Not a JPEG" << llendl; + LL_WARNS() << "Not a JPEG" << LL_ENDL; return false; } fseek(fp, 0, SEEK_SET); // go back to start of the file diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 34c6793522..04e0e752eb 100755 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp @@ -52,7 +52,7 @@ S32 LLImageDXT::formatBits(EFileFormat format) case FORMAT_RGB8: return 24; case FORMAT_RGBA8: return 32; default: - llerrs << "LLImageDXT::Unknown format: " << format << llendl; + LL_ERRS() << "LLImageDXT::Unknown format: " << format << LL_ENDL; return 0; } }; @@ -82,7 +82,7 @@ S32 LLImageDXT::formatComponents(EFileFormat format) case FORMAT_RGB8: return 3; case FORMAT_RGBA8: return 4; default: - llerrs << "LLImageDXT::Unknown format: " << format << llendl; + LL_ERRS() << "LLImageDXT::Unknown format: " << format << LL_ENDL; return 0; } }; @@ -207,7 +207,7 @@ BOOL LLImageDXT::updateData() if (data_size < mHeaderSize) { - llerrs << "LLImageDXT: not enough data" << llendl; + LL_ERRS() << "LLImageDXT: not enough data" << LL_ENDL; } S32 ncomponents = formatComponents(mFileFormat); setSize(width, height, ncomponents); @@ -224,7 +224,7 @@ S32 LLImageDXT::getMipOffset(S32 discard) { if (mFileFormat >= FORMAT_DXT1 && mFileFormat <= FORMAT_DXT5) { - llerrs << "getMipOffset called with old (unsupported) format" << llendl; + LL_ERRS() << "getMipOffset called with old (unsupported) format" << LL_ENDL; } S32 width = getWidth(), height = getHeight(); S32 num_mips = calcNumMips(width, height); @@ -251,7 +251,7 @@ void LLImageDXT::setFormat() { case 3: mFileFormat = FORMAT_DXR1; break; case 4: mFileFormat = FORMAT_DXR3; break; - default: llerrs << "LLImageDXT::setFormat called with ncomponents = " << ncomponents << llendl; + default: LL_ERRS() << "LLImageDXT::setFormat called with ncomponents = " << ncomponents << LL_ENDL; } mHeaderSize = calcHeaderSize(); } @@ -265,7 +265,7 @@ BOOL LLImageDXT::decode(LLImageRaw* raw_image, F32 time) if (mFileFormat >= FORMAT_DXT1 && mFileFormat <= FORMAT_DXR5) { - llwarns << "Attempt to decode compressed LLImageDXT to Raw (unsupported)" << llendl; + LL_WARNS() << "Attempt to decode compressed LLImageDXT to Raw (unsupported)" << LL_ENDL; return FALSE; } @@ -303,7 +303,7 @@ BOOL LLImageDXT::getMipData(LLPointer& raw, S32 discard) } else if (discard < mDiscardLevel) { - llerrs << "Request for invalid discard level" << llendl; + LL_ERRS() << "Request for invalid discard level" << LL_ENDL; } U8* data = getData() + getMipOffset(discard); S32 width = 0; @@ -331,7 +331,7 @@ BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_ format = FORMAT_RGBA8; break; default: - llerrs << "LLImageDXT::encode: Unhandled channel number: " << ncomponents << llendl; + LL_ERRS() << "LLImageDXT::encode: Unhandled channel number: " << ncomponents << LL_ENDL; return 0; } @@ -422,7 +422,7 @@ bool LLImageDXT::convertToDXR() case FORMAT_DXT4: newformat = FORMAT_DXR4; break; case FORMAT_DXT5: newformat = FORMAT_DXR5; break; default: - llwarns << "convertToDXR: can not convert format: " << llformat("0x%08x",getFourCC(mFileFormat)) << llendl; + LL_WARNS() << "convertToDXR: can not convert format: " << llformat("0x%08x",getFourCC(mFileFormat)) << LL_ENDL; return false; } mFileFormat = newformat; @@ -433,7 +433,7 @@ bool LLImageDXT::convertToDXR() U8* newdata = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_bytes); if (!newdata) { - llerrs << "Out of memory in LLImageDXT::convertToDXR()" << llendl; + LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL; return false; } llassert(total_bytes > 0); @@ -466,7 +466,7 @@ S32 LLImageDXT::calcDataSize(S32 discard_level) { if (mFileFormat == FORMAT_UNKNOWN) { - llerrs << "calcDataSize called with unloaded LLImageDXT" << llendl; + LL_ERRS() << "calcDataSize called with unloaded LLImageDXT" << LL_ENDL; return 0; } if (discard_level < 0) diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index b70f84efc8..a25794dab4 100755 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp @@ -374,7 +374,7 @@ boolean LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo ) U8* new_buffer = new U8[ new_buffer_size ]; if (!new_buffer) { - llerrs << "Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )" << llendl; + LL_ERRS() << "Out of memory in LLImageJPEG::encodeEmptyOutputBuffer( j_compress_ptr cinfo )" << LL_ENDL; return FALSE; } memcpy( new_buffer, self->mOutputBuffer, self->mOutputBufferSize ); /* Flawfinder: ignore */ @@ -465,7 +465,7 @@ void LLImageJPEG::errorOutputMessage( j_common_ptr cinfo ) LLImage::setLastError(error); BOOL is_decode = (cinfo->is_decompressor != 0); - llwarns << "LLImageJPEG " << (is_decode ? "decode " : "encode ") << " failed: " << buffer << llendl; + LL_WARNS() << "LLImageJPEG " << (is_decode ? "decode " : "encode ") << " failed: " << buffer << LL_ENDL; } BOOL LLImageJPEG::encode( const LLImageRaw* raw_image, F32 encode_time ) diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp index 920ae2891f..4eb8dc7440 100755 --- a/indra/llimage/llimagetga.cpp +++ b/indra/llimage/llimagetga.cpp @@ -266,7 +266,7 @@ BOOL LLImageTGA::updateData() mColorMap = new U8[ color_map_bytes ]; if (!mColorMap) { - llerrs << "Out of Memory in BOOL LLImageTGA::updateData()" << llendl; + LL_ERRS() << "Out of Memory in BOOL LLImageTGA::updateData()" << LL_ENDL; return FALSE; } memcpy( mColorMap, getData() + mDataOffset, color_map_bytes ); /* Flawfinder: ignore */ @@ -1043,7 +1043,7 @@ BOOL LLImageTGA::decodeAndProcess( LLImageRaw* raw_image, F32 domain, F32 weight // Only works for unflipped monochrome RLE images if( (getComponents() != 1) || (mImageType != 11) || mOriginTopBit || mOriginRightBit ) { - llerrs << "LLImageTGA trying to alpha-gradient process an image that's not a standard RLE, one component image" << llendl; + LL_ERRS() << "LLImageTGA trying to alpha-gradient process an image that's not a standard RLE, one component image" << LL_ENDL; return FALSE; } @@ -1151,7 +1151,7 @@ bool LLImageTGA::loadFile( const std::string& path ) LLFILE* file = LLFile::fopen(path, "rb"); /* Flawfinder: ignore */ if( !file ) { - llwarns << "Couldn't open file " << path << llendl; + LL_WARNS() << "Couldn't open file " << path << LL_ENDL; return false; } @@ -1167,7 +1167,7 @@ bool LLImageTGA::loadFile( const std::string& path ) if( bytes_read != file_size ) { deleteData(); - llwarns << "Couldn't read file " << path << llendl; + LL_WARNS() << "Couldn't read file " << path << LL_ENDL; return false; } @@ -1175,7 +1175,7 @@ bool LLImageTGA::loadFile( const std::string& path ) if( !updateData() ) { - llwarns << "Couldn't decode file " << path << llendl; + LL_WARNS() << "Couldn't decode file " << path << LL_ENDL; deleteData(); return false; } diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index ad2eb0f69c..c8b0e872f6 100755 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -60,7 +60,7 @@ S32 LLImageDecodeThread::update(F32 max_time_ms) bool res = addRequest(req); if (!res) { - llerrs << "request added after LLLFSThread::cleanupClass()" << llendl; + LL_ERRS() << "request added after LLLFSThread::cleanupClass()" << LL_ENDL; } } mCreationList.clear(); diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index d15824ce5a..e98f677d9b 100755 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -73,21 +73,21 @@ sample error callback expecting a LLFILE* client object */ void error_callback(const char* msg, void*) { - lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl; + LL_DEBUGS() << "LLImageJ2COJ: " << chomp(msg) << LL_ENDL; } /** sample warning callback expecting a LLFILE* client object */ void warning_callback(const char* msg, void*) { - lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl; + LL_DEBUGS() << "LLImageJ2COJ: " << chomp(msg) << LL_ENDL; } /** sample debug callback expecting no client object */ void info_callback(const char* msg, void*) { - lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl; + LL_DEBUGS() << "LLImageJ2COJ: " << chomp(msg) << LL_ENDL; } // Divide a by 2 to the power of b and round upwards @@ -203,7 +203,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod if(image->numcomps <= first_channel) { - llwarns << "trying to decode more channels than are present in image: numcomps: " << image->numcomps << " first_channel: " << first_channel << llendl; + LL_WARNS() << "trying to decode more channels than are present in image: numcomps: " << image->numcomps << " first_channel: " << first_channel << LL_ENDL; if (image) { opj_image_destroy(image); @@ -472,7 +472,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base) if(!image) { - llwarns << "ERROR -> getMetadata: failed to decode image!" << llendl; + LL_WARNS() << "ERROR -> getMetadata: failed to decode image!" << LL_ENDL; return FALSE; } diff --git a/indra/llinventory/llcategory.h b/indra/llinventory/llcategory.h index 19ce8fa89b..390a8a1f1e 100755 --- a/indra/llinventory/llcategory.h +++ b/indra/llinventory/llcategory.h @@ -43,7 +43,7 @@ // S32 count = LLCategory::none.getSubCategoryCount(); // for(S32 i = 0; i < count; i++) // { -// llinfos << none.getSubCategory(i).lookupNmae() << llendl; +// LL_INFOS() << none.getSubCategory(i).lookupNmae() << LL_ENDL; // } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp index d643ea6ed9..e10402196f 100755 --- a/indra/llinventory/lleconomy.cpp +++ b/indra/llinventory/lleconomy.cpp @@ -101,7 +101,7 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* if (fakeprice_str) { S32 fakeprice = (S32)atoi(fakeprice_str); - llwarns << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << llendl; + LL_WARNS() << "LL_FAKE_UPLOAD_PRICE: Faking upload price as L$" << fakeprice << LL_ENDL; econ_data->setPriceUpload(fakeprice); } #endif @@ -143,19 +143,19 @@ S32 LLGlobalEconomy::calculateLightRent(const LLVector3& object_size) const void LLGlobalEconomy::print() { - llinfos << "Global Economy Settings: " << llendl; - llinfos << "Object Capacity: " << mObjectCapacity << llendl; - llinfos << "Object Count: " << mObjectCount << llendl; - llinfos << "Claim Price Per Object: " << mPriceObjectClaim << llendl; - llinfos << "Claim Price Per Public Object: " << mPricePublicObjectDecay << llendl; - llinfos << "Delete Price Per Public Object: " << mPricePublicObjectDelete << llendl; - llinfos << "Release Price Per Public Object: " << getPricePublicObjectRelease() << llendl; - llinfos << "Price Per Energy Unit: " << mPriceEnergyUnit << llendl; - llinfos << "Price Per Upload: " << mPriceUpload << llendl; - llinfos << "Light Base Price: " << mPriceRentLight << llendl; - llinfos << "Teleport Min Price: " << mTeleportMinPrice << llendl; - llinfos << "Teleport Price Exponent: " << mTeleportPriceExponent << llendl; - llinfos << "Price for group creation: " << mPriceGroupCreate << llendl; + LL_INFOS() << "Global Economy Settings: " << LL_ENDL; + LL_INFOS() << "Object Capacity: " << mObjectCapacity << LL_ENDL; + LL_INFOS() << "Object Count: " << mObjectCount << LL_ENDL; + LL_INFOS() << "Claim Price Per Object: " << mPriceObjectClaim << LL_ENDL; + LL_INFOS() << "Claim Price Per Public Object: " << mPricePublicObjectDecay << LL_ENDL; + LL_INFOS() << "Delete Price Per Public Object: " << mPricePublicObjectDelete << LL_ENDL; + LL_INFOS() << "Release Price Per Public Object: " << getPricePublicObjectRelease() << LL_ENDL; + LL_INFOS() << "Price Per Energy Unit: " << mPriceEnergyUnit << LL_ENDL; + LL_INFOS() << "Price Per Upload: " << mPriceUpload << LL_ENDL; + LL_INFOS() << "Light Base Price: " << mPriceRentLight << LL_ENDL; + LL_INFOS() << "Teleport Min Price: " << mTeleportMinPrice << LL_ENDL; + LL_INFOS() << "Teleport Price Exponent: " << mTeleportPriceExponent << LL_ENDL; + LL_INFOS() << "Price for group creation: " << mPriceGroupCreate << LL_ENDL; } LLRegionEconomy::LLRegionEconomy() @@ -209,8 +209,8 @@ void LLRegionEconomy::processEconomyDataRequest(LLMessageSystem *msg, void **use LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; if (!this_ptr->hasData()) { - llwarns << "Dropping EconomyDataRequest, because EconomyData message " - << "has not been processed" << llendl; + LL_WARNS() << "Dropping EconomyDataRequest, because EconomyData message " + << "has not been processed" << LL_ENDL; } msg->newMessageFast(_PREHASH_EconomyData); @@ -254,12 +254,12 @@ void LLRegionEconomy::print() { this->LLGlobalEconomy::print(); - llinfos << "Region Economy Settings: " << llendl; - llinfos << "Land (square meters): " << mAreaTotal << llendl; - llinfos << "Owned Land (square meters): " << mAreaOwned << llendl; - llinfos << "Daily Object Rent: " << mPriceObjectRent << llendl; - llinfos << "Daily Land Rent (per meter): " << getPriceParcelRent() << llendl; - llinfos << "Energey Efficiency: " << mEnergyEfficiency << llendl; + LL_INFOS() << "Region Economy Settings: " << LL_ENDL; + LL_INFOS() << "Land (square meters): " << mAreaTotal << LL_ENDL; + LL_INFOS() << "Owned Land (square meters): " << mAreaOwned << LL_ENDL; + LL_INFOS() << "Daily Object Rent: " << mPriceObjectRent << LL_ENDL; + LL_INFOS() << "Daily Land Rent (per meter): " << getPriceParcelRent() << LL_ENDL; + LL_INFOS() << "Energey Efficiency: " << mEnergyEfficiency << LL_ENDL; } diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp index f6d0f5bce8..cc3d7af23a 100755 --- a/indra/llinventory/llfoldertype.cpp +++ b/indra/llinventory/llfoldertype.cpp @@ -145,7 +145,7 @@ LLAssetType::EType LLFolderType::folderTypeToAssetType(LLFolderType::EType folde { if (LLAssetType::lookup(LLAssetType::EType(folder_type)) == LLAssetType::badLookup()) { - llwarns << "Converting to unknown asset type " << folder_type << llendl; + LL_WARNS() << "Converting to unknown asset type " << folder_type << LL_ENDL; } return (LLAssetType::EType)folder_type; } @@ -155,7 +155,7 @@ LLFolderType::EType LLFolderType::assetTypeToFolderType(LLAssetType::EType asset { if (LLFolderType::lookup(LLFolderType::EType(asset_type)) == LLFolderType::badLookup()) { - llwarns << "Converting to unknown folder type " << asset_type << llendl; + LL_WARNS() << "Converting to unknown folder type " << asset_type << LL_ENDL; } return (LLFolderType::EType)asset_type; } diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 2a319c635f..38e01593ca 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -213,8 +213,8 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL; } } return TRUE; @@ -254,19 +254,19 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co void LLInventoryObject::removeFromServer() { // don't do nothin' - llwarns << "LLInventoryObject::removeFromServer() called. Doesn't do anything." << llendl; + LL_WARNS() << "LLInventoryObject::removeFromServer() called. Doesn't do anything." << LL_ENDL; } void LLInventoryObject::updateParentOnServer(BOOL) const { // don't do nothin' - llwarns << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << llendl; + LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL; } void LLInventoryObject::updateServer(BOOL) const { // don't do nothin' - llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl; + LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL; } inline @@ -404,23 +404,23 @@ U32 LLInventoryItem::getCRC32() const // *NOTE: We currently do not validate the name or description, // but if they change in transit, it's no big deal. U32 crc = mUUID.getCRC32(); - //lldebugs << "1 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "1 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mParentUUID.getCRC32(); - //lldebugs << "2 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "2 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mPermissions.getCRC32(); - //lldebugs << "3 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "3 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mAssetUUID.getCRC32(); - //lldebugs << "4 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "4 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mType; - //lldebugs << "5 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "5 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mInventoryType; - //lldebugs << "6 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "6 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mFlags; - //lldebugs << "7 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "7 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += mSaleInfo.getCRC32(); - //lldebugs << "8 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "8 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += (U32)mCreationDate; - //lldebugs << "9 crc: " << std::hex << crc << std::dec << llendl; + //LL_DEBUGS() << "9 crc: " << std::hex << crc << std::dec << LL_ENDL; return crc; } @@ -577,13 +577,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 #ifdef CRC_CHECK if(local_crc == remote_crc) { - lldebugs << "crc matches" << llendl; + LL_DEBUGS() << "crc matches" << LL_ENDL; return TRUE; } else { - llwarns << "inventory crc mismatch: local=" << std::hex << local_crc - << " remote=" << remote_crc << std::dec << llendl; + LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc + << " remote=" << remote_crc << std::dec << LL_ENDL; return FALSE; } #else @@ -719,7 +719,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) const char *donkey = mDescription.c_str(); if (donkey[0] == '|') { - llerrs << "Donkey" << llendl; + LL_ERRS() << "Donkey" << LL_ENDL; } */ } @@ -731,8 +731,8 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import of item " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import of item " << mUUID << LL_ENDL; } } @@ -742,7 +742,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -925,7 +925,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) const char *donkey = mDescription.c_str(); if (donkey[0] == '|') { - llerrs << "Donkey" << llendl; + LL_ERRS() << "Donkey" << LL_ENDL; } */ } @@ -937,8 +937,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import of item " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import of item " << mUUID << LL_ENDL; } } @@ -948,7 +948,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -1175,7 +1175,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd) if((LLInventoryType::IT_NONE == mInventoryType) || !inventory_and_asset_types_match(mInventoryType, mType)) { - lldebugs << "Resetting inventory type for " << mUUID << llendl; + LL_DEBUGS() << "Resetting inventory type for " << mUUID << LL_ENDL; mInventoryType = LLInventoryType::defaultForAssetType(mType); } @@ -1248,7 +1248,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) if (NULL == bin_bucket) { - llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl; + LL_ERRS() << "unpackBinaryBucket failed. bin_bucket is NULL." << LL_ENDL; return; } @@ -1258,7 +1258,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) item_buffer[bin_bucket_size] = '\0'; std::string str(&item_buffer[0]); - lldebugs << "item buffer: " << str << llendl; + LL_DEBUGS() << "item buffer: " << str << LL_ENDL; // Tokenize the string. typedef boost::tokenizer > tokenizer; @@ -1295,7 +1295,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size) perm.init(creator_id, owner_id, last_owner_id, group_id); perm.initMasks(mask_base, mask_owner, mask_group, mask_every, mask_next); setPermissions(perm); - //lldebugs << "perm: " << perm << llendl; + //LL_DEBUGS() << "perm: " << perm << LL_ENDL; LLUUID asset_id((*(iter++)).c_str()); setAssetUUID(asset_id); @@ -1496,8 +1496,8 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import category " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import category " << mUUID << LL_ENDL; } } return TRUE; @@ -1575,8 +1575,8 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import category " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import category " << mUUID << LL_ENDL; } } return TRUE; @@ -1607,8 +1607,8 @@ LLSD ll_create_sd_from_inventory_item(LLPointer item) if(item.isNull()) return rv; if (item->getType() == LLAssetType::AT_NONE) { - llwarns << "ll_create_sd_from_inventory_item() for item with AT_NONE" - << llendl; + LL_WARNS() << "ll_create_sd_from_inventory_item() for item with AT_NONE" + << LL_ENDL; return rv; } rv[INV_ITEM_ID_LABEL] = item->getUUID(); @@ -1633,8 +1633,8 @@ LLSD ll_create_sd_from_inventory_category(LLPointer cat) if(cat.isNull()) return rv; if (cat->getType() == LLAssetType::AT_NONE) { - llwarns << "ll_create_sd_from_inventory_category() for cat with AT_NONE" - << llendl; + LL_WARNS() << "ll_create_sd_from_inventory_category() for cat with AT_NONE" + << LL_ENDL; return rv; } rv[INV_FOLDER_ID_LABEL] = cat->getUUID(); diff --git a/indra/llinventory/lllandmark.cpp b/indra/llinventory/lllandmark.cpp index 493909cf9c..4c6075d6b5 100755 --- a/indra/llinventory/lllandmark.cpp +++ b/indra/llinventory/lllandmark.cpp @@ -128,7 +128,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer) goto error; } cur += chars_read; - // llinfos << "Landmark read: " << pos << llendl; + // LL_INFOS() << "Landmark read: " << pos << LL_ENDL; return new LLLandmark(pos); } @@ -155,7 +155,7 @@ LLLandmark* LLLandmark::constructFromString(const char *buffer) } error: - llinfos << "Bad Landmark Asset: bad _DATA_ block." << llendl; + LL_INFOS() << "Bad Landmark Asset: bad _DATA_ block." << LL_ENDL; return NULL; } @@ -176,7 +176,7 @@ void LLLandmark::requestRegionHandle( if(region_id.isNull()) { // don't bother with checking - it's 0. - lldebugs << "requestRegionHandle: null" << llendl; + LL_DEBUGS() << "requestRegionHandle: null" << LL_ENDL; if(callback) { const U64 U64_ZERO = 0; @@ -187,7 +187,7 @@ void LLLandmark::requestRegionHandle( { if(region_id == mLocalRegion.first) { - lldebugs << "requestRegionHandle: local" << llendl; + LL_DEBUGS() << "requestRegionHandle: local" << LL_ENDL; if(callback) { callback(region_id, mLocalRegion.second); @@ -198,14 +198,14 @@ void LLLandmark::requestRegionHandle( region_map_t::iterator it = mRegions.find(region_id); if(it == mRegions.end()) { - lldebugs << "requestRegionHandle: upstream" << llendl; + LL_DEBUGS() << "requestRegionHandle: upstream" << LL_ENDL; if(callback) { region_callback_map_t::value_type vt(region_id, callback); sRegionCallbackMap.insert(vt); } - lldebugs << "Landmark requesting information about: " - << region_id << llendl; + LL_DEBUGS() << "Landmark requesting information about: " + << region_id << LL_ENDL; msg->newMessage("RegionHandleRequest"); msg->nextBlock("RequestBlock"); msg->addUUID("RegionID", region_id); @@ -214,7 +214,7 @@ void LLLandmark::requestRegionHandle( else if(callback) { // we have the answer locally - just call the callack. - lldebugs << "requestRegionHandle: ready" << llendl; + LL_DEBUGS() << "requestRegionHandle: ready" << LL_ENDL; callback(region_id, (*it).second.mRegionHandle); } } @@ -248,8 +248,8 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**) #if LL_DEBUG U32 grid_x, grid_y; grid_from_region_handle(info.mRegionHandle, &grid_x, &grid_y); - lldebugs << "Landmark got reply for region: " << region_id << " " - << grid_x << "," << grid_y << llendl; + LL_DEBUGS() << "Landmark got reply for region: " << region_id << " " + << grid_x << "," << grid_y << LL_ENDL; #endif // make all the callbacks here. diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp index 69152cefe0..908c647498 100755 --- a/indra/llinventory/llnotecard.cpp +++ b/indra/llinventory/llnotecard.cpp @@ -57,33 +57,33 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "LLEmbeddedItems version" >> mEmbeddedVersion >> "\n"; if (str.fail()) { - llwarns << "Invalid Linden text file header" << llendl; + LL_WARNS() << "Invalid Linden text file header" << LL_ENDL; goto import_file_failed; } if( 1 != mEmbeddedVersion ) { - llwarns << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems version: " << mEmbeddedVersion << LL_ENDL; goto import_file_failed; } str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid Linden text file format: missing {" << llendl; + LL_WARNS() << "Invalid Linden text file format: missing {" << LL_ENDL; goto import_file_failed; } str >> std::ws >> "count " >> count >> "\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems count" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems count" << LL_ENDL; goto import_file_failed; } if((count < 0)) { - llwarns << "Invalid LLEmbeddedItems count value: " << count << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems count value: " << count << LL_ENDL; goto import_file_failed; } @@ -92,7 +92,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing {" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing {" << LL_ENDL; goto import_file_failed; } @@ -100,21 +100,21 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "ext char index " >> index >> "\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing ext char index" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing ext char index" << LL_ENDL; goto import_file_failed; } str >> std::ws >> "inv_item\t0\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing inv_item" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing inv_item" << LL_ENDL; goto import_file_failed; } LLPointer item = new LLInventoryItem; if (!item->importLegacyStream(str)) { - llinfos << "notecard import failed" << llendl; + LL_INFOS() << "notecard import failed" << LL_ENDL; goto import_file_failed; } mItems.push_back(item); @@ -122,7 +122,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "}\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL; goto import_file_failed; } } @@ -130,7 +130,7 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str) str >> std::ws >> "}\n"; if(str.fail()) { - llwarns << "Invalid LLEmbeddedItems file format: missing }" << llendl; + LL_WARNS() << "Invalid LLEmbeddedItems file format: missing }" << LL_ENDL; goto import_file_failed; } @@ -161,20 +161,20 @@ bool LLNotecard::importStream(std::istream& str) str >> std::ws >> "Linden text version " >> mVersion >> "\n"; if(str.fail()) { - llwarns << "Invalid Linden text file header " << llendl; + LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; return FALSE; } if( 1 != mVersion && 2 != mVersion) { - llwarns << "Invalid Linden text file version: " << mVersion << llendl; + LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL; return FALSE; } str >> std::ws >> "{\n"; if(str.fail()) { - llwarns << "Invalid Linden text file format" << llendl; + LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; return FALSE; } @@ -187,7 +187,7 @@ bool LLNotecard::importStream(std::istream& str) str.getline(line_buf, STD_STRING_BUF_SIZE); if(str.fail()) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } line_buf[STD_STRING_STR_LEN] = '\0'; @@ -195,13 +195,13 @@ bool LLNotecard::importStream(std::istream& str) S32 text_len = 0; if( 1 != sscanf(line_buf, "Text length %d", &text_len) ) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } if(text_len > mMaxText || text_len < 0) { - llwarns << "Invalid Linden text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; return FALSE; } @@ -211,7 +211,7 @@ bool LLNotecard::importStream(std::istream& str) fullread(str, text, text_len); if(str.fail()) { - llwarns << "Invalid Linden text: text shorter than text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL; success = FALSE; } text[text_len] = '\0'; diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 23a4e4b077..18154d4b0d 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -581,8 +581,8 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr } else { - llwarns << "Unknown keyword in parcel access entry section: <" - << keyword << ">" << llendl; + LL_WARNS() << "Unknown keyword in parcel access entry section: <" + << keyword << ">" << LL_ENDL; } } return input_stream.good(); @@ -1207,9 +1207,9 @@ void LLParcel::clearParcel() void LLParcel::dump() { - llinfos << "parcel " << mLocalID << " area " << mArea << llendl; - llinfos << " name <" << mName << ">" << llendl; - llinfos << " desc <" << mDesc << ">" << llendl; + LL_INFOS() << "parcel " << mLocalID << " area " << mArea << LL_ENDL; + LL_INFOS() << " name <" << mName << ">" << LL_ENDL; + LL_INFOS() << " desc <" << mDesc << ">" << LL_ENDL; } const std::string& ownership_status_to_string(LLParcel::EOwnershipStatus status) @@ -1289,7 +1289,7 @@ LLParcel::ECategory category_string_to_category(const std::string& s) return (LLParcel::ECategory)i; } } - llwarns << "Parcel category outside of possibilities " << s << llendl; + LL_WARNS() << "Parcel category outside of possibilities " << s << LL_ENDL; return LLParcel::C_NONE; } diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index 55067cde73..e79b753514 100755 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -116,7 +116,7 @@ LLUUID LLPermissions::getSafeOwner() const } else { - llwarns << "LLPermissions::getSafeOwner() called with no valid owner!" << llendl; + LL_WARNS() << "LLPermissions::getSafeOwner() called with no valid owner!" << LL_ENDL; LLUUID unused_uuid; unused_uuid.generate(); @@ -665,7 +665,7 @@ BOOL LLPermissions::importFile(LLFILE* fp) } else { - llinfos << "unknown keyword " << keyword << " in permissions import" << llendl; + LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL; } } fix(); @@ -799,7 +799,7 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream) } else { - llinfos << "unknown keyword " << keyword << " in permissions import" << llendl; + LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL; } } fix(); @@ -981,8 +981,8 @@ void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed) mBits[idx] = allowed ? AP_ALL : AP_SOME; break; default: - llwarns << "Bad aggregateBit " << (S32)idx << " " - << (allowed ? "true" : "false") << llendl; + LL_WARNS() << "Bad aggregateBit " << (S32)idx << " " + << (allowed ? "true" : "false") << LL_ENDL; break; } } @@ -1026,8 +1026,8 @@ void LLAggregatePermissions::aggregateIndex(EPermIndex idx, U8 bits) } break; default: - llwarns << "Bad aggregate index " << (S32)idx << " " - << (S32)bits << llendl; + LL_WARNS() << "Bad aggregate index " << (S32)idx << " " + << (S32)bits << LL_ENDL; break; } } diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index dd408a8efe..63e34d188e 100755 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -179,14 +179,14 @@ BOOL LLSaleInfo::importFile(LLFILE* fp, BOOL& has_perm_mask, U32& perm_mask) } else if (!strcmp("perm_mask", keyword)) { - //llinfos << "found deprecated keyword perm_mask" << llendl; + //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL; has_perm_mask = TRUE; sscanf(valuestr, "%x", &perm_mask); } else { - llwarns << "unknown keyword '" << keyword - << "' in sale info import" << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in sale info import" << LL_ENDL; } } return success; @@ -235,14 +235,14 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m } else if (!strcmp("perm_mask", keyword)) { - //llinfos << "found deprecated keyword perm_mask" << llendl; + //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL; has_perm_mask = TRUE; sscanf(valuestr, "%x", &perm_mask); } else { - llwarns << "unknown keyword '" << keyword - << "' in sale info import" << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in sale info import" << LL_ENDL; } } return success; diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp index ee0e6ae26c..e21f29df41 100755 --- a/indra/llinventory/lltransactionflags.cpp +++ b/indra/llinventory/lltransactionflags.cpp @@ -92,11 +92,11 @@ std::string build_transfer_message_to_source( S32 transaction_type, const std::string& description) { - lldebugs << "build_transfer_message_to_source: " << amount << " " + LL_DEBUGS() << "build_transfer_message_to_source: " << amount << " " << source_id << " " << dest_id << " " << dest_name << " " << transaction_type << " " << (description.empty() ? "(no desc)" : description) - << llendl; + << LL_ENDL; if(source_id.isNull()) { return description; @@ -144,10 +144,10 @@ std::string build_transfer_message_to_destination( S32 transaction_type, const std::string& description) { - lldebugs << "build_transfer_message_to_dest: " << amount << " " + LL_DEBUGS() << "build_transfer_message_to_dest: " << amount << " " << dest_id << " " << source_id << " " << source_name << " " << transaction_type << " " << (description.empty() ? "(no desc)" : description) - << llendl; + << LL_ENDL; if(0 == amount) { return std::string(); diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 0c0a844b73..6a8959517d 100755 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -156,22 +156,22 @@ public: void LLKDUMessageWarning::put_text(const char *s) { - llinfos << "KDU Warning: " << s << llendl; + LL_INFOS() << "KDU Warning: " << s << LL_ENDL; } void LLKDUMessageWarning::put_text(const kdu_uint16 *s) { - llinfos << "KDU Warning: " << s << llendl; + LL_INFOS() << "KDU Warning: " << s << LL_ENDL; } void LLKDUMessageError::put_text(const char *s) { - llinfos << "KDU Error: " << s << llendl; + LL_INFOS() << "KDU Error: " << s << LL_ENDL; } void LLKDUMessageError::put_text(const kdu_uint16 *s) { - llinfos << "KDU Error: " << s << llendl; + LL_INFOS() << "KDU Error: " << s << LL_ENDL; } void LLKDUMessageError::flush(bool end_of_message) @@ -290,7 +290,7 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod kdu_dims dims2; mCodeStreamp->get_dims(2,dims2); if ((dims1 != dims) || (dims2 != dims)) { - llerrs << "Components don't have matching dimensions!" << llendl; + LL_ERRS() << "Components don't have matching dimensions!" << LL_ENDL; } } @@ -393,7 +393,7 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco region_kdu->size.y = region[3] - region[1]; } int discard = (discard_level != -1 ? discard_level : base.getRawDiscardLevel()); - //llinfos << "Merov debug : initDecode, discard used = " << discard << ", asked = " << discard_level << llendl; + //LL_INFOS() << "Merov debug : initDecode, discard used = " << discard << ", asked = " << discard_level << LL_ENDL; // Apply loading restrictions mCodeStreamp->apply_input_restrictions( first_channel, max_channel_count, discard, 0, region_kdu); diff --git a/indra/llmath/llcalc.cpp b/indra/llmath/llcalc.cpp index 1b2d609b67..edc6986cc9 100755 --- a/indra/llmath/llcalc.cpp +++ b/indra/llmath/llcalc.cpp @@ -141,20 +141,20 @@ bool LLCalc::evalString(const std::string& expression, F32& result) try { info = parse(start, expr_upper.end(), calc, space_p); - lldebugs << "Math expression: " << expression << " = " << result << llendl; + LL_DEBUGS() << "Math expression: " << expression << " = " << result << LL_ENDL; } catch(parser_error &e) { mLastErrorPos = e.where - expr_upper.begin(); - llinfos << "Calc parser exception: " << e.descriptor << " at " << mLastErrorPos << " in expression: " << expression << llendl; + LL_INFOS() << "Calc parser exception: " << e.descriptor << " at " << mLastErrorPos << " in expression: " << expression << LL_ENDL; return false; } if (!info.full) { mLastErrorPos = info.stop - expr_upper.begin(); - llinfos << "Unhandled syntax error at " << mLastErrorPos << " in expression: " << expression << llendl; + LL_INFOS() << "Unhandled syntax error at " << mLastErrorPos << " in expression: " << expression << LL_ENDL; return false; } diff --git a/indra/llmath/llcoordframe.cpp b/indra/llmath/llcoordframe.cpp index 7dd8e43185..1bf51ca0eb 100755 --- a/indra/llmath/llcoordframe.cpp +++ b/indra/llmath/llcoordframe.cpp @@ -59,7 +59,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &origin) : if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -71,7 +71,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &origin, const LLVector3 &direction) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -86,7 +86,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &x_axis, if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -102,7 +102,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &origin, if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -117,7 +117,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &origin, if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -132,7 +132,7 @@ LLCoordFrame::LLCoordFrame(const LLQuaternion &q) : if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -147,7 +147,7 @@ LLCoordFrame::LLCoordFrame(const LLVector3 &origin, const LLQuaternion &q) : if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -160,7 +160,7 @@ LLCoordFrame::LLCoordFrame(const LLMatrix4 &mat) : if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } @@ -176,7 +176,7 @@ LLCoordFrame::LLCoordFrame(const F32 *origin, const F32 *rotation) : if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } */ @@ -191,7 +191,7 @@ LLCoordFrame::LLCoordFrame(const F32 *origin_and_rotation) : if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::LLCoordFrame()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::LLCoordFrame()" << LL_ENDL; } } */ @@ -220,7 +220,7 @@ void LLCoordFrame::setOrigin(F32 x, F32 y, F32 z) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setOrigin()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setOrigin()" << LL_ENDL; } } @@ -230,7 +230,7 @@ void LLCoordFrame::setOrigin(const LLVector3 &new_origin) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setOrigin()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setOrigin()" << LL_ENDL; } } @@ -243,7 +243,7 @@ void LLCoordFrame::setOrigin(const F32 *origin) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setOrigin()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setOrigin()" << LL_ENDL; } } @@ -254,7 +254,7 @@ void LLCoordFrame::setOrigin(const LLCoordFrame &frame) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setOrigin()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setOrigin()" << LL_ENDL; } } @@ -271,7 +271,7 @@ void LLCoordFrame::setAxes(const LLVector3 &x_axis, if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setAxes()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setAxes()" << LL_ENDL; } } @@ -284,7 +284,7 @@ void LLCoordFrame::setAxes(const LLMatrix3 &rotation_matrix) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setAxes()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setAxes()" << LL_ENDL; } } @@ -296,7 +296,7 @@ void LLCoordFrame::setAxes(const LLQuaternion &q ) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setAxes()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setAxes()" << LL_ENDL; } } @@ -316,7 +316,7 @@ void LLCoordFrame::setAxes( const F32 *rotation_matrix ) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setAxes()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setAxes()" << LL_ENDL; } } @@ -330,7 +330,7 @@ void LLCoordFrame::setAxes(const LLCoordFrame &frame) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::setAxes()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::setAxes()" << LL_ENDL; } } @@ -346,7 +346,7 @@ void LLCoordFrame::translate(F32 x, F32 y, F32 z) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::translate()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::translate()" << LL_ENDL; } } @@ -358,7 +358,7 @@ void LLCoordFrame::translate(const LLVector3 &v) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::translate()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::translate()" << LL_ENDL; } } @@ -372,7 +372,7 @@ void LLCoordFrame::translate(const F32 *origin) if( !mOrigin.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::translate()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::translate()" << LL_ENDL; } } @@ -409,7 +409,7 @@ void LLCoordFrame::rotate(const LLMatrix3 &rotation_matrix) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::rotate()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::rotate()" << LL_ENDL; } } @@ -423,7 +423,7 @@ void LLCoordFrame::roll(F32 angle) if( !mYAxis.isFinite() || !mZAxis.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::roll()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::roll()" << LL_ENDL; } } @@ -436,7 +436,7 @@ void LLCoordFrame::pitch(F32 angle) if( !mXAxis.isFinite() || !mZAxis.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::pitch()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::pitch()" << LL_ENDL; } } @@ -449,7 +449,7 @@ void LLCoordFrame::yaw(F32 angle) if( !mXAxis.isFinite() || !mYAxis.isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::yaw()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::yaw()" << LL_ENDL; } } @@ -509,7 +509,7 @@ size_t LLCoordFrame::readOrientation(const char *buffer) if( !isFinite() ) { reset(); - llwarns << "Non Finite in LLCoordFrame::readOrientation()" << llendl; + LL_WARNS() << "Non Finite in LLCoordFrame::readOrientation()" << LL_ENDL; } return 12*sizeof(F32); diff --git a/indra/llmath/llline.cpp b/indra/llmath/llline.cpp index ef10d1e7fa..f26231840b 100755 --- a/indra/llmath/llline.cpp +++ b/indra/llmath/llline.cpp @@ -82,10 +82,10 @@ LLVector3 LLLine::nearestApproach( const LLLine& other_line ) const if ( one_minus_dir_dot_dir < SOME_VERY_SMALL_NUMBER ) { #ifdef LL_DEBUG - llwarns << "LLLine::nearestApproach() was given two very " + LL_WARNS() << "LLLine::nearestApproach() was given two very " << "nearly parallel lines dir1 = " << mDirection << " dir2 = " << other_line.mDirection << " with 1-dot_product = " - << one_minus_dir_dot_dir << llendl; + << one_minus_dir_dot_dir << LL_ENDL; #endif // the lines are approximately parallel // We shouldn't fall in here because this check should have been made diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 7348904c61..02220c41d8 100755 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -265,12 +265,12 @@ public: if (child->getOctant() != i) { - llerrs << "Invalid child map, bad octant data." << llendl; + LL_ERRS() << "Invalid child map, bad octant data." << LL_ENDL; } if (getOctant(child->getCenter()) != child->getOctant()) { - llerrs << "Invalid child octant compared to position data." << llendl; + LL_ERRS() << "Invalid child octant compared to position data." << LL_ENDL; } } } @@ -311,7 +311,7 @@ public: { if (data == NULL || data->getBinIndex() != -1) { - OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << llendl; + OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << LL_ENDL; return false; } LLOctreeNode* parent = getOctParent(); @@ -374,7 +374,7 @@ public: if (getChildCount() == 8) { //this really isn't possible, something bad has happened - OCT_ERRS << "Octree detected floating point error and gave up." << llendl; + OCT_ERRS << "Octree detected floating point error and gave up." << LL_ENDL; return false; } @@ -383,7 +383,7 @@ public: { if (mChild[i]->getCenter().equals3(center)) { - OCT_ERRS << "Octree detected duplicate child center and gave up." << llendl; + OCT_ERRS << "Octree detected duplicate child center and gave up." << LL_ENDL; return false; } } @@ -399,7 +399,7 @@ public: else { //it's not in here, give it to the root - OCT_ERRS << "Octree insertion failed, starting over from root!" << llendl; + OCT_ERRS << "Octree insertion failed, starting over from root!" << LL_ENDL; oct_node* node = this; @@ -483,7 +483,7 @@ public: } //node is now root - llwarns << "!!! OCTREE REMOVING ELEMENT BY ADDRESS, SEVERE PERFORMANCE PENALTY |||" << llendl; + LL_WARNS() << "!!! OCTREE REMOVING ELEMENT BY ADDRESS, SEVERE PERFORMANCE PENALTY |||" << LL_ENDL; node->removeByAddress(data); llassert(data->getBinIndex() == -1); return true; @@ -496,7 +496,7 @@ public: if (mData[i] == data) { //we have data _remove(data, i); - llwarns << "FOUND!" << llendl; + LL_WARNS() << "FOUND!" << LL_ENDL; return; } } @@ -524,7 +524,7 @@ public: mChild[i]->validate(); if (mChild[i]->getParent() != this) { - llerrs << "Octree child has invalid parent." << llendl; + LL_ERRS() << "Octree child has invalid parent." << LL_ENDL; } } #endif @@ -550,24 +550,24 @@ public: if (child->getSize().equals3(getSize())) { - OCT_ERRS << "Child size is same as parent size!" << llendl; + OCT_ERRS << "Child size is same as parent size!" << LL_ENDL; } for (U32 i = 0; i < getChildCount(); i++) { if(!mChild[i]->getSize().equals3(child->getSize())) { - OCT_ERRS <<"Invalid octree child size." << llendl; + OCT_ERRS <<"Invalid octree child size." << LL_ENDL; } if (mChild[i]->getCenter().equals3(child->getCenter())) { - OCT_ERRS <<"Duplicate octree child position." << llendl; + OCT_ERRS <<"Duplicate octree child position." << LL_ENDL; } } if (mChild.size() >= 8) { - OCT_ERRS <<"Octree node has too many children... why?" << llendl; + OCT_ERRS <<"Octree node has too many children... why?" << LL_ENDL; } #endif @@ -641,7 +641,7 @@ public: } } - OCT_ERRS << "Octree failed to delete requested child." << llendl; + OCT_ERRS << "Octree failed to delete requested child." << LL_ENDL; } protected: @@ -724,13 +724,13 @@ public: { if (data == NULL) { - OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE ROOT !!!" << llendl; + OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE ROOT !!!" << LL_ENDL; return false; } if (data->getBinRadius() > 4096.0) { - OCT_ERRS << "!!! ELEMENT EXCEEDS MAXIMUM SIZE IN OCTREE ROOT !!!" << llendl; + OCT_ERRS << "!!! ELEMENT EXCEEDS MAXIMUM SIZE IN OCTREE ROOT !!!" << LL_ENDL; return false; } @@ -746,7 +746,7 @@ public: if (lt != 0x7) { - //OCT_ERRS << "!!! ELEMENT EXCEEDS RANGE OF SPATIAL PARTITION !!!" << llendl; + //OCT_ERRS << "!!! ELEMENT EXCEEDS RANGE OF SPATIAL PARTITION !!!" << LL_ENDL; return false; } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index e4ab46929f..640e916b4b 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -349,7 +349,7 @@ public: } else { - llerrs << "Empty leaf" << llendl; + LL_ERRS() << "Empty leaf" << LL_ENDL; } for (S32 i = 0; i < branch->getChildCount(); ++i) @@ -839,7 +839,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai if (detail < MIN_LOD) { - llinfos << "Generating profile with LOD < MIN_LOD. CLAMPING" << llendl; + LL_INFOS() << "Generating profile with LOD < MIN_LOD. CLAMPING" << LL_ENDL; detail = MIN_LOD; } @@ -855,7 +855,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai // Quick validation to eliminate some server crashes. if (begin > end - 0.01f) { - llwarns << "LLProfile::generate() assertion failed (begin >= end)" << llendl; + LL_WARNS() << "LLProfile::generate() assertion failed (begin >= end)" << LL_ENDL; return FALSE; } @@ -1071,7 +1071,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai } break; default: - llerrs << "Unknown profile: getCurveType()=" << params.getCurveType() << llendl; + LL_ERRS() << "Unknown profile: getCurveType()=" << params.getCurveType() << LL_ENDL; break; }; @@ -1155,7 +1155,7 @@ BOOL LLProfileParams::importFile(LLFILE *fp) } else { - llwarns << "unknown keyword " << keyword << " in profile import" << llendl; + LL_WARNS() << "unknown keyword " << keyword << " in profile import" << LL_ENDL; } } @@ -1227,7 +1227,7 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword " << keyword << " in profile import" << llendl; + LL_WARNS() << "unknown keyword " << keyword << " in profile import" << LL_ENDL; } } @@ -1541,7 +1541,7 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, if (detail < MIN_LOD) { - llinfos << "Generating path with LOD < MIN! Clamping to 1" << llendl; + LL_INFOS() << "Generating path with LOD < MIN! Clamping to 1" << LL_ENDL; detail = MIN_LOD; } @@ -1793,7 +1793,7 @@ BOOL LLPathParams::importFile(LLFILE *fp) } else { - llwarns << "unknown keyword " << " in path import" << llendl; + LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } return TRUE; @@ -1933,7 +1933,7 @@ BOOL LLPathParams::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword " << " in path import" << llendl; + LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } return TRUE; @@ -2024,7 +2024,7 @@ LLProfile::~LLProfile() { if(profile_delete_lock) { - llerrs << "LLProfile should not be deleted here!" << llendl ; + LL_ERRS() << "LLProfile should not be deleted here!" << LL_ENDL ; } } @@ -2145,13 +2145,13 @@ BOOL LLVolume::generate() //debug info, to be removed if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20)) { - llinfos << "sizeS: " << mPathp->mPath.size() << " sizeT: " << mProfilep->mProfile.size() << llendl ; - llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ; - llinfos << mParams << llendl ; - llinfos << "more info to check if mProfilep is deleted or not." << llendl ; - llinfos << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << llendl ; + LL_INFOS() << "sizeS: " << mPathp->mPath.size() << " sizeT: " << mProfilep->mProfile.size() << LL_ENDL ; + LL_INFOS() << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << LL_ENDL ; + LL_INFOS() << mParams << LL_ENDL ; + LL_INFOS() << "more info to check if mProfilep is deleted or not." << LL_ENDL ; + LL_INFOS() << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << LL_ENDL ; - llerrs << "LLVolume corrupted!" << llendl ; + LL_ERRS() << "LLVolume corrupted!" << LL_ENDL ; } //******************************************************************** @@ -2167,14 +2167,14 @@ BOOL LLVolume::generate() //debug info, to be removed if((U32)(sizeS * sizeT) > (1u << 20)) { - llinfos << "regenPath: " << (S32)regenPath << " regenProf: " << (S32)regenProf << llendl ; - llinfos << "sizeS: " << sizeS << " sizeT: " << sizeT << llendl ; - llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ; - llinfos << mParams << llendl ; - llinfos << "more info to check if mProfilep is deleted or not." << llendl ; - llinfos << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << llendl ; + LL_INFOS() << "regenPath: " << (S32)regenPath << " regenProf: " << (S32)regenProf << LL_ENDL ; + LL_INFOS() << "sizeS: " << sizeS << " sizeT: " << sizeT << LL_ENDL ; + LL_INFOS() << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << LL_ENDL ; + LL_INFOS() << mParams << LL_ENDL ; + LL_INFOS() << "more info to check if mProfilep is deleted or not." << LL_ENDL ; + LL_INFOS() << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << LL_ENDL ; - llerrs << "LLVolume corrupted!" << llendl ; + LL_ERRS() << "LLVolume corrupted!" << LL_ENDL ; } //******************************************************************** @@ -2368,7 +2368,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) LLSD mdl; if (!unzip_llsd(mdl, is, size)) { - LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD, will probably fetch from sim again." << llendl; + LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD, will probably fetch from sim again." << LL_ENDL; return false; } @@ -2377,7 +2377,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) if (face_count == 0) { //no faces unpacked, treat as failed decode - llwarns << "found no faces!" << llendl; + LL_WARNS() << "found no faces!" << LL_ENDL; return false; } @@ -2410,7 +2410,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) if (idx.empty() || face.mNumIndices < 3) { //why is there an empty index list? - llwarns <<"Empty face present!" << llendl; + LL_WARNS() <<"Empty face present!" << LL_ENDL; continue; } @@ -2557,7 +2557,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) if (cur_vertex != num_verts || idx != weights.size()) { - llwarns << "Vertex weight count does not match vertex count!" << llendl; + LL_WARNS() << "Vertex weight count does not match vertex count!" << LL_ENDL; } } @@ -2723,7 +2723,7 @@ void LLVolume::createVolumeFaces() vf.mNumS = face.mCount; if (vf.mNumS < 0) { - llerrs << "Volume face corruption detected." << llendl; + LL_ERRS() << "Volume face corruption detected." << LL_ENDL; } vf.mBeginT = 0; @@ -2771,7 +2771,7 @@ void LLVolume::createVolumeFaces() vf.mNumS = vf.mNumS*2; if (vf.mNumS < 0) { - llerrs << "Volume face corruption detected." << llendl; + LL_ERRS() << "Volume face corruption detected." << LL_ENDL; } } } @@ -3080,7 +3080,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, // weird crash bug - DEV-11158 - trying to collect more data: if ((sizeS == 0) || (sizeT == 0)) { - llwarns << "sculpt bad mesh size " << sizeS << " " << sizeT << llendl; + LL_WARNS() << "sculpt bad mesh size " << sizeS << " " << sizeT << LL_ENDL; } sNumMeshPoints -= mMesh.size(); @@ -3475,16 +3475,16 @@ bool LLVolumeParams::setType(U8 profile, U8 path) // Bad profile. Make it square. profile = LL_PCODE_PROFILE_SQUARE; result = false; - llwarns << "LLVolumeParams::setType changing bad profile type (" << profile_type - << ") to be LL_PCODE_PROFILE_SQUARE" << llendl; + LL_WARNS() << "LLVolumeParams::setType changing bad profile type (" << profile_type + << ") to be LL_PCODE_PROFILE_SQUARE" << LL_ENDL; } else if (hole_type > LL_PCODE_HOLE_MAX) { // Bad hole. Make it the same. profile = profile_type; result = false; - llwarns << "LLVolumeParams::setType changing bad hole type (" << hole_type - << ") to be LL_PCODE_HOLE_SAME" << llendl; + LL_WARNS() << "LLVolumeParams::setType changing bad hole type (" << hole_type + << ") to be LL_PCODE_HOLE_SAME" << LL_ENDL; } if (path_type < LL_PCODE_PATH_MIN || @@ -3492,8 +3492,8 @@ bool LLVolumeParams::setType(U8 profile, U8 path) { // Bad path. Make it linear. result = false; - llwarns << "LLVolumeParams::setType changing bad path (" << path - << ") to be LL_PCODE_PATH_LINE" << llendl; + LL_WARNS() << "LLVolumeParams::setType changing bad path (" << path + << ") to be LL_PCODE_PATH_LINE" << LL_ENDL; path = LL_PCODE_PATH_LINE; } @@ -3567,7 +3567,7 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) { // we don't allow LLVolumes with this many vertices - llwarns << "Couldn't allocate triangle indices" << llendl; + LL_WARNS() << "Couldn't allocate triangle indices" << LL_ENDL; num_indices = 0; return NULL; } @@ -4160,9 +4160,9 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // assert that we computed the correct number of indices if (count != expected_num_triangle_indices ) { - llerrs << "bad index count prediciton:" + LL_ERRS() << "bad index count prediciton:" << " expected=" << expected_num_triangle_indices - << " actual=" << count << llendl; + << " actual=" << count << LL_ENDL; } #endif @@ -4171,7 +4171,7 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const S32 num_vertices = mMesh.size(); for (i = 0; i < count; i+=3) { - llinfos << index[i] << ":" << index[i+1] << ":" << index[i+2] << llendl; + LL_INFOS() << index[i] << ":" << index[i+1] << ":" << index[i+2] << LL_ENDL; llassert(index[i] < num_vertices); llassert(index[i+1] < num_vertices); llassert(index[i+2] < num_vertices); @@ -4763,7 +4763,7 @@ BOOL equalTriangle(const S32 *a, const S32 *b) BOOL LLVolumeParams::importFile(LLFILE *fp) { - //llinfos << "importing volume" << llendl; + //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of this buffer will require @@ -4797,7 +4797,7 @@ BOOL LLVolumeParams::importFile(LLFILE *fp) } else { - llwarns << "unknown keyword " << keyword << " in volume import" << llendl; + LL_WARNS() << "unknown keyword " << keyword << " in volume import" << LL_ENDL; } } @@ -4817,7 +4817,7 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) { - //llinfos << "importing volume" << llendl; + //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; // *NOTE: changing the size or type of this buffer will require // changing the sscanf below. @@ -4847,7 +4847,7 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) } else { - llwarns << "unknown keyword " << keyword << " in volume import" << llendl; + LL_WARNS() << "unknown keyword " << keyword << " in volume import" << LL_ENDL; } } @@ -5059,7 +5059,7 @@ LLFaceID LLVolume::generateFaceMask() } break; default: - llerrs << "Unknown profile!" << llendl; + LL_ERRS() << "Unknown profile!" << LL_ENDL; break; } @@ -5353,7 +5353,7 @@ BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) } else { - llerrs << "Unknown/uninitialized face type!" << llendl; + LL_ERRS() << "Unknown/uninitialized face type!" << LL_ENDL; } //update the range of the texture coordinates @@ -5960,7 +5960,7 @@ void LLVolumeFace::cacheOptimize() mTangents = binorm; //std::string result = llformat("ACMR pre/post: %.3f/%.3f -- %d triangles %d breaks", pre_acmr, post_acmr, mNumIndices/3, breaks); - //llinfos << result << llendl; + //LL_INFOS() << result << LL_ENDL; } @@ -6759,12 +6759,12 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat if (new_count > 65536) { - llerrs << "Cannot append face -- 16-bit overflow will occur." << llendl; + LL_ERRS() << "Cannot append face -- 16-bit overflow will occur." << LL_ENDL; } if (face.mNumVertices == 0) { - llerrs << "Cannot append empty face." << llendl; + LL_ERRS() << "Cannot append empty face." << LL_ENDL; } //allocate new buffer space diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index 9083273ee5..3b8f08e0c6 100755 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -147,7 +147,7 @@ void LLVolumeMgr::unrefVolume(LLVolume *volumep) volume_lod_group_map_t::iterator iter = mVolumeLODGroups.find(params); if( iter == mVolumeLODGroups.end() ) { - llerrs << "Warning! Tried to cleanup unknown volume type! " << *params << llendl; + LL_ERRS() << "Warning! Tried to cleanup unknown volume type! " << *params << LL_ENDL; if (mDataMutex) { mDataMutex->unlock(); @@ -207,7 +207,7 @@ void LLVolumeMgr::dump() { mDataMutex->unlock(); } - llinfos << "Average usage of LODs " << avg << llendl; + LL_INFOS() << "Average usage of LODs " << avg << LL_ENDL; } void LLVolumeMgr::useMutex() @@ -270,18 +270,18 @@ bool LLVolumeLODGroup::cleanupRefs() bool res = true; if (mRefs != 0) { - llwarns << "Volume group has remaining refs:" << getNumRefs() << llendl; + LL_WARNS() << "Volume group has remaining refs:" << getNumRefs() << LL_ENDL; mRefs = 0; for (S32 i = 0; i < NUM_LODS; i++) { if (mLODRefs[i] > 0) { - llwarns << " LOD " << i << " refs = " << mLODRefs[i] << llendl; + LL_WARNS() << " LOD " << i << " refs = " << mLODRefs[i] << LL_ENDL; mLODRefs[i] = 0; mVolumeLODs[i] = NULL; } } - llwarns << *getVolumeParams() << llendl; + LL_WARNS() << *getVolumeParams() << LL_ENDL; res = false; } return res; @@ -320,7 +320,7 @@ BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep) return TRUE; } } - llerrs << "Deref of non-matching LOD in volume LOD group" << llendl; + LL_ERRS() << "Deref of non-matching LOD in volume LOD group" << LL_ENDL; return FALSE; } @@ -393,7 +393,7 @@ F32 LLVolumeLODGroup::dump() std::string dump_str = llformat("%.3f %d %d %d %d", usage, mAccessCount[0], mAccessCount[1], mAccessCount[2], mAccessCount[3]); - llinfos << dump_str << llendl; + LL_INFOS() << dump_str << LL_ENDL; return usage; } diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp index 0728b49c1f..fb232d5f6c 100755 --- a/indra/llmath/llvolumeoctree.cpp +++ b/indra/llmath/llvolumeoctree.cpp @@ -237,7 +237,7 @@ void LLVolumeOctreeValidate::visit(const LLOctreeNode* branch) if (!test_min.equals3(min, 0.001f) || !test_max.equals3(max, 0.001f)) { - llerrs << "Bad bounding box data found." << llendl; + LL_ERRS() << "Bad bounding box data found." << LL_ENDL; } test_min.sub(LLVector4a(0.001f)); @@ -251,7 +251,7 @@ void LLVolumeOctreeValidate::visit(const LLOctreeNode* branch) if (child->mExtents[0].lessThan(test_min).areAnySet(LLVector4Logical::MASK_XYZ) || child->mExtents[1].greaterThan(test_max).areAnySet(LLVector4Logical::MASK_XYZ)) { - llerrs << "Child protrudes from bounding box." << llendl; + LL_ERRS() << "Child protrudes from bounding box." << LL_ENDL; } } @@ -267,7 +267,7 @@ void LLVolumeOctreeValidate::visit(const LLOctreeNode* branch) if (tri->mV[i]->greaterThan(test_max).areAnySet(LLVector4Logical::MASK_XYZ) || tri->mV[i]->lessThan(test_min).areAnySet(LLVector4Logical::MASK_XYZ)) { - llerrs << "Triangle protrudes from node." << llendl; + LL_ERRS() << "Triangle protrudes from node." << LL_ENDL; } } } diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h index 80d6ced36d..13150028d8 100755 --- a/indra/llmath/llvolumeoctree.h +++ b/indra/llmath/llvolumeoctree.h @@ -59,7 +59,7 @@ public: const LLVolumeTriangle& operator=(const LLVolumeTriangle& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } @@ -110,7 +110,7 @@ public: const LLVolumeOctreeListener& operator=(const LLVolumeOctreeListener& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp index 81ac62be56..cd2be7c8fd 100755 --- a/indra/llmath/v4color.cpp +++ b/indra/llmath/v4color.cpp @@ -245,7 +245,7 @@ void LLColor4::setValue(const LLSD& sd) if (out_of_range) { - llwarns << "LLSD color value out of range!" << llendl; + LL_WARNS() << "LLSD color value out of range!" << LL_ENDL; } #else mV[0] = (F32) sd[0].asReal(); @@ -417,7 +417,7 @@ BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color) if (token_iter == tokens.end()) { // This is a malformed vector. - llwarns << "LLColor4::parseColor() malformed color " << buf << llendl; + LL_WARNS() << "LLColor4::parseColor() malformed color " << buf << LL_ENDL; } else { @@ -704,7 +704,7 @@ BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color) } else { - llwarns << "invalid color " << color_name << llendl; + LL_WARNS() << "invalid color " << color_name << LL_ENDL; } } diff --git a/indra/llmath/xform.cpp b/indra/llmath/xform.cpp index b75aec6a27..5d8b93d5e8 100755 --- a/indra/llmath/xform.cpp +++ b/indra/llmath/xform.cpp @@ -36,10 +36,10 @@ LLXform::~LLXform() { } -// Link optimization - don't inline these llwarns +// Link optimization - don't inline these LL_WARNS() void LLXform::warn(const char* const msg) { - llwarns << msg << llendl; + LL_WARNS() << msg << LL_ENDL; } LLXform* LLXform::getRoot() const diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h index 1b50749b3e..54b0f6d9ec 100755 --- a/indra/llmath/xform.h +++ b/indra/llmath/xform.h @@ -103,9 +103,9 @@ public: inline void setRotation(const F32 x, const F32 y, const F32 z, const F32 s); // Above functions must be inline for speed, but also - // need to emit warnings. llwarns causes inline LLError::CallSite + // need to emit warnings. LL_WARNS() causes inline LLError::CallSite // static objects that make more work for the linker. - // Avoid inline llwarns by calling this function. + // Avoid inline LL_WARNS() by calling this function. void warn(const char* const msg); void setChanged(const U32 bits) { mChanged |= bits; } diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index 7f74247a13..81e28121fd 100755 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -55,13 +55,13 @@ LLAres::HostResponder::~HostResponder() void LLAres::HostResponder::hostResult(const hostent *ent) { - llinfos << "LLAres::HostResponder::hostResult not implemented" << llendl; + LL_INFOS() << "LLAres::HostResponder::hostResult not implemented" << LL_ENDL; } void LLAres::HostResponder::hostError(int code) { - llinfos << "LLAres::HostResponder::hostError " << code << ": " - << LLAres::strerror(code) << llendl; + LL_INFOS() << "LLAres::HostResponder::hostError " << code << ": " + << LLAres::strerror(code) << LL_ENDL; } LLAres::NameInfoResponder::~NameInfoResponder() @@ -71,14 +71,14 @@ LLAres::NameInfoResponder::~NameInfoResponder() void LLAres::NameInfoResponder::nameInfoResult(const char *node, const char *service) { - llinfos << "LLAres::NameInfoResponder::nameInfoResult not implemented" - << llendl; + LL_INFOS() << "LLAres::NameInfoResponder::nameInfoResult not implemented" + << LL_ENDL; } void LLAres::NameInfoResponder::nameInfoError(int code) { - llinfos << "LLAres::NameInfoResponder::nameInfoError " << code << ": " - << LLAres::strerror(code) << llendl; + LL_INFOS() << "LLAres::NameInfoResponder::nameInfoError " << code << ": " + << LLAres::strerror(code) << LL_ENDL; } LLAres::QueryResponder::~QueryResponder() @@ -87,14 +87,14 @@ LLAres::QueryResponder::~QueryResponder() void LLAres::QueryResponder::queryResult(const char *buf, size_t len) { - llinfos << "LLAres::QueryResponder::queryResult not implemented" - << llendl; + LL_INFOS() << "LLAres::QueryResponder::queryResult not implemented" + << LL_ENDL; } void LLAres::QueryResponder::queryError(int code) { - llinfos << "LLAres::QueryResponder::queryError " << code << ": " - << LLAres::strerror(code) << llendl; + LL_INFOS() << "LLAres::QueryResponder::queryError " << code << ": " + << LLAres::strerror(code) << LL_ENDL; } LLAres::LLAres() : @@ -104,7 +104,7 @@ LLAres::LLAres() : if (ares_library_init( ARES_LIB_INIT_ALL ) != ARES_SUCCESS || ares_init(&chan_) != ARES_SUCCESS) { - llwarns << "Could not succesfully initialize ares!" << llendl; + LL_WARNS() << "Could not succesfully initialize ares!" << LL_ENDL; return; } @@ -176,7 +176,7 @@ void LLAres::rewriteURI(const std::string &uri, UriRewriteResponder *resp) return; } - //llinfos << "LLAres::rewriteURI (" << uri << ") search: '" << "_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName() << "'" << llendl; + //LL_INFOS() << "LLAres::rewriteURI (" << uri << ") search: '" << "_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName() << "'" << LL_ENDL; search("_" + resp->mUri.scheme() + "._tcp." + resp->mUri.hostName(), RES_SRV, resp); @@ -251,8 +251,8 @@ int LLQueryResponder::parseRR(const char *buf, size_t len, const char *&pos, r = new LLSrvRecord(rrname, rrttl); break; default: - llinfos << "LLQueryResponder::parseRR got unknown RR type " << rrtype - << llendl; + LL_INFOS() << "LLQueryResponder::parseRR got unknown RR type " << rrtype + << LL_ENDL; return ARES_EBADRESP; } @@ -333,7 +333,7 @@ void LLQueryResponder::queryResult(const char *buf, size_t len) mType = (LLResType) t; break; default: - llinfos << "Cannot grok query type " << t << llendl; + LL_INFOS() << "Cannot grok query type " << t << LL_ENDL; ret = ARES_EBADQUERY; goto bail; } @@ -373,7 +373,7 @@ bail: void LLQueryResponder::querySuccess() { - llinfos << "LLQueryResponder::queryResult not implemented" << llendl; + LL_INFOS() << "LLQueryResponder::queryResult not implemented" << LL_ENDL; } void LLAres::SrvResponder::querySuccess() @@ -393,23 +393,23 @@ void LLAres::SrvResponder::queryError(int code) void LLAres::SrvResponder::srvResult(const dns_rrs_t &ents) { - llinfos << "LLAres::SrvResponder::srvResult not implemented" << llendl; + LL_INFOS() << "LLAres::SrvResponder::srvResult not implemented" << LL_ENDL; for (size_t i = 0; i < ents.size(); i++) { const LLSrvRecord *s = (const LLSrvRecord *) ents[i].get(); - llinfos << "[" << i << "] " << s->host() << ":" << s->port() + LL_INFOS() << "[" << i << "] " << s->host() << ":" << s->port() << " priority " << s->priority() << " weight " << s->weight() - << llendl; + << LL_ENDL; } } void LLAres::SrvResponder::srvError(int code) { - llinfos << "LLAres::SrvResponder::srvError " << code << ": " - << LLAres::strerror(code) << llendl; + LL_INFOS() << "LLAres::SrvResponder::srvError " << code << ": " + << LLAres::strerror(code) << LL_ENDL; } static void nameinfo_callback_1_5(void *arg, int status, int timeouts, @@ -820,11 +820,11 @@ done: void LLAres::UriRewriteResponder::rewriteResult( const std::vector &uris) { - llinfos << "LLAres::UriRewriteResponder::rewriteResult not implemented" - << llendl; + LL_INFOS() << "LLAres::UriRewriteResponder::rewriteResult not implemented" + << LL_ENDL; for (size_t i = 0; i < uris.size(); i++) { - llinfos << "[" << i << "] " << uris[i] << llendl; + LL_INFOS() << "[" << i << "] " << uris[i] << LL_ENDL; } } diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp index 0a4effac19..3d65906b98 100755 --- a/indra/llmessage/llareslistener.cpp +++ b/indra/llmessage/llareslistener.cpp @@ -99,6 +99,6 @@ void LLAresListener::rewriteURI(const LLSD& data) } else { - llinfos << "LLAresListener::rewriteURI requested without Ares present. Ignoring: " << data << llendl; + LL_INFOS() << "LLAresListener::rewriteURI requested without Ares present. Ignoring: " << data << LL_ENDL; } } diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 430c9503ac..fe97501658 100755 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -153,8 +153,8 @@ void LLAssetInfo::setFromNameValue( const LLNameValue& nv ) setName( buf ); buf.assign( str, pos2, std::string::npos ); setDescription( buf ); - LL_DEBUGS("AssetStorage") << "uuid: " << mUuid << llendl; - LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << llendl; + LL_DEBUGS("AssetStorage") << "uuid: " << mUuid << LL_ENDL; + LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << LL_ENDL; } ///---------------------------------------------------------------------------- @@ -360,10 +360,10 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) || ((RT_DOWNLOAD == rt) && LL_ASSET_STORAGE_TIMEOUT < (mt_secs - tmp->mTime))) { - llwarns << "Asset " << getRequestName((ERequestType)rt) << " request " + LL_WARNS() << "Asset " << getRequestName((ERequestType)rt) << " request " << (all ? "aborted" : "timed out") << " for " << tmp->getUUID() << "." - << LLAssetType::lookup(tmp->getType()) << llendl; + << LLAssetType::lookup(tmp->getType()) << LL_ENDL; timed_out.push_front(tmp); iter = requests->erase(curiter); @@ -424,8 +424,8 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse } else { - llwarns << "Asset vfile " << uuid << ":" << type - << " found in static cache with bad size " << file.getSize() << ", ignoring" << llendl; + LL_WARNS() << "Asset vfile " << uuid << ":" << type + << " found in static cache with bad size " << file.getSize() << ", ignoring" << LL_ENDL; } } return false; @@ -438,9 +438,9 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse // IW - uuid is passed by value to avoid side effects, please don't re-add & void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority) { - LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl; + LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; - LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << LL_ENDL; if (user_data) { @@ -450,7 +450,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (mShutDown) { - LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << LL_ENDL; if (callback) { @@ -474,7 +474,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL // Try static VFS first. if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data)) { - LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << LL_ENDL; return; } @@ -492,13 +492,13 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); } - LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << LL_ENDL; } else { if (exists) { - llwarns << "Asset vfile " << uuid << ":" << type << " found with bad size " << file.getSize() << ", removing" << llendl; + LL_WARNS() << "Asset vfile " << uuid << ":" << type << " found with bad size " << file.getSize() << ", removing" << LL_ENDL; file.remove(); } @@ -514,8 +514,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (callback == tmp->mDownCallback && user_data == tmp->mUserData) { // this is a duplicate from the same subsystem - throw it away - llwarns << "Discarding duplicate request for asset " << uuid - << "." << LLAssetType::lookup(type) << llendl; + LL_WARNS() << "Discarding duplicate request for asset " << uuid + << "." << LLAssetType::lookup(type) << LL_ENDL; return; } @@ -527,7 +527,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL if (duplicate) { LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid - << "." << LLAssetType::lookup(type) << llendl; + << "." << LLAssetType::lookup(type) << LL_ENDL; } // This can be overridden by subclasses @@ -567,7 +567,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at tpvf.setAsset(uuid, atype); tpvf.setCallback(downloadCompleteCallback, req); - //llinfos << "Starting transfer for " << uuid << llendl; + //LL_INFOS() << "Starting transfer for " << uuid << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET); ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f)); } @@ -575,7 +575,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at else { // uh-oh, we shouldn't have gotten here - llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; + LL_WARNS() << "Attempt to move asset data request upstream w/o valid upstream provider" << LL_ENDL; if (callback) { add(sFailedDownloadCount, 1); @@ -591,20 +591,20 @@ void LLAssetStorage::downloadCompleteCallback( LLAssetType::EType file_type, void* user_data, LLExtStat ext_status) { - LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << LL_ENDL; LL_DEBUGS("AssetStorage") << "LLAssetStorage::downloadCompleteCallback() for " << file_id - << "," << LLAssetType::lookup(file_type) << llendl; + << "," << LLAssetType::lookup(file_type) << LL_ENDL; LLAssetRequest* req = (LLAssetRequest*)user_data; if(!req) { - llwarns << "LLAssetStorage::downloadCompleteCallback called without" - "a valid request." << llendl; + LL_WARNS() << "LLAssetStorage::downloadCompleteCallback called without" + "a valid request." << LL_ENDL; return; } if (!gAssetStorage) { - llwarns << "LLAssetStorage::downloadCompleteCallback called without any asset system, aborting!" << llendl; + LL_WARNS() << "LLAssetStorage::downloadCompleteCallback called without any asset system, aborting!" << LL_ENDL; return; } @@ -627,7 +627,7 @@ void LLAssetStorage::downloadCompleteCallback( LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType()); if (vfile.getSize() <= 0) { - llwarns << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << llendl; + LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << LL_ENDL; result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE; vfile.remove(); @@ -670,7 +670,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen const LLUUID &asset_id, LLAssetType::EType atype, EstateAssetType etype, LLGetAssetCallback callback, void *user_data, BOOL is_priority) { - lldebugs << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << llendl; + LL_DEBUGS() << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << LL_ENDL; // // Probably will get rid of this early out? @@ -710,7 +710,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen { if (exists) { - llwarns << "Asset vfile " << asset_id << ":" << atype << " found with bad size " << file.getSize() << ", removing" << llendl; + LL_WARNS() << "Asset vfile " << asset_id << ":" << atype << " found with bad size " << file.getSize() << ", removing" << LL_ENDL; file.remove(); } @@ -743,14 +743,14 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen tpvf.setAsset(asset_id, atype); tpvf.setCallback(downloadEstateAssetCompleteCallback, req); - LL_DEBUGS("AssetStorage") << "Starting transfer for " << asset_id << llendl; + LL_DEBUGS("AssetStorage") << "Starting transfer for " << asset_id << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET); ttcp->requestTransfer(spe, tpvf, 100.f + (is_priority ? 1.f : 0.f)); } else { // uh-oh, we shouldn't have gotten here - llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; + LL_WARNS() << "Attempt to move asset data request upstream w/o valid upstream provider" << LL_ENDL; if (callback) { add(sFailedDownloadCount, 1); @@ -770,14 +770,14 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data; if(!req) { - llwarns << "LLAssetStorage::downloadEstateAssetCompleteCallback called" - " without a valid request." << llendl; + LL_WARNS() << "LLAssetStorage::downloadEstateAssetCompleteCallback called" + " without a valid request." << LL_ENDL; return; } if (!gAssetStorage) { - llwarns << "LLAssetStorage::downloadEstateAssetCompleteCallback called" - " without any asset system, aborting!" << llendl; + LL_WARNS() << "LLAssetStorage::downloadEstateAssetCompleteCallback called" + " without any asset system, aborting!" << LL_ENDL; return; } @@ -789,7 +789,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback( LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getAType()); if (vfile.getSize() <= 0) { - llwarns << "downloadCompleteCallback has non-existent or zero-size asset!" << llendl; + LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset!" << LL_ENDL; result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE; vfile.remove(); @@ -808,7 +808,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age const LLUUID &asset_id, LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, BOOL is_priority) { - lldebugs << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << llendl; + LL_DEBUGS() << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << LL_ENDL; // // Probably will get rid of this early out? @@ -839,7 +839,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age size = exists ? file.getSize() : 0; if(exists && size < 1) { - llwarns << "Asset vfile " << asset_id << ":" << atype << " found with bad size " << file.getSize() << ", removing" << llendl; + LL_WARNS() << "Asset vfile " << asset_id << ":" << atype << " found with bad size " << file.getSize() << ", removing" << LL_ENDL; file.remove(); } @@ -890,14 +890,14 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age LL_DEBUGS("AssetStorage") << "Starting transfer for inventory asset " << item_id << " owned by " << owner_id << "," << task_id - << llendl; + << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET); ttcp->requestTransfer(spi, tpvf, 100.f + (is_priority ? 1.f : 0.f)); } else { // uh-oh, we shouldn't have gotten here - llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; + LL_WARNS() << "Attempt to move asset data request upstream w/o valid upstream provider" << LL_ENDL; if (callback) { add(sFailedDownloadCount, 1); @@ -918,13 +918,13 @@ void LLAssetStorage::downloadInvItemCompleteCallback( LLInvItemRequest *req = (LLInvItemRequest*)user_data; if(!req) { - llwarns << "LLAssetStorage::downloadEstateAssetCompleteCallback called" - " without a valid request." << llendl; + LL_WARNS() << "LLAssetStorage::downloadEstateAssetCompleteCallback called" + " without a valid request." << LL_ENDL; return; } if (!gAssetStorage) { - llwarns << "LLAssetStorage::downloadCompleteCallback called without any asset system, aborting!" << llendl; + LL_WARNS() << "LLAssetStorage::downloadCompleteCallback called without any asset system, aborting!" << LL_ENDL; return; } @@ -936,7 +936,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback( LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType()); if (vfile.getSize() <= 0) { - llwarns << "downloadCompleteCallback has non-existent or zero-size asset!" << llendl; + LL_WARNS() << "downloadCompleteCallback has non-existent or zero-size asset!" << LL_ENDL; result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE; vfile.remove(); @@ -959,7 +959,7 @@ void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, { if (!gAssetStorage) { - llwarns << "LLAssetStorage::uploadCompleteCallback has no gAssetStorage!" << llendl; + LL_WARNS() << "LLAssetStorage::uploadCompleteCallback has no gAssetStorage!" << LL_ENDL; return; } LLAssetRequest *req = (LLAssetRequest *)user_data; @@ -967,7 +967,7 @@ void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, if (result) { - llwarns << "LLAssetStorage::uploadCompleteCallback " << result << ":" << getErrorString(result) << " trying to upload file to upstream provider" << llendl; + LL_WARNS() << "LLAssetStorage::uploadCompleteCallback " << result << ":" << getErrorString(result) << " trying to upload file to upstream provider" << LL_ENDL; success = FALSE; } @@ -1049,7 +1049,7 @@ LLAssetStorage::request_list_t* LLAssetStorage::getRequestList(LLAssetStorage::E case RT_LOCALUPLOAD: return &mPendingLocalUploads; default: - llwarns << "Unable to find request list for request type '" << rt << "'" << llendl; + LL_WARNS() << "Unable to find request list for request type '" << rt << "'" << LL_ENDL; return NULL; } } @@ -1065,7 +1065,7 @@ const LLAssetStorage::request_list_t* LLAssetStorage::getRequestList(LLAssetStor case RT_LOCALUPLOAD: return &mPendingLocalUploads; default: - llwarns << "Unable to find request list for request type '" << rt << "'" << llendl; + LL_WARNS() << "Unable to find request list for request type '" << rt << "'" << LL_ENDL; return NULL; } } @@ -1082,7 +1082,7 @@ std::string LLAssetStorage::getRequestName(LLAssetStorage::ERequestType rt) case RT_LOCALUPLOAD: return "localupload"; default: - llwarns << "Unable to find request name for request type '" << rt << "'" << llendl; + LL_WARNS() << "Unable to find request name for request type '" << rt << "'" << LL_ENDL; return ""; } } @@ -1235,7 +1235,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, { LL_DEBUGS("AssetStorage") << "Asset " << getRequestName(rt) << " request for " << asset_id << "." << LLAssetType::lookup(asset_type) - << " removed from pending queue." << llendl; + << " removed from pending queue." << LL_ENDL; return true; } return false; @@ -1330,7 +1330,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData) { // this is a duplicate from the same subsystem - throw it away - LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << llendl; + LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << LL_ENDL; return; } } @@ -1407,7 +1407,7 @@ void LLAssetStorage::storeAssetData( bool user_waiting, F64 timeout) { - llwarns << "storeAssetData: wrong version called" << llendl; + LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call reportMetric( LLUUID::null, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 1" ); } @@ -1426,7 +1426,7 @@ void LLAssetStorage::storeAssetData( bool user_waiting, F64 timeout) { - llwarns << "storeAssetData: wrong version called" << llendl; + LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call reportMetric( asset_id, asset_type, LLStringUtil::null, requesting_agent_id, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 2" ); } @@ -1444,7 +1444,7 @@ void LLAssetStorage::storeAssetData( bool user_waiting, F64 timeout) { - llwarns << "storeAssetData: wrong version called" << llendl; + LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 3" ); } @@ -1462,7 +1462,7 @@ void LLAssetStorage::storeAssetData( bool user_waiting, F64 timeout) { - llwarns << "storeAssetData: wrong version called" << llendl; + LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call reportMetric( LLUUID::null, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 4" ); } @@ -1517,7 +1517,7 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET { if( !metric_recipient ) { - LL_DEBUGS("AssetStorage") << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl; + LL_DEBUGS("AssetStorage") << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << LL_ENDL; return; } diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp index 88aaf7c52a..0b5025a422 100755 --- a/indra/llmessage/llblowfishcipher.cpp +++ b/indra/llmessage/llblowfishcipher.cpp @@ -70,10 +70,10 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) int blocksize = EVP_CIPHER_CTX_block_size(&context); int keylen = EVP_CIPHER_CTX_key_length(&context); int iv_length = EVP_CIPHER_CTX_iv_length(&context); - lldebugs << "LLBlowfishCipher blocksize " << blocksize + LL_DEBUGS() << "LLBlowfishCipher blocksize " << blocksize << " keylen " << keylen << " iv_len " << iv_length - << llendl; + << LL_ENDL; int output_len = 0; int temp_len = 0; @@ -83,7 +83,7 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) src, src_len)) { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << llendl; + LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << LL_ENDL; goto ERROR; } @@ -91,7 +91,7 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) // not an exact multiple of the block size. if (!EVP_EncryptFinal_ex(&context, (unsigned char*)(dst + output_len), &temp_len)) { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << llendl; + LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << LL_ENDL; goto ERROR; } output_len += temp_len; @@ -107,7 +107,7 @@ ERROR: // virtual U32 LLBlowfishCipher::decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) { - llerrs << "LLBlowfishCipher decrypt unsupported" << llendl; + LL_ERRS() << "LLBlowfishCipher decrypt unsupported" << LL_ENDL; return 0; } diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index f7f81e74bd..bf62808340 100755 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -181,8 +181,8 @@ bool LLHeapBuffer::reclaimSegment(const LLSegment& segment) } else if(mReclaimedBytes > mSize) { - llwarns << "LLHeapBuffer reclaimed more memory than allocated." - << " This is probably programmer error." << llendl; + LL_WARNS() << "LLHeapBuffer reclaimed more memory than allocated." + << " This is probably programmer error." << LL_ENDL; } return true; } diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index a51a48edc3..ff1c9993cc 100755 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -53,7 +53,7 @@ LLBufferStreamBuf::~LLBufferStreamBuf() // virtual int LLBufferStreamBuf::underflow() { - //lldebugs << "LLBufferStreamBuf::underflow()" << llendl; + //LL_DEBUGS() << "LLBufferStreamBuf::underflow()" << LL_ENDL; if(!mBuffer) { return EOF; diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 267c48e1d2..90ab56635f 100755 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -341,7 +341,7 @@ bool LLCacheName::importFile(std::istream& istr) ++count; } - llinfos << "LLCacheName loaded " << count << " agent names" << llendl; + LL_INFOS() << "LLCacheName loaded " << count << " agent names" << LL_ENDL; count = 0; LLSD groups = data[GROUPS]; @@ -362,7 +362,7 @@ bool LLCacheName::importFile(std::istream& istr) impl.mReverseCache[entry->mGroupName] = id; ++count; } - llinfos << "LLCacheName loaded " << count << " group names" << llendl; + LL_INFOS() << "LLCacheName loaded " << count << " group names" << LL_ENDL; return true; } @@ -438,7 +438,7 @@ void LLCacheName::localizeCacheName(std::string key, std::string value) if (key!="" && value!= "" ) sCacheName[key]=value; else - llwarns<< " Error localizing cache key " << key << " To "<< value< we must ask for it - lldebugs << "LLCacheName queuing HACK group request: " << id << llendl; + LL_DEBUGS() << "LLCacheName queuing HACK group request: " << id << LL_ENDL; entry = NULL; } @@ -674,8 +674,8 @@ void LLCacheName::processPending() if(!impl.mUpstreamHost.isOk()) { - lldebugs << "LLCacheName::processPending() - bad upstream host." - << llendl; + LL_DEBUGS() << "LLCacheName::processPending() - bad upstream host." + << LL_ENDL; return; } @@ -722,33 +722,33 @@ void LLCacheName::dump() LLCacheNameEntry* entry = iter->second; if (entry->mIsGroup) { - llinfos + LL_INFOS() << iter->first << " = (group) " << entry->mGroupName << " @ " << entry->mCreateTime - << llendl; + << LL_ENDL; } else { - llinfos + LL_INFOS() << iter->first << " = " << buildFullName(entry->mFirstName, entry->mLastName) << " @ " << entry->mCreateTime - << llendl; + << LL_ENDL; } } } void LLCacheName::dumpStats() { - llinfos << "Queue sizes: " + LL_INFOS() << "Queue sizes: " << " Cache=" << impl.mCache.size() << " AskName=" << impl.mAskNameQueue.size() << " AskGroup=" << impl.mAskGroupQueue.size() << " Pending=" << impl.mPendingQueue.size() << " Reply=" << impl.mReplyQueue.size() // << " Observers=" << impl.mSignal.size() - << llendl; + << LL_ENDL; } void LLCacheName::clear() @@ -884,7 +884,7 @@ void LLCacheName::Impl::processUUIDRequest(LLMessageSystem* msg, bool isGroup) // level, hence having an upstream provider. if (!mUpstreamHost.isOk()) { - llwarns << "LLCacheName - got UUID name/group request, but no upstream provider!" << llendl; + LL_WARNS() << "LLCacheName - got UUID name/group request, but no upstream provider!" << LL_ENDL; return; } @@ -901,11 +901,11 @@ void LLCacheName::Impl::processUUIDRequest(LLMessageSystem* msg, bool isGroup) { if (isGroup != entry->mIsGroup) { - llwarns << "LLCacheName - Asked for " + LL_WARNS() << "LLCacheName - Asked for " << (isGroup ? "group" : "user") << " name, " << "but found " << (entry->mIsGroup ? "group" : "user") - << ": " << id << llendl; + << ": " << id << LL_ENDL; } else { diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 0c2d4b823d..00e9266d47 100755 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -183,7 +183,7 @@ LLCircuitData::~LLCircuitData() std::ostream_iterator append(str, " "); str << "MSG: -> " << mHost << "\tABORTING RELIABLE:\t"; std::copy(doomed.begin(), doomed.end(), append); - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } } @@ -203,7 +203,7 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) std::ostringstream str; str << "MSG: <- " << packetp->mHost << "\tRELIABLE ACKED:\t" << packetp->mPacketID; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } if (packetp->mCallback) { @@ -231,13 +231,13 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) if (iter != mFinalRetryPackets.end()) { packetp = iter->second; - // llinfos << "Packet " << packet_num << " removed from the pending list" << llendl; + // LL_INFOS() << "Packet " << packet_num << " removed from the pending list" << LL_ENDL; if(gMessageSystem->mVerboseLog) { std::ostringstream str; str << "MSG: <- " << packetp->mHost << "\tRELIABLE ACKED:\t" << packetp->mPacketID; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } if (packetp->mCallback) { @@ -320,8 +320,8 @@ S32 LLCircuitData::resendUnackedPackets(const F64 now) if (mUnackedPacketBytes > 256000 && !(getPacketsOut() % 1024)) { // Warn if we've got a lot of resends waiting. - llwarns << mHost << " has " << mUnackedPacketBytes - << " bytes of reliable messages waiting" << llendl; + LL_WARNS() << mHost << " has " << mUnackedPacketBytes + << " bytes of reliable messages waiting" << LL_ENDL; } // Stop resending. There are less than 512000 unacked packets. break; @@ -341,7 +341,7 @@ S32 LLCircuitData::resendUnackedPackets(const F64 now) std::ostringstream str; str << "MSG: -> " << packetp->mHost << "\tRESENDING RELIABLE:\t" << packetp->mPacketID; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } packetp->mBuffer[0] |= LL_RESENT_FLAG; // tag packet id as being a resend @@ -390,10 +390,10 @@ S32 LLCircuitData::resendUnackedPackets(const F64 now) if (now > packetp->mExpirationTime) { // fail (too many retries) - //llinfos << "Packet " << packetp->mPacketID << " removed from the pending list: exceeded retry limit" << llendl; + //LL_INFOS() << "Packet " << packetp->mPacketID << " removed from the pending list: exceeded retry limit" << LL_ENDL; //if (packetp->mMessageName) //{ - // llinfos << "Packet name " << packetp->mMessageName << llendl; + // LL_INFOS() << "Packet name " << packetp->mMessageName << LL_ENDL; //} gMessageSystem->mFailedResendPackets++; @@ -402,7 +402,7 @@ S32 LLCircuitData::resendUnackedPackets(const F64 now) std::ostringstream str; str << "MSG: -> " << packetp->mHost << "\tABORTING RELIABLE:\t" << packetp->mPacketID; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } if (packetp->mCallback) @@ -445,7 +445,7 @@ LLCircuit::~LLCircuit() LLCircuitData *LLCircuit::addCircuitData(const LLHost &host, TPACKETID in_id) { // This should really validate if one already exists - llinfos << "LLCircuit::addCircuitData for " << host << llendl; + LL_INFOS() << "LLCircuit::addCircuitData for " << host << LL_ENDL; LLCircuitData *tempp = new LLCircuitData(host, in_id, mHeartbeatInterval, mHeartbeatTimeout); mCircuitData.insert(circuit_data_map::value_type(host, tempp)); mPingSet.insert(tempp); @@ -456,7 +456,7 @@ LLCircuitData *LLCircuit::addCircuitData(const LLHost &host, TPACKETID in_id) void LLCircuit::removeCircuitData(const LLHost &host) { - llinfos << "LLCircuit::removeCircuitData for " << host << llendl; + LL_INFOS() << "LLCircuit::removeCircuitData for " << host << LL_ENDL; mLastCircuit = NULL; circuit_data_map::iterator it = mCircuitData.find(host); if(it != mCircuitData.end()) @@ -471,7 +471,7 @@ void LLCircuit::removeCircuitData(const LLHost &host) } else { - llwarns << "Couldn't find entry for next ping in ping set!" << llendl; + LL_WARNS() << "Couldn't find entry for next ping in ping set!" << LL_ENDL; } // Clean up from optimization maps @@ -719,9 +719,9 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) { std::ostringstream str; str << "MSG: <- " << mHost << "\tRECOVERING LOST:\t" << id; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } - // llinfos << "removing potential lost: " << id << llendl; + // LL_INFOS() << "removing potential lost: " << id << LL_ENDL; mPotentialLostPackets.erase(id); } else if (!receive_resent) // don't freak out over out-of-order reliable resends @@ -738,10 +738,10 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) std::ostringstream str; str << "MSG: <- " << mHost << "\tPACKET GAP:\t" << index; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } -// llinfos << "adding potential lost: " << index << llendl; +// LL_INFOS() << "adding potential lost: " << index << LL_ENDL; mPotentialLostPackets[index] = time; index++; index = index % LL_MAX_OUT_PACKET_ID; @@ -750,13 +750,13 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) } else { - llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl; + LL_INFOS() << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << LL_ENDL; if(gMessageSystem->mVerboseLog) { std::ostringstream str; str << "MSG: <- " << mHost << "\tPACKET GAP:\t" << id << " expected " << index; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } } @@ -765,11 +765,11 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) if (gap_count > 128) { - llwarns << "Packet loss gap filler running amok!" << llendl; + LL_WARNS() << "Packet loss gap filler running amok!" << LL_ENDL; } else if (gap_count > 16) { - llwarns << "Sustaining large amounts of packet loss!" << llendl; + LL_WARNS() << "Sustaining large amounts of packet loss!" << LL_ENDL; } } @@ -889,8 +889,8 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) wrapped_final = TRUE; } - //llinfos << mHost << " - unacked count " << mUnackedPackets.size() << llendl; - //llinfos << mHost << " - final count " << mFinalRetryPackets.size() << llendl; + //LL_INFOS() << mHost << " - unacked count " << mUnackedPackets.size() << LL_ENDL; + //LL_INFOS() << mHost << " - final count " << mFinalRetryPackets.size() << LL_ENDL; if (wrapped != wrapped_final) { // One of the "unacked" or "final" lists hasn't wrapped. Whichever one @@ -900,12 +900,12 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // Hasn't wrapped, so the one on the // unacked packet list is older packet_id = iter->first; - //llinfos << mHost << ": nowrapped unacked" << llendl; + //LL_INFOS() << mHost << ": nowrapped unacked" << LL_ENDL; } else { packet_id = iter_final->first; - //llinfos << mHost << ": nowrapped final" << llendl; + //LL_INFOS() << mHost << ": nowrapped final" << LL_ENDL; } } else @@ -917,7 +917,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // Send the ID of the last packet we sent out. // This will flush all of the destination's // unacked packets, theoretically. - //llinfos << mHost << ": No unacked!" << llendl; + //LL_INFOS() << mHost << ": No unacked!" << LL_ENDL; packet_id = getPacketOutID(); } else @@ -928,7 +928,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // Unacked list has the lowest so far packet_id = iter->first; had_unacked = TRUE; - //llinfos << mHost << ": Unacked" << llendl; + //LL_INFOS() << mHost << ": Unacked" << LL_ENDL; } if (iter_final != mFinalRetryPackets.end()) @@ -938,13 +938,13 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) { // Both had a packet, use the lowest. packet_id = llmin(packet_id, iter_final->first); - //llinfos << mHost << ": Min of unacked/final" << llendl; + //LL_INFOS() << mHost << ": Min of unacked/final" << LL_ENDL; } else { // Only the final had a packet, use it. packet_id = iter_final->first; - //llinfos << mHost << ": Final!" << llendl; + //LL_INFOS() << mHost << ": Final!" << LL_ENDL; } } } @@ -979,7 +979,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) std::ostringstream str; str << "MSG: <- " << mHost << "\tLOST PACKET:\t" << (*it).first; - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } mPotentialLostPackets.erase(it++); } @@ -999,8 +999,8 @@ void LLCircuitData::clearDuplicateList(TPACKETID oldest_id) // we want to KEEP all x where oldest_id <= x <= last incoming packet, and delete everything else. - //llinfos << mHost << ": clearing before oldest " << oldest_id << llendl; - //llinfos << "Recent list before: " << mRecentlyReceivedReliablePackets.size() << llendl; + //LL_INFOS() << mHost << ": clearing before oldest " << oldest_id << LL_ENDL; + //LL_INFOS() << "Recent list before: " << mRecentlyReceivedReliablePackets.size() << LL_ENDL; if (oldest_id < mHighestPacketID) { // Clean up everything with a packet ID less than oldest_id. @@ -1023,14 +1023,14 @@ void LLCircuitData::clearDuplicateList(TPACKETID oldest_id) // Validate that the packet ID seems far enough away if ((pit->first - mHighestPacketID) < 100) { - llwarns << "Probably incorrectly timing out non-wrapped packets!" << llendl; + LL_WARNS() << "Probably incorrectly timing out non-wrapped packets!" << LL_ENDL; } U64 delta_t_usec = mt_usec - (*pit).second; F64 delta_t_sec = delta_t_usec * SEC_PER_USEC; if (delta_t_sec > LL_DUPLICATE_SUPPRESSION_TIMEOUT) { // enough time has elapsed we're not likely to get a duplicate on this one - llinfos << "Clearing " << pit->first << " from recent list" << llendl; + LL_INFOS() << "Clearing " << pit->first << " from recent list" << LL_ENDL; mRecentlyReceivedReliablePackets.erase(pit++); } else @@ -1038,7 +1038,7 @@ void LLCircuitData::clearDuplicateList(TPACKETID oldest_id) ++pit; } } - //llinfos << "Recent list after: " << mRecentlyReceivedReliablePackets.size() << llendl; + //LL_INFOS() << "Recent list after: " << mRecentlyReceivedReliablePackets.size() << LL_ENDL; } BOOL LLCircuitData::checkCircuitTimeout() @@ -1048,17 +1048,17 @@ BOOL LLCircuitData::checkCircuitTimeout() // Nota Bene: This needs to be turned off if you are debugging multiple simulators if (time_since_last_ping > mHeartbeatTimeout) { - llwarns << "LLCircuitData::checkCircuitTimeout for " << mHost << " last ping " << time_since_last_ping << " seconds ago." < " << cd->mHost << "\tPACKET ACKS:\t"; std::ostream_iterator append(str, " "); std::copy(cd->mAcks.begin(), cd->mAcks.end(), append); - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; } // empty out the acks list @@ -1188,7 +1188,7 @@ void LLCircuitData::dumpResendCountAndReset() { if (mCurrentResendCount) { - llinfos << "Circuit: " << mHost << " resent " << mCurrentResendCount << " packets" << llendl; + LL_INFOS() << "Circuit: " << mHost << " resent " << mCurrentResendCount << " packets" << LL_ENDL; mCurrentResendCount = 0; } } diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 47041a2880..03989df170 100755 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -98,7 +98,7 @@ void check_curl_code(CURLcode code) { // linux appears to throw a curl error once per session for a bad initialization // at a pretty random time (when enabling cookies). - llinfos << "curl error detected: " << curl_easy_strerror(code) << llendl; + LL_INFOS() << "curl error detected: " << curl_easy_strerror(code) << LL_ENDL; } } @@ -108,7 +108,7 @@ void check_curl_multi_code(CURLMcode code) { // linux appears to throw a curl error once per session for a bad initialization // at a pretty random time (when enabling cookies). - llinfos << "curl multi error detected: " << curl_multi_strerror(code) << llendl; + LL_INFOS() << "curl multi error detected: " << curl_multi_strerror(code) << LL_ENDL; } } @@ -153,7 +153,7 @@ void LLCurl::Responder::errorWithContent( // virtual void LLCurl::Responder::error(U32 status, const std::string& reason) { - llinfos << mURL << " [" << status << "]: " << reason << llendl; + LL_INFOS() << mURL << " [" << status << "]: " << reason << LL_ENDL; } // virtual @@ -178,7 +178,7 @@ void LLCurl::Responder::completedRaw( const bool emit_errors = false; if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXML(content, istr, emit_errors)) { - llinfos << "Failed to deserialize LLSD. " << mURL << " [" << status << "]: " << reason << llendl; + LL_INFOS() << "Failed to deserialize LLSD. " << mURL << " [" << status << "]: " << reason << LL_ENDL; content["reason"] = reason; } @@ -246,7 +246,7 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle) if (!handle) { return ; //handle allocation failed. - //llerrs << "handle cannot be NULL!" << llendl; + //LL_ERRS() << "handle cannot be NULL!" << LL_ENDL; } LLMutexLock lock(sHandleMutexp) ; @@ -268,7 +268,7 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle) } else { - llerrs << "Invalid handle." << llendl; + LL_ERRS() << "Invalid handle." << LL_ENDL; } } @@ -287,7 +287,7 @@ LLCurl::Easy* LLCurl::Easy::getEasy() if (!easy->mCurlEasyHandle) { // this can happen if we have too many open files (fails in c-ares/ares_init.c) - llwarns << "allocEasyHandle() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl; + LL_WARNS() << "allocEasyHandle() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << LL_ENDL; delete easy; return NULL; } @@ -549,7 +549,7 @@ LLCurl::Multi::Multi(F32 idle_time_out) mCurlMultiHandle = LLCurl::newMultiHandle(); if (!mCurlMultiHandle) { - llwarns << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl; + LL_WARNS() << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << LL_ENDL; mCurlMultiHandle = LLCurl::newMultiHandle(); } @@ -824,8 +824,8 @@ S32 LLCurl::Multi::process() else { response = 499; - //*TODO: change to llwarns - llerrs << "cleaned up curl request completed!" << llendl; + //*TODO: change to LL_WARNS() + LL_ERRS() << "cleaned up curl request completed!" << LL_ENDL; } if (response >= 400) { @@ -870,7 +870,7 @@ bool LLCurl::Multi::addEasy(Easy* easy) check_curl_multi_code(mcode); //if (mcode != CURLM_OK) //{ - // llwarns << "Curl Error: " << curl_multi_strerror(mcode) << llendl; + // LL_WARNS() << "Curl Error: " << curl_multi_strerror(mcode) << LL_ENDL; // return false; //} return true; @@ -987,7 +987,7 @@ void LLCurlThread::addMulti(LLCurl::Multi* multi) if (!addRequest(req)) { - llwarns << "curl request added when the thread is quitted" << llendl; + LL_WARNS() << "curl request added when the thread is quitted" << LL_ENDL; } } @@ -1094,7 +1094,7 @@ bool LLCurlRequest::addEasy(LLCurl::Easy* easy) if (mProcessing) { - llerrs << "Posting to a LLCurlRequest instance from within a responder is not allowed (causes DNS timeouts)." << llendl; + LL_ERRS() << "Posting to a LLCurlRequest instance from within a responder is not allowed (causes DNS timeouts)." << LL_ENDL; } bool res = mActiveMulti->addEasy(easy); return res; @@ -1158,7 +1158,7 @@ bool LLCurlRequest::post(const std::string& url, easy->slist_append("Content-Type: application/llsd+xml"); easy->setHeaders(); - lldebugs << "POSTING: " << bytes << " bytes." << llendl; + LL_DEBUGS() << "POSTING: " << bytes << " bytes." << LL_ENDL; bool res = addEasy(easy); return res; } @@ -1186,7 +1186,7 @@ bool LLCurlRequest::post(const std::string& url, easy->slist_append("Content-Type: application/octet-stream"); easy->setHeaders(); - lldebugs << "POSTING: " << bytes << " bytes." << llendl; + LL_DEBUGS() << "POSTING: " << bytes << " bytes." << LL_ENDL; bool res = addEasy(easy); return res; } @@ -1567,7 +1567,7 @@ void LLCurlEasyRequest::sendRequest(const std::string& url) { llassert_always(!mRequestSent); mRequestSent = true; - lldebugs << url << llendl; + LL_DEBUGS() << url << LL_ENDL; if (isValid() && mEasy) { mEasy->setHeaders(); @@ -1774,7 +1774,7 @@ CURLM* LLCurl::newMultiHandle() if(sTotalHandles + 1 > sMaxHandles) { - llwarns << "no more handles available." << llendl ; + LL_WARNS() << "no more handles available." << LL_ENDL ; return NULL ; //failed } sTotalHandles++; @@ -1782,7 +1782,7 @@ CURLM* LLCurl::newMultiHandle() CURLM* ret = curl_multi_init() ; if(!ret) { - llwarns << "curl_multi_init failed." << llendl ; + LL_WARNS() << "curl_multi_init failed." << LL_ENDL ; } return ret ; @@ -1808,7 +1808,7 @@ CURL* LLCurl::newEasyHandle() if(sTotalHandles + 1 > sMaxHandles) { - llwarns << "no more handles available." << llendl ; + LL_WARNS() << "no more handles available." << LL_ENDL ; return NULL ; //failed } sTotalHandles++; @@ -1816,7 +1816,7 @@ CURL* LLCurl::newEasyHandle() CURL* ret = curl_easy_init() ; if(!ret) { - llwarns << "curl_easy_init failed." << llendl ; + LL_WARNS() << "curl_easy_init failed." << LL_ENDL ; } return ret ; diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 3385d7c2e2..3510f93805 100755 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -52,13 +52,13 @@ LLDataPacker::LLDataPacker() : mPassFlags(0), mWriteEnabled(FALSE) //virtual void LLDataPacker::reset() { - llerrs << "Using unimplemented datapacker reset!" << llendl; + LL_ERRS() << "Using unimplemented datapacker reset!" << LL_ENDL; } //virtual void LLDataPacker::dumpBufferToLog() { - llerrs << "dumpBufferToLog not implemented for this type!" << llendl; + LL_ERRS() << "dumpBufferToLog not implemented for this type!" << LL_ENDL; } BOOL LLDataPacker::packFixed(const F32 value, const char *name, @@ -108,7 +108,7 @@ BOOL LLDataPacker::packFixed(const F32 value, const char *name, } else { - llerrs << "Using fixed-point packing of " << total_bits << " bits, why?!" << llendl; + LL_ERRS() << "Using fixed-point packing of " << total_bits << " bits, why?!" << LL_ENDL; } return success; } @@ -117,7 +117,7 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, const BOOL is_signed, const U32 int_bits, const U32 frac_bits) { //BOOL success = TRUE; - //llinfos << "unpackFixed:" << name << " int:" << int_bits << " frac:" << frac_bits << llendl; + //LL_INFOS() << "unpackFixed:" << name << " int:" << int_bits << " frac:" << frac_bits << LL_ENDL; BOOL ok = FALSE; S32 unsigned_bits = int_bits + frac_bits; S32 total_bits = unsigned_bits; @@ -158,10 +158,10 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, else { fixed_val = 0; - llerrs << "Bad bit count: " << total_bits << llendl; + LL_ERRS() << "Bad bit count: " << total_bits << LL_ENDL; } - //llinfos << "Fixed_val:" << fixed_val << llendl; + //LL_INFOS() << "Fixed_val:" << fixed_val << LL_ENDL; fixed_val /= (F32)(1 << frac_bits); if (is_signed) @@ -169,7 +169,7 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, fixed_val -= max_val; } value = fixed_val; - //llinfos << "Value: " << value << llendl; + //LL_INFOS() << "Value: " << value << LL_ENDL; return ok; } @@ -239,7 +239,7 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char } else { - llwarns << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << llendl; + LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << LL_ENDL; success = FALSE; } return success; @@ -550,7 +550,7 @@ const LLDataPackerBinaryBuffer& LLDataPackerBinaryBuffer::operator=(const LLData if (a.getBufferSize() > getBufferSize()) { // We've got problems, ack! - llerrs << "Trying to do an assignment with not enough room in the target." << llendl; + LL_ERRS() << "Trying to do an assignment with not enough room in the target." << LL_ENDL; } memcpy(mBufferp, a.mBufferp, a.getBufferSize()); /*Flawfinder: ignore*/ return *this; @@ -558,7 +558,7 @@ const LLDataPackerBinaryBuffer& LLDataPackerBinaryBuffer::operator=(const LLData void LLDataPackerBinaryBuffer::dumpBufferToLog() { - llwarns << "Binary Buffer Dump, size: " << mBufferSize << llendl; + LL_WARNS() << "Binary Buffer Dump, size: " << mBufferSize << LL_ENDL; char line_buffer[256]; /*Flawfinder: ignore*/ S32 i; S32 cur_line_pos = 0; @@ -571,13 +571,13 @@ void LLDataPackerBinaryBuffer::dumpBufferToLog() if (cur_line_pos >= 16) { cur_line_pos = 0; - llwarns << "Offset:" << std::hex << cur_line*16 << std::dec << " Data:" << line_buffer << llendl; + LL_WARNS() << "Offset:" << std::hex << cur_line*16 << std::dec << " Data:" << line_buffer << LL_ENDL; cur_line++; } } if (cur_line_pos) { - llwarns << "Offset:" << std::hex << cur_line*16 << std::dec << " Data:" << line_buffer << llendl; + LL_WARNS() << "Offset:" << std::hex << cur_line*16 << std::dec << " Data:" << line_buffer << LL_ENDL; } } @@ -608,7 +608,7 @@ BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n { // *NOTE: I believe we need to mark a failure bit at this point. numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packString: string truncated: " << value << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packString: string truncated: " << value << LL_ENDL; } mCurBufferp += numCopied; return success; @@ -647,7 +647,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packBinaryData: number truncated: " << size << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryData: number truncated: " << size << LL_ENDL; } mCurBufferp += numCopied; @@ -660,7 +660,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packBinaryData: data truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryData: data truncated: " << LL_ENDL; bBufferFull = TRUE; } mCurBufferp += numCopied; @@ -672,7 +672,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packBinaryData: newline truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryData: newline truncated: " << LL_ENDL; } mCurBufferp += numCopied; } @@ -734,7 +734,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packBinaryDataFixed: data truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryDataFixed: data truncated: " << LL_ENDL; bBufferFull = TRUE; } mCurBufferp += numCopied; @@ -746,7 +746,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packBinaryDataFixed: newline truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryDataFixed: newline truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -813,7 +813,7 @@ BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packU8: val truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packU8: val truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -860,7 +860,7 @@ BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packU16: val truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packU16: val truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -907,7 +907,7 @@ BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packU32: val truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packU32: val truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -951,7 +951,7 @@ BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packS32: val truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packS32: val truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -995,7 +995,7 @@ BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packF32: val truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packF32: val truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1039,7 +1039,7 @@ BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packColor4: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packColor4: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1082,7 +1082,7 @@ BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *na if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packColor4U: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packColor4U: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1132,7 +1132,7 @@ BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *na if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packVector2: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packVector2: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1176,7 +1176,7 @@ BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *na if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packVector3: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packVector3: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1219,7 +1219,7 @@ BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *na if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packVector4: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packVector4: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1266,7 +1266,7 @@ BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::packUUID: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::packUUID: truncated: " << LL_ENDL; success = FALSE; } mCurBufferp += numCopied; @@ -1292,7 +1292,7 @@ BOOL LLDataPackerAsciiBuffer::unpackUUID(LLUUID &value, const char *name) void LLDataPackerAsciiBuffer::dump() { - llinfos << "Buffer: " << mBufferp << llendl; + LL_INFOS() << "Buffer: " << mBufferp << LL_ENDL; } void LLDataPackerAsciiBuffer::writeIndentedName(const char *name) @@ -1318,7 +1318,7 @@ void LLDataPackerAsciiBuffer::writeIndentedName(const char *name) if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) { numCopied = getBufferSize()-getCurrentSize(); - llwarns << "LLDataPackerAsciiBuffer::writeIndentedName: truncated: " << llendl; + LL_WARNS() << "LLDataPackerAsciiBuffer::writeIndentedName: truncated: " << LL_ENDL; } mCurBufferp += numCopied; @@ -1347,7 +1347,7 @@ BOOL LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 if (strcmp(keyword, name)) { - llwarns << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << llendl; + LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; return FALSE; } } @@ -1904,7 +1904,7 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v fpos_t last_pos; if (0 != fgetpos(mFP, &last_pos)) // 0==success for fgetpos { - llwarns << "Data packer failed to fgetpos" << llendl; + LL_WARNS() << "Data packer failed to fgetpos" << LL_ENDL; return FALSE; } @@ -1917,13 +1917,13 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v if (!keyword[0]) { - llwarns << "Data packer could not get the keyword!" << llendl; + LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL; fsetpos(mFP, &last_pos); return FALSE; } if (strcmp(keyword, name)) { - llwarns << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << llendl; + LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; fsetpos(mFP, &last_pos); return FALSE; } @@ -1941,12 +1941,12 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v sscanf(buffer, "%511s %511[^\n]", keyword, value); /* Flawfinder: ignore */ if (!keyword[0]) { - llwarns << "Data packer could not get the keyword!" << llendl; + LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL; return FALSE; } if (strcmp(keyword, name)) { - llwarns << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << llendl; + LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; return FALSE; } diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index 226752d52e..5140f56c01 100755 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h @@ -200,8 +200,8 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { - llwarns << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << llendl; - llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; + LL_WARNS() << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << LL_ENDL; + LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; return FALSE; } @@ -321,8 +321,8 @@ inline BOOL LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const cha { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { - llwarns << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << llendl; - llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; + LL_WARNS() << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << LL_ENDL; + LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; return FALSE; } diff --git a/indra/llmessage/lldispatcher.cpp b/indra/llmessage/lldispatcher.cpp index 7ac3651a76..c40fe0d389 100755 --- a/indra/llmessage/lldispatcher.cpp +++ b/indra/llmessage/lldispatcher.cpp @@ -76,7 +76,7 @@ bool LLDispatcher::dispatch( LLDispatchHandler* func = (*it).second; return (*func)(this, name, invoice, strings); } - llwarns << "Unable to find handler for Generic message: " << name << llendl; + LL_WARNS() << "Unable to find handler for Generic message: " << name << LL_ENDL; return false; } diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index dbb8c4e28d..d813a05963 100755 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -164,12 +164,12 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) case LLSD::TypeMap: { #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(map) BEGIN" << llendl; + LL_INFOS() << "streamOut(map) BEGIN" << LL_ENDL; #endif ostr << ""; if(ostr.fail()) { - llinfos << "STREAM FAILURE writing struct" << llendl; + LL_INFOS() << "STREAM FAILURE writing struct" << LL_ENDL; } LLSD::map_const_iterator it = sd.beginMap(); LLSD::map_const_iterator end = sd.endMap(); @@ -180,21 +180,21 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) streamOut(ostr, (*it).second); if(ostr.fail()) { - llinfos << "STREAM FAILURE writing '" << (*it).first - << "' with sd type " << (*it).second.type() << llendl; + LL_INFOS() << "STREAM FAILURE writing '" << (*it).first + << "' with sd type " << (*it).second.type() << LL_ENDL; } ostr << ""; } ostr << ""; #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(map) END" << llendl; + LL_INFOS() << "streamOut(map) END" << LL_ENDL; #endif break; } case LLSD::TypeArray: { #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(array) BEGIN" << llendl; + LL_INFOS() << "streamOut(array) BEGIN" << LL_ENDL; #endif ostr << ""; LLSD::array_const_iterator it = sd.beginArray(); @@ -204,12 +204,12 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) streamOut(ostr, *it); if(ostr.fail()) { - llinfos << "STREAM FAILURE writing array element sd type " - << (*it).type() << llendl; + LL_INFOS() << "STREAM FAILURE writing array element sd type " + << (*it).type() << LL_ENDL; } } #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(array) END" << llendl; + LL_INFOS() << "streamOut(array) END" << LL_ENDL; #endif ostr << ""; break; @@ -218,31 +218,31 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) // treat undefined as a bool with a false value. case LLSD::TypeBoolean: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(bool)" << llendl; + LL_INFOS() << "streamOut(bool)" << LL_ENDL; #endif ostr << "" << (sd.asBoolean() ? "1" : "0") << ""; break; case LLSD::TypeInteger: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(int)" << llendl; + LL_INFOS() << "streamOut(int)" << LL_ENDL; #endif ostr << "" << sd.asInteger() << ""; break; case LLSD::TypeReal: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(real)" << llendl; + LL_INFOS() << "streamOut(real)" << LL_ENDL; #endif ostr << "" << sd.asReal() << ""; break; case LLSD::TypeString: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(string)" << llendl; + LL_INFOS() << "streamOut(string)" << LL_ENDL; #endif ostr << "" << xml_escape_string(sd.asString()) << ""; break; case LLSD::TypeUUID: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(uuid)" << llendl; + LL_INFOS() << "streamOut(uuid)" << LL_ENDL; #endif // serialize it as a string ostr << "" << sd.asString() << ""; @@ -250,7 +250,7 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) case LLSD::TypeURI: { #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(uri)" << llendl; + LL_INFOS() << "streamOut(uri)" << LL_ENDL; #endif // serialize it as a string ostr << "" << xml_escape_string(sd.asString()) << ""; @@ -259,7 +259,7 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) case LLSD::TypeBinary: { #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(binary)" << llendl; + LL_INFOS() << "streamOut(binary)" << LL_ENDL; #endif // this is pretty inefficient, but we'll deal with that // problem when it becomes one. @@ -282,15 +282,15 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) } case LLSD::TypeDate: #if LL_SPEW_STREAM_OUT_DEBUGGING - llinfos << "streamOut(date)" << llendl; + LL_INFOS() << "streamOut(date)" << LL_ENDL; #endif // no need to escape this since it will be alpha-numeric. ostr << "" << sd.asString() << ""; break; default: // unhandled type - llwarns << "Unhandled structured data type: " << sd.type() - << llendl; + LL_WARNS() << "Unhandled structured data type: " << sd.type() + << LL_ENDL; break; } ostr << "
"; @@ -361,7 +361,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( } else { - llwarns << "Unable to determine the type of LLSD response." << llendl; + LL_WARNS() << "Unable to determine the type of LLSD response." << LL_ENDL; } PUMP_DEBUG; return rv; @@ -403,7 +403,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( PUMP_DEBUG; if(!eos) { - llinfos << "!eos" << llendl; + LL_INFOS() << "!eos" << LL_ENDL; return STATUS_BREAK; } @@ -413,7 +413,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in())); if(stream.fail()) { - llinfos << "STREAM FAILURE reading structure data." << llendl; + LL_INFOS() << "STREAM FAILURE reading structure data." << LL_ENDL; } PUMP_DEBUG; @@ -435,7 +435,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( } if(method.empty()) { - llwarns << "SD -> XML Request no method found." << llendl; + LL_WARNS() << "SD -> XML Request no method found." << LL_ENDL; return STATUS_ERROR; } @@ -446,13 +446,13 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( ostream.precision(DEFAULT_PRECISION); if(ostream.fail()) { - llinfos << "STREAM FAILURE setting precision" << llendl; + LL_INFOS() << "STREAM FAILURE setting precision" << LL_ENDL; } ostream << XML_HEADER << XMLRPC_REQUEST_HEADER_1 << xml_escape_string(method) << XMLRPC_REQUEST_HEADER_2; if(ostream.fail()) { - llinfos << "STREAM FAILURE writing method headers" << llendl; + LL_INFOS() << "STREAM FAILURE writing method headers" << LL_ENDL; } switch(param_sd.type()) { @@ -519,7 +519,7 @@ LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value) break; } case xmlrpc_type_boolean: - //lldebugs << "stream_out() bool" << llendl; + //LL_DEBUGS() << "stream_out() bool" << LL_ENDL; ostr << " " << (XMLRPC_GetValueBoolean(value) ? "true" : "false"); break; case xmlrpc_type_datetime: @@ -527,23 +527,23 @@ LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value) break; case xmlrpc_type_double: ostr << " r" << XMLRPC_GetValueDouble(value); - //lldebugs << "stream_out() double" << XMLRPC_GetValueDouble(value) - // << llendl; + //LL_DEBUGS() << "stream_out() double" << XMLRPC_GetValueDouble(value) + // << LL_ENDL; break; case xmlrpc_type_int: ostr << " i" << XMLRPC_GetValueInt(value); - //lldebugs << "stream_out() integer:" << XMLRPC_GetValueInt(value) - // << llendl; + //LL_DEBUGS() << "stream_out() integer:" << XMLRPC_GetValueInt(value) + // << LL_ENDL; break; case xmlrpc_type_string: - //lldebugs << "stream_out() string: " << str << llendl; + //LL_DEBUGS() << "stream_out() string: " << str << LL_ENDL; ostr << " s(" << XMLRPC_GetValueStringLen(value) << ")'" << XMLRPC_GetValueString(value) << "'"; break; case xmlrpc_type_array: // vector case xmlrpc_type_mixed: // vector { - //lldebugs << "stream_out() array" << llendl; + //LL_DEBUGS() << "stream_out() array" << LL_ENDL; ostr << " ["; U32 needs_comma = 0; XMLRPC_VALUE current = XMLRPC_VectorRewind(value); @@ -558,7 +558,7 @@ LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value) } case xmlrpc_type_struct: // still vector { - //lldebugs << "stream_out() struct" << llendl; + //LL_DEBUGS() << "stream_out() struct" << LL_ENDL; ostr << " {"; std::string name; U32 needs_comma = 0; @@ -578,7 +578,7 @@ LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value) case xmlrpc_type_none: default: status = LLIOPipe::STATUS_ERROR; - llwarns << "Found an empty xmlrpc type.." << llendl; + LL_WARNS() << "Found an empty xmlrpc type.." << LL_ENDL; // not much we can do here... break; }; @@ -618,7 +618,7 @@ LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( buf[bytes] = '\0'; buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes); - //lldebugs << "xmlrpc response: " << buf << llendl; + //LL_DEBUGS() << "xmlrpc response: " << buf << LL_ENDL; PUMP_DEBUG; XMLRPC_REQUEST response = XMLRPC_REQUEST_FromXML( @@ -627,7 +627,7 @@ LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( NULL); if(!response) { - llwarns << "XML -> SD Response unable to parse xml." << llendl; + LL_WARNS() << "XML -> SD Response unable to parse xml." << LL_ENDL; delete[] buf; return STATUS_ERROR; } @@ -702,7 +702,7 @@ LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl( buf[bytes] = '\0'; buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes); - //lldebugs << "xmlrpc request: " << buf << llendl; + //LL_DEBUGS() << "xmlrpc request: " << buf << LL_ENDL; // Check the value in the buffer. XMLRPC_REQUEST_FromXML will report a error code 4 if // values that are less than 0x20 are passed to it, except @@ -729,7 +729,7 @@ LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl( NULL); if(!request) { - llwarns << "XML -> SD Request process parse error." << llendl; + LL_WARNS() << "XML -> SD Request process parse error." << LL_ENDL; delete[] buf; return STATUS_ERROR; } diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index 61a84de8e3..63c15f0d5e 100755 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp @@ -84,18 +84,18 @@ std::string LLHost::getHostName() const hostent* he; if (INVALID_HOST_IP_ADDRESS == mIP) { - llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; + LL_WARNS() << "LLHost::getHostName() : Invalid IP address" << LL_ENDL; return std::string(); } he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); if (!he) { #if LL_WINDOWS - llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " - << WSAGetLastError() << llendl; + LL_WARNS() << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " + << WSAGetLastError() << LL_ENDL; #else - llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " - << h_errno << llendl; + LL_WARNS() << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " + << h_errno << LL_ENDL; #endif return std::string(); } @@ -136,17 +136,17 @@ BOOL LLHost::setHostByName(const std::string& hostname) switch(error_number) { case TRY_AGAIN: // XXX how to handle this case? - llwarns << "LLHost::setAddress(): try again" << llendl; + LL_WARNS() << "LLHost::setAddress(): try again" << LL_ENDL; break; case HOST_NOT_FOUND: case NO_ADDRESS: // NO_DATA - llwarns << "LLHost::setAddress(): host not found" << llendl; + LL_WARNS() << "LLHost::setAddress(): host not found" << LL_ENDL; break; case NO_RECOVERY: - llwarns << "LLHost::setAddress(): unrecoverable error" << llendl; + LL_WARNS() << "LLHost::setAddress(): unrecoverable error" << LL_ENDL; break; default: - llwarns << "LLHost::setAddress(): unknown error - " << error_number << llendl; + LL_WARNS() << "LLHost::setAddress(): unknown error - " << error_number << LL_ENDL; break; } return FALSE; diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 9a4d22ab0b..0479f0fd32 100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -276,7 +276,7 @@ void LLHTTPAssetRequest::setupCurlHandle() } else { - llerrs << "LLHTTPAssetRequest::setupCurlHandle - No asset storage associated with this request!" << llendl; + LL_ERRS() << "LLHTTPAssetRequest::setupCurlHandle - No asset storage associated with this request!" << LL_ENDL; } } @@ -290,7 +290,7 @@ void LLHTTPAssetRequest::cleanupCurlHandle() } else { - llerrs << "LLHTTPAssetRequest::~LLHTTPAssetRequest - No asset storage associated with this request!" << llendl; + LL_ERRS() << "LLHTTPAssetRequest::~LLHTTPAssetRequest - No asset storage associated with this request!" << LL_ENDL; } mCurlHandle = NULL; } @@ -312,7 +312,7 @@ void LLHTTPAssetRequest::prepareCompressedUpload() if (r != Z_OK) { - llerrs << "LLHTTPAssetRequest::prepareCompressedUpload defalateInit2() failed" << llendl; + LL_ERRS() << "LLHTTPAssetRequest::prepareCompressedUpload defalateInit2() failed" << LL_ENDL; } mZInitialized = true; @@ -327,10 +327,10 @@ void LLHTTPAssetRequest::finishCompressedUpload() { if (mZInitialized) { - llinfos << "LLHTTPAssetRequest::finishCompressedUpload: " + LL_INFOS() << "LLHTTPAssetRequest::finishCompressedUpload: " << "read " << mZStream.total_in << " byte asset file, " << "uploaded " << mZStream.total_out << " byte compressed asset" - << llendl; + << LL_ENDL; deflateEnd(&mZStream); delete[] mZInputBuffer; @@ -368,8 +368,8 @@ size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size) { if (r < 0) { - llwarns << "LLHTTPAssetRequest::readCompressedData: deflate returned error code " - << (S32) r << llendl; + LL_WARNS() << "LLHTTPAssetRequest::readCompressedData: deflate returned error code " + << (S32) r << LL_ENDL; } break; } @@ -496,7 +496,7 @@ void LLHTTPAssetStorage::storeAssetData( } else { - llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl; + LL_WARNS() << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << LL_ENDL; if (callback) { // LLAssetStorage metric: Zero size VFS @@ -518,7 +518,7 @@ void LLHTTPAssetStorage::storeAssetData( bool user_waiting, F64 timeout) { - llinfos << "LLAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; + LL_INFOS() << "LLAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL; LLLegacyAssetRequest *legacy = new LLLegacyAssetRequest; @@ -688,15 +688,15 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, } - llinfos << "Asset " << getRequestName(rt) << " request for " + LL_INFOS() << "Asset " << getRequestName(rt) << " request for " << asset_id << "." << LLAssetType::lookup(asset_type) << " removed from curl and placed at the end of the pending queue." - << llendl; + << LL_ENDL; } else { - llwarns << "Unable to find pending " << getRequestName(rt) << " request for " - << asset_id << "." << LLAssetType::lookup(asset_type) << llendl; + LL_WARNS() << "Unable to find pending " << getRequestName(rt) << " request for " + << asset_id << "." << LLAssetType::lookup(asset_type) << LL_ENDL; } } delete req; @@ -803,7 +803,7 @@ void LLHTTPAssetStorage::checkForTimeouts() } else { - llinfos << "Requesting " << new_req->mURLBuffer << llendl; + LL_INFOS() << "Requesting " << new_req->mURLBuffer << LL_ENDL; } } @@ -867,10 +867,10 @@ void LLHTTPAssetStorage::checkForTimeouts() // Get the uncompressed file size. LLVFile file(mVFS,new_req->getUUID(),new_req->getType()); S32 size = file.getSize(); - llinfos << "Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << llendl; + LL_INFOS() << "Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << LL_ENDL; if (size == 0) { - llwarns << "Rejecting zero size PUT request!" << llendl; + LL_WARNS() << "Rejecting zero size PUT request!" << LL_ENDL; new_req->cleanupCurlHandle(); deletePendingRequest(RT_UPLOAD, new_req->getType(), new_req->getUUID()); } @@ -916,12 +916,12 @@ void LLHTTPAssetStorage::checkForTimeouts() // Get the uncompressed file size. S32 size = file.getSize(); - llinfos << "TAT: LLHTTPAssetStorage::checkForTimeouts() : pending local!" - << " Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << llendl; + LL_INFOS() << "TAT: LLHTTPAssetStorage::checkForTimeouts() : pending local!" + << " Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << LL_ENDL; if (size == 0) { - llwarns << "Rejecting zero size PUT request!" << llendl; + LL_WARNS() << "Rejecting zero size PUT request!" << LL_ENDL; new_req->cleanupCurlHandle(); deletePendingRequest(RT_UPLOAD, new_req->getType(), new_req->getUUID()); } @@ -958,7 +958,7 @@ void LLHTTPAssetStorage::checkForTimeouts() || curl_result == HTTP_PUT_OK || curl_result == HTTP_NO_CONTENT)) { - llinfos << "Success uploading " << req->getUUID() << " to " << req->mURLBuffer << llendl; + LL_INFOS() << "Success uploading " << req->getUUID() << " to " << req->mURLBuffer << LL_ENDL; if (RT_LOCALUPLOAD == req->mRequestType) { addTempAssetData(req->getUUID(), req->mRequestingAgentID, mHostName); @@ -969,8 +969,8 @@ void LLHTTPAssetStorage::checkForTimeouts() curl_result == HTTP_SERVER_BAD_GATEWAY || curl_result == HTTP_SERVER_TEMP_UNAVAILABLE) { - llwarns << "Re-requesting upload for " << req->getUUID() << ". Received upload error to " << req->mURLBuffer << - " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << llendl; + LL_WARNS() << "Re-requesting upload for " << req->getUUID() << ". Received upload error to " << req->mURLBuffer << + " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL; ////HACK (probably) I am sick of this getting requeued and driving me mad. //if (req->mIsUserWaiting) @@ -980,8 +980,8 @@ void LLHTTPAssetStorage::checkForTimeouts() } else { - llwarns << "Failure uploading " << req->getUUID() << " to " << req->mURLBuffer << - " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << llendl; + LL_WARNS() << "Failure uploading " << req->getUUID() << " to " << req->mURLBuffer << + " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL; xfer_result = LL_ERR_ASSET_REQUEST_FAILED; } @@ -1003,7 +1003,7 @@ void LLHTTPAssetStorage::checkForTimeouts() { if (req->mVFile && req->mVFile->getSize() > 0) { - llinfos << "Success downloading " << req->mURLBuffer << ", size " << req->mVFile->getSize() << llendl; + LL_INFOS() << "Success downloading " << req->mURLBuffer << ", size " << req->mVFile->getSize() << LL_ENDL; req->mVFile->rename(req->getUUID(), req->getType()); } @@ -1011,15 +1011,15 @@ void LLHTTPAssetStorage::checkForTimeouts() { // *TODO: if this actually indicates a bad asset on the server // (not certain at this point), then delete it - llwarns << "Found " << req->mURLBuffer << " to be zero size" << llendl; + LL_WARNS() << "Found " << req->mURLBuffer << " to be zero size" << LL_ENDL; xfer_result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE; } } else { // KLW - TAT See if an avatar owns this texture, and if so request re-upload. - llwarns << "Failure downloading " << req->mURLBuffer << - " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << llendl; + LL_WARNS() << "Failure downloading " << req->mURLBuffer << + " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL; xfer_result = (curl_result == HTTP_MISSING) ? LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE : LL_ERR_ASSET_REQUEST_FAILED; @@ -1091,10 +1091,10 @@ void LLHTTPAssetStorage::bumpTimedOutUploads() if ( req->mTimeout < (mt_secs - req->mTime) ) { - llwarns << "Asset upload request timed out for " + LL_WARNS() << "Asset upload request timed out for " << req->getUUID() << "." << LLAssetType::lookup(req->getType()) - << ", bumping to the back of the line!" << llendl; + << ", bumping to the back of the line!" << LL_ENDL; deletePendingRequest(RT_UPLOAD, req->getType(), req->getUUID()); } @@ -1106,7 +1106,7 @@ size_t LLHTTPAssetStorage::curlDownCallback(void *data, size_t size, size_t nmem { if (!gAssetStorage) { - llwarns << "Missing gAssetStorage, aborting curl download callback!" << llendl; + LL_WARNS() << "Missing gAssetStorage, aborting curl download callback!" << LL_ENDL; return 0; } S32 bytes = (S32)(size * nmemb); @@ -1136,7 +1136,7 @@ size_t LLHTTPAssetStorage::curlUpCallback(void *data, size_t size, size_t nmemb, { if (!gAssetStorage) { - llwarns << "Missing gAssetStorage, aborting curl download callback!" << llendl; + LL_WARNS() << "Missing gAssetStorage, aborting curl download callback!" << LL_ENDL; return 0; } CURL *curl_handle = (CURL *)user_data; @@ -1171,12 +1171,12 @@ S32 LLHTTPAssetStorage::getURLToFile(const LLUUID& uuid, LLAssetType::EType asse { // *NOTE: There is no guarantee that the uuid and the asset_type match // - not that it matters. - Doug - lldebugs << "LLHTTPAssetStorage::getURLToFile() - " << url << llendl; + LL_DEBUGS() << "LLHTTPAssetStorage::getURLToFile() - " << url << LL_ENDL; FILE *fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ if (! fp) { - llwarns << "Failed to open " << filename << " for writing" << llendl; + LL_WARNS() << "Failed to open " << filename << " for writing" << LL_ENDL; return LL_ERR_ASSET_REQUEST_FAILED; } @@ -1190,7 +1190,7 @@ S32 LLHTTPAssetStorage::getURLToFile(const LLUUID& uuid, LLAssetType::EType asse curl_easy_setopt(req.mCurlHandle, CURLOPT_WRITEDATA, req.mCurlHandle); curl_multi_add_handle(mCurlMultiHandle, req.mCurlHandle); - llinfos << "Requesting as file " << req.mURLBuffer << llendl; + LL_INFOS() << "Requesting as file " << req.mURLBuffer << LL_ENDL; // braindead curl loop int queue_length; @@ -1215,7 +1215,7 @@ S32 LLHTTPAssetStorage::getURLToFile(const LLUUID& uuid, LLAssetType::EType asse } else if (timeout.hasExpired()) { - llwarns << "Request for " << url << " has timed out." << llendl; + LL_WARNS() << "Request for " << url << " has timed out." << LL_ENDL; success = false; xfer_result = LL_ERR_ASSET_REQUEST_FAILED; break; @@ -1233,19 +1233,19 @@ S32 LLHTTPAssetStorage::getURLToFile(const LLUUID& uuid, LLAssetType::EType asse if (size > 0) { // everything seems to be in order - llinfos << "Success downloading " << req.mURLBuffer << " to file, size " << size << llendl; + LL_INFOS() << "Success downloading " << req.mURLBuffer << " to file, size " << size << LL_ENDL; } else { - llwarns << "Found " << req.mURLBuffer << " to be zero size" << llendl; + LL_WARNS() << "Found " << req.mURLBuffer << " to be zero size" << LL_ENDL; xfer_result = LL_ERR_ASSET_REQUEST_FAILED; } } else { xfer_result = curl_result == HTTP_MISSING ? LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE : LL_ERR_ASSET_REQUEST_FAILED; - llinfos << "Failure downloading " << req.mURLBuffer << - " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << llendl; + LL_INFOS() << "Failure downloading " << req.mURLBuffer << + " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << LL_ENDL; } } @@ -1267,7 +1267,7 @@ size_t LLHTTPAssetStorage::curlFileDownCallback(void *data, size_t size, size_t if (! req->mFP) { - llwarns << "Missing mFP, aborting curl file download callback!" << llendl; + LL_WARNS() << "Missing mFP, aborting curl file download callback!" << LL_ENDL; return 0; } @@ -1314,7 +1314,7 @@ void LLHTTPAssetStorage::addRunningRequest(ERequestType rt, LLHTTPAssetRequest* } else { - llerrs << "LLHTTPAssetStorage::addRunningRequest - Request is not an upload OR download, this is bad!" << llendl; + LL_ERRS() << "LLHTTPAssetStorage::addRunningRequest - Request is not an upload OR download, this is bad!" << LL_ENDL; } } @@ -1327,7 +1327,7 @@ void LLHTTPAssetStorage::removeRunningRequest(ERequestType rt, LLHTTPAssetReques } else { - llerrs << "LLHTTPAssetStorage::removeRunningRequest - Destroyed request is not an upload OR download, this is bad!" << llendl; + LL_ERRS() << "LLHTTPAssetStorage::removeRunningRequest - Destroyed request is not an upload OR download, this is bad!" << LL_ENDL; } } @@ -1336,7 +1336,7 @@ void LLHTTPAssetStorage::addTempAssetData(const LLUUID& asset_id, const LLUUID& { if (agent_id.isNull() || asset_id.isNull()) { - llwarns << "TAT: addTempAssetData bad id's asset_id: " << asset_id << " agent_id: " << agent_id << llendl; + LL_WARNS() << "TAT: addTempAssetData bad id's asset_id: " << asset_id << " agent_id: " << agent_id << LL_ENDL; return; } @@ -1437,26 +1437,26 @@ void LLHTTPAssetStorage::dumpTempAssetData(const LLUUID& avatar_id) const if (avatar_id.isNull() || avatar_id == temp_asset_data.mAgentID) { - llinfos << "TAT: dump agent " << temp_asset_data.mAgentID + LL_INFOS() << "TAT: dump agent " << temp_asset_data.mAgentID << " texture " << temp_asset_data.mAssetID << " host " << temp_asset_data.mHostName - << llendl; + << LL_ENDL; count++; } } if (avatar_id.isNull()) { - llinfos << "TAT: dumped " << count << " entries for all avatars" << llendl; + LL_INFOS() << "TAT: dumped " << count << " entries for all avatars" << LL_ENDL; } else { - llinfos << "TAT: dumped " << count << " entries for avatar " << avatar_id << llendl; + LL_INFOS() << "TAT: dumped " << count << " entries for avatar " << avatar_id << LL_ENDL; } } void LLHTTPAssetStorage::clearTempAssetData() { - llinfos << "TAT: Clearing temp asset data map" << llendl; + LL_INFOS() << "TAT: Clearing temp asset data map" << LL_ENDL; mTempAssets.clear(); } diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 6110b035dc..fec4b1630b 100755 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -246,8 +246,8 @@ static void request( req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req); - lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " " - << headers << llendl; + LL_DEBUGS() << LLURLRequest::actionAsVerb(method) << " " << url << " " + << headers << LL_ENDL; // Insert custom headers if the caller sent any if (headers.isMap()) @@ -274,7 +274,7 @@ static void request( req->useProxy(false); } header << iter->first << ": " << iter->second.asString() ; - lldebugs << "header = " << header.str() << llendl; + LL_DEBUGS() << "header = " << header.str() << LL_ENDL; req->addHeader(header.str().c_str()); } } @@ -436,7 +436,7 @@ static LLSD blocking_request( const F32 timeout = 5 ) { - lldebugs << "blockingRequest of " << url << llendl; + LL_DEBUGS() << "blockingRequest of " << url << LL_ENDL; char curl_error_buffer[CURL_ERROR_SIZE] = "\0"; CURL* curlp = LLCurl::newEasyHandle(); llassert_always(curlp != NULL) ; @@ -467,7 +467,7 @@ static LLSD blocking_request( { std::ostringstream header; header << iter->first << ": " << iter->second.asString() ; - lldebugs << "header = " << header.str() << llendl; + LL_DEBUGS() << "header = " << header.str() << LL_ENDL; headers_list = curl_slist_append(headers_list, header.str().c_str()); } } @@ -496,12 +496,12 @@ static LLSD blocking_request( } // * Do the action using curl, handle results - lldebugs << "HTTP body: " << body_str << llendl; + LL_DEBUGS() << "HTTP body: " << body_str << LL_ENDL; headers_list = curl_slist_append(headers_list, "Accept: application/llsd+xml"); CURLcode curl_result = curl_easy_setopt(curlp, CURLOPT_HTTPHEADER, headers_list); if ( curl_result != CURLE_OK ) { - llinfos << "Curl is hosed - can't add headers" << llendl; + LL_INFOS() << "Curl is hosed - can't add headers" << LL_ENDL; } LLSD response = LLSD::emptyMap(); @@ -513,19 +513,19 @@ static LLSD blocking_request( if ( http_status != 404 && (http_status != 200 || curl_success != 0) ) { // We expect 404s, don't spam for them. - llwarns << "CURL REQ URL: " << url << llendl; - llwarns << "CURL REQ METHOD TYPE: " << method << llendl; - llwarns << "CURL REQ HEADERS: " << headers.asString() << llendl; - llwarns << "CURL REQ BODY: " << body_str << llendl; - llwarns << "CURL HTTP_STATUS: " << http_status << llendl; - llwarns << "CURL ERROR: " << curl_error_buffer << llendl; - llwarns << "CURL ERROR BODY: " << http_buffer.asString() << llendl; + LL_WARNS() << "CURL REQ URL: " << url << LL_ENDL; + LL_WARNS() << "CURL REQ METHOD TYPE: " << method << LL_ENDL; + LL_WARNS() << "CURL REQ HEADERS: " << headers.asString() << LL_ENDL; + LL_WARNS() << "CURL REQ BODY: " << body_str << LL_ENDL; + LL_WARNS() << "CURL HTTP_STATUS: " << http_status << LL_ENDL; + LL_WARNS() << "CURL ERROR: " << curl_error_buffer << LL_ENDL; + LL_WARNS() << "CURL ERROR BODY: " << http_buffer.asString() << LL_ENDL; response["body"] = http_buffer.asString(); } else { response["body"] = http_buffer.asLLSD(); - lldebugs << "CURL response: " << http_buffer.asString() << llendl; + LL_DEBUGS() << "CURL response: " << http_buffer.asString() << LL_ENDL; } if(headers_list) diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp index 5c2f73eccb..dfff84a564 100755 --- a/indra/llmessage/llhttpnode.cpp +++ b/indra/llmessage/llhttpnode.cpp @@ -172,7 +172,7 @@ LLSD LLHTTPNode::simpleDel(const LLSD&) const // virtual void LLHTTPNode::options(ResponsePtr response, const LLSD& context) const { - //llinfos << "options context: " << context << llendl; + //LL_INFOS() << "options context: " << context << LL_ENDL; // default implementation constructs an url to the documentation. std::string host( @@ -238,10 +238,10 @@ const LLHTTPNode* LLHTTPNode::traverse( LLHTTPNode* child = node->getChild(*iter, context); if(!child) { - lldebugs << "LLHTTPNode::traverse: Couldn't find '" << *iter << "'" << llendl; + LL_DEBUGS() << "LLHTTPNode::traverse: Couldn't find '" << *iter << "'" << LL_ENDL; break; } - lldebugs << "LLHTTPNode::traverse: Found '" << *iter << "'" << llendl; + LL_DEBUGS() << "LLHTTPNode::traverse: Found '" << *iter << "'" << LL_ENDL; node = child; } @@ -275,8 +275,8 @@ void LLHTTPNode::addNode(const std::string& path, LLHTTPNode* nodeToAdd) if (iter == end) { - llwarns << "LLHTTPNode::addNode: already a node that handles " - << path << llendl; + LL_WARNS() << "LLHTTPNode::addNode: already a node that handles " + << path << LL_ENDL; return; } diff --git a/indra/llmessage/llhttpsender.cpp b/indra/llmessage/llhttpsender.cpp index c48cbc42a6..643735fc18 100755 --- a/indra/llmessage/llhttpsender.cpp +++ b/indra/llmessage/llhttpsender.cpp @@ -54,14 +54,14 @@ void LLHTTPSender::send(const LLHost& host, const std::string& name, // Default implementation inserts sender, message and sends HTTP POST std::ostringstream stream; stream << "http://" << host << "/trusted-message/" << name; - llinfos << "LLHTTPSender::send: POST to " << stream.str() << llendl; + LL_INFOS() << "LLHTTPSender::send: POST to " << stream.str() << LL_ENDL; LLHTTPClient::post(stream.str(), body, response); } //static void LLHTTPSender::setSender(const LLHost& host, LLHTTPSender* sender) { - llinfos << "LLHTTPSender::setSender " << host << llendl; + LL_INFOS() << "LLHTTPSender::setSender " << host << LL_ENDL; senderMap[host] = sender; } diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index b0275c161b..b7f3e6e4f7 100755 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -111,7 +111,7 @@ LLIMInfo::~LLIMInfo() void LLIMInfo::packInstantMessage(LLMessageSystem* msg) const { - lldebugs << "LLIMInfo::packInstantMessage()" << llendl; + LL_DEBUGS() << "LLIMInfo::packInstantMessage()" << LL_ENDL; msg->newMessageFast(_PREHASH_ImprovedInstantMessage); packMessageBlock(msg); } @@ -161,7 +161,7 @@ void pack_instant_message( const U8* binary_bucket, S32 binary_bucket_size) { - lldebugs << "pack_instant_message()" << llendl; + LL_DEBUGS() << "pack_instant_message()" << LL_ENDL; msg->newMessageFast(_PREHASH_ImprovedInstantMessage); pack_instant_message_block( msg, @@ -228,7 +228,7 @@ void pack_instant_message_block( if (num_written < 0 || num_written >= MTUBYTES) { num_written = MTUBYTES - 1; - llwarns << "pack_instant_message_block: message truncated: " << message << llendl; + LL_WARNS() << "pack_instant_message_block: message truncated: " << message << LL_ENDL; } bytes_left -= num_written; diff --git a/indra/llmessage/lliobuffer.cpp b/indra/llmessage/lliobuffer.cpp index ed00e230ac..bbd7b8777d 100755 --- a/indra/llmessage/lliobuffer.cpp +++ b/indra/llmessage/lliobuffer.cpp @@ -109,6 +109,6 @@ LLIOPipe::EStatus LLIOBuffer::process_impl( LLPumpIO* pump) { // no-op (I think) - llwarns << "You are using an LLIOBuffer which is deprecated." << llendl; + LL_WARNS() << "You are using an LLIOBuffer which is deprecated." << LL_ENDL; return STATUS_OK; } diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index f9d37b2e39..7b2fda52ec 100755 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -154,7 +154,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_PIPE); PUMP_DEBUG; - lldebugs << "LLSDHTTPServer::process_impl" << llendl; + LL_DEBUGS() << "LLSDHTTPServer::process_impl" << LL_ENDL; // Once we have all the data, We need to read the sd on // the the in channel, and respond on the out channel @@ -245,15 +245,15 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( // Log all HTTP transactions. // TODO: Add a way to log these to their own file instead of indra.log // It is just too spammy to be in indra.log. - lldebugs << verb << " " << context[CONTEXT_REQUEST]["path"].asString() + LL_DEBUGS() << verb << " " << context[CONTEXT_REQUEST]["path"].asString() << " " << mStatusCode << " " << mStatusMessage << " " << delta - << "s" << llendl; + << "s" << LL_ENDL; // Log Internal Server Errors //if(mStatusCode == 500) //{ - // llwarns << "LLHTTPPipe::process_impl:500:Internal Server Error" - // << llendl; + // LL_WARNS() << "LLHTTPPipe::process_impl:500:Internal Server Error" + // << LL_ENDL; //} } @@ -302,8 +302,8 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( return STATUS_DONE; } default: - llwarns << "LLHTTPPipe::process_impl: unexpected state " - << mState << llendl; + LL_WARNS() << "LLHTTPPipe::process_impl: unexpected state " + << mState << LL_ENDL; return STATUS_BREAK; } @@ -332,7 +332,7 @@ void LLHTTPPipe::Response::result(const LLSD& r) { if(! mPipe) { - llwarns << "LLHTTPPipe::Response::result: NULL pipe" << llendl; + LL_WARNS() << "LLHTTPPipe::Response::result: NULL pipe" << LL_ENDL; return; } @@ -348,7 +348,7 @@ void LLHTTPPipe::Response::extendedResult(S32 code, const std::string& body, con { if(! mPipe) { - llwarns << "LLHTTPPipe::Response::status: NULL pipe" << llendl; + LL_WARNS() << "LLHTTPPipe::Response::status: NULL pipe" << LL_ENDL; return; } @@ -364,7 +364,7 @@ void LLHTTPPipe::Response::status(S32 code, const std::string& message) { if(! mPipe) { - llwarns << "LLHTTPPipe::Response::status: NULL pipe" << llendl; + LL_WARNS() << "LLHTTPPipe::Response::status: NULL pipe" << LL_ENDL; return; } @@ -595,7 +595,7 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) : // virtual LLHTTPResponder::~LLHTTPResponder() { - //lldebugs << "destroying LLHTTPResponder" << llendl; + //LL_DEBUGS() << "destroying LLHTTPResponder" << LL_ENDL; } bool LLHTTPResponder::readHeaderLine( @@ -612,7 +612,7 @@ bool LLHTTPResponder::readHeaderLine( { if(len) { - lldebugs << "readLine failed - too long maybe?" << llendl; + LL_DEBUGS() << "readLine failed - too long maybe?" << LL_ENDL; markBad(channels, buffer); } return false; @@ -668,8 +668,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { memcpy(buf, (*seg_iter).data(), (*seg_iter).size()); /*Flawfinder: ignore*/ buf[(*seg_iter).size()] = '\0'; - llinfos << (*seg_iter).getChannel() << ": " << buf - << llendl; + LL_INFOS() << (*seg_iter).getChannel() << ": " << buf + << LL_ENDL; ++seg_iter; } } @@ -695,10 +695,10 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( header >> mAbsPathAndQuery; header >> mVersion; - lldebugs << "http request: " + LL_DEBUGS() << "http request: " << mVerb << " " << mAbsPathAndQuery - << " " << mVersion << llendl; + << " " << mVersion << LL_ENDL; std::string::size_type delimiter = mAbsPathAndQuery.find('?'); @@ -728,7 +728,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { read_next_line = false; parse_all = false; - lldebugs << "unknown http verb: " << mVerb << llendl; + LL_DEBUGS() << "unknown http verb: " << mVerb << LL_ENDL; markBad(channels, buffer); } } @@ -763,7 +763,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( if(NULL == pos_colon) { keep_parsing = false; - lldebugs << "bad header: " << buf << llendl; + LL_DEBUGS() << "bad header: " << buf << LL_ENDL; markBad(channels, buffer); break; } @@ -774,7 +774,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( LLStringUtil::toLower(name); if("content-length" == name) { - lldebugs << "Content-Length: " << value << llendl; + LL_DEBUGS() << "Content-Length: " << value << LL_ENDL; mContentLength = atoi(value.c_str()); } else @@ -811,8 +811,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( const LLHTTPNode* node = mRootNode.traverse(mPath, context); if(node) { - //llinfos << "LLHTTPResponder::process_impl found node for " - // << mAbsPathAndQuery << llendl; + //LL_INFOS() << "LLHTTPResponder::process_impl found node for " + // << mAbsPathAndQuery << LL_ENDL; // Copy everything after mLast read to the out. LLBufferArray::segment_iterator_t seg_iter; @@ -832,8 +832,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { memcpy(buf, (*seg_iter).data(), (*seg_iter).size()); /*Flawfinder: ignore*/ buf[(*seg_iter).size()] = '\0'; - llinfos << (*seg_iter).getChannel() << ": " << buf - << llendl; + LL_INFOS() << (*seg_iter).getChannel() << ": " << buf + << LL_ENDL; ++seg_iter; } #endif @@ -859,7 +859,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( = node->getProtocolHandler(); if (protocolHandler) { - lldebugs << "HTTP context: " << context << llendl; + LL_DEBUGS() << "HTTP context: " << context << LL_ENDL; protocolHandler->build(chain, context); } else @@ -918,8 +918,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( } else { - llwarns << "LLHTTPResponder::process_impl didn't find a node for " - << mAbsPathAndQuery << llendl; + LL_WARNS() << "LLHTTPResponder::process_impl didn't find a node for " + << mAbsPathAndQuery << LL_ENDL; LLBufferStream str(channels, buffer.get()); mState = STATE_SHORT_CIRCUIT; str << HTTP_VERSION_STR << " 404 Not Found\r\n\r\n\n" @@ -972,7 +972,7 @@ LLHTTPNode& LLIOHTTPServer::create( port); if(!socket) { - llerrs << "Unable to initialize socket" << llendl; + LL_ERRS() << "Unable to initialize socket" << LL_ENDL; } LLHTTPResponseFactory* factory = new LLHTTPResponseFactory; diff --git a/indra/llmessage/lliopipe.cpp b/indra/llmessage/lliopipe.cpp index 8f827f7a30..4676a9a8f0 100755 --- a/indra/llmessage/lliopipe.cpp +++ b/indra/llmessage/lliopipe.cpp @@ -72,7 +72,7 @@ LLIOPipe::LLIOPipe() : LLIOPipe::~LLIOPipe() { - //lldebugs << "destroying LLIOPipe" << llendl; + //LL_DEBUGS() << "destroying LLIOPipe" << LL_ENDL; } //virtual diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index 27e3cc7898..35da391ca4 100755 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -74,7 +74,7 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) #if LL_DEBUG_SOCKET_FILE_DESCRIPTORS if(!apr_sock) { - lldebugs << "Socket -- " << (msg?msg:"") << ": no socket." << llendl; + LL_DEBUGS() << "Socket -- " << (msg?msg:"") << ": no socket." << LL_ENDL; return; } // *TODO: Why doesn't this work? @@ -82,13 +82,13 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) int os_sock; if(APR_SUCCESS == apr_os_sock_get(&os_sock, apr_sock)) { - lldebugs << "Socket -- " << (msg?msg:"") << " on fd " << os_sock - << " at " << apr_sock << llendl; + LL_DEBUGS() << "Socket -- " << (msg?msg:"") << " on fd " << os_sock + << " at " << apr_sock << LL_ENDL; } else { - lldebugs << "Socket -- " << (msg?msg:"") << " no fd " - << " at " << apr_sock << llendl; + LL_DEBUGS() << "Socket -- " << (msg?msg:"") << " no fd " + << " at " << apr_sock << LL_ENDL; } #endif } @@ -166,13 +166,13 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) rv.reset(); return rv; } - lldebugs << "Bound " << ((DATAGRAM_UDP == type) ? "udp" : "tcp") - << " socket to port: " << sa->port << llendl; + LL_DEBUGS() << "Bound " << ((DATAGRAM_UDP == type) ? "udp" : "tcp") + << " socket to port: " << sa->port << LL_ENDL; if(STREAM_TCP == type) { // If it's a stream based socket, we need to tell the OS // to keep a queue of incoming connections for ACCEPT. - lldebugs << "Setting listen state for socket." << llendl; + LL_DEBUGS() << "Setting listen state for socket." << LL_ENDL; status = apr_socket_listen( socket, LL_DEFAULT_LISTEN_BACKLOG); @@ -291,7 +291,7 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) : LLIOSocketReader::~LLIOSocketReader() { - //lldebugs << "Destroying LLIOSocketReader" << llendl; + //LL_DEBUGS() << "Destroying LLIOSocketReader" << LL_ENDL; } static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_READER("Socket Reader"); @@ -316,8 +316,8 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( if(pump) { PUMP_DEBUG; - lldebugs << "Initializing poll descriptor for LLIOSocketReader." - << llendl; + LL_DEBUGS() << "Initializing poll descriptor for LLIOSocketReader." + << LL_ENDL; apr_pollfd_t poll_fd; poll_fd.p = NULL; poll_fd.desc_type = APR_POLL_SOCKET; @@ -344,7 +344,7 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( status = apr_socket_recv(mSource->getSocket(), read_buf, &len); buffer->append(channels.out(), (U8*)read_buf, len); } while((APR_SUCCESS == status) && (READ_BUFFER_SIZE == len)); - lldebugs << "socket read status: " << status << llendl; + LL_DEBUGS() << "socket read status: " << status << LL_ENDL; LLIOPipe::EStatus rv = STATUS_OK; PUMP_DEBUG; @@ -391,7 +391,7 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) : LLIOSocketWriter::~LLIOSocketWriter() { - //lldebugs << "Destroying LLIOSocketWriter" << llendl; + //LL_DEBUGS() << "Destroying LLIOSocketWriter" << LL_ENDL; } static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_WRITER("Socket Writer"); @@ -415,8 +415,8 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( if(pump) { PUMP_DEBUG; - lldebugs << "Initializing poll descriptor for LLIOSocketWriter." - << llendl; + LL_DEBUGS() << "Initializing poll descriptor for LLIOSocketWriter." + << LL_ENDL; apr_pollfd_t poll_fd; poll_fd.p = NULL; poll_fd.desc_type = APR_POLL_SOCKET; @@ -542,7 +542,7 @@ LLIOServerSocket::LLIOServerSocket( LLIOServerSocket::~LLIOServerSocket() { - //lldebugs << "Destroying LLIOServerSocket" << llendl; + //LL_DEBUGS() << "Destroying LLIOServerSocket" << LL_ENDL; } void LLIOServerSocket::setResponseTimeout(F32 timeout_secs) @@ -563,7 +563,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( PUMP_DEBUG; if(!pump) { - llwarns << "Need a pump for server socket." << llendl; + LL_WARNS() << "Need a pump for server socket." << LL_ENDL; return STATUS_ERROR; } if(!mInitialized) @@ -572,8 +572,8 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( // This segment sets up the pump so that we do not call // process again until we have an incoming read, aka connect() // from a remote host. - lldebugs << "Initializing poll descriptor for LLIOServerSocket." - << llendl; + LL_DEBUGS() << "Initializing poll descriptor for LLIOServerSocket." + << LL_ENDL; apr_pollfd_t poll_fd; poll_fd.p = NULL; poll_fd.desc_type = APR_POLL_SOCKET; @@ -588,7 +588,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( // we are initialized, and told to process, so we must have a // socket waiting for a connection. - lldebugs << "accepting socket" << llendl; + LL_DEBUGS() << "accepting socket" << LL_ENDL; PUMP_DEBUG; apr_pool_t* new_pool = NULL; @@ -633,12 +633,12 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( } else { - llwarns << "Unable to build reactor to socket." << llendl; + LL_WARNS() << "Unable to build reactor to socket." << LL_ENDL; } } else { - llwarns << "Unable to create linden socket." << llendl; + LL_WARNS() << "Unable to create linden socket." << LL_ENDL; } PUMP_DEBUG; @@ -678,7 +678,7 @@ LLIODataSocket::LLIODataSocket( if(ll_apr_warn_status(status)) return; if(sa->port) { - lldebugs << "Bound datagram socket to port: " << sa->port << llendl; + LL_DEBUGS() << "Bound datagram socket to port: " << sa->port << LL_ENDL; mPort = sa->port; } else diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index dc27f2ca4a..134154aa6c 100755 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -194,16 +194,16 @@ std::string LLMail::buildSMTPTransaction( { if(!from_address || !to_address) { - llinfos << "send_mail build_smtp_transaction reject: missing to and/or" - << " from address." << llendl; + LL_INFOS() << "send_mail build_smtp_transaction reject: missing to and/or" + << " from address." << LL_ENDL; return std::string(); } if(!valid_subject_chars(subject)) { - llinfos << "send_mail build_smtp_transaction reject: bad subject header: " + LL_INFOS() << "send_mail build_smtp_transaction reject: bad subject header: " << "to=<" << to_address << ">, from=<" << from_address << ">" - << llendl; + << LL_ENDL; return std::string(); } std::ostringstream from_fmt; @@ -260,8 +260,8 @@ bool LLMail::send( { if(!from_address || !to_address) { - llinfos << "send_mail reject: missing to and/or from address." - << llendl; + LL_INFOS() << "send_mail reject: missing to and/or from address." + << LL_ENDL; return false; } @@ -298,26 +298,26 @@ bool LLMail::send( if(!gMailEnabled) { - llinfos << "send_mail reject: mail system is disabled: to=<" + LL_INFOS() << "send_mail reject: mail system is disabled: to=<" << to_address << ">, from=<" << from_address - << ">" << llendl; + << ">" << LL_ENDL; // Any future interface to SMTP should return this as an // error. --mark return true; } if(!gSockAddr) { - llwarns << "send_mail reject: mail system not initialized: to=<" + LL_WARNS() << "send_mail reject: mail system not initialized: to=<" << to_address << ">, from=<" << from_address - << ">" << llendl; + << ">" << LL_ENDL; return false; } if(!connect_smtp()) { - llwarns << "send_mail reject: SMTP connect failure: to=<" + LL_WARNS() << "send_mail reject: SMTP connect failure: to=<" << to_address << ">, from=<" << from_address - << ">" << llendl; + << ">" << LL_ENDL; return false; } @@ -333,27 +333,27 @@ bool LLMail::send( disconnect_smtp(); if(ll_apr_warn_status(status)) { - llwarns << "send_mail socket failure: unable to write " + LL_WARNS() << "send_mail socket failure: unable to write " << "to=<" << to_address << ">, from=<" << from_address << ">" << ", bytes=" << original_size - << ", sent=" << send_size << llendl; + << ", sent=" << send_size << LL_ENDL; return false; } if(send_size >= LL_MAX_KNOWN_GOOD_MAIL_SIZE) { - llwarns << "send_mail message has been shown to fail in testing " + LL_WARNS() << "send_mail message has been shown to fail in testing " << "when sending messages larger than " << LL_MAX_KNOWN_GOOD_MAIL_SIZE - << " bytes. The next log about success is potentially a lie." << llendl; + << " bytes. The next log about success is potentially a lie." << LL_ENDL; } - lldebugs << "send_mail success: " + LL_DEBUGS() << "send_mail success: " << "to=<" << to_address << ">, from=<" << from_address << ">" << ", bytes=" << original_size - << ", sent=" << send_size << llendl; + << ", sent=" << send_size << LL_ENDL; #if LL_LOG_ENTIRE_MAIL_MESSAGE_ON_SEND - llinfos << rfc2822_msg.str() << llendl; + LL_INFOS() << rfc2822_msg.str() << LL_ENDL; #endif return true; } diff --git a/indra/llmessage/llmessageconfig.cpp b/indra/llmessage/llmessageconfig.cpp index 539efc65f8..f8b2c8f5a6 100755 --- a/indra/llmessage/llmessageconfig.cpp +++ b/indra/llmessage/llmessageconfig.cpp @@ -145,9 +145,9 @@ void LLMessageConfigFile::loadMessages(const LLSD& data) std::ostringstream out; LLSDXMLFormatter *formatter = new LLSDXMLFormatter; formatter->format(mMessages, out); - llinfos << "loading ... " << out.str() + LL_INFOS() << "loading ... " << out.str() << " LLMessageConfigFile::loadMessages loaded " - << mMessages.size() << " messages" << llendl; + << mMessages.size() << " messages" << LL_ENDL; #endif } @@ -182,7 +182,7 @@ void LLMessageConfigFile::loadMessageBans(const LLSD& data) bool LLMessageConfigFile::isCapBanned(const std::string& cap_name) const { - lldebugs << "mCapBans is " << LLSDNotationStreamer(mCapBans) << llendl; + LL_DEBUGS() << "mCapBans is " << LLSDNotationStreamer(mCapBans) << LL_ENDL; return mCapBans[cap_name]; } @@ -268,7 +268,7 @@ bool LLMessageConfig::isValidMessage(const std::string& msg_name) { if (sServerName.empty()) { - llerrs << "LLMessageConfig::initClass() not called" << llendl; + LL_ERRS() << "LLMessageConfig::initClass() not called" << LL_ENDL; } LLMessageConfigFile& file = LLMessageConfigFile::instance(); return file.mMessages.has(msg_name); @@ -294,8 +294,8 @@ LLSD LLMessageConfig::getConfigForMessage(const std::string& msg_name) { if (sServerName.empty()) { - llerrs << "LLMessageConfig::isMessageTrusted(name) before" - << " LLMessageConfig::initClass()" << llendl; + LL_ERRS() << "LLMessageConfig::isMessageTrusted(name) before" + << " LLMessageConfig::initClass()" << LL_ENDL; } LLMessageConfigFile& file = LLMessageConfigFile::instance(); // LLSD for the CamelCase message name diff --git a/indra/llmessage/llmessagetemplate.cpp b/indra/llmessage/llmessagetemplate.cpp index d64123ad62..c4c7e66703 100755 --- a/indra/llmessage/llmessagetemplate.cpp +++ b/indra/llmessage/llmessagetemplate.cpp @@ -39,8 +39,8 @@ void LLMsgVarData::addData(const void *data, S32 size, EMsgVariableType type, S3 { if (mType != type) { - llwarns << "Type mismatch in LLMsgVarData::addData for " << mName - << llendl; + LL_WARNS() << "Type mismatch in LLMsgVarData::addData for " << mName + << LL_ENDL; } } if(size) @@ -181,12 +181,12 @@ void LLMessageTemplate::banUdp() }; if (mDeprecation != MD_DEPRECATED) { - llinfos << "Setting " << mName << " to UDPBlackListed was " << deprecation[mDeprecation] << llendl; + LL_INFOS() << "Setting " << mName << " to UDPBlackListed was " << deprecation[mDeprecation] << LL_ENDL; mDeprecation = MD_UDPBLACKLISTED; } else { - llinfos << mName << " is already more deprecated than UDPBlackListed" << llendl; + LL_INFOS() << mName << " is already more deprecated than UDPBlackListed" << LL_ENDL; } } diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index 70a91d8a6f..330c915ab1 100755 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -193,7 +193,7 @@ public: LLMessageVariable** varp = &mMemberVariables[name]; if (*varp != NULL) { - llerrs << name << " has already been used as a variable name!" << llendl; + LL_ERRS() << name << " has already been used as a variable name!" << LL_ENDL; } *varp = new LLMessageVariable(name, type, size); if (((*varp)->getType() != MVT_VARIABLE) @@ -301,8 +301,8 @@ public: LLMessageBlock** member_blockp = &mMemberBlocks[blockp->mName]; if (*member_blockp != NULL) { - llerrs << "Block " << blockp->mName - << "has already been used as a block name!" << llendl; + LL_ERRS() << "Block " << blockp->mName + << "has already been used as a block name!" << LL_ENDL; } *member_blockp = blockp; if ( (mTotalSize != -1) diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index b0f19df47c..1f7c09dbe5 100755 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -165,13 +165,13 @@ BOOL b_check_token(const char *token, const char *regexp) if (current_checker == -1) { - llerrs << "Invalid regular expression value!" << llendl; + LL_ERRS() << "Invalid regular expression value!" << LL_ENDL; return FALSE; } if (current_checker == 9999) { - llerrs << "Regular expression can't start with *!" << llendl; + LL_ERRS() << "Regular expression can't start with *!" << LL_ENDL; return FALSE; } @@ -179,7 +179,7 @@ BOOL b_check_token(const char *token, const char *regexp) { if (current_checker == -1) { - llerrs << "Input exceeds regular expression!\nDid you forget a *?" << llendl; + LL_ERRS() << "Input exceeds regular expression!\nDid you forget a *?" << LL_ENDL; return FALSE; } @@ -204,7 +204,7 @@ BOOL b_variable_ok(const char *token) { if (!b_check_token(token, "fv*")) { - llwarns << "Token '" << token << "' isn't a variable!" << llendl; + LL_WARNS() << "Token '" << token << "' isn't a variable!" << LL_ENDL; return FALSE; } return TRUE; @@ -215,7 +215,7 @@ BOOL b_integer_ok(const char *token) { if (!b_check_token(token, "sd*")) { - llwarns << "Token isn't an integer!" << llendl; + LL_WARNS() << "Token isn't an integer!" << LL_ENDL; return FALSE; } return TRUE; @@ -226,7 +226,7 @@ BOOL b_positive_integer_ok(const char *token) { if (!b_check_token(token, "d*")) { - llwarns << "Token isn't an integer!" << llendl; + LL_WARNS() << "Token isn't an integer!" << LL_ENDL; return FALSE; } return TRUE; @@ -359,13 +359,13 @@ void LLTemplateTokenizer::error(std::string message) const { if(atEOF()) { - llerrs << "Unexpected end of file: " << message << llendl; + LL_ERRS() << "Unexpected end of file: " << message << LL_ENDL; } else { - llerrs << "Problem parsing message template at line " + LL_ERRS() << "Problem parsing message template at line " << line() << ", with token '" << get() << "' : " - << message << llendl; + << message << LL_ENDL; } } @@ -383,12 +383,12 @@ LLTemplateParser::LLTemplateParser(LLTemplateTokenizer & tokens): std::string vers_string = tokens.next(); mVersion = (F32)atof(vers_string.c_str()); - llinfos << "### Message template version " << mVersion << " ###" << llendl; + LL_INFOS() << "### Message template version " << mVersion << " ###" << LL_ENDL; } else { - llerrs << "Version must be first in the message template, found " - << tokens.next() << llendl; + LL_ERRS() << "Version must be first in the message template, found " + << tokens.next() << LL_ENDL; } while(LLMessageTemplate * templatep = parseMessage(tokens)) @@ -405,8 +405,8 @@ LLTemplateParser::LLTemplateParser(LLTemplateTokenizer & tokens): if(!tokens.wantEOF()) { - llerrs << "Expected end of template or a message, instead found: " - << tokens.next() << " at " << tokens.line() << llendl; + LL_ERRS() << "Expected end of template or a message, instead found: " + << tokens.next() << " at " << tokens.line() << LL_ENDL; } } @@ -441,7 +441,7 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) // is name a legit C variable name if (!b_variable_ok(template_name.c_str())) { - llerrs << "Not legit variable name: " << template_name << " at " << tokens.line() << llendl; + LL_ERRS() << "Not legit variable name: " << template_name << " at " << tokens.line() << LL_ENDL; } // ok, now get Frequency ("High", "Medium", or "Low") @@ -461,7 +461,7 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) } else { - llerrs << "Expected frequency, got " << freq_string << " at " << tokens.line() << llendl; + LL_ERRS() << "Expected frequency, got " << freq_string << " at " << tokens.line() << LL_ENDL; } // TODO more explicit checking here pls @@ -477,7 +477,7 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) message_number = (255 << 24) | (255 << 16) | message_number; break; default: - llerrs << "Unknown frequency enum: " << frequency << llendl; + LL_ERRS() << "Unknown frequency enum: " << frequency << LL_ENDL; } templatep = new LLMessageTemplate( @@ -497,7 +497,7 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) } else { - llerrs << "Bad trust " << trust << " at " << tokens.line() << llendl; + LL_ERRS() << "Bad trust " << trust << " at " << tokens.line() << LL_ENDL; } // get encoding @@ -512,7 +512,7 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) } else { - llerrs << "Bad encoding " << encoding << " at " << tokens.line() << llendl; + LL_ERRS() << "Bad encoding " << encoding << " at " << tokens.line() << LL_ENDL; } // get deprecation @@ -544,8 +544,8 @@ LLMessageTemplate * LLTemplateParser::parseMessage(LLTemplateTokenizer & tokens) if(!tokens.want("}")) { - llerrs << "Expecting closing } for message " << template_name - << " at " << tokens.line() << llendl; + LL_ERRS() << "Expecting closing } for message " << template_name + << " at " << tokens.line() << LL_ENDL; } return templatep; } @@ -566,8 +566,8 @@ LLMessageBlock * LLTemplateParser::parseBlock(LLTemplateTokenizer & tokens) // is name a legit C variable name if (!b_variable_ok(block_name.c_str())) { - llerrs << "not a legal block name: " << block_name - << " at " << tokens.line() << llendl; + LL_ERRS() << "not a legal block name: " << block_name + << " at " << tokens.line() << LL_ENDL; } // now, block type ("Single", "Multiple", or "Variable") @@ -586,8 +586,8 @@ LLMessageBlock * LLTemplateParser::parseBlock(LLTemplateTokenizer & tokens) // is it a legal integer if (!b_positive_integer_ok(repeats.c_str())) { - llerrs << "not a legal integer for block multiple count: " - << repeats << " at " << tokens.line() << llendl; + LL_ERRS() << "not a legal integer for block multiple count: " + << repeats << " at " << tokens.line() << LL_ENDL; } // ok, we can create a block @@ -602,8 +602,8 @@ LLMessageBlock * LLTemplateParser::parseBlock(LLTemplateTokenizer & tokens) } else { - llerrs << "bad block type: " << block_type - << " at " << tokens.line() << llendl; + LL_ERRS() << "bad block type: " << block_type + << " at " << tokens.line() << LL_ENDL; } @@ -617,8 +617,8 @@ LLMessageBlock * LLTemplateParser::parseBlock(LLTemplateTokenizer & tokens) if(!tokens.want("}")) { - llerrs << "Expecting closing } for block " << block_name - << " at " << tokens.line() << llendl; + LL_ERRS() << "Expecting closing } for block " << block_name + << " at " << tokens.line() << LL_ENDL; } return blockp; @@ -637,8 +637,8 @@ LLMessageVariable * LLTemplateParser::parseVariable(LLTemplateTokenizer & tokens if (!b_variable_ok(var_name.c_str())) { - llerrs << "Not a legit variable name: " << var_name - << " at " << tokens.line() << llendl; + LL_ERRS() << "Not a legit variable name: " << var_name + << " at " << tokens.line() << LL_ENDL; } std::string var_type = tokens.next(); @@ -721,8 +721,8 @@ LLMessageVariable * LLTemplateParser::parseVariable(LLTemplateTokenizer & tokens if (!b_positive_integer_ok(variable_size.c_str())) { - llerrs << "not a legal integer variable size: " << variable_size - << " at " << tokens.line() << llendl; + LL_ERRS() << "not a legal integer variable size: " << variable_size + << " at " << tokens.line() << LL_ENDL; } EMsgVariableType type_enum; @@ -737,8 +737,8 @@ LLMessageVariable * LLTemplateParser::parseVariable(LLTemplateTokenizer & tokens else { type_enum = MVT_FIXED; // removes a warning - llerrs << "bad variable type: " << var_type - << " at " << tokens.line() << llendl; + LL_ERRS() << "bad variable type: " << var_type + << " at " << tokens.line() << LL_ENDL; } varp = new LLMessageVariable( @@ -748,14 +748,14 @@ LLMessageVariable * LLTemplateParser::parseVariable(LLTemplateTokenizer & tokens } else { - llerrs << "bad variable type:" << var_type - << " at " << tokens.line() << llendl; + LL_ERRS() << "bad variable type:" << var_type + << " at " << tokens.line() << LL_ENDL; } if(!tokens.want("}")) { - llerrs << "Expecting closing } for variable " << var_name - << " at " << tokens.line() << llendl; + LL_ERRS() << "Expecting closing } for variable " << var_name + << " at " << tokens.line() << LL_ENDL; } return varp; } diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index f2bdcfad53..c51883ee3d 100755 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -209,7 +209,7 @@ void LLNameValue::init(const char *name, const char *data, const char *type, con } else { - llwarns << "Unknown name value type string " << mStringType << " for " << mName << llendl; + LL_WARNS() << "Unknown name value type string " << mStringType << " for " << mName << LL_ENDL; mType = NVT_NULL; } @@ -261,8 +261,8 @@ void LLNameValue::init(const char *name, const char *data, const char *type, con } else { - llwarns << "LLNameValue::init() - unknown sendto field " - << nvsendto << " for NV " << mName << llendl; + LL_WARNS() << "LLNameValue::init() - unknown sendto field " + << nvsendto << " for NV " << mName << LL_ENDL; mSendto = NVS_NULL; mStringSendto = mNVNameTable->addString("S"); } @@ -332,7 +332,7 @@ LLNameValue::LLNameValue(const char *name, const char *type, const char *nvclass else { mType = NVT_NULL; - llinfos << "Unknown name-value type " << mStringType << llendl; + LL_INFOS() << "Unknown name-value type " << mStringType << LL_ENDL; } // Nota Bene: Whatever global structure manages this should have these in the name table already! @@ -580,7 +580,7 @@ char *LLNameValue::getString() } else { - llerrs << mName << " not a string!" << llendl; + LL_ERRS() << mName << " not a string!" << LL_ENDL; return NULL; } } @@ -593,7 +593,7 @@ const char *LLNameValue::getAsset() const } else { - llerrs << mName << " not an asset!" << llendl; + LL_ERRS() << mName << " not an asset!" << LL_ENDL; return NULL; } } @@ -606,7 +606,7 @@ F32 *LLNameValue::getF32() } else { - llerrs << mName << " not a F32!" << llendl; + LL_ERRS() << mName << " not a F32!" << LL_ENDL; return NULL; } } @@ -619,7 +619,7 @@ S32 *LLNameValue::getS32() } else { - llerrs << mName << " not a S32!" << llendl; + LL_ERRS() << mName << " not a S32!" << LL_ENDL; return NULL; } } @@ -632,7 +632,7 @@ U32 *LLNameValue::getU32() } else { - llerrs << mName << " not a U32!" << llendl; + LL_ERRS() << mName << " not a U32!" << LL_ENDL; return NULL; } } @@ -645,7 +645,7 @@ U64 *LLNameValue::getU64() } else { - llerrs << mName << " not a U64!" << llendl; + LL_ERRS() << mName << " not a U64!" << LL_ENDL; return NULL; } } @@ -658,7 +658,7 @@ void LLNameValue::getVec3(LLVector3 &vec) } else { - llerrs << mName << " not a Vec3!" << llendl; + LL_ERRS() << mName << " not a Vec3!" << LL_ENDL; } } @@ -670,7 +670,7 @@ LLVector3 *LLNameValue::getVec3() } else { - llerrs << mName << " not a Vec3!" << llendl; + LL_ERRS() << mName << " not a Vec3!" << LL_ENDL; return NULL; } } @@ -726,7 +726,7 @@ LLNameValue &LLNameValue::operator=(const LLNameValue &a) *mNameValueReference.u64 = *a.mNameValueReference.u64; break; default: - llerrs << "Unknown Name value type " << (U32)a.mType << llendl; + LL_ERRS() << "Unknown Name value type " << (U32)a.mType << LL_ENDL; break; } @@ -865,7 +865,7 @@ void LLNameValue::setU32(const U32 a) *mNameValueReference.f32 = (F32)a; break; default: - llerrs << "NameValue: Trying to set U32 into a " << mStringType << ", unknown conversion" << llendl; + LL_ERRS() << "NameValue: Trying to set U32 into a " << mStringType << ", unknown conversion" << LL_ENDL; break; } return; @@ -883,7 +883,7 @@ void LLNameValue::setVec3(const LLVector3 &a) *mNameValueReference.vec3 = a; break; default: - llerrs << "NameValue: Trying to set LLVector3 into a " << mStringType << ", unknown conversion" << llendl; + LL_ERRS() << "NameValue: Trying to set LLVector3 into a " << mStringType << ", unknown conversion" << LL_ENDL; break; } return; @@ -895,7 +895,7 @@ std::string LLNameValue::printNameValue() const std::string buffer; buffer = llformat("%s %s %s %s ", mName, mStringType, mStringClass, mStringSendto); buffer += printData(); -// llinfos << "Name Value Length: " << buffer.size() + 1 << llendl; +// LL_INFOS() << "Name Value Length: " << buffer.size() + 1 << LL_ENDL; return buffer; } @@ -928,7 +928,7 @@ std::string LLNameValue::printData() const buffer = llformat( "%f, %f, %f", mNameValueReference.vec3->mV[VX], mNameValueReference.vec3->mV[VY], mNameValueReference.vec3->mV[VZ]); break; default: - llerrs << "Trying to print unknown NameValue type " << mStringType << llendl; + LL_ERRS() << "Trying to print unknown NameValue type " << mStringType << LL_ENDL; break; } return buffer; @@ -962,7 +962,7 @@ std::ostream& operator<<(std::ostream& s, const LLNameValue &a) s << *(a.mNameValueReference.vec3); break; default: - llerrs << "Trying to print unknown NameValue type " << a.mStringType << llendl; + LL_ERRS() << "Trying to print unknown NameValue type " << a.mStringType << LL_ENDL; break; } return s; diff --git a/indra/llmessage/llpacketbuffer.cpp b/indra/llmessage/llpacketbuffer.cpp index 22e4dc1e8d..ccf991b1a7 100755 --- a/indra/llmessage/llpacketbuffer.cpp +++ b/indra/llmessage/llpacketbuffer.cpp @@ -41,7 +41,7 @@ LLPacketBuffer::LLPacketBuffer(const LLHost &host, const char *datap, const S32 if (size > NET_BUFFER_SIZE) { - llerrs << "Sending packet > " << NET_BUFFER_SIZE << " of size " << size << llendl; + LL_ERRS() << "Sending packet > " << NET_BUFFER_SIZE << " of size " << size << LL_ENDL; } else { diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index a8c568a365..687212ea10 100755 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -195,7 +195,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) if (mInBufferLength + packetp->getSize() > mMaxBufferLength) { // Toss it. - llwarns << "Throwing away packet, overflowing buffer" << llendl; + LL_WARNS() << "Throwing away packet, overflowing buffer" << LL_ENDL; delete packetp; packetp = NULL; } @@ -323,7 +323,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL { // Nuke this packet, we overflowed the buffer. // Toss it. - llwarns << "Throwing away outbound packet, overflowing buffer" << llendl; + LL_WARNS() << "Throwing away outbound packet, overflowing buffer" << LL_ENDL; } else { @@ -331,7 +331,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL if ((mOutBufferLength > 4192) && queue_timer.getElapsedTimeF32() > 1.f) { // Add it to the queue - llinfos << "Outbound packet queue " << mOutBufferLength << " bytes" << llendl; + LL_INFOS() << "Outbound packet queue " << mOutBufferLength << " bytes" << LL_ENDL; queue_timer.reset(); } packetp = new LLPacketBuffer(host, send_buffer, buf_size); diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp index 26cafa025f..a169bdec60 100755 --- a/indra/llmessage/llpartdata.cpp +++ b/indra/llmessage/llpartdata.cpp @@ -266,7 +266,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) } else if (size != PS_DATA_BLOCK_SIZE) { - llwarns << "PSBlock is wrong size for particle system data - got " << size << ", expecting " << PS_DATA_BLOCK_SIZE << llendl; + LL_WARNS() << "PSBlock is wrong size for particle system data - got " << size << ", expecting " << PS_DATA_BLOCK_SIZE << LL_ENDL; return TRUE; } gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, PS_DATA_BLOCK_SIZE, block_num, PS_DATA_BLOCK_SIZE); @@ -314,7 +314,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num) if (size != PS_DATA_BLOCK_SIZE) { - llwarns << "PSBlock is wrong size for particle system data - got " << size << ", expecting " << PS_DATA_BLOCK_SIZE << llendl; + LL_WARNS() << "PSBlock is wrong size for particle system data - got " << size << ", expecting " << PS_DATA_BLOCK_SIZE << LL_ENDL; return FALSE; } diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index e3f09f34ee..cbc09cacb7 100755 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -82,7 +82,7 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll) #if LL_DEBUG_POLL_FILE_DESCRIPTORS if(!poll) { - lldebugs << "Poll -- " << (msg?msg:"") << ": no pollfd." << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << ": no pollfd." << LL_ENDL; return; } if(poll->desc.s) @@ -90,13 +90,13 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll) apr_os_sock_t os_sock; if(APR_SUCCESS == apr_os_sock_get(&os_sock, poll->desc.s)) { - lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_sock - << " at " << poll->desc.s << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " on fd " << os_sock + << " at " << poll->desc.s << LL_ENDL; } else { - lldebugs << "Poll -- " << (msg?msg:"") << " no fd " - << " at " << poll->desc.s << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " no fd " + << " at " << poll->desc.s << LL_ENDL; } } else if(poll->desc.f) @@ -104,18 +104,18 @@ void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll) apr_os_file_t os_file; if(APR_SUCCESS == apr_os_file_get(&os_file, poll->desc.f)) { - lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_file - << " at " << poll->desc.f << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " on fd " << os_file + << " at " << poll->desc.f << LL_ENDL; } else { - lldebugs << "Poll -- " << (msg?msg:"") << " no fd " - << " at " << poll->desc.f << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << " no fd " + << " at " << poll->desc.f << LL_ENDL; } } else { - lldebugs << "Poll -- " << (msg?msg:"") << ": no descriptor." << llendl; + LL_DEBUGS() << "Poll -- " << (msg?msg:"") << ": no descriptor." << LL_ENDL; } #endif } @@ -204,10 +204,10 @@ bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request info.mData->setThreaded(has_curl_request); LLLinkInfo link; #if LL_DEBUG_PIPE_TYPE_IN_PUMP - lldebugs << "LLPumpIO::addChain() " << chain[0] << " '" - << typeid(*(chain[0])).name() << "'" << llendl; + LL_DEBUGS() << "LLPumpIO::addChain() " << chain[0] << " '" + << typeid(*(chain[0])).name() << "'" << LL_ENDL; #else - lldebugs << "LLPumpIO::addChain() " << chain[0] <reqevents) :"null") + LL_DEBUGS() << "Setting conditionals (" << (poll ? events_2_string(poll->reqevents) :"null") << ") " #if LL_DEBUG_PIPE_TYPE_IN_PUMP << "on pipe " << typeid(*pipe).name() #endif - << " at " << pipe << llendl; + << " at " << pipe << LL_ENDL; // remove any matching poll file descriptors for this pipe. LLIOPipe::ptr_t pipe_ptr(pipe); @@ -447,7 +447,7 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t void LLPumpIO::pump(const S32& poll_timeout) { LLFastTimer t1(FTM_PUMP_IO); - //llinfos << "LLPumpIO::pump()" << llendl; + //LL_INFOS() << "LLPumpIO::pump()" << LL_ENDL; // Run any pending runners. mRunner.run(); @@ -475,7 +475,7 @@ void LLPumpIO::pump(const S32& poll_timeout) if(!mPendingChains.empty()) { PUMP_DEBUG; - //lldebugs << "Pushing " << mPendingChains.size() << "." << llendl; + //LL_DEBUGS() << "Pushing " << mPendingChains.size() << "." << LL_ENDL; std::copy( mPendingChains.begin(), mPendingChains.end(), @@ -523,7 +523,7 @@ void LLPumpIO::pump(const S32& poll_timeout) if(mPollset) { PUMP_DEBUG; - //llinfos << "polling" << llendl; + //LL_INFOS() << "polling" << LL_ENDL; S32 count = 0; S32 client_id = 0; { @@ -545,7 +545,7 @@ void LLPumpIO::pump(const S32& poll_timeout) signal_client_t::iterator not_signalled = signalled_client.end(); // Process everything as appropriate - //lldebugs << "Running chain count: " << mRunningChains.size() << llendl; + //LL_DEBUGS() << "Running chain count: " << mRunningChains.size() << LL_ENDL; running_chains_t::iterator run_chain = mRunningChains.begin(); bool process_this_chain = false; while( run_chain != mRunningChains.end() ) @@ -565,9 +565,9 @@ void LLPumpIO::pump(const S32& poll_timeout) && (*run_chain).mTimer.hasExpired()) { PUMP_DEBUG; - llinfos << "Error handler forgot to reset timeout. " + LL_INFOS() << "Error handler forgot to reset timeout. " << "Resetting to " << DEFAULT_CHAIN_EXPIRY_SECS - << " seconds." << llendl; + << " seconds." << LL_ENDL; (*run_chain).setTimeoutSeconds(DEFAULT_CHAIN_EXPIRY_SECS); } } @@ -577,15 +577,15 @@ void LLPumpIO::pump(const S32& poll_timeout) // it timed out and no one handled it, so we need to // retire the chain #if LL_DEBUG_PIPE_TYPE_IN_PUMP - lldebugs << "Removing chain " + LL_DEBUGS() << "Removing chain " << (*run_chain).mChainLinks[0].mPipe << " '" << typeid(*((*run_chain).mChainLinks[0].mPipe)).name() - << "' because it timed out." << llendl; + << "' because it timed out." << LL_ENDL; #else -// lldebugs << "Removing chain " +// LL_DEBUGS() << "Removing chain " // << (*run_chain).mChainLinks[0].mPipe -// << " because we reached the end." << llendl; +// << " because we reached the end." << LL_ENDL; #endif run_chain = removeRunningChain(run_chain); continue; @@ -610,12 +610,12 @@ void LLPumpIO::pump(const S32& poll_timeout) { // if there are no conditionals, just process this chain. process_this_chain = true; - //lldebugs << "no conditionals - processing" << llendl; + //LL_DEBUGS() << "no conditionals - processing" << LL_ENDL; } else { PUMP_DEBUG; - //lldebugs << "checking conditionals" << llendl; + //LL_DEBUGS() << "checking conditionals" << LL_ENDL; // Check if this run chain was signalled. If any file // descriptor is ready for something, then go ahead and // process this chian. @@ -655,7 +655,7 @@ void LLPumpIO::pump(const S32& poll_timeout) error_status = LLIOPipe::STATUS_ERROR; if(handleChainError(*run_chain, error_status)) break; ll_debug_poll_fd("Removing pipe", poll); - llwarns << "Removing pipe " + LL_WARNS() << "Removing pipe " << (*run_chain).mChainLinks[0].mPipe << " '" #if LL_DEBUG_PIPE_TYPE_IN_PUMP @@ -664,7 +664,7 @@ void LLPumpIO::pump(const S32& poll_timeout) #endif << "' because: " << events_2_string(poll->rtnevents) - << llendl; + << LL_ENDL; (*run_chain).mHead = (*run_chain).mChainLinks.end(); break; } @@ -692,13 +692,13 @@ void LLPumpIO::pump(const S32& poll_timeout) if((*run_chain).mHead == (*run_chain).mChainLinks.end()) { #if LL_DEBUG_PIPE_TYPE_IN_PUMP - lldebugs << "Removing chain " << (*run_chain).mChainLinks[0].mPipe + LL_DEBUGS() << "Removing chain " << (*run_chain).mChainLinks[0].mPipe << " '" << typeid(*((*run_chain).mChainLinks[0].mPipe)).name() - << "' because we reached the end." << llendl; + << "' because we reached the end." << LL_ENDL; #else -// lldebugs << "Removing chain " << (*run_chain).mChainLinks[0].mPipe -// << " because we reached the end." << llendl; +// LL_DEBUGS() << "Removing chain " << (*run_chain).mChainLinks[0].mPipe +// << " because we reached the end." << LL_ENDL; #endif PUMP_DEBUG; @@ -778,7 +778,7 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { - //llinfos << "LLPumpIO::callback()" << llendl; + //LL_INFOS() << "LLPumpIO::callback()" << LL_ENDL; if(true) { #if LL_THREADS_APR @@ -847,7 +847,7 @@ void LLPumpIO::cleanup() mCallbackMutex = NULL; if(mPollset) { -// lldebugs << "cleaning up pollset" << llendl; +// LL_DEBUGS() << "cleaning up pollset" << LL_ENDL; apr_pollset_destroy(mPollset); mPollset = NULL; } @@ -861,10 +861,10 @@ void LLPumpIO::cleanup() void LLPumpIO::rebuildPollset() { -// lldebugs << "LLPumpIO::rebuildPollset()" << llendl; +// LL_DEBUGS() << "LLPumpIO::rebuildPollset()" << LL_ENDL; if(mPollset) { - //lldebugs << "destroying pollset" << llendl; + //LL_DEBUGS() << "destroying pollset" << LL_ENDL; apr_pollset_destroy(mPollset); mPollset = NULL; } @@ -875,7 +875,7 @@ void LLPumpIO::rebuildPollset() { size += (*run_it).mDescriptors.size(); } - //lldebugs << "found " << size << " descriptors." << llendl; + //LL_DEBUGS() << "found " << size << " descriptors." << LL_ENDL; if(size) { // Recycle the memory pool @@ -922,10 +922,10 @@ void LLPumpIO::processChain(LLChainInfo& chain) { #if LL_DEBUG_PROCESS_LINK #if LL_DEBUG_PIPE_TYPE_IN_PUMP - llinfos << "Processing " << typeid(*((*it).mPipe)).name() << "." - << llendl; + LL_INFOS() << "Processing " << typeid(*((*it).mPipe)).name() << "." + << LL_ENDL; #else - llinfos << "Processing link " << (*it).mPipe << "." << llendl; + LL_INFOS() << "Processing link " << (*it).mPipe << "." << LL_ENDL; #endif #endif #if LL_DEBUG_SPEW_BUFFER_CHANNEL_IN @@ -942,15 +942,15 @@ void LLPumpIO::processChain(LLChainInfo& chain) (U8*)buf, bytes); buf[bytes] = '\0'; - llinfos << "CHANNEL IN(" << (*it).mChannels.in() << "): " - << buf << llendl; + LL_INFOS() << "CHANNEL IN(" << (*it).mChannels.in() << "): " + << buf << LL_ENDL; delete[] buf; buf = NULL; } else { - llinfos << "CHANNEL IN(" << (*it).mChannels.in()<< "): (null)" - << llendl; + LL_INFOS() << "CHANNEL IN(" << (*it).mChannels.in()<< "): (null)" + << LL_ENDL; } } #endif @@ -975,15 +975,15 @@ void LLPumpIO::processChain(LLChainInfo& chain) (U8*)buf, bytes); buf[bytes] = '\0'; - llinfos << "CHANNEL OUT(" << (*it).mChannels.out()<< "): " - << buf << llendl; + LL_INFOS() << "CHANNEL OUT(" << (*it).mChannels.out()<< "): " + << buf << LL_ENDL; delete[] buf; buf = NULL; } else { - llinfos << "CHANNEL OUT(" << (*it).mChannels.out()<< "): (null)" - << llendl; + LL_INFOS() << "CHANNEL OUT(" << (*it).mChannels.out()<< "): (null)" + << LL_ENDL; } } #endif @@ -993,11 +993,11 @@ void LLPumpIO::processChain(LLChainInfo& chain) // below. if(LLIOPipe::isSuccess(status)) { - llinfos << "Pipe returned: '" + LL_INFOS() << "Pipe returned: '" #if LL_DEBUG_PIPE_TYPE_IN_PUMP << typeid(*((*it).mPipe)).name() << "':'" #endif - << LLIOPipe::lookupStatusString(status) << "'" << llendl; + << LLIOPipe::lookupStatusString(status) << "'" << LL_ENDL; } #endif @@ -1037,12 +1037,12 @@ void LLPumpIO::processChain(LLChainInfo& chain) PUMP_DEBUG; if(LLIOPipe::isError(status)) { - llinfos << "Pump generated pipe err: '" + LL_INFOS() << "Pump generated pipe err: '" #if LL_DEBUG_PIPE_TYPE_IN_PUMP << typeid(*((*it).mPipe)).name() << "':'" #endif << LLIOPipe::lookupStatusString(status) - << "'" << llendl; + << "'" << LL_ENDL; #if LL_DEBUG_SPEW_BUFFER_CHANNEL_IN_ON_ERROR if(chain.mData) { @@ -1059,18 +1059,18 @@ void LLPumpIO::processChain(LLChainInfo& chain) (U8*)buf, bytes); buf[bytes] = '\0'; - llinfos << "Input After Error: " << buf << llendl; + LL_INFOS() << "Input After Error: " << buf << LL_ENDL; delete[] buf; buf = NULL; } else { - llinfos << "Input After Error: (null)" << llendl; + LL_INFOS() << "Input After Error: (null)" << LL_ENDL; } } else { - llinfos << "Input After Error: (null)" << llendl; + LL_INFOS() << "Input After Error: (null)" << LL_ENDL; } #endif keep_going = false; @@ -1082,8 +1082,8 @@ void LLPumpIO::processChain(LLChainInfo& chain) } else { - llinfos << "Unhandled status code: " << status << ":" - << LLIOPipe::lookupStatusString(status) << llendl; + LL_INFOS() << "Unhandled status code: " << status << ":" + << LLIOPipe::lookupStatusString(status) << LL_ENDL; } break; } @@ -1130,8 +1130,8 @@ bool LLPumpIO::handleChainError( do { #if LL_DEBUG_PIPE_TYPE_IN_PUMP - lldebugs << "Passing error to " << typeid(*((*rit).mPipe)).name() - << "." << llendl; + LL_DEBUGS() << "Passing error to " << typeid(*((*rit).mPipe)).name() + << "." << LL_ENDL; #endif error = (*rit).mPipe->handleError(error, this); switch(error) @@ -1145,8 +1145,8 @@ bool LLPumpIO::handleChainError( case LLIOPipe::STATUS_BREAK: case LLIOPipe::STATUS_NEED_PROCESS: #if LL_DEBUG_PIPE_TYPE_IN_PUMP - lldebugs << "Pipe " << typeid(*((*rit).mPipe)).name() - << " returned code to stop error handler." << llendl; + LL_DEBUGS() << "Pipe " << typeid(*((*rit).mPipe)).name() + << " returned code to stop error handler." << LL_ENDL; #endif keep_going = false; break; @@ -1156,8 +1156,8 @@ bool LLPumpIO::handleChainError( default: if(LLIOPipe::isSuccess(error)) { - llinfos << "Unhandled status code: " << error << ":" - << LLIOPipe::lookupStatusString(error) << llendl; + LL_INFOS() << "Unhandled status code: " << error << ":" + << LLIOPipe::lookupStatusString(error) << LL_ENDL; error = LLIOPipe::STATUS_ERROR; keep_going = false; } diff --git a/indra/llmessage/llregionhandle.h b/indra/llmessage/llregionhandle.h index c77794e4b8..e3ddd46acd 100755 --- a/indra/llmessage/llregionhandle.h +++ b/indra/llmessage/llregionhandle.h @@ -68,7 +68,7 @@ inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handl U32 x_int, y_int; if (x_pos < 0.f) { -// llwarns << "to_region_handle:Clamping negative x position " << x_pos << " to zero!" << llendl; +// LL_WARNS() << "to_region_handle:Clamping negative x position " << x_pos << " to zero!" << LL_ENDL; return FALSE; } else @@ -77,7 +77,7 @@ inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handl } if (y_pos < 0.f) { -// llwarns << "to_region_handle:Clamping negative y position " << y_pos << " to zero!" << llendl; +// LL_WARNS() << "to_region_handle:Clamping negative y position " << y_pos << " to zero!" << LL_ENDL; return FALSE; } else diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp index 932cbf375e..e6ed37028a 100755 --- a/indra/llmessage/llregionpresenceverifier.cpp +++ b/indra/llmessage/llregionpresenceverifier.cpp @@ -74,7 +74,7 @@ void LLRegionPresenceVerifier::RegionResponder::result(const LLSD& content) LLHost destination(host, port); LLUUID id = content["region_id"]; - lldebugs << "Verifying " << destination.getString() << " is region " << id << llendl; + LL_DEBUGS() << "Verifying " << destination.getString() << " is region " << id << LL_ENDL; std::stringstream uri; uri << "http://" << destination.getString() << "/state/basic/"; @@ -110,8 +110,8 @@ void LLRegionPresenceVerifier::VerifiedDestinationResponder::result(const LLSD& LLUUID actual_region_id = content["region_id"]; LLUUID expected_region_id = mContent["region_id"]; - lldebugs << "Actual region: " << content << llendl; - lldebugs << "Expected region: " << mContent << llendl; + LL_DEBUGS() << "Actual region: " << content << LL_ENDL; + LL_DEBUGS() << "Expected region: " << mContent << LL_ENDL; if (mSharedData->checkValidity(content) && (actual_region_id == expected_region_id)) @@ -124,7 +124,7 @@ void LLRegionPresenceVerifier::VerifiedDestinationResponder::result(const LLSD& } else { - llwarns << "Simulator verification failed. Region: " << mUri << llendl; + LL_WARNS() << "Simulator verification failed. Region: " << mUri << LL_ENDL; mSharedData->onRegionVerificationFailed(); } } @@ -133,8 +133,8 @@ void LLRegionPresenceVerifier::VerifiedDestinationResponder::retry() { LLSD headers; headers["Cache-Control"] = "no-cache, max-age=0"; - llinfos << "Requesting region information, get uncached for region " - << mUri << llendl; + LL_INFOS() << "Requesting region information, get uncached for region " + << mUri << LL_ENDL; --mRetryCount; mSharedData->getHttpClient().get(mUri, new RegionResponder(mUri, mSharedData, mRetryCount), headers); } @@ -147,7 +147,7 @@ void LLRegionPresenceVerifier::VerifiedDestinationResponder::error(U32 status, c } else { - llwarns << "Failed to contact simulator for verification. Region: " << mUri << llendl; + LL_WARNS() << "Failed to contact simulator for verification. Region: " << mUri << LL_ENDL; mSharedData->onRegionVerificationFailed(); } } diff --git a/indra/llmessage/llsdappservices.cpp b/indra/llmessage/llsdappservices.cpp index 8bab91b0c0..4103ece33a 100755 --- a/indra/llmessage/llsdappservices.cpp +++ b/indra/llmessage/llsdappservices.cpp @@ -119,8 +119,8 @@ public: virtual bool validate(const std::string& name, LLSD& context) const { - //llinfos << "validate: " << name << ", " - // << LLSDOStreamer(context) << llendl; + //LL_INFOS() << "validate: " << name << ", " + // << LLSDOStreamer(context) << LL_ENDL; if((std::string("PUT") == context["request"]["verb"].asString()) && !name.empty()) { return true; @@ -257,8 +257,8 @@ public: virtual bool validate(const std::string& name, LLSD& context) const { - llinfos << "LLHTTPLiveConfigSingleService::validate(" << name - << ")" << llendl; + LL_INFOS() << "LLHTTPLiveConfigSingleService::validate(" << name + << ")" << LL_ENDL; LLSD option = LLApp::instance()->getOption(name); if(option.isDefined()) return true; else return false; diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp index 1c93c12d99..1d0904e3f1 100755 --- a/indra/llmessage/llsdmessage.cpp +++ b/indra/llmessage/llsdmessage.cpp @@ -128,7 +128,7 @@ void LLSDMessage::EventResponder::errorWithContent(U32 status, const std::string } else // default error handling { - // convention seems to be to use llinfos, but that seems a bit casual? + // convention seems to be to use LL_INFOS(), but that seems a bit casual? LL_WARNS("LLSDMessage::EventResponder") << "'" << mMessage << "' to '" << mTarget << "' failed with code " << status << ": " << reason << '\n' diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 615221e0ad..49456c71ed 100755 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -91,7 +91,7 @@ void LLSDMessageBuilder::nextBlock(const char* blockname) } else { - llerrs << "existing block not array" << llendl; + LL_ERRS() << "existing block not array" << LL_ENDL; } } @@ -380,7 +380,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data) break; default: - llwarns << "Unknown type in conversion of message to LLSD" << llendl; + LL_WARNS() << "Unknown type in conversion of message to LLSD" << LL_ENDL; break; } } @@ -391,7 +391,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data) void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg) { mCurrentMessage = msg; - lldebugs << LLSDNotationStreamer(mCurrentMessage) << llendl; + LL_DEBUGS() << LLSDNotationStreamer(mCurrentMessage) << LL_ENDL; } const LLSD& LLSDMessageBuilder::getMessage() const diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp index a6fccd2a56..b729ebafa9 100755 --- a/indra/llmessage/llsdmessagereader.cpp +++ b/indra/llmessage/llsdmessagereader.cpp @@ -53,16 +53,16 @@ LLSDMessageReader::~LLSDMessageReader() LLSD getLLSD(const LLSD& input, const char* block, const char* var, S32 blocknum) { - // babbage: log error to llerrs if variable not found to mimic + // babbage: log error to LL_ERRS() if variable not found to mimic // LLTemplateMessageReader::getData behaviour if(NULL == block) { - llerrs << "NULL block name" << llendl; + LL_ERRS() << "NULL block name" << LL_ENDL; return LLSD(); } if(NULL == var) { - llerrs << "NULL var name" << llendl; + LL_ERRS() << "NULL var name" << LL_ENDL; return LLSD(); } if(! input[block].isArray()) @@ -70,7 +70,7 @@ LLSD getLLSD(const LLSD& input, const char* block, const char* var, S32 blocknum // NOTE: babbage: need to return default for missing blocks to allow // backwards/forwards compatibility - handlers must cope with default // values. - llwarns << "block " << block << " not found" << llendl; + LL_WARNS() << "block " << block << " not found" << LL_ENDL; return LLSD(); } @@ -80,7 +80,7 @@ LLSD getLLSD(const LLSD& input, const char* block, const char* var, S32 blocknum // NOTE: babbage: need to return default for missing vars to allow // backwards/forwards compatibility - handlers must cope with default // values. - llwarns << "var " << var << " not found" << llendl; + LL_WARNS() << "var " << var << " not found" << LL_ENDL; } return result; } @@ -238,7 +238,7 @@ void LLSDMessageReader::getString(const char *block, const char *var, { if(buffer_size <= 0) { - llwarns << "buffer_size <= 0" << llendl; + LL_WARNS() << "buffer_size <= 0" << LL_ENDL; return; } std::string data = getLLSD(mMessage, block, var, blocknum); diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 05b27f582c..077a0f69a3 100755 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -129,8 +129,8 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - //llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")" - // << llendl; + //LL_INFOS() << "RPC: " << uri << "." << method << "(" << *parameter << ")" + // << LL_ENDL; if(method.empty() || !response) { return false; @@ -155,8 +155,8 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - //llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")" - // << llendl; + //LL_INFOS() << "RPC: " << uri << "." << method << "(" << parameter << ")" + // << LL_ENDL; if(method.empty() || parameter.empty() || !response) { return false; @@ -196,7 +196,7 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( case STATE_READY: { PUMP_DEBUG; -// lldebugs << "LLSDRPCClient::process_impl STATE_READY" << llendl; +// LL_DEBUGS() << "LLSDRPCClient::process_impl STATE_READY" << LL_ENDL; buffer->append( channels.out(), (U8*)mRequest.c_str(), @@ -209,8 +209,8 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( { PUMP_DEBUG; // The input channel has the sd response in it. - //lldebugs << "LLSDRPCClient::process_impl STATE_WAITING_FOR_RESPONSE" - // << llendl; + //LL_DEBUGS() << "LLSDRPCClient::process_impl STATE_WAITING_FOR_RESPONSE" + // << LL_ENDL; LLBufferStream resp(channels, buffer.get()); LLSD sd; LLSDSerialize::fromNotation(sd, resp, buffer->count(channels.in())); @@ -237,7 +237,7 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( case STATE_DONE: default: PUMP_DEBUG; - llinfos << "invalid state to process" << llendl; + LL_INFOS() << "invalid state to process" << LL_ENDL; rv = STATUS_ERROR; break; } diff --git a/indra/llmessage/llsdrpcclient.h b/indra/llmessage/llsdrpcclient.h index 0cecf4f688..8eb7a08620 100755 --- a/indra/llmessage/llsdrpcclient.h +++ b/indra/llmessage/llsdrpcclient.h @@ -239,11 +239,11 @@ public: LLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {} virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - lldebugs << "LLSDRPCClientFactory::build" << llendl; + LL_DEBUGS() << "LLSDRPCClientFactory::build" << LL_ENDL; LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST)); if(!http->isValid()) { - llwarns << "Creating LLURLRequest failed." << llendl ; + LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ; delete http; return false; } @@ -289,12 +289,12 @@ public: LLXMLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {} virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - lldebugs << "LLXMLSDRPCClientFactory::build" << llendl; + LL_DEBUGS() << "LLXMLSDRPCClientFactory::build" << LL_ENDL; LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST)); if(!http->isValid()) { - llwarns << "Creating LLURLRequest failed." << llendl ; + LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ; delete http; return false ; } diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 2c233c1c0d..296a65f8b0 100755 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -107,7 +107,7 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_SERVER); PUMP_DEBUG; -// lldebugs << "LLSDRPCServer::process_impl" << llendl; +// LL_DEBUGS() << "LLSDRPCServer::process_impl" << LL_ENDL; // Once we have all the data, We need to read the sd on // the the in channel, and respond on the out channel if(!eos) return STATUS_BREAK; @@ -132,10 +132,10 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( return STATUS_DONE; case STATE_DONE: -// lldebugs << "STATE_DONE" << llendl; +// LL_DEBUGS() << "STATE_DONE" << LL_ENDL; break; case STATE_CALLBACK: -// lldebugs << "STATE_CALLBACK" << llendl; +// LL_DEBUGS() << "STATE_CALLBACK" << LL_ENDL; PUMP_DEBUG; method_name = mRequest[LLSDRPC_METHOD_SD_NAME].asString(); if(!method_name.empty() && mRequest.has(LLSDRPC_PARAMETER_SD_NAME)) @@ -169,7 +169,7 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( mState = STATE_DONE; break; case STATE_NONE: -// lldebugs << "STATE_NONE" << llendl; +// LL_DEBUGS() << "STATE_NONE" << LL_ENDL; default: { // First time we got here - process the SD request, and call @@ -317,7 +317,7 @@ void LLSDRPCServer::buildFault( { LLBufferStream ostr(channels, data); ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3; - llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl; + LL_INFOS() << "LLSDRPCServer::buildFault: " << code << ", " << msg << LL_ENDL; } // static @@ -334,6 +334,6 @@ void LLSDRPCServer::buildResponse( std::ostringstream debug_ostr; debug_ostr << "LLSDRPCServer::buildResponse: "; LLSDSerialize::toNotation(response, debug_ostr); - llinfos << debug_ostr.str() << llendl; + LL_INFOS() << debug_ostr.str() << LL_ENDL; #endif } diff --git a/indra/llmessage/llsdrpcserver.h b/indra/llmessage/llsdrpcserver.h index 9e56e4ea46..415bd31c26 100755 --- a/indra/llmessage/llsdrpcserver.h +++ b/indra/llmessage/llsdrpcserver.h @@ -323,7 +323,7 @@ class LLSDRPCServerFactory : public LLChainIOFactory public: virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - lldebugs << "LLXMLSDRPCServerFactory::build" << llendl; + LL_DEBUGS() << "LLXMLSDRPCServerFactory::build" << LL_ENDL; chain.push_back(LLIOPipe::ptr_t(new Server)); return true; } @@ -341,7 +341,7 @@ class LLXMLRPCServerFactory : public LLChainIOFactory public: virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { - lldebugs << "LLXMLSDRPCServerFactory::build" << llendl; + LL_DEBUGS() << "LLXMLSDRPCServerFactory::build" << LL_ENDL; chain.push_back(LLIOPipe::ptr_t(new LLFilterXMLRPCRequest2LLSD)); chain.push_back(LLIOPipe::ptr_t(new Server)); chain.push_back(LLIOPipe::ptr_t(new LLFilterSD2XMLRPCResponse)); diff --git a/indra/llmessage/llservice.cpp b/indra/llmessage/llservice.cpp index dbec92c221..ddcc13d969 100755 --- a/indra/llmessage/llservice.cpp +++ b/indra/llmessage/llservice.cpp @@ -41,7 +41,7 @@ LLService::~LLService() // static bool LLService::registerCreator(const std::string& name, creator_t fn) { - llinfos << "LLService::registerCreator(" << name << ")" << llendl; + LL_INFOS() << "LLService::registerCreator(" << name << ")" << LL_ENDL; if(name.empty()) { return false; @@ -64,7 +64,7 @@ LLIOPipe* LLService::activate( { if(name.empty()) { - llinfos << "LLService::activate - no service specified." << llendl; + LL_INFOS() << "LLService::activate - no service specified." << LL_ENDL; return NULL; } creators_t::iterator it = sCreatorFunctors.find(name); @@ -79,15 +79,15 @@ LLIOPipe* LLService::activate( { // empty out the chain, because failed service creation // should just discard this stuff. - llwarns << "LLService::activate - unable to build chain: " << name - << llendl; + LL_WARNS() << "LLService::activate - unable to build chain: " << name + << LL_ENDL; chain.clear(); } } else { - llwarns << "LLService::activate - unable find factory: " << name - << llendl; + LL_WARNS() << "LLService::activate - unable find factory: " << name + << LL_ENDL; } return rv; } diff --git a/indra/llmessage/llservicebuilder.cpp b/indra/llmessage/llservicebuilder.cpp index b9aef3d0ba..392e7f1091 100755 --- a/indra/llmessage/llservicebuilder.cpp +++ b/indra/llmessage/llservicebuilder.cpp @@ -50,11 +50,11 @@ void LLServiceBuilder::loadServiceDefinitionsFromFile( std::string service_name = (*array_itr)["name"].asString(); createServiceDefinition(service_name, service_llsd); } - llinfos << "loaded config file: " << service_filename << llendl; + LL_INFOS() << "loaded config file: " << service_filename << LL_ENDL; } else { - llwarns << "unable to find config file: " << service_filename << llendl; + LL_WARNS() << "unable to find config file: " << service_filename << LL_ENDL; } } @@ -119,7 +119,7 @@ std::string LLServiceBuilder::buildServiceURI(const std::string& service_name) c } else { - llwarns << "Cannot find service " << service_name << llendl; + LL_WARNS() << "Cannot find service " << service_name << LL_ENDL; } return service_url.str(); } @@ -204,9 +204,9 @@ std::string russ_format(const std::string& format_str, const LLSD& context) } else { - llwarns << "Unknown key: " << key << " in option map: " + LL_WARNS() << "Unknown key: " << key << " in option map: " << LLSDOStreamer(context) - << llendl; + << LL_ENDL; keep_looping = false; } break; @@ -220,8 +220,8 @@ std::string russ_format(const std::string& format_str, const LLSD& context) } break; default: - llinfos << "Unknown directive: " << *(deepest_node + 1) - << llendl; + LL_INFOS() << "Unknown directive: " << *(deepest_node + 1) + << LL_ENDL; keep_looping = false; break; } @@ -229,8 +229,8 @@ std::string russ_format(const std::string& format_str, const LLSD& context) } if (service_url.find('{') != std::string::npos) { - llwarns << "Constructed a likely bogus service URL: " << service_url - << llendl; + LL_WARNS() << "Constructed a likely bogus service URL: " << service_url + << LL_ENDL; } return service_url; } diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 9e8eb48460..8d7c4c0282 100755 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -81,7 +81,7 @@ void LLTemplateMessageBuilder::newMessage(const char *name) if (msg_template->getDeprecation() != MD_NOTDEPRECATED) { - llwarns << "Sending deprecated message " << namep << llendl; + LL_WARNS() << "Sending deprecated message " << namep << LL_ENDL; } LLMessageTemplate::message_block_map_t::const_iterator iter; @@ -96,7 +96,7 @@ void LLTemplateMessageBuilder::newMessage(const char *name) } else { - llerrs << "newMessage - Message " << name << " not registered" << llendl; + LL_ERRS() << "newMessage - Message " << name << " not registered" << LL_ENDL; } } @@ -125,7 +125,7 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) if (!mCurrentSMessageTemplate) { - llerrs << "newMessage not called prior to setBlock" << llendl; + LL_ERRS() << "newMessage not called prior to setBlock" << LL_ENDL; return; } @@ -133,8 +133,8 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) const LLMessageBlock* template_data = mCurrentSMessageTemplate->getBlock(bnamep); if (!template_data) { - llerrs << "LLTemplateMessageBuilder::nextBlock " << bnamep - << " not a block in " << mCurrentSMessageTemplate->mName << llendl; + LL_ERRS() << "LLTemplateMessageBuilder::nextBlock " << bnamep + << " not a block in " << mCurrentSMessageTemplate->mName << LL_ENDL; return; } @@ -164,8 +164,8 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) // if the block is type MBT_SINGLE this is bad! if (template_data->mType == MBT_SINGLE) { - llerrs << "LLTemplateMessageBuilder::nextBlock called multiple times" - << " for " << bnamep << " but is type MBT_SINGLE" << llendl; + LL_ERRS() << "LLTemplateMessageBuilder::nextBlock called multiple times" + << " for " << bnamep << " but is type MBT_SINGLE" << LL_ENDL; return; } @@ -175,10 +175,10 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) if ( (template_data->mType == MBT_MULTIPLE) &&(mCurrentSDataBlock->mBlockNumber == template_data->mNumber)) { - llerrs << "LLTemplateMessageBuilder::nextBlock called " + LL_ERRS() << "LLTemplateMessageBuilder::nextBlock called " << mCurrentSDataBlock->mBlockNumber << " times for " << bnamep << " exceeding " << template_data->mNumber - << " specified in type MBT_MULTIPLE." << llendl; + << " specified in type MBT_MULTIPLE." << LL_ENDL; return; } @@ -191,8 +191,8 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) if (block_data->mBlockNumber > MAX_BLOCKS) { - llerrs << "Trying to pack too many blocks into MBT_VARIABLE type " - << "(limited to " << MAX_BLOCKS << ")" << llendl; + LL_ERRS() << "Trying to pack too many blocks into MBT_VARIABLE type " + << "(limited to " << MAX_BLOCKS << ")" << LL_ENDL; } // create new name @@ -263,11 +263,11 @@ BOOL LLTemplateMessageBuilder::removeLastBlock() if (num_blocks <= 1) { // we just blew away the last one, so return FALSE - llwarns << "not blowing away the only block of message " + LL_WARNS() << "not blowing away the only block of message " << mCurrentSMessageName << ". Block: " << block_name << ". Number: " << num_blocks - << llendl; + << LL_ENDL; return FALSE; } else @@ -290,14 +290,14 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM // do we have a current message? if (!mCurrentSMessageTemplate) { - llerrs << "newMessage not called prior to addData" << llendl; + LL_ERRS() << "newMessage not called prior to addData" << LL_ENDL; return; } // do we have a current block? if (!mCurrentSDataBlock) { - llerrs << "setBlock not called prior to addData" << llendl; + LL_ERRS() << "setBlock not called prior to addData" << LL_ENDL; return; } @@ -305,7 +305,7 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM const LLMessageVariable* var_data = mCurrentSMessageTemplate->getBlock(mCurrentSBlockName)->getVariable(vnamep); if (!var_data || !var_data->getName()) { - llerrs << vnamep << " not a variable in block " << mCurrentSBlockName << " of " << mCurrentSMessageTemplate->mName << llendl; + LL_ERRS() << vnamep << " not a variable in block " << mCurrentSBlockName << " of " << mCurrentSMessageTemplate->mName << LL_ENDL; return; } @@ -316,9 +316,9 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM if ((var_data->getSize() == 1) && (size > 255)) { - llwarns << "Field " << varname << " is a Variable 1 but program " + LL_WARNS() << "Field " << varname << " is a Variable 1 but program " << "attempted to stuff more than 255 bytes in " - << "(" << size << "). Clamping size and truncating data." << llendl; + << "(" << size << "). Clamping size and truncating data." << LL_ENDL; size = 255; char *truncate = (char *)data; truncate[254] = 0; // array size is 255 but the last element index is 254 @@ -332,8 +332,8 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM { if (size != var_data->getSize()) { - llerrs << varname << " is type MVT_FIXED but request size " << size << " doesn't match template size " - << var_data->getSize() << llendl; + LL_ERRS() << varname << " is type MVT_FIXED but request size " << size << " doesn't match template size " + << var_data->getSize() << LL_ENDL; return; } // alright, smash it in @@ -350,14 +350,14 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM // do we have a current message? if (!mCurrentSMessageTemplate) { - llerrs << "newMessage not called prior to addData" << llendl; + LL_ERRS() << "newMessage not called prior to addData" << LL_ENDL; return; } // do we have a current block? if (!mCurrentSDataBlock) { - llerrs << "setBlock not called prior to addData" << llendl; + LL_ERRS() << "setBlock not called prior to addData" << LL_ENDL; return; } @@ -365,7 +365,7 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM const LLMessageVariable* var_data = mCurrentSMessageTemplate->getBlock(mCurrentSBlockName)->getVariable(vnamep); if (!var_data->getName()) { - llerrs << vnamep << " not a variable in block " << mCurrentSBlockName << " of " << mCurrentSMessageTemplate->mName << llendl; + LL_ERRS() << vnamep << " not a variable in block " << mCurrentSBlockName << " of " << mCurrentSMessageTemplate->mName << LL_ENDL; return; } @@ -373,7 +373,7 @@ void LLTemplateMessageBuilder::addData(const char *varname, const void *data, EM if (var_data->getType() == MVT_VARIABLE) { // nope - llerrs << vnamep << " is type MVT_VARIABLE. Call using addData(name, data, size)" << llendl; + LL_ERRS() << vnamep << " is type MVT_VARIABLE. Call using addData(name, data, size)" << LL_ENDL; return; } else @@ -643,8 +643,8 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat // Just reporting error is likely not enough. Need // to check how to abort or error out gracefully // from this function. XXXTBD - llerrs << "buildBlock failed. Message excedding " - << "sendBuffersize." << llendl; + LL_ERRS() << "buildBlock failed. Message excedding " + << "sendBuffersize." << LL_ENDL; } } else if (template_data->mType == MBT_MULTIPLE) @@ -652,10 +652,10 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat if (block_count != template_data->mNumber) { // nope! need to fill it in all the way! - llerrs << "Block " << mbci->mName + LL_ERRS() << "Block " << mbci->mName << " is type MBT_MULTIPLE but only has data for " << block_count << " out of its " - << template_data->mNumber << " blocks" << llendl; + << template_data->mNumber << " blocks" << LL_ENDL; } } @@ -669,10 +669,10 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat if (mvci.getSize() == -1) { // oops, this variable wasn't ever set! - llerrs << "The variable " << mvci.getName() << " in block " + LL_ERRS() << "The variable " << mvci.getName() << " in block " << mbci->mName << " of message " << template_data->mName - << " wasn't set prior to buildMessage call" << llendl; + << " wasn't set prior to buildMessage call" << LL_ENDL; } else { @@ -699,7 +699,7 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat htonmemcpy(&buffer[result], &size, MVT_S32, 4); break; default: - llerrs << "Attempting to build variable field with unknown size of " << size << llendl; + LL_ERRS() << "Attempting to build variable field with unknown size of " << size << LL_ENDL; break; } result += mvci.getDataSize(); @@ -721,11 +721,11 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat // Just reporting error is likely not // enough. Need to check how to abort or error // out gracefully from this function. XXXTBD - llerrs << "buildBlock failed. " + LL_ERRS() << "buildBlock failed. " << "Attempted to pack " << (result + mvci.getSize()) << " bytes into a buffer with size " - << buffer_size << "." << llendl; + << buffer_size << "." << LL_ENDL; } } } @@ -760,7 +760,7 @@ U32 LLTemplateMessageBuilder::buildMessage( // do we have a current message? if (!mCurrentSMessageTemplate) { - llerrs << "newMessage not called prior to buildMessage" << llendl; + LL_ERRS() << "newMessage not called prior to buildMessage" << LL_ENDL; return 0; } @@ -809,7 +809,7 @@ U32 LLTemplateMessageBuilder::buildMessage( } else { - llerrs << "unexpected message frequency in buildMessage" << llendl; + LL_ERRS() << "unexpected message frequency in buildMessage" << LL_ENDL; return 0; } diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index ab91f74abe..f160f60f30 100755 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -68,13 +68,13 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname // is there a message ready to go? if (mReceiveSize == -1) { - llerrs << "No message waiting for decode 2!" << llendl; + LL_ERRS() << "No message waiting for decode 2!" << LL_ENDL; return; } if (!mCurrentRMessageData) { - llerrs << "Invalid mCurrentMessageData in getData!" << llendl; + LL_ERRS() << "Invalid mCurrentMessageData in getData!" << LL_ENDL; return; } @@ -85,8 +85,8 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname if (iter == mCurrentRMessageData->mMemberBlocks.end()) { - llerrs << "Block " << blockname << " #" << blocknum - << " not in message " << mCurrentRMessageData->mName << llendl; + LL_ERRS() << "Block " << blockname << " #" << blocknum + << " not in message " << mCurrentRMessageData->mName << LL_ENDL; return; } @@ -95,18 +95,18 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname if (!vardata.getName()) { - llerrs << "Variable "<< vnamep << " not in message " - << mCurrentRMessageData->mName<< " block " << bnamep << llendl; + LL_ERRS() << "Variable "<< vnamep << " not in message " + << mCurrentRMessageData->mName<< " block " << bnamep << LL_ENDL; return; } if (size && size != vardata.getSize()) { - llerrs << "Msg " << mCurrentRMessageData->mName + LL_ERRS() << "Msg " << mCurrentRMessageData->mName << " variable " << vnamep << " is size " << vardata.getSize() << " but copying into buffer of size " << size - << llendl; + << LL_ENDL; return; } @@ -136,11 +136,11 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname } else { - llwarns << "Msg " << mCurrentRMessageData->mName + LL_WARNS() << "Msg " << mCurrentRMessageData->mName << " variable " << vnamep << " is size " << vardata.getSize() << " but truncated to max size of " << max_size - << llendl; + << LL_ENDL; memcpy(datap, vardata.getData(), max_size); } @@ -151,13 +151,13 @@ S32 LLTemplateMessageReader::getNumberOfBlocks(const char *blockname) // is there a message ready to go? if (mReceiveSize == -1) { - llerrs << "No message waiting for decode 3!" << llendl; + LL_ERRS() << "No message waiting for decode 3!" << LL_ENDL; return -1; } if (!mCurrentRMessageData) { - llerrs << "Invalid mCurrentRMessageData in getData!" << llendl; + LL_ERRS() << "Invalid mCurrentRMessageData in getData!" << LL_ENDL; return -1; } @@ -178,13 +178,13 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, const char *varname) // is there a message ready to go? if (mReceiveSize == -1) { // This is a serious error - crash - llerrs << "No message waiting for decode 4!" << llendl; + LL_ERRS() << "No message waiting for decode 4!" << LL_ENDL; return LL_MESSAGE_ERROR; } if (!mCurrentRMessageData) { // This is a serious error - crash - llerrs << "Invalid mCurrentRMessageData in getData!" << llendl; + LL_ERRS() << "Invalid mCurrentRMessageData in getData!" << LL_ENDL; return LL_MESSAGE_ERROR; } @@ -194,8 +194,8 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, const char *varname) if (iter == mCurrentRMessageData->mMemberBlocks.end()) { // don't crash - llinfos << "Block " << bnamep << " not in message " - << mCurrentRMessageData->mName << llendl; + LL_INFOS() << "Block " << bnamep << " not in message " + << mCurrentRMessageData->mName << LL_ENDL; return LL_BLOCK_NOT_IN_MESSAGE; } @@ -206,15 +206,15 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, const char *varname) if (!vardata.getName()) { // don't crash - llinfos << "Variable " << varname << " not in message " - << mCurrentRMessageData->mName << " block " << bnamep << llendl; + LL_INFOS() << "Variable " << varname << " not in message " + << mCurrentRMessageData->mName << " block " << bnamep << LL_ENDL; return LL_VARIABLE_NOT_IN_BLOCK; } if (mCurrentRMessageTemplate->mMemberBlocks[bnamep]->mType != MBT_SINGLE) { // This is a serious error - crash - llerrs << "Block " << bnamep << " isn't type MBT_SINGLE," - " use getSize with blocknum argument!" << llendl; + LL_ERRS() << "Block " << bnamep << " isn't type MBT_SINGLE," + " use getSize with blocknum argument!" << LL_ENDL; return LL_MESSAGE_ERROR; } @@ -226,13 +226,13 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, S32 blocknum, const // is there a message ready to go? if (mReceiveSize == -1) { // This is a serious error - crash - llerrs << "No message waiting for decode 5!" << llendl; + LL_ERRS() << "No message waiting for decode 5!" << LL_ENDL; return LL_MESSAGE_ERROR; } if (!mCurrentRMessageData) { // This is a serious error - crash - llerrs << "Invalid mCurrentRMessageData in getData!" << llendl; + LL_ERRS() << "Invalid mCurrentRMessageData in getData!" << LL_ENDL; return LL_MESSAGE_ERROR; } @@ -243,8 +243,8 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, S32 blocknum, const if (iter == mCurrentRMessageData->mMemberBlocks.end()) { // don't crash - llinfos << "Block " << bnamep << " not in message " - << mCurrentRMessageData->mName << llendl; + LL_INFOS() << "Block " << bnamep << " not in message " + << mCurrentRMessageData->mName << LL_ENDL; return LL_BLOCK_NOT_IN_MESSAGE; } @@ -253,8 +253,8 @@ S32 LLTemplateMessageReader::getSize(const char *blockname, S32 blocknum, const if (!vardata.getName()) { // don't crash - llinfos << "Variable " << vnamep << " not in message " - << mCurrentRMessageData->mName << " block " << bnamep << llendl; + LL_INFOS() << "Variable " << vnamep << " not in message " + << mCurrentRMessageData->mName << " block " << bnamep << LL_ENDL; return LL_VARIABLE_NOT_IN_BLOCK; } @@ -326,8 +326,8 @@ void LLTemplateMessageReader::getF32(const char *block, const char *var, if( !llfinite( d ) ) { - llwarns << "non-finite in getF32Fast " << block << " " << var - << llendl; + LL_WARNS() << "non-finite in getF32Fast " << block << " " << var + << LL_ENDL; d = 0; } } @@ -339,8 +339,8 @@ void LLTemplateMessageReader::getF64(const char *block, const char *var, if( !llfinite( d ) ) { - llwarns << "non-finite in getF64Fast " << block << " " << var - << llendl; + LL_WARNS() << "non-finite in getF64Fast " << block << " " << var + << LL_ENDL; d = 0; } } @@ -352,8 +352,8 @@ void LLTemplateMessageReader::getVector3(const char *block, const char *var, if( !v.isFinite() ) { - llwarns << "non-finite in getVector3Fast " << block << " " - << var << llendl; + LL_WARNS() << "non-finite in getVector3Fast " << block << " " + << var << LL_ENDL; v.zeroVec(); } } @@ -365,8 +365,8 @@ void LLTemplateMessageReader::getVector4(const char *block, const char *var, if( !v.isFinite() ) { - llwarns << "non-finite in getVector4Fast " << block << " " - << var << llendl; + LL_WARNS() << "non-finite in getVector4Fast " << block << " " + << var << LL_ENDL; v.zeroVec(); } } @@ -378,8 +378,8 @@ void LLTemplateMessageReader::getVector3d(const char *block, const char *var, if( !v.isFinite() ) { - llwarns << "non-finite in getVector3dFast " << block << " " - << var << llendl; + LL_WARNS() << "non-finite in getVector3dFast " << block << " " + << var << LL_ENDL; v.zeroVec(); } @@ -396,8 +396,8 @@ void LLTemplateMessageReader::getQuat(const char *block, const char *var, } else { - llwarns << "non-finite in getQuatFast " << block << " " << var - << llendl; + LL_WARNS() << "non-finite in getQuatFast " << block << " " << var + << LL_ENDL; q.loadIdentity(); } } @@ -450,7 +450,7 @@ BOOL LLTemplateMessageReader::decodeTemplate( // is there a message ready to go? if (buffer_size <= 0) { - llwarns << "No message waiting for decode!" << llendl; + LL_WARNS() << "No message waiting for decode!" << LL_ENDL; return(FALSE); } @@ -485,8 +485,8 @@ BOOL LLTemplateMessageReader::decodeTemplate( } else // bogus packet received (too short) { - llwarns << "Packet with unusable length received (too short): " - << buffer_size << llendl; + LL_WARNS() << "Packet with unusable length received (too short): " + << buffer_size << LL_ENDL; return(FALSE); } @@ -497,8 +497,8 @@ BOOL LLTemplateMessageReader::decodeTemplate( } else { - llwarns << "Message #" << std::hex << num << std::dec - << " received but not registered!" << llendl; + LL_WARNS() << "Message #" << std::hex << num << std::dec + << " received but not registered!" << LL_ENDL; gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); return(FALSE); } @@ -509,18 +509,18 @@ BOOL LLTemplateMessageReader::decodeTemplate( void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) { // we've run off the end of the packet! - llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName + LL_WARNS() << "Ran off end of packet " << mCurrentRMessageTemplate->mName // << " with id " << mCurrentRecvPacketID << " from " << host << " trying to read " << wanted << " bytes at position " << where << " going past packet end at " << mReceiveSize - << llendl; + << LL_ENDL; if(gMessageSystem->mVerboseLog) { - llinfos << "MSG: -> " << host << "\tREAD PAST END:\t" + LL_INFOS() << "MSG: -> " << host << "\tREAD PAST END:\t" // << mCurrentRecvPacketID << " " - << getMessageName() << llendl; + << getMessageName() << LL_ENDL; } gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET); } @@ -586,7 +586,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender } else { - llerrs << "Unknown block type" << llendl; + LL_ERRS() << "Unknown block type" << LL_ENDL; return FALSE; } @@ -653,7 +653,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender htonmemcpy(&tsize, &buffer[decode_pos], MVT_U32, 4); break; default: - llerrs << "Attempting to read variable field with unknown size of " << data_size << llendl; + LL_ERRS() << "Attempting to read variable field with unknown size of " << data_size << LL_ENDL; break; } } @@ -692,7 +692,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender if (mCurrentRMessageData->mMemberBlocks.empty() && !mCurrentRMessageTemplate->mMemberBlocks.empty()) { - lldebugs << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << llendl; + LL_DEBUGS() << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << LL_ENDL; return FALSE; } @@ -708,7 +708,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender LLFastTimer t(FTM_PROCESS_MESSAGES); if( !mCurrentRMessageTemplate->callHandlerFunc(gMessageSystem) ) { - llwarns << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << llendl; + LL_WARNS() << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << LL_ENDL; } } @@ -738,9 +738,9 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender if(decode_time > LLMessageReader::getTimeDecodesSpamThreshold()) { - lldebugs << "--------- Message " << mCurrentRMessageTemplate->mName << " decode took " << decode_time << " seconds. (" << + LL_DEBUGS() << "--------- Message " << mCurrentRMessageTemplate->mName << " decode took " << decode_time << " seconds. (" << mCurrentRMessageTemplate->mMaxDecodeTimePerMsg << " max, " << - (mCurrentRMessageTemplate->mTotalDecodeTime / mCurrentRMessageTemplate->mTotalDecoded) << " avg)" << llendl; + (mCurrentRMessageTemplate->mTotalDecodeTime / mCurrentRMessageTemplate->mTotalDecoded) << " avg)" << LL_ENDL; } } } @@ -758,9 +758,9 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, if(valid) { mCurrentRMessageTemplate->mReceiveCount++; - //lldebugs << "MessageRecvd:" + //LL_DEBUGS() << "MessageRecvd:" // << mCurrentRMessageTemplate->mName - // << " from " << sender << llendl; + // << " from " << sender << LL_ENDL; } if (valid && isBanned(trusted)) @@ -770,15 +770,15 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, << getMessageName() << " from " << ((trusted) ? "trusted " : "untrusted ") - << sender << llendl; + << sender << LL_ENDL; valid = FALSE; } if(valid && isUdpBanned()) { - llwarns << "Received UDP black listed message " + LL_WARNS() << "Received UDP black listed message " << getMessageName() - << " from " << sender << llendl; + << " from " << sender << LL_ENDL; valid = FALSE; } return valid; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 64ebd51fec..181c594205 100755 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -440,8 +440,8 @@ BOOL LLThrottleGroup::dynamicAdjust() //if (total) //{ - // llinfos << i << ": B" << channel_busy[i] << " I" << channel_idle[i] << " N" << channel_over_nominal[i]; - // llcont << " Nom: " << mNominalBPS[i] << " Cur: " << mCurrentBPS[i] << " BS: " << mBitsSentHistory[i] << llendl; + // LL_INFOS() << i << ": B" << channel_busy[i] << " I" << channel_idle[i] << " N" << channel_over_nominal[i]; + // LL_CONT << " Nom: " << mNominalBPS[i] << " Cur: " << mCurrentBPS[i] << " BS: " << mBitsSentHistory[i] << LL_ENDL; //} } @@ -482,7 +482,7 @@ BOOL LLThrottleGroup::dynamicAdjust() avail_bps = mCurrentBPS[i] - used_bps; } - //llinfos << i << " avail " << avail_bps << llendl; + //LL_INFOS() << i << " avail " << avail_bps << LL_ENDL; // Historically, a channel could have used more than its current share, // even if it's idle right now. @@ -499,7 +499,7 @@ BOOL LLThrottleGroup::dynamicAdjust() } } - //llinfos << "Pool BPS: " << pool_bps << llendl; + //LL_INFOS() << "Pool BPS: " << pool_bps << LL_ENDL; // Now redistribute the bandwidth to busy channels. F32 unused_bps = 0.f; @@ -508,7 +508,7 @@ BOOL LLThrottleGroup::dynamicAdjust() if (channel_busy[i]) { F32 add_amount = pool_bps * (mNominalBPS[i] / busy_nominal_sum); - //llinfos << "Busy " << i << " gets " << pool_bps << llendl; + //LL_INFOS() << "Busy " << i << " gets " << pool_bps << LL_ENDL; mCurrentBPS[i] += add_amount; // CRO: make sure this doesn't get too huge diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index 034680caf8..e647df1c11 100755 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -64,7 +64,7 @@ LLTransferManager::~LLTransferManager() { if (mValid) { - llwarns << "LLTransferManager::~LLTransferManager - Should have been cleaned up by message system shutdown process" << llendl; + LL_WARNS() << "LLTransferManager::~LLTransferManager - Should have been cleaned up by message system shutdown process" << LL_ENDL; cleanup(); } } @@ -74,7 +74,7 @@ void LLTransferManager::init() { if (mValid) { - llerrs << "Double initializing LLTransferManager!" << llendl; + LL_ERRS() << "Double initializing LLTransferManager!" << LL_ENDL; } mValid = TRUE; @@ -122,7 +122,7 @@ void LLTransferManager::cleanupConnection(const LLHost &host) { // This can happen legitimately if we've never done a transfer, and we're // cleaning up a circuit. - //llwarns << "Cleaning up nonexistent transfer connection to " << host << llendl; + //LL_WARNS() << "Cleaning up nonexistent transfer connection to " << host << LL_ENDL; return; } LLTransferConnection *connp = iter->second; @@ -203,7 +203,7 @@ LLTransferSource *LLTransferManager::findTransferSource(const LLUUID &transfer_i //static void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferRequest" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferRequest" << LL_ENDL; LLUUID transfer_id; LLTransferSourceType source_type; @@ -219,33 +219,33 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) if (!tscp) { - llwarns << "Source channel not found" << llendl; + LL_WARNS() << "Source channel not found" << LL_ENDL; return; } if (tscp->findTransferSource(transfer_id)) { - llwarns << "Duplicate request for transfer " << transfer_id << ", aborting!" << llendl; + LL_WARNS() << "Duplicate request for transfer " << transfer_id << ", aborting!" << LL_ENDL; return; } S32 size = msgp->getSize("TransferInfo", "Params"); if(size > MAX_PARAMS_SIZE) { - llwarns << "LLTransferManager::processTransferRequest params too big." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest params too big." + << LL_ENDL; return; } - //llinfos << transfer_id << ":" << source_type << ":" << channel_type << ":" << priority << llendl; + //LL_INFOS() << transfer_id << ":" << source_type << ":" << channel_type << ":" << priority << LL_ENDL; LLTransferSource* tsp = LLTransferSource::createSource( source_type, transfer_id, priority); if(!tsp) { - llwarns << "LLTransferManager::processTransferRequest couldn't create" - << " transfer source!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest couldn't create" + << " transfer source!" << LL_ENDL; return; } U8 tmp[MAX_PARAMS_SIZE]; @@ -258,8 +258,8 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) // This should only happen if the data is corrupt or // incorrectly packed. // *NOTE: We may want to call abortTransfer(). - llwarns << "LLTransferManager::processTransferRequest: bad parameters." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest: bad parameters." + << LL_ENDL; delete tsp; return; } @@ -272,7 +272,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferInfo" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferInfo" << LL_ENDL; LLUUID transfer_id; LLTransferTargetType target_type; @@ -286,11 +286,11 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) msgp->getS32("TransferInfo", "Status", (S32 &)status); msgp->getS32("TransferInfo", "Size", size); - //llinfos << transfer_id << ":" << target_type<< ":" << channel_type << llendl; + //LL_INFOS() << transfer_id << ":" << target_type<< ":" << channel_type << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(msgp->getSender(), channel_type); if (!ttcp) { - llwarns << "Target channel not found" << llendl; + LL_WARNS() << "Target channel not found" << LL_ENDL; // Should send a message to abort the transfer. return; } @@ -298,7 +298,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) LLTransferTarget *ttp = ttcp->findTransferTarget(transfer_id); if (!ttp) { - llwarns << "TransferInfo for unknown transfer! Not able to handle this yet!" << llendl; + LL_WARNS() << "TransferInfo for unknown transfer! Not able to handle this yet!" << LL_ENDL; // This could happen if we're doing a push transfer, although to avoid confusion, // maybe it should be a different message. return; @@ -306,7 +306,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) if (status != LLTS_OK) { - llwarns << transfer_id << ": Non-ok status, cleaning up" << llendl; + LL_WARNS() << transfer_id << ": Non-ok status, cleaning up" << LL_ENDL; ttp->completionCallback(status); // Clean up the transfer. ttcp->deleteTransfer(ttp); @@ -317,8 +317,8 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) S32 params_size = msgp->getSize("TransferInfo", "Params"); if(params_size > MAX_PARAMS_SIZE) { - llwarns << "LLTransferManager::processTransferInfo params too big." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferInfo params too big." + << LL_ENDL; return; } else if(params_size > 0) @@ -330,15 +330,15 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { // This should only happen if the data is corrupt or // incorrectly packed. - llwarns << "LLTransferManager::processTransferRequest: bad params." - << llendl; + LL_WARNS() << "LLTransferManager::processTransferRequest: bad params." + << LL_ENDL; ttp->abortTransfer(); ttcp->deleteTransfer(ttp); return; } } - //llinfos << "Receiving " << transfer_id << ", size " << size << " bytes" << llendl; + //LL_INFOS() << "Receiving " << transfer_id << ", size " << size << " bytes" << LL_ENDL; ttp->setSize(size); ttp->setGotInfo(TRUE); @@ -358,7 +358,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { // Perhaps this stuff should be inside a method in LLTransferPacket? // I'm too lazy to do it now, though. -// llinfos << "Playing back delayed packet " << packet_id << llendl; +// LL_INFOS() << "Playing back delayed packet " << packet_id << LL_ENDL; LLTransferPacket *packetp = ttp->mDelayedPacketMap[packet_id]; // This is somewhat inefficient, but avoids us having to duplicate @@ -392,11 +392,11 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) { if (status != LLTS_DONE) { - llwarns << "LLTransferManager::processTransferInfo Error in playback!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferInfo Error in playback!" << LL_ENDL; } else { - llinfos << "LLTransferManager::processTransferInfo replay FINISHED for " << transfer_id << llendl; + LL_INFOS() << "LLTransferManager::processTransferInfo replay FINISHED for " << transfer_id << LL_ENDL; } // This transfer is done, either via error or not. ttp->completionCallback(status); @@ -410,7 +410,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferPacket" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferPacket" << LL_ENDL; LLUUID transfer_id; LLTransferChannelType channel_type; @@ -423,20 +423,20 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) msgp->getS32("TransferData", "Status", (S32 &)status); // Find the transfer associated with this packet. - //llinfos << transfer_id << ":" << channel_type << llendl; + //LL_INFOS() << transfer_id << ":" << channel_type << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(msgp->getSender(), channel_type); if (!ttcp) { - llwarns << "Target channel not found" << llendl; + LL_WARNS() << "Target channel not found" << LL_ENDL; return; } LLTransferTarget *ttp = ttcp->findTransferTarget(transfer_id); if (!ttp) { - llwarns << "Didn't find matching transfer for " << transfer_id + LL_WARNS() << "Didn't find matching transfer for " << transfer_id << " processing packet " << packet_id - << " from " << msgp->getSender() << llendl; + << " from " << msgp->getSender() << LL_ENDL; return; } @@ -455,7 +455,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) if ((size < 0) || (size > MAX_PACKET_DATA_SIZE)) { - llwarns << "Invalid transfer packet size " << size << llendl; + LL_WARNS() << "Invalid transfer packet size " << size << LL_ENDL; return; } @@ -472,8 +472,8 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) if(!ttp->addDelayedPacket(packet_id, status, tmp_data, size)) { // Whoops - failed to add a delayed packet for some reason. - llwarns << "Too many delayed packets processing transfer " - << transfer_id << " from " << msgp->getSender() << llendl; + LL_WARNS() << "Too many delayed packets processing transfer " + << transfer_id << " from " << msgp->getSender() << LL_ENDL; ttp->abortTransfer(); ttcp->deleteTransfer(ttp); return; @@ -483,15 +483,15 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) const S32 LL_TRANSFER_WARN_GAP = 10; if(!ttp->gotInfo()) { - llwarns << "Got data packet before information in transfer " + LL_WARNS() << "Got data packet before information in transfer " << transfer_id << " from " << msgp->getSender() - << ", got " << packet_id << llendl; + << ", got " << packet_id << LL_ENDL; } else if((packet_id - ttp->getNextPacketID()) > LL_TRANSFER_WARN_GAP) { - llwarns << "Out of order packet in transfer " << transfer_id + LL_WARNS() << "Out of order packet in transfer " << transfer_id << " from " << msgp->getSender() << ", got " << packet_id - << " expecting " << ttp->getNextPacketID() << llendl; + << " expecting " << ttp->getNextPacketID() << LL_ENDL; } #endif return; @@ -516,11 +516,11 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { if (status != LLTS_DONE) { - llwarns << "LLTransferManager::processTransferPacket Error in transfer!" << llendl; + LL_WARNS() << "LLTransferManager::processTransferPacket Error in transfer!" << LL_ENDL; } else { -// llinfos << "LLTransferManager::processTransferPacket done for " << transfer_id << llendl; +// LL_INFOS() << "LLTransferManager::processTransferPacket done for " << transfer_id << LL_ENDL; } // This transfer is done, either via error or not. ttp->completionCallback(status); @@ -534,7 +534,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) { // Perhaps this stuff should be inside a method in LLTransferPacket? // I'm too lazy to do it now, though. -// llinfos << "Playing back delayed packet " << packet_id << llendl; +// LL_INFOS() << "Playing back delayed packet " << packet_id << LL_ENDL; LLTransferPacket *packetp = ttp->mDelayedPacketMap[packet_id]; // This is somewhat inefficient, but avoids us having to duplicate @@ -564,7 +564,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) //static void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **) { - //llinfos << "LLTransferManager::processTransferPacket" << llendl; + //LL_INFOS() << "LLTransferManager::processTransferPacket" << LL_ENDL; LLUUID transfer_id; LLTransferChannelType channel_type; @@ -598,7 +598,7 @@ void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **) } } - llwarns << "Couldn't find transfer " << transfer_id << " to abort!" << llendl; + LL_WARNS() << "Couldn't find transfer " << transfer_id << " to abort!" << LL_ENDL; } @@ -608,7 +608,7 @@ void LLTransferManager::reliablePacketCallback(void **user_data, S32 result) LLUUID *transfer_idp = (LLUUID *)user_data; if (result) { - llwarns << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << llendl; + LL_WARNS() << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << LL_ENDL; LLTransferSource *tsp = gTransferManager.findTransferSource(*transfer_idp); if (tsp) { @@ -758,7 +758,7 @@ void LLTransferSourceChannel::updateTransfers() // We DON'T want to send any packets if they're blocked, they'll just end up // piling up on the other end. - //llwarns << "Blocking transfers due to blocked circuit for " << getHost() << llendl; + //LL_WARNS() << "Blocking transfers due to blocked circuit for " << getHost() << LL_ENDL; return; } @@ -776,7 +776,7 @@ void LLTransferSourceChannel::updateTransfers() BOOL done = FALSE; for (iter = mTransferSources.mMap.begin(); (iter != mTransferSources.mMap.end()) && !done;) { - //llinfos << "LLTransferSourceChannel::updateTransfers()" << llendl; + //LL_INFOS() << "LLTransferSourceChannel::updateTransfers()" << LL_ENDL; // Do stuff. next = iter; next++; @@ -848,11 +848,11 @@ void LLTransferSourceChannel::updateTransfers() // We're OK, don't need to do anything. Keep sending data. break; case LLTS_ERROR: - llwarns << "Error in transfer dataCallback!" << llendl; + LL_WARNS() << "Error in transfer dataCallback!" << LL_ENDL; // fall through case LLTS_DONE: // We need to clean up this transfer source. - //llinfos << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << llendl; + //LL_INFOS() << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << LL_ENDL; tsp->completionCallback(status); delete tsp; @@ -860,7 +860,7 @@ void LLTransferSourceChannel::updateTransfers() iter = next; break; default: - llerrs << "Unknown transfer error code!" << llendl; + LL_ERRS() << "Unknown transfer error code!" << LL_ENDL; } // At this point, we should do priority adjustment (since some transfers like @@ -906,7 +906,7 @@ BOOL LLTransferSourceChannel::deleteTransfer(LLTransferSource *tsp) } } - llerrs << "Unable to find transfer source to delete!" << llendl; + LL_ERRS() << "Unable to find transfer source to delete!" << LL_ENDL; return FALSE; } @@ -947,7 +947,7 @@ void LLTransferTargetChannel::requestTransfer( source_params.getType()); if (!ttp) { - llwarns << "LLTransferManager::requestTransfer aborting due to target creation failure!" << llendl; + LL_WARNS() << "LLTransferManager::requestTransfer aborting due to target creation failure!" << LL_ENDL; return; } @@ -1021,7 +1021,7 @@ BOOL LLTransferTargetChannel::deleteTransfer(LLTransferTarget *ttp) } } - llerrs << "Unable to find transfer target to delete!" << llendl; + LL_ERRS() << "Unable to find transfer target to delete!" << LL_ENDL; return FALSE; } @@ -1083,7 +1083,7 @@ void LLTransferSource::sendTransferStatus(LLTSCode status) void LLTransferSource::abortTransfer() { // Send a message down, call the completion callback - llinfos << "LLTransferSource::Aborting transfer " << getID() << " to " << mChannelp->getHost() << llendl; + LL_INFOS() << "LLTransferSource::Aborting transfer " << getID() << " to " << mChannelp->getHost() << LL_ENDL; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); @@ -1101,7 +1101,7 @@ void LLTransferSource::registerSourceType(const LLTransferSourceType stype, LLTr { // Disallow changing what class handles a source type // Unclear when you would want to do this, and whether it would work. - llerrs << "Reregistering source type " << stype << llendl; + LL_ERRS() << "Reregistering source type " << stype << LL_ENDL; } else { @@ -1129,7 +1129,7 @@ LLTransferSource *LLTransferSource::createSource(const LLTransferSourceType styp if (!sSourceCreateMap.count(stype)) { // Use the callback to create the source type if it's not there. - llwarns << "Unknown transfer source type: " << stype << llendl; + LL_WARNS() << "Unknown transfer source type: " << stype << LL_ENDL; return NULL; } return (sSourceCreateMap[stype])(id, priority); @@ -1216,7 +1216,7 @@ LLTransferTarget::~LLTransferTarget() void LLTransferTarget::abortTransfer() { // Send a message up, call the completion callback - llinfos << "LLTransferTarget::Aborting transfer " << getID() << " from " << mChannelp->getHost() << llendl; + LL_INFOS() << "LLTransferTarget::Aborting transfer " << getID() << " from " << mChannelp->getHost() << LL_ENDL; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); @@ -1248,7 +1248,7 @@ bool LLTransferTarget::addDelayedPacket( #ifdef _DEBUG if (mDelayedPacketMap.find(packet_id) != mDelayedPacketMap.end()) { - llerrs << "Packet ALREADY in delayed packet map!" << llendl; + LL_ERRS() << "Packet ALREADY in delayed packet map!" << LL_ENDL; } #endif @@ -1269,7 +1269,7 @@ LLTransferTarget* LLTransferTarget::createTarget( case LLTTT_VFILE: return new LLTransferTargetVFile(id, source_type); default: - llwarns << "Unknown transfer target type: " << type << llendl; + LL_WARNS() << "Unknown transfer target type: " << type << LL_ENDL; return NULL; } } @@ -1304,7 +1304,7 @@ void LLTransferSourceParamsInvItem::setAsset(const LLUUID &asset_id, const LLAss void LLTransferSourceParamsInvItem::packParams(LLDataPacker &dp) const { - lldebugs << "LLTransferSourceParamsInvItem::packParams()" << llendl; + LL_DEBUGS() << "LLTransferSourceParamsInvItem::packParams()" << LL_ENDL; dp.packUUID(mAgentID, "AgentID"); dp.packUUID(mSessionID, "SessionID"); dp.packUUID(mOwnerID, "OwnerID"); diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 8537773a3f..80ed3340c6 100755 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp @@ -66,18 +66,18 @@ void LLTransferSourceAsset::initTransfer() } else { - llwarns << "Attempted to request blocked asset " + LL_WARNS() << "Attempted to request blocked asset " << mParams.getAssetID() << ":" << LLAssetType::lookupHumanReadable(mParams.getAssetType()) - << llendl; + << LL_ENDL; sendTransferStatus(LLTS_ERROR); } } else { - llwarns << "Attempted to request asset " << mParams.getAssetID() + LL_WARNS() << "Attempted to request asset " << mParams.getAssetID() << ":" << LLAssetType::lookupHumanReadable(mParams.getAssetType()) - << " without an asset system!" << llendl; + << " without an asset system!" << LL_ENDL; sendTransferStatus(LLTS_ERROR); } } @@ -93,7 +93,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, S32 &returned_bytes, BOOL &delete_returned) { - //llinfos << "LLTransferSourceAsset::dataCallback" << llendl; + //LL_INFOS() << "LLTransferSourceAsset::dataCallback" << LL_ENDL; if (!mGotResponse) { return LLTS_SKIP; @@ -109,14 +109,14 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, if (packet_id != mLastPacketID + 1) { - llerrs << "Can't handle out of order file transfer yet!" << llendl; + LL_ERRS() << "Can't handle out of order file transfer yet!" << LL_ENDL; } // grab a buffer from the right place in the file if (!vf.seek(mCurPos, 0)) { - llwarns << "LLTransferSourceAsset Can't seek to " << mCurPos << " length " << vf.getSize() << llendl; - llwarns << "While sending " << mParams.getAssetID() << llendl; + LL_WARNS() << "LLTransferSourceAsset Can't seek to " << mCurPos << " length " << vf.getSize() << LL_ENDL; + LL_WARNS() << "While sending " << mParams.getAssetID() << LL_ENDL; return LLTS_ERROR; } @@ -160,13 +160,13 @@ void LLTransferSourceAsset::completionCallback(const LLTSCode status) void LLTransferSourceAsset::packParams(LLDataPacker& dp) const { - //llinfos << "LLTransferSourceAsset::packParams" << llendl; + //LL_INFOS() << "LLTransferSourceAsset::packParams" << LL_ENDL; mParams.packParams(dp); } BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp) { - //llinfos << "LLTransferSourceAsset::unpackParams" << llendl; + //LL_INFOS() << "LLTransferSourceAsset::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); } @@ -183,13 +183,13 @@ void LLTransferSourceAsset::responderCallback(LLVFS *vfs, const LLUUID& uuid, LL if (!tsap) { - llinfos << "Aborting transfer " << transfer_id << " callback, transfer source went away" << llendl; + LL_INFOS() << "Aborting transfer " << transfer_id << " callback, transfer source went away" << LL_ENDL; return; } if (result) { - llinfos << "AssetStorage: Error " << gAssetStorage->getErrorString(result) << " downloading uuid " << uuid << llendl; + LL_INFOS() << "AssetStorage: Error " << gAssetStorage->getErrorString(result) << " downloading uuid " << uuid << LL_ENDL; } LLTSCode status; diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 43c9448fba..1f284a158d 100755 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp @@ -43,7 +43,7 @@ LLTransferSourceFile::~LLTransferSourceFile() { if (mFP) { - llerrs << "Destructor called without the completion callback being called!" << llendl; + LL_ERRS() << "Destructor called without the completion callback being called!" << LL_ENDL; } } @@ -56,7 +56,7 @@ void LLTransferSourceFile::initTransfer() || (filename == "..") || (filename.find(delimiter[0]) != std::string::npos)) { - llwarns << "Attempting to transfer file " << filename << " with path delimiter, aborting!" << llendl; + LL_WARNS() << "Attempting to transfer file " << filename << " with path delimiter, aborting!" << LL_ENDL; sendTransferStatus(LLTS_ERROR); return; @@ -88,17 +88,17 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id, S32 &returned_bytes, BOOL &delete_returned) { - //llinfos << "LLTransferSourceFile::dataCallback" << llendl; + //LL_INFOS() << "LLTransferSourceFile::dataCallback" << LL_ENDL; if (!mFP) { - llerrs << "Data callback without file set!" << llendl; + LL_ERRS() << "Data callback without file set!" << LL_ENDL; return LLTS_ERROR; } if (packet_id != mLastPacketID + 1) { - llerrs << "Can't handle out of order file transfer yet!" << llendl; + LL_ERRS() << "Can't handle out of order file transfer yet!" << LL_ENDL; } // Grab up until the max number of bytes from the file. @@ -137,13 +137,13 @@ void LLTransferSourceFile::completionCallback(const LLTSCode status) void LLTransferSourceFile::packParams(LLDataPacker& dp) const { - //llinfos << "LLTransferSourceFile::packParams" << llendl; + //LL_INFOS() << "LLTransferSourceFile::packParams" << LL_ENDL; mParams.packParams(dp); } BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp) { - //llinfos << "LLTransferSourceFile::unpackParams" << llendl; + //LL_INFOS() << "LLTransferSourceFile::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); } @@ -169,6 +169,6 @@ BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) dp.unpackU8(delete_flag, "Delete"); mDeleteOnCompletion = delete_flag; - llinfos << "Unpacked filename: " << mFilename << llendl; + LL_INFOS() << "Unpacked filename: " << mFilename << LL_ENDL; return TRUE; } diff --git a/indra/llmessage/lltransfertargetfile.cpp b/indra/llmessage/lltransfertargetfile.cpp index 560fc8b6e4..ca0318a2d6 100755 --- a/indra/llmessage/lltransfertargetfile.cpp +++ b/indra/llmessage/lltransfertargetfile.cpp @@ -44,7 +44,7 @@ LLTransferTargetFile::~LLTransferTargetFile() { if (mFP) { - llerrs << "LLTransferTargetFile::~LLTransferTargetFile - Should have been cleaned up in completion callback" << llendl; + LL_ERRS() << "LLTransferTargetFile::~LLTransferTargetFile - Should have been cleaned up in completion callback" << LL_ENDL; fclose(mFP); mFP = NULL; } @@ -61,7 +61,7 @@ void LLTransferTargetFile::applyParams(const LLTransferTargetParams ¶ms) { if (params.getType() != mType) { - llwarns << "Target parameter type doesn't match!" << llendl; + LL_WARNS() << "Target parameter type doesn't match!" << LL_ENDL; return; } @@ -70,8 +70,8 @@ void LLTransferTargetFile::applyParams(const LLTransferTargetParams ¶ms) LLTSCode LLTransferTargetFile::dataCallback(const S32 packet_id, U8 *in_datap, const S32 in_size) { - //llinfos << "LLTransferTargetFile::dataCallback" << llendl; - //llinfos << "Packet: " << packet_id << llendl; + //LL_INFOS() << "LLTransferTargetFile::dataCallback" << LL_ENDL; + //LL_INFOS() << "Packet: " << packet_id << LL_ENDL; if (!mFP) { @@ -79,7 +79,7 @@ LLTSCode LLTransferTargetFile::dataCallback(const S32 packet_id, U8 *in_datap, c if (!mFP) { - llwarns << "Failure opening " << mParams.mFilename << " for write by LLTransferTargetFile" << llendl; + LL_WARNS() << "Failure opening " << mParams.mFilename << " for write by LLTransferTargetFile" << LL_ENDL; return LLTS_ERROR; } } @@ -91,7 +91,7 @@ LLTSCode LLTransferTargetFile::dataCallback(const S32 packet_id, U8 *in_datap, c S32 count = (S32)fwrite(in_datap, 1, in_size, mFP); if (count != in_size) { - llwarns << "Failure in LLTransferTargetFile::dataCallback!" << llendl; + LL_WARNS() << "Failure in LLTransferTargetFile::dataCallback!" << LL_ENDL; return LLTS_ERROR; } return LLTS_OK; @@ -99,7 +99,7 @@ LLTSCode LLTransferTargetFile::dataCallback(const S32 packet_id, U8 *in_datap, c void LLTransferTargetFile::completionCallback(const LLTSCode status) { - llinfos << "LLTransferTargetFile::completionCallback" << llendl; + LL_INFOS() << "LLTransferTargetFile::completionCallback" << LL_ENDL; if (mFP) { fclose(mFP); @@ -113,7 +113,7 @@ void LLTransferTargetFile::completionCallback(const LLTSCode status) case LLTS_ABORT: case LLTS_ERROR: // We're aborting this transfer, we don't want to keep this file. - llwarns << "Aborting file transfer for " << mParams.mFilename << llendl; + LL_WARNS() << "Aborting file transfer for " << mParams.mFilename << LL_ENDL; if (mFP) { // Only need to remove file if we successfully opened it. diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index c78d9288b6..3c234b9726 100755 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -115,7 +115,7 @@ void LLTransferTargetVFile::applyParams(const LLTransferTargetParams ¶ms) { if (params.getType() != mType) { - llwarns << "Target parameter type doesn't match!" << llendl; + LL_WARNS() << "Target parameter type doesn't match!" << LL_ENDL; return; } @@ -125,8 +125,8 @@ void LLTransferTargetVFile::applyParams(const LLTransferTargetParams ¶ms) LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap, const S32 in_size) { - //llinfos << "LLTransferTargetFile::dataCallback" << llendl; - //llinfos << "Packet: " << packet_id << llendl; + //LL_INFOS() << "LLTransferTargetFile::dataCallback" << LL_ENDL; + //LL_INFOS() << "Packet: " << packet_id << LL_ENDL; LLVFile vf(gAssetStorage->mVFS, mTempID, mParams.getAssetType(), LLVFile::APPEND); if (mNeedsCreate) @@ -142,7 +142,7 @@ LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap, if (!vf.write(in_datap, in_size)) { - llwarns << "Failure in LLTransferTargetVFile::dataCallback!" << llendl; + LL_WARNS() << "Failure in LLTransferTargetVFile::dataCallback!" << LL_ENDL; return LLTS_ERROR; } return LLTS_OK; @@ -151,11 +151,11 @@ LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap, void LLTransferTargetVFile::completionCallback(const LLTSCode status) { - //llinfos << "LLTransferTargetVFile::completionCallback" << llendl; + //LL_INFOS() << "LLTransferTargetVFile::completionCallback" << LL_ENDL; if (!gAssetStorage) { - llwarns << "Aborting vfile transfer after asset storage shut down!" << llendl; + LL_WARNS() << "Aborting vfile transfer after asset storage shut down!" << LL_ENDL; return; } @@ -169,14 +169,14 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status) LLVFile file(gAssetStorage->mVFS, mTempID, mParams.getAssetType(), LLVFile::WRITE); if (!file.rename(mParams.getAssetID(), mParams.getAssetType())) { - llerrs << "LLTransferTargetVFile: rename failed" << llendl; + LL_ERRS() << "LLTransferTargetVFile: rename failed" << LL_ENDL; } } err_code = LL_ERR_NOERR; - lldebugs << "LLTransferTargetVFile::completionCallback for " + LL_DEBUGS() << "LLTransferTargetVFile::completionCallback for " << mParams.getAssetID() << "," << LLAssetType::lookup(mParams.getAssetType()) - << " with temp id " << mTempID << llendl; + << " with temp id " << mTempID << LL_ENDL; break; case LLTS_ERROR: case LLTS_ABORT: @@ -184,7 +184,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status) default: { // We're aborting this transfer, we don't want to keep this file. - llwarns << "Aborting vfile transfer for " << mParams.getAssetID() << llendl; + LL_WARNS() << "Aborting vfile transfer for " << mParams.getAssetID() << LL_ENDL; LLVFile vf(gAssetStorage->mVFS, mTempID, mParams.getAssetType(), LLVFile::APPEND); vf.remove(); } diff --git a/indra/llmessage/lltrustedmessageservice.cpp b/indra/llmessage/lltrustedmessageservice.cpp index fea7fc72c4..151d02a156 100755 --- a/indra/llmessage/lltrustedmessageservice.cpp +++ b/indra/llmessage/lltrustedmessageservice.cpp @@ -63,7 +63,7 @@ void LLTrustedMessageService::post(LLHTTPNode::ResponsePtr response, { LL_WARNS("Messaging") << "trusted message POST to /trusted-message/" << name << " from unknown or untrusted sender " - << sender << llendl; + << sender << LL_ENDL; response->status(403, "Unknown or untrusted sender"); } else @@ -71,13 +71,13 @@ void LLTrustedMessageService::post(LLHTTPNode::ResponsePtr response, gMessageSystem->receivedMessageFromTrustedSender(); if (input.has("binary-template-data")) { - llinfos << "Dispatching template: " << input << llendl; + LL_INFOS() << "Dispatching template: " << input << LL_ENDL; // try and send this message using udp dispatch LLMessageSystem::dispatchTemplate(name, message_data, response); } else { - llinfos << "Dispatching without template: " << input << llendl; + LL_INFOS() << "Dispatching without template: " << input << LL_ENDL; LLMessageSystem::dispatch(name, message_data, response); } } diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 7281ac35af..898545bd86 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -177,7 +177,7 @@ void LLURLRequest::setURL(const std::string& url) mDetail->mURL = url; if (url.empty()) { - llwarns << "empty URL specified" << llendl; + LL_WARNS() << "empty URL specified" << LL_ENDL; } } @@ -230,7 +230,7 @@ void LLURLRequest::useProxy(bool use_proxy) } - lldebugs << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (env_proxy ? env_proxy : "(null)") << llendl; + LL_DEBUGS() << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (env_proxy ? env_proxy : "(null)") << LL_ENDL; if (env_proxy && use_proxy) { @@ -298,7 +298,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( { LLFastTimer t(FTM_PROCESS_URL_REQUEST); PUMP_DEBUG; - //llinfos << "LLURLRequest::process_impl()" << llendl; + //LL_INFOS() << "LLURLRequest::process_impl()" << LL_ENDL; if (!buffer) return STATUS_ERROR; // we're still waiting or prcessing, check how many @@ -316,10 +316,10 @@ LLIOPipe::EStatus LLURLRequest::process_impl( const F32 TIMEOUT_ADJUSTMENT = 2.0f; mDetail->mByteAccumulator = 0; pump->adjustTimeoutSeconds(TIMEOUT_ADJUSTMENT); - lldebugs << "LLURLRequest adjustTimeoutSeconds for request: " << mDetail->mURL << llendl; + LL_DEBUGS() << "LLURLRequest adjustTimeoutSeconds for request: " << mDetail->mURL << LL_ENDL; if (mState == STATE_INITIALIZED) { - llinfos << "LLURLRequest adjustTimeoutSeconds called during upload" << llendl; + LL_INFOS() << "LLURLRequest adjustTimeoutSeconds called during upload" << LL_ENDL; } } @@ -383,7 +383,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( mState = STATE_HAVE_RESPONSE; context[CONTEXT_REQUEST][CONTEXT_TRANSFERED_BYTES] = mRequestTransferedBytes; context[CONTEXT_RESPONSE][CONTEXT_TRANSFERED_BYTES] = mResponseTransferedBytes; - lldebugs << this << "Setting context to " << context << llendl; + LL_DEBUGS() << this << "Setting context to " << context << LL_ENDL; switch(result) { case CURLE_OK: @@ -417,12 +417,12 @@ LLIOPipe::EStatus LLURLRequest::process_impl( keep_looping = false; break; default: // CURLE_URL_MALFORMAT - llwarns << "URLRequest Error: " << result + LL_WARNS() << "URLRequest Error: " << result << ", " << LLCurl::strerror(result) << ", " << (mDetail->mURL.empty() ? "" : mDetail->mURL) - << llendl; + << LL_ENDL; status = STATUS_ERROR; keep_looping = false; break; @@ -437,14 +437,14 @@ LLIOPipe::EStatus LLURLRequest::process_impl( eos = true; context[CONTEXT_REQUEST][CONTEXT_TRANSFERED_BYTES] = mRequestTransferedBytes; context[CONTEXT_RESPONSE][CONTEXT_TRANSFERED_BYTES] = mResponseTransferedBytes; - lldebugs << this << "Setting context to " << context << llendl; + LL_DEBUGS() << this << "Setting context to " << context << LL_ENDL; return STATUS_DONE; default: PUMP_DEBUG; context[CONTEXT_REQUEST][CONTEXT_TRANSFERED_BYTES] = mRequestTransferedBytes; context[CONTEXT_RESPONSE][CONTEXT_TRANSFERED_BYTES] = mResponseTransferedBytes; - lldebugs << this << "Setting context to " << context << llendl; + LL_DEBUGS() << this << "Setting context to " << context << LL_ENDL; return STATUS_ERROR; } } @@ -533,7 +533,7 @@ bool LLURLRequest::configure() break; default: - llwarns << "Unhandled URLRequest action: " << mAction << llendl; + LL_WARNS() << "Unhandled URLRequest action: " << mAction << LL_ENDL; break; } if(rv) @@ -661,7 +661,7 @@ static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) LLStringUtil::trim(header); if (!header.empty()) { - llwarns << "Unable to parse header: " << header << llendl; + LL_WARNS() << "Unable to parse header: " << header << LL_ENDL; } } @@ -739,15 +739,15 @@ void LLURLRequestComplete::complete(const LLChannelDescriptors& channels, void LLURLRequestComplete::response(const LLChannelDescriptors& channels, const buffer_ptr_t& buffer) { - llwarns << "LLURLRequestComplete::response default implementation called" - << llendl; + LL_WARNS() << "LLURLRequestComplete::response default implementation called" + << LL_ENDL; } //virtual void LLURLRequestComplete::noResponse() { - llwarns << "LLURLRequestComplete::noResponse default implementation called" - << llendl; + LL_WARNS() << "LLURLRequestComplete::noResponse default implementation called" + << LL_ENDL; } void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index a4a68d0c81..c506af19ce 100755 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -100,7 +100,7 @@ LLUserOperationMgr::~LLUserOperationMgr() { if (mUserOperationList.size() > 0) { - llwarns << "Exiting with user operations pending." << llendl; + LL_WARNS() << "Exiting with user operations pending." << LL_ENDL; } } @@ -109,7 +109,7 @@ void LLUserOperationMgr::addOperation(LLUserOperation* op) { if(!op) { - llwarns << "Tried to add null op" << llendl; + LL_WARNS() << "Tried to add null op" << LL_ENDL; return; } LLUUID id = op->getTransactionID(); @@ -160,7 +160,7 @@ void LLUserOperationMgr::deleteExpiredOperations() op = (*it).second; if(op && op->isExpired()) { - lldebugs << "expiring: " << (*it).first << llendl; + LL_DEBUGS() << "expiring: " << (*it).first << LL_ENDL; op->expire(); mUserOperationList.erase(it++); delete op; diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index f8c55d52ad..4aba5cae72 100755 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -99,7 +99,7 @@ void LLXfer::cleanup () S32 LLXfer::startSend (U64 xfer_id, const LLHost &remote_host) { - llwarns << "undifferentiated LLXfer::startSend for " << getFileName() << llendl; + LL_WARNS() << "undifferentiated LLXfer::startSend for " << getFileName() << LL_ENDL; return (-1); } @@ -115,8 +115,8 @@ void LLXfer::setXferSize (S32 xfer_size) S32 LLXfer::startDownload() { - llwarns << "undifferentiated LLXfer::startDownload for " << getFileName() - << llendl; + LL_WARNS() << "undifferentiated LLXfer::startDownload for " << getFileName() + << LL_ENDL; return (-1); } @@ -140,7 +140,7 @@ S32 LLXfer::receiveData (char *datap, S32 data_size) } else { - llerrs << "NULL data passed in receiveData" << llendl; + LL_ERRS() << "NULL data passed in receiveData" << LL_ENDL; } } @@ -163,7 +163,7 @@ S32 LLXfer::flush() S32 LLXfer::suck(S32 start_position) { - llwarns << "Attempted to send a packet outside the buffer bounds in LLXfer::suck()" << llendl; + LL_WARNS() << "Attempted to send a packet outside the buffer bounds in LLXfer::suck()" << LL_ENDL; return (-1); } @@ -196,7 +196,7 @@ void LLXfer::sendPacket(S32 packet_num) if (fdata_size < 0) { - llwarns << "negative data size in xfer send, aborting" << llendl; + LL_WARNS() << "negative data size in xfer send, aborting" << LL_ENDL; abort(LL_ERR_EOF); return; } @@ -289,13 +289,13 @@ S32 LLXfer::processEOF() if (LL_ERR_NOERR == mCallbackResult) { - llinfos << "xfer from " << mRemoteHost << " complete: " << getFileName() - << llendl; + LL_INFOS() << "xfer from " << mRemoteHost << " complete: " << getFileName() + << LL_ENDL; } else { - llinfos << "xfer from " << mRemoteHost << " failed, code " - << mCallbackResult << ": " << getFileName() << llendl; + LL_INFOS() << "xfer from " << mRemoteHost << " failed, code " + << mCallbackResult << ": " << getFileName() << LL_ENDL; } if (mCallback) @@ -323,8 +323,8 @@ void LLXfer::abort (S32 result_code) { mCallbackResult = result_code; - llinfos << "Aborting xfer from " << mRemoteHost << " named " << getFileName() - << " - error: " << result_code << llendl; + LL_INFOS() << "Aborting xfer from " << mRemoteHost << " named " << getFileName() + << " - error: " << result_code << LL_ENDL; gMessageSystem->newMessageFast(_PREHASH_AbortXfer); gMessageSystem->nextBlockFast(_PREHASH_XferID); diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index 9e02af2c3e..257a13f277 100755 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -102,12 +102,12 @@ void LLXfer_File::cleanup () if (mDeleteLocalOnCompletion) { - lldebugs << "Removing file: " << mLocalFilename << llendl; + LL_DEBUGS() << "Removing file: " << mLocalFilename << LL_ENDL; LLFile::remove(mLocalFilename); } else { - lldebugs << "Keeping local file: " << mLocalFilename << llendl; + LL_DEBUGS() << "Keeping local file: " << mLocalFilename << LL_ENDL; } LLXfer::cleanup(); @@ -139,7 +139,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id, mCallbackDataHandle = user_data; mCallbackResult = LL_ERR_NOERR; - llinfos << "Requesting xfer from " << remote_host << " for file: " << mLocalFilename << llendl; + LL_INFOS() << "Requesting xfer from " << remote_host << " for file: " << mLocalFilename << LL_ENDL; if (mBuffer) { @@ -182,7 +182,7 @@ S32 LLXfer_File::startDownload() } else { - llwarns << "Couldn't create file to be received!" << llendl; + LL_WARNS() << "Couldn't create file to be received!" << LL_ENDL; retval = -1; } @@ -223,7 +223,7 @@ S32 LLXfer_File::startSend (U64 xfer_id, const LLHost &remote_host) } else { - llinfos << "Warning: " << mLocalFilename << " not found." << llendl; + LL_INFOS() << "Warning: " << mLocalFilename << " not found." << LL_ENDL; return (LL_ERR_FILE_NOT_FOUND); } @@ -279,7 +279,7 @@ S32 LLXfer_File::flush() { if (mFp) { - llerrs << "Overwriting open file pointer!" << llendl; + LL_ERRS() << "Overwriting open file pointer!" << LL_ENDL; } mFp = LLFile::fopen(mTempFilename,"a+b"); /* Flawfinder : ignore */ @@ -287,10 +287,10 @@ S32 LLXfer_File::flush() { if (fwrite(mBuffer,1,mBufferLength,mFp) != mBufferLength) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } -// llinfos << "******* wrote " << mBufferLength << " bytes of file xfer" << llendl; +// LL_INFOS() << "******* wrote " << mBufferLength << " bytes of file xfer" << LL_ENDL; fclose(mFp); mFp = NULL; @@ -298,7 +298,7 @@ S32 LLXfer_File::flush() } else { - llwarns << "LLXfer_File::flush() unable to open " << mTempFilename << " for writing!" << llendl; + LL_WARNS() << "LLXfer_File::flush() unable to open " << mTempFilename << " for writing!" << LL_ENDL; retval = LL_ERR_CANNOT_OPEN_FILE; } } @@ -329,37 +329,37 @@ S32 LLXfer_File::processEOF() { #if !LL_WINDOWS S32 error_number = errno; - llinfos << "Rename failure (" << error_number << ") - " - << mTempFilename << " to " << mLocalFilename << llendl; + LL_INFOS() << "Rename failure (" << error_number << ") - " + << mTempFilename << " to " << mLocalFilename << LL_ENDL; if(EXDEV == error_number) { if(copy_file(mTempFilename, mLocalFilename) == 0) { - llinfos << "Rename across mounts; copying+unlinking the file instead." << llendl; + LL_INFOS() << "Rename across mounts; copying+unlinking the file instead." << LL_ENDL; unlink(mTempFilename.c_str()); } else { - llwarns << "Copy failure - " << mTempFilename << " to " - << mLocalFilename << llendl; + LL_WARNS() << "Copy failure - " << mTempFilename << " to " + << mLocalFilename << LL_ENDL; } } else { //LLFILE* fp = LLFile::fopen(mTempFilename, "r"); - //llwarns << "File " << mTempFilename << " does " - // << (!fp ? "not" : "" ) << " exit." << llendl; + //LL_WARNS() << "File " << mTempFilename << " does " + // << (!fp ? "not" : "" ) << " exit." << LL_ENDL; //if(fp) fclose(fp); //fp = LLFile::fopen(mLocalFilename, "r"); - //llwarns << "File " << mLocalFilename << " does " - // << (!fp ? "not" : "" ) << " exit." << llendl; + //LL_WARNS() << "File " << mLocalFilename << " does " + // << (!fp ? "not" : "" ) << " exit." << LL_ENDL; //if(fp) fclose(fp); - llwarns << "Rename fatally failed, can only handle EXDEV (" - << EXDEV << ")" << llendl; + LL_WARNS() << "Rename fatally failed, can only handle EXDEV (" + << EXDEV << ")" << LL_ENDL; } #else - llwarns << "Rename failure - " << mTempFilename << " to " - << mLocalFilename << llendl; + LL_WARNS() << "Rename failure - " << mTempFilename << " to " + << mLocalFilename << LL_ENDL; #endif } } diff --git a/indra/llmessage/llxfer_mem.cpp b/indra/llmessage/llxfer_mem.cpp index 4c7e83c33d..3bea08f2e5 100755 --- a/indra/llmessage/llxfer_mem.cpp +++ b/indra/llmessage/llxfer_mem.cpp @@ -130,7 +130,7 @@ S32 LLXfer_Mem::processEOF() mStatus = e_LL_XFER_COMPLETE; - llinfos << "xfer complete: " << getFileName() << llendl; + LL_INFOS() << "xfer complete: " << getFileName() << LL_ENDL; if (mCallback) { @@ -164,7 +164,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id, mRemotePath = remote_path; mDeleteRemoteOnCompletion = delete_remote_on_completion; - llinfos << "Requesting file: " << remote_filename << llendl; + LL_INFOS() << "Requesting file: " << remote_filename << LL_ENDL; delete [] mBuffer; mBuffer = NULL; diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index 751a69518c..4a378d1d34 100755 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp @@ -118,7 +118,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id, mName = llformat("VFile %s:%s", id_string.c_str(), LLAssetType::lookup(mType)); - llinfos << "Requesting " << mName << llendl; + LL_INFOS() << "Requesting " << mName << LL_ENDL; if (mBuffer) { @@ -236,8 +236,8 @@ S32 LLXfer_VFile::suck(S32 start_position) // grab a buffer from the right place in the file if (! mVFile->seek(start_position, 0)) { - llwarns << "VFile Xfer Can't seek to position " << start_position << ", file length " << mVFile->getSize() << llendl; - llwarns << "While sending file " << mLocalID << llendl; + LL_WARNS() << "VFile Xfer Can't seek to position " << start_position << ", file length " << mVFile->getSize() << LL_ENDL; + LL_WARNS() << "While sending file " << mLocalID << LL_ENDL; return -1; } @@ -291,7 +291,7 @@ S32 LLXfer_VFile::processEOF() LLVFile file(mVFS, mTempID, mType, LLVFile::WRITE); if (! file.rename(mLocalID, mType)) { - llinfos << "copy from temp file failed: unable to rename to " << mLocalID << llendl; + LL_INFOS() << "copy from temp file failed: unable to rename to " << mLocalID << LL_ENDL; } } diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index e74eb74763..b518dd1b72 100755 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -196,13 +196,13 @@ void LLXferManager::printHostStatus() LLHostStatus *host_statusp = NULL; if (!mOutgoingHosts.empty()) { - llinfos << "Outgoing Xfers:" << llendl; + LL_INFOS() << "Outgoing Xfers:" << LL_ENDL; for (status_list_t::iterator iter = mOutgoingHosts.begin(); iter != mOutgoingHosts.end(); ++iter) { host_statusp = *iter; - llinfos << " " << host_statusp->mHost << " active: " << host_statusp->mNumActive << " pending: " << host_statusp->mNumPending << llendl; + LL_INFOS() << " " << host_statusp->mHost << " active: " << host_statusp->mNumActive << " pending: " << host_statusp->mNumPending << LL_ENDL; } } } @@ -392,7 +392,7 @@ U64 LLXferManager::registerXfer(const void *datap, const S32 length) } else { - llerrs << "Xfer allocation error" << llendl; + LL_ERRS() << "Xfer allocation error" << LL_ENDL; xfer_id = 0; } @@ -455,7 +455,7 @@ void LLXferManager::requestFile(const std::string& local_filename, } else { - llerrs << "Xfer allocation error" << llendl; + LL_ERRS() << "Xfer allocation error" << LL_ENDL; } } @@ -483,7 +483,7 @@ void LLXferManager::requestFile(const std::string& remote_filename, } else { - llerrs << "Xfer allocation error" << llendl; + LL_ERRS() << "Xfer allocation error" << LL_ENDL; } } @@ -528,7 +528,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id, } else { - llerrs << "Xfer allocation error" << llendl; + LL_ERRS() << "Xfer allocation error" << LL_ENDL; } } @@ -570,7 +570,7 @@ void LLXferManager::requestXfer( } else { - llerrs << "Xfer allcoation error" << llendl; + LL_ERRS() << "Xfer allcoation error" << LL_ENDL; } } @@ -589,7 +589,7 @@ void LLXferManager::requestXfer(U64 xfer_id, const LLHost &remote_host, BOOL del } else { - llerrs << "Xfer allcoation error" << llendl; + LL_ERRS() << "Xfer allcoation error" << LL_ENDL; } } */ @@ -616,9 +616,9 @@ void LLXferManager::processReceiveData (LLMessageSystem *mesgsys, void ** /*user if (!xferp) { char U64_BUF[MAX_STRING]; /* Flawfinder : ignore */ - llwarns << "received xfer data from " << mesgsys->getSender() + LL_WARNS() << "received xfer data from " << mesgsys->getSender() << " for non-existent xfer id: " - << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) << llendl; + << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) << LL_ENDL; return; } @@ -629,11 +629,11 @@ void LLXferManager::processReceiveData (LLMessageSystem *mesgsys, void ** /*user // confirm it if it was a resend of the last one, since the confirmation might have gotten dropped if (decodePacketNum(packetnum) == (xferp->mPacketNum - 1)) { - llinfos << "Reconfirming xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet " << packetnum << llendl; sendConfirmPacket(mesgsys, id, decodePacketNum(packetnum), mesgsys->getSender()); + LL_INFOS() << "Reconfirming xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet " << packetnum << LL_ENDL; sendConfirmPacket(mesgsys, id, decodePacketNum(packetnum), mesgsys->getSender()); } else { - llinfos << "Ignoring xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " recv'd packet " << packetnum << "; expecting " << xferp->mPacketNum << llendl; + LL_INFOS() << "Ignoring xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " recv'd packet " << packetnum << "; expecting " << xferp->mPacketNum << LL_ENDL; } return; } @@ -802,8 +802,8 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user mesgsys->getU64Fast(_PREHASH_XferID, _PREHASH_ID, id); char U64_BUF[MAX_STRING]; /* Flawfinder : ignore */ - llinfos << "xfer request id: " << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) - << " to " << mesgsys->getSender() << llendl; + LL_INFOS() << "xfer request id: " << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) + << " to " << mesgsys->getSender() << LL_ENDL; mesgsys->getStringFast(_PREHASH_XferID, _PREHASH_Filename, local_filename); @@ -823,16 +823,16 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user { if(NULL == LLAssetType::lookup(type)) { - llwarns << "Invalid type for xfer request: " << uuid << ":" - << type_s16 << " to " << mesgsys->getSender() << llendl; + LL_WARNS() << "Invalid type for xfer request: " << uuid << ":" + << type_s16 << " to " << mesgsys->getSender() << LL_ENDL; return; } - llinfos << "starting vfile transfer: " << uuid << "," << LLAssetType::lookup(type) << " to " << mesgsys->getSender() << llendl; + LL_INFOS() << "starting vfile transfer: " << uuid << "," << LLAssetType::lookup(type) << " to " << mesgsys->getSender() << LL_ENDL; if (! mVFS) { - llwarns << "Attempt to send VFile w/o available VFS" << llendl; + LL_WARNS() << "Attempt to send VFile w/o available VFS" << LL_ENDL; return; } @@ -845,7 +845,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user } else { - llerrs << "Xfer allcoation error" << llendl; + LL_ERRS() << "Xfer allcoation error" << LL_ENDL; } } else if (!local_filename.empty()) @@ -868,7 +868,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user case LL_PATH_NONE: if(!validateFileForTransfer(local_filename)) { - llwarns << "SECURITY: Unapproved filename '" << local_filename << llendl; + LL_WARNS() << "SECURITY: Unapproved filename '" << local_filename << LL_ENDL; return; } break; @@ -876,13 +876,13 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user case LL_PATH_CACHE: if(!verify_cache_filename(local_filename)) { - llwarns << "SECURITY: Illegal cache filename '" << local_filename << llendl; + LL_WARNS() << "SECURITY: Illegal cache filename '" << local_filename << LL_ENDL; return; } break; default: - llwarns << "SECURITY: Restricted file dir enum: " << (U32)local_path << llendl; + LL_WARNS() << "SECURITY: Restricted file dir enum: " << (U32)local_path << LL_ENDL; return; } @@ -897,7 +897,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user { expanded_filename = local_filename; } - llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; + LL_INFOS() << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << LL_ENDL; BOOL delete_local_on_completion = FALSE; mesgsys->getBOOL("XferID", "DeleteOnCompletion", delete_local_on_completion); @@ -913,15 +913,15 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user } else { - llerrs << "Xfer allcoation error" << llendl; + LL_ERRS() << "Xfer allcoation error" << LL_ENDL; } } else { char U64_BUF[MAX_STRING]; /* Flawfinder : ignore */ - llinfos << "starting memory transfer: " + LL_INFOS() << "starting memory transfer: " << U64_to_str(id, U64_BUF, sizeof(U64_BUF)) << " to " - << mesgsys->getSender() << llendl; + << mesgsys->getSender() << LL_ENDL; xferp = findXfer(id, mSendList); @@ -931,7 +931,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user } else { - llinfos << "Warning: " << U64_BUF << " not found." << llendl; + LL_INFOS() << "Warning: " << U64_BUF << " not found." << LL_ENDL; result = LL_ERR_FILE_NOT_FOUND; } } @@ -945,7 +945,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user } else // can happen with a memory transfer not found { - llinfos << "Aborting xfer to " << mesgsys->getSender() << " with error: " << result << llendl; + LL_INFOS() << "Aborting xfer to " << mesgsys->getSender() << " with error: " << result << LL_ENDL; mesgsys->newMessageFast(_PREHASH_AbortXfer); mesgsys->nextBlockFast(_PREHASH_XferID); @@ -959,18 +959,18 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user { xferp->sendNextPacket(); changeNumActiveXfers(xferp->mRemoteHost,1); -// llinfos << "***STARTING XFER IMMEDIATELY***" << llendl; +// LL_INFOS() << "***STARTING XFER IMMEDIATELY***" << LL_ENDL; } else { if(xferp) { - llinfos << " queueing xfer request, " << numPendingXfers(xferp->mRemoteHost) << " ahead of this one" << llendl; + LL_INFOS() << " queueing xfer request, " << numPendingXfers(xferp->mRemoteHost) << " ahead of this one" << LL_ENDL; } else { - llwarns << "LLXferManager::processFileRequest() - no xfer found!" - << llendl; + LL_WARNS() << "LLXferManager::processFileRequest() - no xfer found!" + << LL_ENDL; } } } @@ -1016,7 +1016,7 @@ void LLXferManager::retransmitUnackedPackets () // if the circuit dies, abort if (! gMessageSystem->mCircuitInfo.isCircuitAlive( xferp->mRemoteHost )) { - llinfos << "Xfer found in progress on dead circuit, aborting" << llendl; + LL_INFOS() << "Xfer found in progress on dead circuit, aborting" << LL_ENDL; xferp->mCallbackResult = LL_ERR_CIRCUIT_GONE; xferp->processEOF(); delp = xferp; @@ -1038,7 +1038,7 @@ void LLXferManager::retransmitUnackedPackets () { if (xferp->mRetries > LL_PACKET_RETRY_LIMIT) { - llinfos << "dropping xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet retransmit limit exceeded, xfer dropped" << llendl; + LL_INFOS() << "dropping xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet retransmit limit exceeded, xfer dropped" << LL_ENDL; xferp->abort(LL_ERR_TCP_TIMEOUT); delp = xferp; xferp = xferp->mNext; @@ -1046,14 +1046,14 @@ void LLXferManager::retransmitUnackedPackets () } else { - llinfos << "resending xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet unconfirmed after: "<< et << " sec, packet " << xferp->mPacketNum << llendl; + LL_INFOS() << "resending xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << " packet unconfirmed after: "<< et << " sec, packet " << xferp->mPacketNum << LL_ENDL; xferp->resendLastPacket(); xferp = xferp->mNext; } } else if ((xferp->mStatus == e_LL_XFER_REGISTERED) && ( (et = xferp->ACKTimer.getElapsedTimeF32()) > LL_XFER_REGISTRATION_TIMEOUT)) { - llinfos << "registered xfer never requested, xfer dropped" << llendl; + LL_INFOS() << "registered xfer never requested, xfer dropped" << LL_ENDL; xferp->abort(LL_ERR_TCP_TIMEOUT); delp = xferp; xferp = xferp->mNext; @@ -1061,17 +1061,17 @@ void LLXferManager::retransmitUnackedPackets () } else if (xferp->mStatus == e_LL_XFER_ABORTED) { - llwarns << "Removing aborted xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << llendl; + LL_WARNS() << "Removing aborted xfer " << xferp->mRemoteHost << ":" << xferp->getFileName() << LL_ENDL; delp = xferp; xferp = xferp->mNext; removeXfer(delp,&mSendList); } else if (xferp->mStatus == e_LL_XFER_PENDING) { -// llinfos << "*** numActiveXfers = " << numActiveXfers(xferp->mRemoteHost) << " mMaxOutgoingXfersPerCircuit = " << mMaxOutgoingXfersPerCircuit << llendl; +// LL_INFOS() << "*** numActiveXfers = " << numActiveXfers(xferp->mRemoteHost) << " mMaxOutgoingXfersPerCircuit = " << mMaxOutgoingXfersPerCircuit << LL_ENDL; if (numActiveXfers(xferp->mRemoteHost) < mMaxOutgoingXfersPerCircuit) { -// llinfos << "bumping pending xfer to active" << llendl; +// LL_INFOS() << "bumping pending xfer to active" << LL_ENDL; xferp->sendNextPacket(); changeNumActiveXfers(xferp->mRemoteHost,1); } @@ -1094,10 +1094,10 @@ void LLXferManager::retransmitUnackedPackets () { break; } - //llinfos << "Confirm packet queue length:" << mXferAckQueue.size() << llendl; + //LL_INFOS() << "Confirm packet queue length:" << mXferAckQueue.size() << LL_ENDL; LLXferAckInfo ack_info = mXferAckQueue.front(); mXferAckQueue.pop_front(); - //llinfos << "Sending confirm packet" << llendl; + //LL_INFOS() << "Sending confirm packet" << LL_ENDL; sendConfirmPacket(gMessageSystem, ack_info.mID, ack_info.mPacketNum, ack_info.mRemoteHost); mAckThrottle.throttleOverflow(1000.f*8.f); // Assume 1000 bytes/packet } @@ -1156,9 +1156,9 @@ void LLXferManager::startPendingDownloads() S32 start_count = mMaxIncomingXfers - download_count; - lldebugs << "LLXferManager::startPendingDownloads() - XFER_IN_PROGRESS: " + LL_DEBUGS() << "LLXferManager::startPendingDownloads() - XFER_IN_PROGRESS: " << download_count << " XFER_PENDING: " << pending_count - << " startring " << llmin(start_count, pending_count) << llendl; + << " startring " << llmin(start_count, pending_count) << LL_ENDL; if((start_count > 0) && (pending_count > 0)) { diff --git a/indra/llmessage/machine.cpp b/indra/llmessage/machine.cpp index 8d2f512037..1e9c9c3c9a 100755 --- a/indra/llmessage/machine.cpp +++ b/indra/llmessage/machine.cpp @@ -33,7 +33,7 @@ void LLMachine::setMachinePort(S32 port) { if (port < 0) { - llinfos << "Can't assign a negative number to LLMachine::mPort" << llendl; + LL_INFOS() << "Can't assign a negative number to LLMachine::mPort" << LL_ENDL; mHost.setPort(0); } else @@ -46,7 +46,7 @@ void LLMachine::setControlPort( S32 port ) { if (port < 0) { - llinfos << "Can't assign a negative number to LLMachine::mControlPort" << llendl; + LL_INFOS() << "Can't assign a negative number to LLMachine::mControlPort" << LL_ENDL; mControlPort = 0; } else diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 4a4cc57e20..2b377670f1 100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -152,7 +152,7 @@ void LLMessageHandlerBridge::post(LLHTTPNode::ResponsePtr response, std::string name = context["request"]["wildcard"]["message-name"]; char* namePtr = LLMessageStringTable::getInstance()->getString(name.c_str()); - lldebugs << "Setting mLastSender " << input["sender"].asString() << LL_ENDL; + LL_DEBUGS() << "Setting mLastSender " << input["sender"].asString() << LL_ENDL; gMessageSystem->mLastSender = LLHost(input["sender"].asString()); gMessageSystem->mPacketsIn += 1; gMessageSystem->mLLSDMessageReader->setMessage(namePtr, input["body"]); @@ -891,7 +891,7 @@ LLSD LLMessageSystem::getBuiltMessageLLSD() const else { // TODO: implement as below? - llerrs << "Message not built as LLSD." << LL_ENDL; + LL_ERRS() << "Message not built as LLSD." << LL_ENDL; } return result; } @@ -1153,7 +1153,7 @@ LLHTTPClient::ResponderPtr LLMessageSystem::createResponder(const std::string& n } // This can be called from signal handlers, -// so should should not use llinfos. +// so should should not use LL_INFOS(). S32 LLMessageSystem::sendMessage(const LLHost &host) { if (! mMessageBuilder->isBuilt()) diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index 05e384d939..af0eb109e3 100755 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -656,8 +656,8 @@ public: S32 getSize(const char *blockname, S32 blocknum, const char *varname) const; void resetReceiveCounts(); // resets receive counts for all message types to 0 - void dumpReceiveCounts(); // dumps receive count for each message type to llinfos - void dumpCircuitInfo(); // Circuit information to llinfos + void dumpReceiveCounts(); // dumps receive count for each message type to LL_INFOS() + void dumpCircuitInfo(); // Circuit information to LL_INFOS() BOOL isClear() const; // returns mbSClear; S32 flush(const LLHost &host); @@ -887,7 +887,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_S16: if (n != 2) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 1) = *(ct); @@ -902,7 +902,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_F32: if (n != 4) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 3) = *(ct); @@ -919,7 +919,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_F64: if (n != 8) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN *(s + 7) = *(ct); @@ -939,7 +939,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLQuaternion: // We only send x, y, z and infer w (we set x, y, z to ensure that w >= 0) if (n != 12) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN htonmemcpy(s + 8, ct + 8, MVT_F32, 4); @@ -952,7 +952,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLVector3d: if (n != 24) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN htonmemcpy(s + 16, ct + 16, MVT_F64, 8); @@ -965,7 +965,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_LLVector4: if (n != 16) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN htonmemcpy(s + 12, ct + 12, MVT_F32, 4); @@ -979,7 +979,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_U16Vec3: if (n != 6) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN htonmemcpy(s + 4, ct + 4, MVT_U16, 2); @@ -992,7 +992,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_U16Quat: if (n != 8) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN htonmemcpy(s + 6, ct + 6, MVT_U16, 2); @@ -1006,7 +1006,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type, case MVT_S16Array: if (n % 2) { - llerrs << "Size argument passed to htonmemcpy doesn't match swizzle type size" << llendl; + LL_ERRS() << "Size argument passed to htonmemcpy doesn't match swizzle type size" << LL_ENDL; } #ifdef LL_BIG_ENDIAN length = n % 2; diff --git a/indra/llmessage/message_string_table.cpp b/indra/llmessage/message_string_table.cpp index dd063fcb83..e4f5fb3a38 100755 --- a/indra/llmessage/message_string_table.cpp +++ b/indra/llmessage/message_string_table.cpp @@ -80,10 +80,10 @@ char* LLMessageStringTable::getString(const char *str) if (mUsed >= MESSAGE_NUMBER_OF_HASH_BUCKETS - 1) { U32 i; - llinfos << "Dumping string table before crashing on HashTable full!" << llendl; + LL_INFOS() << "Dumping string table before crashing on HashTable full!" << LL_ENDL; for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) { - llinfos << "Entry #" << i << ": " << mString[i] << llendl; + LL_INFOS() << "Entry #" << i << ": " << mString[i] << LL_ENDL; } } return mString[hash_value]; diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 1c9508214c..523bcbb60d 100755 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -173,7 +173,7 @@ U32 ip_string_to_u32(const char* ip_string) if (ip == INADDR_NONE && strncmp(ip_string, BROADCAST_ADDRESS_STRING, MAXADDRSTR) != 0) { - llwarns << "ip_string_to_u32() failed, Error: Invalid IP string '" << ip_string << "'" << llendl; + LL_WARNS() << "ip_string_to_u32() failed, Error: Invalid IP string '" << ip_string << "'" << LL_ENDL; return INVALID_HOST_IP_ADDRESS; } return ip; @@ -332,7 +332,7 @@ S32 receive_packet(int hSocket, char * receiveBuffer) return 0; if (WSAECONNRESET == WSAGetLastError()) return 0; - llinfos << "receivePacket() failed, Error: " << WSAGetLastError() << llendl; + LL_INFOS() << "receivePacket() failed, Error: " << WSAGetLastError() << LL_ENDL; } return nRet; @@ -366,8 +366,8 @@ BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, i { return TRUE; } - llinfos << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort - << ", Error " << last_error << llendl; + LL_INFOS() << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort + << ", Error " << last_error << LL_ENDL; } } } while ( (nRet == SOCKET_ERROR) @@ -395,7 +395,7 @@ S32 start_net(S32& socket_out, int& nPort) hSocket = socket(AF_INET, SOCK_DGRAM, 0); if (hSocket < 0) { - llwarns << "socket() failed" << llendl; + LL_WARNS() << "socket() failed" << LL_ENDL; return 1; } @@ -406,21 +406,21 @@ S32 start_net(S32& socket_out, int& nPort) stLclAddr.sin_family = AF_INET; stLclAddr.sin_addr.s_addr = htonl(INADDR_ANY); stLclAddr.sin_port = htons(0); - llinfos << "attempting to connect on OS assigned port" << llendl; + LL_INFOS() << "attempting to connect on OS assigned port" << LL_ENDL; nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr)); if (nRet < 0) { - llwarns << "Failed to bind on an OS assigned port error: " - << nRet << llendl; + LL_WARNS() << "Failed to bind on an OS assigned port error: " + << nRet << LL_ENDL; } else { sockaddr_in socket_info; socklen_t len = sizeof(sockaddr_in); int err = getsockname(hSocket, (sockaddr*)&socket_info, &len); - llinfos << "Get socket returned: " << err << " length " << len << llendl; + LL_INFOS() << "Get socket returned: " << err << " length " << len << LL_ENDL; nPort = ntohs(socket_info.sin_port); - llinfos << "Assigned port: " << nPort << llendl; + LL_INFOS() << "Assigned port: " << nPort << LL_ENDL; } } @@ -431,7 +431,7 @@ S32 start_net(S32& socket_out, int& nPort) stLclAddr.sin_addr.s_addr = htonl(INADDR_ANY); stLclAddr.sin_port = htons(nPort); U32 attempt_port = nPort; - llinfos << "attempting to connect on port " << attempt_port << llendl; + LL_INFOS() << "attempting to connect on port " << attempt_port << LL_ENDL; nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr)); if (nRet < 0) @@ -445,7 +445,7 @@ S32 start_net(S32& socket_out, int& nPort) attempt_port++) { stLclAddr.sin_port = htons(attempt_port); - llinfos << "trying port " << attempt_port << llendl; + LL_INFOS() << "trying port " << attempt_port << LL_ENDL; nRet = bind(hSocket, (struct sockaddr*) &stLclAddr, sizeof(stLclAddr)); if (!((nRet < 0) && (errno == EADDRINUSE))) { @@ -454,7 +454,7 @@ S32 start_net(S32& socket_out, int& nPort) } if (nRet < 0) { - llwarns << "startNet() : Couldn't find available network port." << llendl; + LL_WARNS() << "startNet() : Couldn't find available network port." << LL_ENDL; // Fail gracefully in release. return 3; } @@ -462,12 +462,12 @@ S32 start_net(S32& socket_out, int& nPort) // Some other socket error else { - llwarns << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << llendl; + LL_WARNS() << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << LL_ENDL; // Fail gracefully in release. return 4; } } - llinfos << "connected on port " << attempt_port << llendl; + LL_INFOS() << "connected on port " << attempt_port << LL_ENDL; nPort = attempt_port; } // Set socket to be non-blocking @@ -476,18 +476,18 @@ S32 start_net(S32& socket_out, int& nPort) nRet = setsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, buff_size); if (nRet) { - llinfos << "Can't set receive size!" << llendl; + LL_INFOS() << "Can't set receive size!" << LL_ENDL; } nRet = setsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, buff_size); if (nRet) { - llinfos << "Can't set send size!" << llendl; + LL_INFOS() << "Can't set send size!" << LL_ENDL; } getsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, &buff_size); getsockopt(hSocket, SOL_SOCKET, SO_SNDBUF, (char *)&snd_size, &buff_size); - llinfos << "startNet - receive buffer size : " << rec_size << llendl; - llinfos << "startNet - send buffer size : " << snd_size << llendl; + LL_INFOS() << "startNet - receive buffer size : " << rec_size << LL_ENDL; + LL_INFOS() << "startNet - send buffer size : " << snd_size << LL_ENDL; #if LL_LINUX // Turn on recipient address tracking @@ -495,11 +495,11 @@ S32 start_net(S32& socket_out, int& nPort) int use_pktinfo = 1; if( setsockopt( hSocket, SOL_IP, IP_PKTINFO, &use_pktinfo, sizeof(use_pktinfo) ) == -1 ) { - llwarns << "No IP_PKTINFO available" << llendl; + LL_WARNS() << "No IP_PKTINFO available" << LL_ENDL; } else { - llinfos << "IP_PKKTINFO enabled" << llendl; + LL_INFOS() << "IP_PKKTINFO enabled" << LL_ENDL; } } #endif @@ -593,7 +593,7 @@ int receive_packet(int hSocket, char * receiveBuffer) } // Uncomment for testing if/when implementing for Mac or Windows: - // llinfos << "Received datagram to in addr " << u32_to_ip_string(get_receiving_interface_ip()) << llendl; + // LL_INFOS() << "Received datagram to in addr " << u32_to_ip_string(get_receiving_interface_ip()) << LL_ENDL; return nRet; } @@ -627,22 +627,22 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, if (errno == EAGAIN) { // say nothing, just repeat send - llinfos << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << llendl; - llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl; + LL_INFOS() << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << LL_ENDL; + LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; resend = TRUE; } else if (errno == ECONNREFUSED) { // response to ICMP connection refused message on earlier send - llinfos << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << llendl; - llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl; + LL_INFOS() << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << LL_ENDL; + LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; resend = TRUE; } else { // some other error - llinfos << "sendto() failed: " << errno << ", " << strerror(errno) << llendl; - llinfos << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << llendl; + LL_INFOS() << "sendto() failed: " << errno << ", " << strerror(errno) << LL_ENDL; + LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; resend = FALSE; } } @@ -651,7 +651,7 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, if (send_attempts >= 3) { - llinfos << "sendPacket() bailed out of send!" << llendl; + LL_INFOS() << "sendPacket() bailed out of send!" << LL_ENDL; return FALSE; } diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index b07a050617..d87de38aa5 100755 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -1272,7 +1272,7 @@ BOOL LLPartSysCompressedPacket::fromUnsignedBytes(U8 *in, U32 bytesUsed) } else { - llerrs << "NULL input data or number of bytes exceed mData size" << llendl; + LL_ERRS() << "NULL input data or number of bytes exceed mData size" << LL_ENDL; return FALSE; } } diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp index cdf5fdb3c6..32f8d80782 100755 --- a/indra/llmessage/patch_code.cpp +++ b/indra/llmessage/patch_code.cpp @@ -88,7 +88,7 @@ void code_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, S32 *patch) if ( (wbits > 17) ||(wbits < 2)) { - llerrs << "Bits needed per word in code_patch_header out of legal range. Adjust compression quatization." << llendl; + LL_ERRS() << "Bits needed per word in code_patch_header out of legal range. Adjust compression quatization." << LL_ENDL; } ph->quant_wbits |= (wbits - 2); @@ -135,7 +135,7 @@ void code_patch(LLBitPack &bitpack, S32 *patch, S32 postquant) if ( (postquant > patch_size*patch_size) ||(postquant < 0)) { - llerrs << "Bad postquant in code_patch!" << llendl; + LL_ERRS() << "Bad postquant in code_patch!" << LL_ENDL; } if (postquant) diff --git a/indra/llplugin/llplugincookiestore.cpp b/indra/llplugin/llplugincookiestore.cpp index 82017ab3fa..e1e16a2bb3 100755 --- a/indra/llplugin/llplugincookiestore.cpp +++ b/indra/llplugin/llplugincookiestore.cpp @@ -395,7 +395,7 @@ void LLPluginCookieStore::writeChangedCookies(std::ostream& s, bool clear_change { if(mHasChangedCookies) { - lldebugs << "returning changed cookies: " << llendl; + LL_DEBUGS() << "returning changed cookies: " << LL_ENDL; cookie_map_t::iterator iter; for(iter = mCookies.begin(); iter != mCookies.end(); ) { @@ -407,7 +407,7 @@ void LLPluginCookieStore::writeChangedCookies(std::ostream& s, bool clear_change { s << iter->second->getCookie() << "\n"; - lldebugs << " " << iter->second->getCookie() << llendl; + LL_DEBUGS() << " " << iter->second->getCookie() << LL_ENDL; // If requested, clear the changed mark if(clear_changed) diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp index 091e93ea4b..7e2bf90ad1 100755 --- a/indra/llplugin/llpluginmessagepipe.cpp +++ b/indra/llplugin/llpluginmessagepipe.cpp @@ -215,7 +215,7 @@ bool LLPluginMessagePipe::pumpOutput() else if(APR_STATUS_IS_EOF(status)) { // This is what we normally expect when a plugin exits. - llinfos << "Got EOF from plugin socket. " << llendl; + LL_INFOS() << "Got EOF from plugin socket. " << LL_ENDL; if(mOwner) { diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index a4da7674d5..ea0d2b81f1 100755 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -185,7 +185,7 @@ bool LLPluginProcessParent::accept() if(status == APR_SUCCESS) { -// llinfos << "SUCCESS" << llendl; +// LL_INFOS() << "SUCCESS" << LL_ENDL; // Success. Create a message pipe on the new socket // we MUST create a new pool for the LLSocket, since it will take ownership of it and delete it in its destructor! @@ -199,14 +199,14 @@ bool LLPluginProcessParent::accept() } else if(APR_STATUS_IS_EAGAIN(status)) { -// llinfos << "EAGAIN" << llendl; +// LL_INFOS() << "EAGAIN" << LL_ENDL; // No incoming connections. This is not an error. status = APR_SUCCESS; } else { -// llinfos << "Error:" << llendl; +// LL_INFOS() << "Error:" << LL_ENDL; ll_apr_warn_status(status); // Some other error. diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index cf4c645cfd..7f3c8da434 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -69,7 +69,7 @@ template T getMaterialField(const LLSD& data, const std::string& fie { return (T)data[field]; } - llerrs << "Missing or mistyped field '" << field << "' in material definition" << llendl; + LL_ERRS() << "Missing or mistyped field '" << field << "' in material definition" << LL_ENDL; return (T)LLSD(); } @@ -80,7 +80,7 @@ template<> LLUUID getMaterialField(const LLSD& data, const std::string& field, c { return data[field].asUUID(); } - llerrs << "Missing or mistyped field '" << field << "' in material definition" << llendl; + LL_ERRS() << "Missing or mistyped field '" << field << "' in material definition" << LL_ENDL; return LLUUID::null; } diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp index 4709e769c1..37c718b4c6 100755 --- a/indra/llprimitive/llmaterialtable.cpp +++ b/indra/llprimitive/llmaterialtable.cpp @@ -547,14 +547,14 @@ LLUUID LLMaterialTable::getCollisionSoundUUID(U8 mcode, U8 mcode2) mcode &= LL_MCODE_MASK; mcode2 &= LL_MCODE_MASK; - //llinfos << "code 1: " << ((U32) mcode) << " code 2:" << ((U32) mcode2) << llendl; + //LL_INFOS() << "code 1: " << ((U32) mcode) << " code 2:" << ((U32) mcode2) << LL_ENDL; if (mCollisionSoundMatrix && (mcode < LL_MCODE_END) && (mcode2 < LL_MCODE_END)) { return(mCollisionSoundMatrix[mcode * LL_MCODE_END + mcode2]); } else { - //llinfos << "Null Sound" << llendl; + //LL_INFOS() << "Null Sound" << LL_ENDL; return(SND_NULL); } } diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 28ed051c55..e48613b8ca 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -233,7 +233,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa verts.push_back(cv); if (verts.size() >= 65535) { - //llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl; + //LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL; return LLModel::VERTEX_NUMBER_OVERFLOW ; } U16 index = (U16) (verts.size()-1); @@ -437,7 +437,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector& fac verts.push_back(cv); if (verts.size() >= 65535) { - //llerrs << "Attempted to write model exceeding 16-bit index buffer limitation." << llendl; + //LL_ERRS() << "Attempted to write model exceeding 16-bit index buffer limitation." << LL_ENDL; return LLModel::VERTEX_NUMBER_OVERFLOW ; } U16 index = (U16) (verts.size()-1); @@ -737,12 +737,12 @@ std::string LLModel::getStatusString(U32 status) { if(status_strings[status] == std::string()) { - llerrs << "No valid status string for this status: " << (U32)status << llendl ; + LL_ERRS() << "No valid status string for this status: " << (U32)status << LL_ENDL ; } return status_strings[status] ; } - llerrs << "Invalid model status: " << (U32)status << llendl ; + LL_ERRS() << "Invalid model status: " << (U32)status << LL_ENDL ; return std::string() ; } @@ -818,7 +818,7 @@ BOOL LLModel::createVolumeFacesFromDomMesh(domMesh* mesh) } else { - llwarns << "no mesh found" << llendl; + LL_WARNS() << "no mesh found" << LL_ENDL; } return FALSE; @@ -1077,14 +1077,14 @@ void LLModel::addFace(const LLVolumeFace& face) { if (face.mNumVertices == 0) { - llerrs << "Cannot add empty face." << llendl; + LL_ERRS() << "Cannot add empty face." << LL_ENDL; } mVolumeFaces.push_back(face); if (mVolumeFaces.size() > MAX_MODEL_FACES) { - llerrs << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << llendl; + LL_ERRS() << "Model prims cannot have more than " << MAX_MODEL_FACES << " faces!" << LL_ENDL; } } @@ -1106,7 +1106,7 @@ void LLModel::generateNormals(F32 angle_cutoff) if (vol_face.mNumIndices > 65535) { - llwarns << "Too many vertices for normal generation to work." << llendl; + LL_WARNS() << "Too many vertices for normal generation to work." << LL_ENDL; continue; } @@ -1706,7 +1706,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) { if ((iter->first - pos).magVec() > 0.1f) { - llerrs << "Couldn't find weight list." << llendl; + LL_ERRS() << "Couldn't find weight list." << LL_ENDL; } return iter->second; @@ -1811,7 +1811,7 @@ bool LLModel::loadModel(std::istream& is) { if (!LLSDSerialize::fromBinary(header, is, 1024*1024*1024)) { - llwarns << "Mesh header parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL; return false; } } @@ -1841,7 +1841,7 @@ bool LLModel::loadModel(std::istream& is) if (header[nm[lod]]["offset"].asInteger() == -1 || header[nm[lod]]["size"].asInteger() == 0 ) { //cannot load requested LOD - llwarns << "LoD data is invalid!" << llendl; + LL_WARNS() << "LoD data is invalid!" << LL_ENDL; return false; } @@ -1904,7 +1904,7 @@ bool LLModel::loadModel(std::istream& is) } else { - llwarns << "unpackVolumeFaces failed!" << llendl; + LL_WARNS() << "unpackVolumeFaces failed!" << LL_ENDL; } return false; @@ -1922,7 +1922,7 @@ bool LLModel::isMaterialListSubset( LLModel* ref ) for (U32 dst = 0; dst < refCnt; ++dst) { - //llinfos<mMaterialList[dst]<mMaterialList[dst]<mMaterialList[dst]; if ( foundRef ) @@ -1967,7 +1967,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn bool isASubset = isMaterialListSubset( ref ); if ( !isASubset ) { - llinfos<<"Material of model is not a subset of reference."< p.size()) { - llerrs << "Index out of bounds" << llendl; + LL_ERRS() << "Index out of bounds" << LL_ENDL; } } } @@ -2438,7 +2438,7 @@ void LLModel::Decomposition::merge(const LLModel::Decomposition* rhs) if (mMeshID != rhs->mMeshID) { - llerrs << "Attempted to merge with decomposition of some other mesh." << llendl; + LL_ERRS() << "Attempted to merge with decomposition of some other mesh." << LL_ENDL; } if (mBaseHull.empty()) diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 1b4c68481f..a505ea04a7 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -126,7 +126,7 @@ void LLPrimitive::setVolumeManager( LLVolumeMgr* volume_manager ) { if ( !volume_manager || sVolumeManager ) { - llerrs << "LLPrimitive::sVolumeManager attempting to be set to NULL or it already has been set." << llendl; + LL_ERRS() << "LLPrimitive::sVolumeManager attempting to be set to NULL or it already has been set." << LL_ENDL; } sVolumeManager = volume_manager; } @@ -197,7 +197,7 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) } else { - llerrs << "primitive allocation failed" << llendl; + LL_ERRS() << "primitive allocation failed" << LL_ENDL; } return retval; @@ -483,7 +483,7 @@ LLPCode LLPrimitive::legacyToPCode(const U8 legacy) pcode = LL_PCODE_TREE_NEW; break; default: - llwarns << "Unknown legacy code " << legacy << " [" << (S32)legacy << "]!" << llendl; + LL_WARNS() << "Unknown legacy code " << legacy << " [" << (S32)legacy << "]!" << LL_ENDL; } return pcode; @@ -578,7 +578,7 @@ U8 LLPrimitive::pCodeToLegacy(const LLPCode pcode) legacy = TREE_NEW; break; default: - llwarns << "Unknown pcode " << (S32)pcode << ":" << pcode << "!" << llendl; + LL_WARNS() << "Unknown pcode " << (S32)pcode << ":" << pcode << "!" << LL_ENDL; return 0; } return legacy; @@ -586,7 +586,7 @@ U8 LLPrimitive::pCodeToLegacy(const LLPCode pcode) // static -// Don't crash or llerrs here! This function is used for debug strings. +// Don't crash or LL_ERRS() here! This function is used for debug strings. std::string LLPrimitive::pCodeToString(const LLPCode pcode) { std::string pcode_string; @@ -665,7 +665,7 @@ std::string LLPrimitive::pCodeToString(const LLPCode pcode) } else { - llwarns << "Unknown base mask for pcode: " << base_code << llendl; + LL_WARNS() << "Unknown base mask for pcode: " << base_code << LL_ENDL; } U8 mask_code = pcode & (~LL_PCODE_BASE_MASK); @@ -701,7 +701,7 @@ void LLPrimitive::copyTEs(const LLPrimitive *primitivep) U32 i; if (primitivep->getExpectedNumTEs() != getExpectedNumTEs()) { - llwarns << "Primitives don't have same expected number of TE's" << llendl; + LL_WARNS() << "Primitives don't have same expected number of TE's" << LL_ENDL; } U32 num_tes = llmin(primitivep->getExpectedNumTEs(), getExpectedNumTEs()); if (mTextureList.size() < getExpectedNumTEs()) @@ -803,7 +803,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai { S32 te_index = face_index_from_id(cur_mask, old_faces); old_tes.copyTexture(face_bit, *(getTE(te_index))); - //llinfos << face_bit << ":" << te_index << ":" << old_tes[face_bit].getID() << llendl; + //LL_INFOS() << face_bit << ":" << te_index << ":" << old_tes[face_bit].getID() << LL_ENDL; } } @@ -823,7 +823,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai if (mVolumep->getNumFaces() == 0 && new_face_mask != 0) { - llwarns << "Object with 0 faces found...INCORRECT!" << llendl; + LL_WARNS() << "Object with 0 faces found...INCORRECT!" << LL_ENDL; setNumTEs(mVolumep->getNumFaces()); return TRUE; } @@ -881,7 +881,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai } if (i == 4) { - llwarns << "No path end or outer face in volume!" << llendl; + LL_WARNS() << "No path end or outer face in volume!" << LL_ENDL; } continue; } @@ -917,7 +917,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai } if (i == 4) { - llwarns << "No path end or outer face in volume!" << llendl; + LL_WARNS() << "No path end or outer face in volume!" << LL_ENDL; } continue; } @@ -943,8 +943,8 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai } if (-1 == min_outer_bit) { - llinfos << (LLVolume *)mVolumep << llendl; - llwarns << "Bad! No outer faces, impossible!" << llendl; + LL_INFOS() << (LLVolume *)mVolumep << LL_ENDL; + LL_WARNS() << "Bad! No outer faces, impossible!" << LL_ENDL; } face_mapping[face_bit] = min_outer_bit; } @@ -963,7 +963,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai { if (-1 == face_mapping[face_bit]) { - llwarns << "No mapping from old face to new face!" << llendl; + LL_WARNS() << "No mapping from old face to new face!" << LL_ENDL; } S32 te_num = face_index_from_id(cur_mask, mVolumep->getProfile().mFaces); @@ -1421,7 +1421,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) if (!dp.unpackBinaryData(packed_buffer, size, "TextureEntry")) { retval = TEM_INVALID; - llwarns << "Bad texture entry block! Abort!" << llendl; + LL_WARNS() << "Bad texture entry block! Abort!" << LL_ENDL; return retval; } diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index 537e7a6695..dfae9699ec 100755 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -130,7 +130,7 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te) if (S32(index) >= mEntryList.size()) { S32 current_size = mEntryList.size(); - llwarns << "ignore copy of index = " << S32(index) << " into texture entry list of size = " << current_size << llendl; + LL_WARNS() << "ignore copy of index = " << S32(index) << " into texture entry list of size = " << current_size << LL_ENDL; return TEM_CHANGE_NONE; } diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp index 185a3f69c0..031a315d62 100755 --- a/indra/llprimitive/lltextureanim.cpp +++ b/indra/llprimitive/lltextureanim.cpp @@ -125,7 +125,7 @@ void LLTextureAnim::unpackTAMessage(LLMessageSystem *mesgsys, const S32 block_nu { if (size) { - llwarns << "Bad size " << size << " for TA block, ignoring." << llendl; + LL_WARNS() << "Bad size " << size << " for TA block, ignoring." << LL_ENDL; } mMode = 0; return; @@ -160,7 +160,7 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp) { if (size) { - llwarns << "Bad size " << size << " for TA block, ignoring." << llendl; + LL_WARNS() << "Bad size " << size << " for TA block, ignoring." << LL_ENDL; } mMode = 0; return; diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 597f078490..56e79f16bc 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -271,8 +271,8 @@ bool LLTextureEntry::fromLLSD(const LLSD& sd) w = TEXTURE_MEDIA_DATA_KEY; if (hasMedia() != sd.has(w)) { - llwarns << "LLTextureEntry::fromLLSD: media_flags (" << hasMedia() << - ") does not match presence of media_data (" << sd.has(w) << "). Fixing." << llendl; + LL_WARNS() << "LLTextureEntry::fromLLSD: media_flags (" << hasMedia() << + ") does not match presence of media_data (" << sd.has(w) << "). Fixing." << LL_ENDL; } updateMediaData(sd[w]); diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp index 842d848217..19a6db20ae 100755 --- a/indra/llprimitive/lltreeparams.cpp +++ b/indra/llprimitive/lltreeparams.cpp @@ -40,7 +40,7 @@ LLTreeParams::LLTreeParams() { -// llinfos << "TREE PARAMS INITIALIZED" << llendl; +// LL_INFOS() << "TREE PARAMS INITIALIZED" << LL_ENDL; // init to basic something or other... mShape = SR_TEND_FLAME; mLevels = 1; diff --git a/indra/llprimitive/llvolumemessage.cpp b/indra/llprimitive/llvolumemessage.cpp index 58b23bebd2..a2c2666146 100755 --- a/indra/llprimitive/llvolumemessage.cpp +++ b/indra/llprimitive/llvolumemessage.cpp @@ -109,8 +109,8 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * CUT_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile begin out of range: " << temp_f32 - << ". Clamping to 0.0." << llendl; + LL_WARNS() << "Profile begin out of range: " << temp_f32 + << ". Clamping to 0.0." << LL_ENDL; temp_f32 = 0.f; ok = false; } @@ -120,8 +120,8 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * CUT_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile end out of range: " << 1.f - temp_f32 - << ". Clamping to 1.0." << llendl; + LL_WARNS() << "Profile end out of range: " << 1.f - temp_f32 + << ". Clamping to 1.0." << LL_ENDL; temp_f32 = 1.f; ok = false; } @@ -131,19 +131,19 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * HOLLOW_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile hollow out of range: " << temp_f32 - << ". Clamping to 0.0." << llendl; + LL_WARNS() << "Profile hollow out of range: " << temp_f32 + << ". Clamping to 0.0." << LL_ENDL; temp_f32 = 0.f; ok = false; } params->setHollow(temp_f32); /* - llinfos << "Unpacking Profile Block " << block_num << llendl; - llinfos << "Curve: " << (U32)getCurve() << llendl; - llinfos << "Begin: " << getBegin() << llendl; - llinfos << "End: " << getEnd() << llendl; - llinfos << "Hollow: " << getHollow() << llendl; + LL_INFOS() << "Unpacking Profile Block " << block_num << LL_ENDL; + LL_INFOS() << "Curve: " << (U32)getCurve() << LL_ENDL; + LL_INFOS() << "Begin: " << getBegin() << LL_ENDL; + LL_INFOS() << "End: " << getEnd() << LL_ENDL; + LL_INFOS() << "Hollow: " << getHollow() << LL_ENDL; */ return ok; @@ -165,8 +165,8 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * CUT_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile begin out of range: " << temp_f32 << llendl; - llwarns << "Clamping to 0.0" << llendl; + LL_WARNS() << "Profile begin out of range: " << temp_f32 << LL_ENDL; + LL_WARNS() << "Clamping to 0.0" << LL_ENDL; temp_f32 = 0.f; ok = false; } @@ -176,8 +176,8 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * CUT_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile end out of range: " << 1.f - temp_f32 << llendl; - llwarns << "Clamping to 1.0" << llendl; + LL_WARNS() << "Profile end out of range: " << 1.f - temp_f32 << LL_ENDL; + LL_WARNS() << "Clamping to 1.0" << LL_ENDL; temp_f32 = 1.f; ok = false; } @@ -187,8 +187,8 @@ bool LLVolumeMessage::unpackProfileParams( temp_f32 = temp_u16 * HOLLOW_QUANTA; if (temp_f32 > 1.f) { - llwarns << "Profile hollow out of range: " << temp_f32 << llendl; - llwarns << "Clamping to 0.0" << llendl; + LL_WARNS() << "Profile hollow out of range: " << temp_f32 << LL_ENDL; + LL_WARNS() << "Clamping to 0.0" << LL_ENDL; temp_f32 = 0.f; ok = false; } @@ -379,12 +379,12 @@ bool LLVolumeMessage::unpackPathParams( params->setSkew((F32)(skew * SCALE_QUANTA)); /* - llinfos << "Unpacking Path Block " << block_num << llendl; - llinfos << "Curve: " << (U32)params->getCurve() << llendl; - llinfos << "Begin: " << params->getBegin() << llendl; - llinfos << "End: " << params->getEnd() << llendl; - llinfos << "Scale: " << params->getScale() << llendl; - llinfos << "Twist: " << params->getTwist() << llendl; + LL_INFOS() << "Unpacking Path Block " << block_num << LL_ENDL; + LL_INFOS() << "Curve: " << (U32)params->getCurve() << LL_ENDL; + LL_INFOS() << "Begin: " << params->getBegin() << LL_ENDL; + LL_INFOS() << "End: " << params->getEnd() << LL_ENDL; + LL_INFOS() << "Scale: " << params->getScale() << LL_ENDL; + LL_INFOS() << "Twist: " << params->getTwist() << LL_ENDL; */ return true; @@ -480,16 +480,16 @@ bool LLVolumeMessage::constrainVolumeParams(LLVolumeParams& params) bad |= params.setSkew(params.getPathParams().getSkew()) ? 0 : 0x800; if(bad) { - llwarns << "LLVolumeMessage::constrainVolumeParams() - " + LL_WARNS() << "LLVolumeMessage::constrainVolumeParams() - " << "forced to constrain incoming volume params: " - << llformat("0x%04x",bad) << llendl; + << llformat("0x%04x",bad) << LL_ENDL; } return bad ? false : true; } bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLMessageSystem *mesgsys) { - // llinfos << "pack volume" << llendl; + // LL_INFOS() << "pack volume" << LL_ENDL; if (params) { packPathParams(¶ms->getPathParams(), mesgsys); @@ -505,7 +505,7 @@ bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLMessageSy bool LLVolumeMessage::packVolumeParams(const LLVolumeParams* params, LLDataPacker &dp) { - // llinfos << "pack volume" << llendl; + // LL_INFOS() << "pack volume" << LL_ENDL; if (params) { packPathParams(¶ms->getPathParams(), dp); diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 362452d837..77b4019b7c 100755 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -100,7 +100,7 @@ void LLCubeMap::initGL() } else { - llwarns << "Using cube map without extension!" << llendl; + LL_WARNS() << "Using cube map without extension!" << LL_ENDL; } } diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 058bef43a5..4cc5b78b63 100755 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -75,7 +75,7 @@ LLFontManager::LLFontManager() if (error) { // Clean up freetype libs. - llerrs << "Freetype initialization failure!" << llendl; + LL_ERRS() << "Freetype initialization failure!" << LL_ENDL; FT_Done_FreeType(gFTLibrary); } } @@ -189,7 +189,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v if (!mFTFace->charmap) { - //llinfos << " no unicode encoding, set whatever encoding there is..." << llendl; + //LL_INFOS() << " no unicode encoding, set whatever encoding there is..." << LL_ENDL; FT_Set_Charmap(mFTFace, mFTFace->charmaps[0]); } @@ -321,7 +321,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const return FALSE; llassert(!mIsFallback); - //lldebugs << "Adding new glyph for " << wch << " to font" << llendl; + //LL_DEBUGS() << "Adding new glyph for " << wch << " to font" << LL_ENDL; FT_UInt glyph_index; @@ -329,7 +329,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const glyph_index = FT_Get_Char_Index(mFTFace, wch); if (glyph_index == 0) { - //llinfos << "Trying to add glyph from fallback font!" << llendl; + //LL_INFOS() << "Trying to add glyph from fallback font!" << LL_ENDL; font_vector_t::const_iterator iter; for(iter = mFallbackFonts.begin(); iter != mFallbackFonts.end(); iter++) { @@ -501,7 +501,7 @@ void LLFontFreetype::reset(F32 vert_dpi, F32 horz_dpi) // This is the head of the list - need to rebuild ourself and all fallbacks. if (mFallbackFonts.empty()) { - llwarns << "LLFontGL::reset(), no fallback fonts present" << llendl; + LL_WARNS() << "LLFontGL::reset(), no fallback fonts present" << LL_ENDL; } else { diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index a646a0d35a..ce5757a6ae 100755 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -276,7 +276,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons } if (!fgi) { - llerrs << "Missing Glyph Info" << llendl; + LL_ERRS() << "Missing Glyph Info" << LL_ENDL; break; } // Per-glyph bitmap texture. @@ -1070,7 +1070,7 @@ std::string LLFontGL::getFontPathSystem() system_root = getenv("SystemRoot"); /* Flawfinder: ignore */ if (!system_root) { - llwarns << "SystemRoot not found, attempting to load fonts from default path." << llendl; + LL_WARNS() << "SystemRoot not found, attempting to load fonts from default path." << LL_ENDL; } #endif @@ -1115,12 +1115,12 @@ std::string LLFontGL::getFontPathLocal() LLFontGL::LLFontGL(const LLFontGL &source) { - llerrs << "Not implemented!" << llendl; + LL_ERRS() << "Not implemented!" << LL_ENDL; } LLFontGL &LLFontGL::operator=(const LLFontGL &source) { - llerrs << "Not implemented" << llendl; + LL_ERRS() << "Not implemented" << LL_ENDL; return *this; } diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 77aa3fcd2c..d003687415 100755 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -200,7 +200,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) if ( root.isNull() || ! root->hasName( "fonts" ) ) { - llwarns << "Bad font info file: " << *path_it << llendl; + LL_WARNS() << "Bad font info file: " << *path_it << LL_ENDL; continue; } @@ -353,10 +353,10 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) bool found_size = nameToSize(norm_desc.getSize(),point_size); if (!found_size) { - llwarns << "createFont unrecognized size " << norm_desc.getSize() << llendl; + LL_WARNS() << "createFont unrecognized size " << norm_desc.getSize() << LL_ENDL; return NULL; } - llinfos << "createFont " << norm_desc.getName() << " size " << norm_desc.getSize() << " style " << ((S32) norm_desc.getStyle()) << llendl; + LL_INFOS() << "createFont " << norm_desc.getName() << " size " << norm_desc.getSize() << " style " << ((S32) norm_desc.getStyle()) << LL_ENDL; F32 fallback_scale = 1.0; // Find corresponding font template (based on same descriptor with no size specified) @@ -365,8 +365,8 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) const LLFontDescriptor *match_desc = getClosestFontTemplate(template_desc); if (!match_desc) { - llwarns << "createFont failed, no template found for " - << norm_desc.getName() << " style [" << ((S32)norm_desc.getStyle()) << "]" << llendl; + LL_WARNS() << "createFont failed, no template found for " + << norm_desc.getName() << " style [" << ((S32)norm_desc.getStyle()) << "]" << LL_ENDL; return NULL; } @@ -379,7 +379,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // This may not be the best solution, but it at least prevents a crash. if (it != mFontMap.end() && it->second != NULL) { - llinfos << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << llendl; + LL_INFOS() << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << LL_ENDL; // copying underlying Freetype font, and storing in LLFontGL with requested font descriptor LLFontGL *font = new LLFontGL; @@ -412,7 +412,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // Load fonts based on names. if (file_names.empty()) { - llwarns << "createFont failed, no file names specified" << llendl; + LL_WARNS() << "createFont failed, no file names specified" << LL_ENDL; return NULL; } @@ -480,7 +480,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) } else { - llwarns << "createFont failed in some way" << llendl; + LL_WARNS() << "createFont failed in some way" << LL_ENDL; } mFontMap[desc] = result; @@ -533,9 +533,9 @@ LLFontGL *LLFontRegistry::getFont(const LLFontDescriptor& desc) LLFontGL *fontp = createFont(desc); if (!fontp) { - llwarns << "getFont failed, name " << desc.getName() + LL_WARNS() << "getFont failed, name " << desc.getName() <<" style=[" << ((S32) desc.getStyle()) << "]" - << " size=[" << desc.getSize() << "]" << llendl; + << " size=[" << desc.getSize() << "]" << LL_ENDL; } return fontp; } @@ -638,28 +638,28 @@ const LLFontDescriptor *LLFontRegistry::getClosestFontTemplate(const LLFontDescr void LLFontRegistry::dump() { - llinfos << "LLFontRegistry dump: " << llendl; + LL_INFOS() << "LLFontRegistry dump: " << LL_ENDL; for (font_size_map_t::iterator size_it = mFontSizes.begin(); size_it != mFontSizes.end(); ++size_it) { - llinfos << "Size: " << size_it->first << " => " << size_it->second << llendl; + LL_INFOS() << "Size: " << size_it->first << " => " << size_it->second << LL_ENDL; } for (font_reg_map_t::iterator font_it = mFontMap.begin(); font_it != mFontMap.end(); ++font_it) { const LLFontDescriptor& desc = font_it->first; - llinfos << "Font: name=" << desc.getName() + LL_INFOS() << "Font: name=" << desc.getName() << " style=[" << ((S32)desc.getStyle()) << "]" << " size=[" << desc.getSize() << "]" << " fileNames=" - << llendl; + << LL_ENDL; for (string_vec_t::const_iterator file_it=desc.getFileNames().begin(); file_it != desc.getFileNames().end(); ++file_it) { - llinfos << " file: " << *file_it <dumpStats(); } - llinfos << "-----------------------------------" << llendl; - llinfos << "Total rendering time: " << llformat("%.4f ms", sTotalTimeElapsed/1000000.f) << llendl; - llinfos << "Total samples drawn: " << llformat("%.4f million", sTotalSamplesDrawn/1000000.f) << llendl; - llinfos << "Total triangles drawn: " << llformat("%.3f million", sTotalTrianglesDrawn/1000000.f) << llendl; + LL_INFOS() << "-----------------------------------" << LL_ENDL; + LL_INFOS() << "Total rendering time: " << llformat("%.4f ms", sTotalTimeElapsed/1000000.f) << LL_ENDL; + LL_INFOS() << "Total samples drawn: " << llformat("%.4f million", sTotalSamplesDrawn/1000000.f) << LL_ENDL; + LL_INFOS() << "Total triangles drawn: " << llformat("%.3f million", sTotalTrianglesDrawn/1000000.f) << LL_ENDL; } void LLGLSLShader::clearStats() @@ -158,11 +158,11 @@ void LLGLSLShader::dumpStats() { if (mDrawCalls > 0) { - llinfos << "=============================================" << llendl; - llinfos << mName << llendl; + LL_INFOS() << "=============================================" << LL_ENDL; + LL_INFOS() << mName << LL_ENDL; for (U32 i = 0; i < mShaderFiles.size(); ++i) { - llinfos << mShaderFiles[i].first << llendl; + LL_INFOS() << mShaderFiles[i].first << LL_ENDL; } for (U32 i = 0; i < mTexture.size(); ++i) { @@ -171,10 +171,10 @@ void LLGLSLShader::dumpStats() if (idx >= 0) { GLint uniform_idx = getUniformLocation(i); - llinfos << mUniformNameMap[uniform_idx] << " - " << std::hex << mTextureMagFilter[i] << "/" << mTextureMinFilter[i] << std::dec << llendl; + LL_INFOS() << mUniformNameMap[uniform_idx] << " - " << std::hex << mTextureMagFilter[i] << "/" << mTextureMinFilter[i] << std::dec << LL_ENDL; } } - llinfos << "=============================================" << llendl; + LL_INFOS() << "=============================================" << LL_ENDL; F32 ms = mTimeElapsed/1000000.f; F32 seconds = ms/1000.f; @@ -190,10 +190,10 @@ void LLGLSLShader::dumpStats() F32 pct_calls = (F32) mDrawCalls/(F32)sTotalDrawCalls*100.f; U32 avg_batch = mTrianglesDrawn/mDrawCalls; - llinfos << "Triangles Drawn: " << mTrianglesDrawn << " " << llformat("(%.2f pct of total, %.3f million/sec)", pct_tris, tris_sec ) << llendl; - llinfos << "Draw Calls: " << mDrawCalls << " " << llformat("(%.2f pct of total, avg %d tris/call)", pct_calls, avg_batch) << llendl; - llinfos << "SamplesDrawn: " << mSamplesDrawn << " " << llformat("(%.2f pct of total, %.3f billion/sec)", pct_samples, samples_sec) << llendl; - llinfos << "Time Elapsed: " << mTimeElapsed << " " << llformat("(%.2f pct of total, %.5f ms)\n", (F32) ((F64)mTimeElapsed/(F64)sTotalTimeElapsed)*100.f, ms) << llendl; + LL_INFOS() << "Triangles Drawn: " << mTrianglesDrawn << " " << llformat("(%.2f pct of total, %.3f million/sec)", pct_tris, tris_sec ) << LL_ENDL; + LL_INFOS() << "Draw Calls: " << mDrawCalls << " " << llformat("(%.2f pct of total, avg %d tris/call)", pct_calls, avg_batch) << LL_ENDL; + LL_INFOS() << "SamplesDrawn: " << mSamplesDrawn << " " << llformat("(%.2f pct of total, %.3f billion/sec)", pct_samples, samples_sec) << LL_ENDL; + LL_INFOS() << "Time Elapsed: " << mTimeElapsed << " " << llformat("(%.2f pct of total, %.5f ms)\n", (F32) ((F64)mTimeElapsed/(F64)sTotalTimeElapsed)*100.f, ms) << LL_ENDL; } } @@ -703,7 +703,7 @@ BOOL LLGLSLShader::mapUniforms(const vector * uniforms) unbind(); - LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << llendl; + LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL; return res; } @@ -849,7 +849,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode) } else { - llerrs << "Texture channel " << index << " texture type corrupted." << llendl; + LL_ERRS() << "Texture channel " << index << " texture type corrupted." << LL_ENDL; } } gGL.getTexUnit(index)->disable(); @@ -1149,7 +1149,7 @@ GLint LLGLSLShader::getUniformLocation(const string& uniform) stop_glerror(); if (iter->second != glGetUniformLocationARB(mProgramObject, uniform.c_str())) { - llerrs << "Uniform does not match." << llendl; + LL_ERRS() << "Uniform does not match." << LL_ENDL; } stop_glerror(); } diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index e69b322d60..6b85f81aee 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -101,7 +101,7 @@ public: LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps) ; LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ; - virtual void dump(); // debug info to llinfos + virtual void dump(); // debug info to LL_INFOS() virtual const LLUUID& getID() const = 0; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 1d4be1f53c..1d1beafff8 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -117,7 +117,7 @@ void LLImageGL::checkTexSize(bool forced) const BOOL error = FALSE; if (texname != mTexName) { - llinfos << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << llendl; + LL_INFOS() << "Bound: " << texname << " Should bind: " << mTexName << " Default: " << LLImageGL::sDefaultGLTexture->getTexName() << LL_ENDL; error = TRUE; if (gDebugSession) @@ -126,7 +126,7 @@ void LLImageGL::checkTexSize(bool forced) const } else { - llerrs << "Invalid texture bound!" << llendl; + LL_ERRS() << "Invalid texture bound!" << LL_ENDL; } } stop_glerror() ; @@ -150,8 +150,8 @@ void LLImageGL::checkTexSize(bool forced) const } else { - llerrs << "wrong texture size and discard level: width: " << - mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << llendl ; + LL_ERRS() << "wrong texture size and discard level: width: " << + mWidth << " Height: " << mHeight << " Current Level: " << (S32)mCurrentDiscardLevel << LL_ENDL ; } } @@ -200,7 +200,7 @@ S32 LLImageGL::dataFormatBits(S32 dataformat) case GL_RGBA: return 32; case GL_BGRA: return 32; // Used for QuickTime media textures on the Mac default: - llerrs << "LLImageGL::Unknown format: " << dataformat << llendl; + LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; return 0; } } @@ -235,7 +235,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) case GL_RGBA: return 4; case GL_BGRA: return 4; // Used for QuickTime media textures on the Mac default: - llerrs << "LLImageGL::Unknown format: " << dataformat << llendl; + LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; return 0; } } @@ -301,7 +301,7 @@ void LLImageGL::restoreGL() LLImageGL* glimage = *iter; if(glimage->getTexName()) { - llerrs << "tex name is not 0." << llendl ; + LL_ERRS() << "tex name is not 0." << LL_ENDL ; } if (glimage->mSaveData.notNull()) { @@ -490,12 +490,12 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve // Check if dimensions are a power of two! if (!checkSize(width,height)) { - llerrs << llformat("Texture has non power of two dimension: %dx%d",width,height) << llendl; + LL_ERRS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL; } if (mTexName) { -// llwarns << "Setting Size of LLImageGL with existing mTexName = " << mTexName << llendl; +// LL_WARNS() << "Setting Size of LLImageGL with existing mTexName = " << mTexName << LL_ENDL; destroyGLTexture(); } @@ -534,7 +534,7 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve // virtual void LLImageGL::dump() { - llinfos << "mMaxDiscardLevel " << S32(mMaxDiscardLevel) + LL_INFOS() << "mMaxDiscardLevel " << S32(mMaxDiscardLevel) << " mLastBindTime " << mLastBindTime << " mTarget " << S32(mTarget) << " mBindTarget " << S32(mBindTarget) @@ -549,12 +549,12 @@ void LLImageGL::dump() #if DEBUG_MISS << " mMissed " << mMissed #endif - << llendl; + << LL_ENDL; - llinfos << " mTextureMemory " << mTextureMemory + LL_INFOS() << " mTextureMemory " << mTextureMemory << " mTexNames " << mTexName << " mIsResident " << S32(mIsResident) - << llendl; + << LL_ENDL; } //---------------------------------------------------------------------------- @@ -836,7 +836,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) } else { - llerrs << "Compressed Image has mipmaps but data does not (can not auto generate compressed mips)" << llendl; + LL_ERRS() << "Compressed Image has mipmaps but data does not (can not auto generate compressed mips)" << LL_ENDL; } } else @@ -885,7 +885,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) if (gGLManager.mIsDisabled) { - llwarns << "Trying to create a texture while GL is disabled!" << llendl; + LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL; return FALSE; } llassert(gGLManager.mInited); @@ -931,7 +931,7 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) mFormatType = GL_UNSIGNED_BYTE; break; default: - llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl; + LL_ERRS() << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL; } } @@ -975,13 +975,13 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 if (mTexName == 0) { // *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18 - //llwarns << "Setting subimage on image without GL texture" << llendl; + //LL_WARNS() << "Setting subimage on image without GL texture" << LL_ENDL; return FALSE; } if (datap == NULL) { // *TODO: Re-enable warning? Ran into thread locking issues? DK 2011-02-18 - //llwarns << "Setting subimage on image with NULL datap" << llendl; + //LL_WARNS() << "Setting subimage on image with NULL datap" << LL_ENDL; return FALSE; } @@ -995,7 +995,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 if (mUseMipMaps) { dump(); - llerrs << "setSubImage called with mipmapped image (not supported)" << llendl; + LL_ERRS() << "setSubImage called with mipmapped image (not supported)" << LL_ENDL; } llassert_always(mCurrentDiscardLevel == 0); llassert_always(x_pos >= 0 && y_pos >= 0); @@ -1004,28 +1004,28 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 (y_pos + height) > getHeight()) { dump(); - llerrs << "Subimage not wholly in target image!" + LL_ERRS() << "Subimage not wholly in target image!" << " x_pos " << x_pos << " y_pos " << y_pos << " width " << width << " height " << height << " getWidth() " << getWidth() << " getHeight() " << getHeight() - << llendl; + << LL_ENDL; } if ((x_pos + width) > data_width || (y_pos + height) > data_height) { dump(); - llerrs << "Subimage not wholly in source image!" + LL_ERRS() << "Subimage not wholly in source image!" << " x_pos " << x_pos << " y_pos " << y_pos << " width " << width << " height " << height << " source_width " << data_width << " source_height " << data_height - << llendl; + << LL_ENDL; } @@ -1041,7 +1041,7 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 datap += (y_pos * data_width + x_pos) * getComponents(); // Update the GL texture BOOL res = gGL.getTexUnit(0)->bindManual(mBindTarget, mTexName); - if (!res) llerrs << "LLImageGL::setSubImage(): bindTexture failed" << llendl; + if (!res) LL_ERRS() << "LLImageGL::setSubImage(): bindTexture failed" << LL_ENDL; stop_glerror(); glTexSubImage2D(mTarget, 0, x_pos, y_pos, @@ -1257,7 +1257,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt intformat = GL_COMPRESSED_ALPHA; break; default: - llwarns << "Could not compress format: " << std::hex << intformat << llendl; + LL_WARNS() << "Could not compress format: " << std::hex << intformat << LL_ENDL; break; } } @@ -1280,7 +1280,7 @@ BOOL LLImageGL::createGLTexture() LLFastTimer t(FTM_CREATE_GL_TEXTURE1); if (gGLManager.mIsDisabled) { - llwarns << "Trying to create a texture while GL is disabled!" << llendl; + LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL; return FALSE; } @@ -1299,7 +1299,7 @@ BOOL LLImageGL::createGLTexture() stop_glerror(); if (!mTexName) { - llerrs << "LLImageGL::createGLTexture failed to make an empty texture" << llendl; + LL_ERRS() << "LLImageGL::createGLTexture failed to make an empty texture" << LL_ENDL; } return TRUE ; @@ -1311,7 +1311,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S LLFastTimer t(FTM_CREATE_GL_TEXTURE2); if (gGLManager.mIsDisabled) { - llwarns << "Trying to create a texture while GL is disabled!" << llendl; + LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL; return FALSE; } @@ -1361,7 +1361,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S mFormatType = GL_UNSIGNED_BYTE; break; default: - llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl; + LL_ERRS() << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL; } calcAlphaChannelOffsetAndStride() ; @@ -1423,7 +1423,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ } if (!mTexName) { - llerrs << "LLImageGL::createGLTexture failed to make texture" << llendl; + LL_ERRS() << "LLImageGL::createGLTexture failed to make texture" << LL_ENDL; } if (mUseMipMaps) @@ -1472,7 +1472,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const { llassert_always(sAllowReadBackRaw) ; - //llerrs << "should not call this function!" << llendl ; + //LL_ERRS() << "should not call this function!" << LL_ENDL ; if (discard_level < 0) { @@ -1510,15 +1510,15 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre } if(width < glwidth) { - llwarns << "texture size is smaller than it should be." << llendl ; - llwarns << "width: " << width << " glwidth: " << glwidth << " mWidth: " << mWidth << - " mCurrentDiscardLevel: " << (S32)mCurrentDiscardLevel << " discard_level: " << (S32)discard_level << llendl ; + LL_WARNS() << "texture size is smaller than it should be." << LL_ENDL ; + LL_WARNS() << "width: " << width << " glwidth: " << glwidth << " mWidth: " << mWidth << + " mCurrentDiscardLevel: " << (S32)mCurrentDiscardLevel << " discard_level: " << (S32)discard_level << LL_ENDL ; return FALSE ; } if (width <= 0 || width > 2048 || height <= 0 || height > 2048 || ncomponents < 1 || ncomponents > 4) { - llerrs << llformat("LLImageGL::readBackRaw: bogus params: %d x %d x %d",width,height,ncomponents) << llendl; + LL_ERRS() << llformat("LLImageGL::readBackRaw: bogus params: %d x %d x %d",width,height,ncomponents) << LL_ENDL; } LLGLint is_compressed = 0; @@ -1531,7 +1531,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre GLenum error ; while((error = glGetError()) != GL_NO_ERROR) { - llwarns << "GL Error happens before reading back texture. Error code: " << error << llendl ; + LL_WARNS() << "GL Error happens before reading back texture. Error code: " << error << LL_ENDL ; } //----------------------------------------------------------------------------------------------- @@ -1541,8 +1541,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, (GLint*)&glbytes); if(!imageraw->allocateDataSize(width, height, ncomponents, glbytes)) { - llwarns << "Memory allocation failed for reading back texture. Size is: " << glbytes << llendl ; - llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ; + LL_WARNS() << "Memory allocation failed for reading back texture. Size is: " << glbytes << LL_ENDL ; + LL_WARNS() << "width: " << width << "height: " << height << "components: " << ncomponents << LL_ENDL ; return FALSE ; } @@ -1553,8 +1553,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre { if(!imageraw->allocateDataSize(width, height, ncomponents)) { - llwarns << "Memory allocation failed for reading back texture." << llendl ; - llwarns << "width: " << width << "height: " << height << "components: " << ncomponents << llendl ; + LL_WARNS() << "Memory allocation failed for reading back texture." << LL_ENDL ; + LL_WARNS() << "width: " << width << "height: " << height << "components: " << ncomponents << LL_ENDL ; return FALSE ; } @@ -1565,12 +1565,12 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre //----------------------------------------------------------------------------------------------- if((error = glGetError()) != GL_NO_ERROR) { - llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ; + LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ; imageraw->deleteData() ; while((error = glGetError()) != GL_NO_ERROR) { - llwarns << "GL Error happens after reading back texture. Error code: " << error << llendl ; + LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ; } return FALSE ; @@ -1854,7 +1854,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() mAlphaOffset < 0 || //unsupported type (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation { - llwarns << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << llendl; + LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL; mNeedsAlphaAndPickMask = FALSE ; mIsMask = FALSE; diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 227ccc90bd..c38b8d3cfa 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -99,7 +99,7 @@ protected: void calcAlphaChannelOffsetAndStride(); public: - virtual void dump(); // debugging info to llinfos + virtual void dump(); // debugging info to LL_INFOS() void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1); void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;} diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index e4279ea1e0..84caa045cc 100755 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -145,7 +145,7 @@ void LLPostProcess::saveEffect(std::string const & effectName) mAllEffects[effectName] = tweaks; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); - //llinfos << "Saving PostProcess Effects settings to " << pathName << llendl; + //LL_INFOS() << "Saving PostProcess Effects settings to " << pathName << LL_ENDL; llofstream effectsXML(pathName); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 918f5585a8..c104a93773 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -232,7 +232,7 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) LLImageGL* gl_tex = NULL ; if (texture == NULL || !(gl_tex = texture->getGLTexture())) { - llwarns << "NULL LLTexUnit::bind texture" << llendl; + LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL; return false; } @@ -280,7 +280,7 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind) if(!texture) { - llwarns << "NULL LLTexUnit::bind texture" << llendl; + LL_WARNS() << "NULL LLTexUnit::bind texture" << LL_ENDL; return false; } @@ -330,7 +330,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap) if (cubeMap == NULL) { - llwarns << "NULL LLTexUnit::bind cubemap" << llendl; + LL_WARNS() << "NULL LLTexUnit::bind cubemap" << LL_ENDL; return false; } @@ -354,7 +354,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap) } else { - llwarns << "Using cube map without extension!" << llendl; + LL_WARNS() << "Using cube map without extension!" << LL_ENDL; return false; } } @@ -372,7 +372,7 @@ bool LLTexUnit::bind(LLRenderTarget* renderTarget, bool bindDepth) { if (renderTarget->hasStencil()) { - llerrs << "Cannot bind a render buffer for sampling. Allocate render target without a stencil buffer if sampling of depth buffer is required." << llendl; + LL_ERRS() << "Cannot bind a render buffer for sampling. Allocate render target without a stencil buffer if sampling of depth buffer is required." << LL_ENDL; } bindManual(renderTarget->getUsage(), renderTarget->getDepth()); @@ -498,7 +498,7 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio { glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gGL.mMaxAnisotropy); - llinfos << "gGL.mMaxAnisotropy: " << gGL.mMaxAnisotropy << llendl ; + LL_INFOS() << "gGL.mMaxAnisotropy: " << gGL.mMaxAnisotropy << LL_ENDL ; gGL.mMaxAnisotropy = llmax(1.f, gGL.mMaxAnisotropy) ; } glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY_EXT, gGL.mMaxAnisotropy); @@ -552,7 +552,7 @@ void LLTexUnit::setTextureBlendType(eTextureBlendType type) glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); break; default: - llerrs << "Unknown Texture Blend Type: " << type << llendl; + LL_ERRS() << "Unknown Texture Blend Type: " << type << LL_ENDL; break; } setColorScale(scale_amount); @@ -592,7 +592,7 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) return GL_CONSTANT_ARB; default: - llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << llendl; + LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << LL_ENDL; return GL_PRIMARY_COLOR_ARB; } } @@ -630,7 +630,7 @@ GLint LLTexUnit::getTextureSourceType(eTextureBlendSrc src, bool isAlpha) return GL_ONE_MINUS_SRC_ALPHA; default: - llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Source Color or Alpha instead." << llendl; + LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Source Color or Alpha instead." << LL_ENDL; return (isAlpha) ? GL_SRC_ALPHA: GL_SRC_COLOR; } } @@ -771,7 +771,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT break; default: - llwarns << "Unknown eTextureBlendOp: " << op << ". Setting op to replace." << llendl; + LL_WARNS() << "Unknown eTextureBlendOp: " << op << ". Setting op to replace." << LL_ENDL; // Slightly special syntax (no second sources), just set all and return. glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_REPLACE); glTexEnvi(GL_TEXTURE_ENV, src0_enum, source1); @@ -819,7 +819,7 @@ void LLTexUnit::debugTextureUnit(void) if ((GL_TEXTURE0_ARB + mIndex) != activeTexture) { U32 set_unit = (activeTexture - GL_TEXTURE0_ARB); - llwarns << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << llendl; + LL_WARNS() << "Incorrect Texture Unit! Expected: " << set_unit << " Actual: " << mIndex << LL_ENDL; } } @@ -1388,7 +1388,7 @@ void LLRender::pushMatrix() } else { - llwarns << "Matrix stack overflow." << llendl; + LL_WARNS() << "Matrix stack overflow." << LL_ENDL; } } } @@ -1404,7 +1404,7 @@ void LLRender::popMatrix() } else { - llwarns << "Matrix stack underflow." << llendl; + LL_WARNS() << "Matrix stack underflow." << LL_ENDL; } } } @@ -1477,7 +1477,7 @@ void LLRender::translateUI(F32 x, F32 y, F32 z) { if (mUIOffset.empty()) { - llerrs << "Need to push a UI translation frame before offsetting" << llendl; + LL_ERRS() << "Need to push a UI translation frame before offsetting" << LL_ENDL; } mUIOffset.back().mV[0] += x; @@ -1489,7 +1489,7 @@ void LLRender::scaleUI(F32 x, F32 y, F32 z) { if (mUIScale.empty()) { - llerrs << "Need to push a UI transformation frame before scaling." << llendl; + LL_ERRS() << "Need to push a UI transformation frame before scaling." << LL_ENDL; } mUIScale.back().scaleVec(LLVector3(x,y,z)); @@ -1520,7 +1520,7 @@ void LLRender::popUIMatrix() { if (mUIOffset.empty()) { - llerrs << "UI offset stack blown." << llendl; + LL_ERRS() << "UI offset stack blown." << LL_ENDL; } mUIOffset.pop_back(); mUIScale.pop_back(); @@ -1549,7 +1549,7 @@ void LLRender::loadUIIdentity() { if (mUIOffset.empty()) { - llerrs << "Need to push UI translation frame before clearing offset." << llendl; + LL_ERRS() << "Need to push UI translation frame before clearing offset." << LL_ENDL; } mUIOffset.back().setVec(0,0,0); mUIScale.back().setVec(1,1,1); @@ -1607,7 +1607,7 @@ void LLRender::setSceneBlendType(eBlendType type) blendFunc(BF_ONE, BF_ZERO); break; default: - llerrs << "Unknown Scene Blend Type: " << type << llendl; + LL_ERRS() << "Unknown Scene Blend Type: " << type << LL_ENDL; break; } } @@ -1648,7 +1648,7 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) if (cur_func != sGLCompareFunc[func]) { - llerrs << "Alpha test function corrupted!" << llendl; + LL_ERRS() << "Alpha test function corrupted!" << LL_ENDL; } F32 ref = 0.f; @@ -1656,7 +1656,7 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) if (ref != value) { - llerrs << "Alpha test value corrupted!" << llendl; + LL_ERRS() << "Alpha test value corrupted!" << LL_ENDL; } } } @@ -1686,7 +1686,7 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor, llassert(alpha_dfactor < BF_UNDEF); if (!gGLManager.mHasBlendFuncSeparate) { - LL_WARNS_ONCE("render") << "no glBlendFuncSeparateEXT(), using color-only blend func" << llendl; + LL_WARNS_ONCE("render") << "no glBlendFuncSeparateEXT(), using color-only blend func" << LL_ENDL; blendFunc(color_sfactor, color_dfactor); return; } @@ -1711,7 +1711,7 @@ LLTexUnit* LLRender::getTexUnit(U32 index) } else { - lldebugs << "Non-existing texture unit layer requested: " << index << llendl; + LL_DEBUGS() << "Non-existing texture unit layer requested: " << index << LL_ENDL; return mDummyTexUnit; } } @@ -1747,7 +1747,7 @@ bool LLRender::verifyTexUnitActive(U32 unitToVerify) } else { - llwarns << "TexUnit currently active: " << mCurrTextureUnitIndex << " (expecting " << unitToVerify << ")" << llendl; + LL_WARNS() << "TexUnit currently active: " << mCurrTextureUnitIndex << " (expecting " << unitToVerify << ")" << LL_ENDL; return false; } } @@ -1778,7 +1778,7 @@ void LLRender::begin(const GLuint& mode) } else if (mCount != 0) { - llerrs << "gGL.begin() called redundantly." << llendl; + LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL; } mMode = mode; @@ -1790,7 +1790,7 @@ void LLRender::end() if (mCount == 0) { return; - //IMM_ERRS << "GL begin and end called with no vertices specified." << llendl; + //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL; } if ((mMode != LLRender::QUADS && @@ -1809,22 +1809,22 @@ void LLRender::flush() #if 0 if (!glIsEnabled(GL_VERTEX_ARRAY)) { - llerrs << "foo 1" << llendl; + LL_ERRS() << "foo 1" << LL_ENDL; } if (!glIsEnabled(GL_COLOR_ARRAY)) { - llerrs << "foo 2" << llendl; + LL_ERRS() << "foo 2" << LL_ENDL; } if (!glIsEnabled(GL_TEXTURE_COORD_ARRAY)) { - llerrs << "foo 3" << llendl; + LL_ERRS() << "foo 3" << LL_ENDL; } if (glIsEnabled(GL_NORMAL_ARRAY)) { - llerrs << "foo 7" << llendl; + LL_ERRS() << "foo 7" << LL_ENDL; } GLvoid* pointer; @@ -1832,19 +1832,19 @@ void LLRender::flush() glGetPointerv(GL_VERTEX_ARRAY_POINTER, &pointer); if (pointer != &(mBuffer[0].v)) { - llerrs << "foo 4" << llendl; + LL_ERRS() << "foo 4" << LL_ENDL; } glGetPointerv(GL_COLOR_ARRAY_POINTER, &pointer); if (pointer != &(mBuffer[0].c)) { - llerrs << "foo 5" << llendl; + LL_ERRS() << "foo 5" << LL_ENDL; } glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &pointer); if (pointer != &(mBuffer[0].uv)) { - llerrs << "foo 6" << llendl; + LL_ERRS() << "foo 6" << LL_ENDL; } #endif @@ -1860,7 +1860,7 @@ void LLRender::flush() { if (mCount%4 != 0) { - llerrs << "Incomplete quad rendered." << llendl; + LL_ERRS() << "Incomplete quad rendered." << LL_ENDL; } } @@ -1868,7 +1868,7 @@ void LLRender::flush() { if (mCount%3 != 0) { - llerrs << "Incomplete triangle rendered." << llendl; + LL_ERRS() << "Incomplete triangle rendered." << LL_ENDL; } } @@ -1876,7 +1876,7 @@ void LLRender::flush() { if (mCount%2 != 0) { - llerrs << "Incomplete line rendered." << llendl; + LL_ERRS() << "Incomplete line rendered." << LL_ENDL; } } } @@ -1929,7 +1929,7 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) if (mCount > 4094) { - // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; + // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL; return; } @@ -1972,7 +1972,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count) { if (mCount + vert_count > 4094) { - // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; + // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL; return; } @@ -2029,7 +2029,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v { if (mCount + vert_count > 4094) { - // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; + // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL; return; } @@ -2087,7 +2087,7 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol { if (mCount + vert_count > 4094) { - // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; + // LL_WARNS() << "GL immediate mode overflow. Some geometry not drawn." << LL_ENDL; return; } diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index fe34c218a8..3ac2d0b809 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -348,7 +348,7 @@ void gl_draw_image( S32 x, S32 y, LLTexture* image, const LLColor4& color, const { if (NULL == image) { - llwarns << "image == NULL; aborting function" << llendl; + LL_WARNS() << "image == NULL; aborting function" << LL_ENDL; return; } gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color, uv_rect ); @@ -363,7 +363,7 @@ void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, { if (NULL == image) { - llwarns << "image == NULL; aborting function" << llendl; + LL_WARNS() << "image == NULL; aborting function" << LL_ENDL; return; } gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect ); @@ -373,7 +373,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border { if (NULL == image) { - llwarns << "image == NULL; aborting function" << llendl; + LL_WARNS() << "image == NULL; aborting function" << LL_ENDL; return; } @@ -391,7 +391,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex if (NULL == image) { - llwarns << "image == NULL; aborting function" << llendl; + LL_WARNS() << "image == NULL; aborting function" << LL_ENDL; return; } @@ -649,7 +649,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre { if (!image && !target) { - llwarns << "image == NULL; aborting function" << llendl; + LL_WARNS() << "image == NULL; aborting function" << LL_ENDL; return; } diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 6e22712b94..a4d77b00d6 100755 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -43,7 +43,7 @@ void check_framebuffer_status() case GL_FRAMEBUFFER_COMPLETE: break; default: - llwarns << "check_framebuffer_status failed -- " << std::hex << status << llendl; + LL_WARNS() << "check_framebuffer_status failed -- " << std::hex << status << LL_ENDL; ll_fail("check_framebuffer_status failed"); break; } @@ -137,7 +137,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo { if (!allocateDepth()) { - llwarns << "Failed to allocate depth buffer for render target." << llendl; + LL_WARNS() << "Failed to allocate depth buffer for render target." << LL_ENDL; return false; } } @@ -179,13 +179,13 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) if( offset >= 4 ) { - llwarns << "Too many color attachments" << llendl; + LL_WARNS() << "Too many color attachments" << LL_ENDL; llassert( offset < 4 ); return false; } if( offset > 0 && (mFBO == 0 || !gGLManager.mHasDrawBuffers) ) { - llwarns << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << llendl; + LL_WARNS() << "FBO not used or no drawbuffers available; mFBO=" << (U32)mFBO << " gGLManager.mHasDrawBuffers=" << (U32)gGLManager.mHasDrawBuffers << LL_ENDL; llassert( mFBO != 0 ); llassert( gGLManager.mHasDrawBuffers ); return false; @@ -203,7 +203,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false); if (glGetError() != GL_NO_ERROR) { - llwarns << "Could not allocate color buffer for render target." << llendl; + LL_WARNS() << "Could not allocate color buffer for render target." << LL_ENDL; return false; } } @@ -289,7 +289,7 @@ bool LLRenderTarget::allocateDepth() if (glGetError() != GL_NO_ERROR) { - llwarns << "Unable to allocate depth buffer for render target." << llendl; + LL_WARNS() << "Unable to allocate depth buffer for render target." << LL_ENDL; return false; } @@ -300,17 +300,17 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target) { if (!mFBO || !target.mFBO) { - llerrs << "Cannot share depth buffer between non FBO render targets." << llendl; + LL_ERRS() << "Cannot share depth buffer between non FBO render targets." << LL_ENDL; } if (target.mDepth) { - llerrs << "Attempting to override existing depth buffer. Detach existing buffer first." << llendl; + LL_ERRS() << "Attempting to override existing depth buffer. Detach existing buffer first." << LL_ENDL; } if (target.mUseDepth) { - llerrs << "Attempting to override existing shared depth buffer. Detach existing buffer first." << llendl; + LL_ERRS() << "Attempting to override existing shared depth buffer. Detach existing buffer first." << LL_ENDL; } if (mDepth) @@ -461,7 +461,7 @@ U32 LLRenderTarget::getTexture(U32 attachment) const { if (attachment > mTex.size()-1) { - llerrs << "Invalid attachment index." << llendl; + LL_ERRS() << "Invalid attachment index." << LL_ENDL; } if (mTex.empty()) { @@ -529,7 +529,7 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, gGL.flush(); if (!source.mFBO || !mFBO) { - llwarns << "Cannot copy framebuffer contents for non FBO render targets." << llendl; + LL_WARNS() << "Cannot copy framebuffer contents for non FBO render targets." << LL_ENDL; return; } @@ -572,7 +572,7 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0 { if (!source.mFBO) { - llerrs << "Cannot copy framebuffer contents for non FBO render targets." << llendl; + LL_ERRS() << "Cannot copy framebuffer contents for non FBO render targets." << LL_ENDL; } { GLboolean write_depth = mask & GL_DEPTH_BUFFER_BIT ? TRUE : FALSE; diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index fea4ee2819..e7e5327e16 100755 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -584,7 +584,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade { //should NEVER get here -- if major version is 1 and minor version is less than 10, // viewer should never attempt to use shaders, continuing will result in undefined behavior - llerrs << "Unsupported GLSL Version." << llendl; + LL_ERRS() << "Unsupported GLSL Version." << LL_ENDL; } if (minor_version <= 19) @@ -751,7 +751,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade else { //should never get here. Indexed texture rendering requires GLSL 1.30 or later // (for passing integers between vertex and fragment shaders) - llerrs << "Indexed texture rendering requires GLSL 1.30 or later." << llendl; + LL_ERRS() << "Indexed texture rendering requires GLSL 1.30 or later." << LL_ENDL; } } else @@ -824,13 +824,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade if (i % 128 == 0) { //dump every 128 lines - LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl; + LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL; ostr = std::stringstream(); } } - LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl; + LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL; #else std::string str; @@ -839,7 +839,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade if (i % 128 == 0) { - LL_WARNS("ShaderLoading") << str << llendl; + LL_WARNS("ShaderLoading") << str << LL_ENDL; str = ""; } } @@ -1150,7 +1150,7 @@ void LLShaderMgr::initAttribsAndUniforms() { if (dupe_check.find(mReservedUniforms[i]) != dupe_check.end()) { - llerrs << "Duplicate reserved uniform name found: " << mReservedUniforms[i] << llendl; + LL_ERRS() << "Duplicate reserved uniform name found: " << mReservedUniforms[i] << LL_ENDL; } dupe_check.insert(mReservedUniforms[i]); } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 22ea96ee19..ed2ed081e9 100755 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -491,7 +491,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } else { - llerrs << "Bad client state! " << array[i] << " disabled." << llendl; + LL_ERRS() << "Bad client state! " << array[i] << " disabled." << LL_ENDL; } } } @@ -510,7 +510,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } else { - llerrs << "Bad client state! " << array[i] << " enabled." << llendl; + LL_ERRS() << "Bad client state! " << array[i] << " enabled." << LL_ENDL; } } } @@ -578,13 +578,13 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector& pos, con if( count == 0 ) { - llwarns << "Called drawArrays with 0 vertices" << llendl; + LL_WARNS() << "Called drawArrays with 0 vertices" << LL_ENDL; return; } if( norm.size() < pos.size() ) { - llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl; + LL_WARNS() << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << LL_ENDL; return; } @@ -661,7 +661,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of if (start >= (U32) mNumVerts || end >= (U32) mNumVerts) { - llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << llendl; + LL_ERRS() << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << LL_ENDL; } llassert(mNumIndices >= 0); @@ -669,7 +669,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of if (indices_offset >= (U32) mNumIndices || indices_offset + count > (U32) mNumIndices) { - llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; + LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << LL_ENDL; } if (gDebugGL && !useVBOs()) @@ -679,7 +679,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of { if (idx[i] < start || idx[i] > end) { - llerrs << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << llendl; + LL_ERRS() << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << LL_ENDL; } } @@ -697,7 +697,7 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of S32 idx = (S32) (v[i][3]+0.25f); if (idx < 0 || idx >= shader->mFeatures.mIndexedTextureChannels) { - llerrs << "Bad texture index found in vertex data stream." << llendl; + LL_ERRS() << "Bad texture index found in vertex data stream." << LL_ENDL; } } } @@ -717,19 +717,19 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi { if (mGLArray != sGLRenderArray) { - llerrs << "Wrong vertex array bound." << llendl; + LL_ERRS() << "Wrong vertex array bound." << LL_ENDL; } } else { if (mGLIndices != sGLRenderIndices) { - llerrs << "Wrong index buffer bound." << llendl; + LL_ERRS() << "Wrong index buffer bound." << LL_ENDL; } if (mGLBuffer != sGLRenderBuffer) { - llerrs << "Wrong vertex buffer bound." << llendl; + LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL; } } @@ -740,13 +740,13 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi if (elem != mGLIndices) { - llerrs << "Wrong index buffer bound!" << llendl; + LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL; } } if (mode >= LLRender::NUM_MODES) { - llerrs << "Invalid draw mode: " << mode << llendl; + LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL; return; } @@ -774,32 +774,32 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const if (indices_offset >= (U32) mNumIndices || indices_offset + count > (U32) mNumIndices) { - llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl; + LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << LL_ENDL; } if (mGLArray) { if (mGLArray != sGLRenderArray) { - llerrs << "Wrong vertex array bound." << llendl; + LL_ERRS() << "Wrong vertex array bound." << LL_ENDL; } } else { if (mGLIndices != sGLRenderIndices) { - llerrs << "Wrong index buffer bound." << llendl; + LL_ERRS() << "Wrong index buffer bound." << LL_ENDL; } if (mGLBuffer != sGLRenderBuffer) { - llerrs << "Wrong vertex buffer bound." << llendl; + LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL; } } if (mode >= LLRender::NUM_MODES) { - llerrs << "Invalid draw mode: " << mode << llendl; + LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL; return; } @@ -823,27 +823,27 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const if (first >= (U32) mNumVerts || first + count > (U32) mNumVerts) { - llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl; + LL_ERRS() << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << LL_ENDL; } if (mGLArray) { if (mGLArray != sGLRenderArray) { - llerrs << "Wrong vertex array bound." << llendl; + LL_ERRS() << "Wrong vertex array bound." << LL_ENDL; } } else { if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive) { - llerrs << "Wrong vertex buffer bound." << llendl; + LL_ERRS() << "Wrong vertex buffer bound." << LL_ENDL; } } if (mode >= LLRender::NUM_MODES) { - llerrs << "Invalid draw mode: " << mode << llendl; + LL_ERRS() << "Invalid draw mode: " << mode << LL_ENDL; return; } @@ -1269,7 +1269,7 @@ void LLVertexBuffer::updateNumVerts(S32 nverts) if (nverts > 65536) { - llwarns << "Vertex buffer overflow!" << llendl; + LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL; nverts = 65536; } @@ -1308,7 +1308,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) if (nverts < 0 || nindices < 0 || nverts > 65536) { - llerrs << "Bad vertex buffer allocation: " << nverts << " : " << nindices << llendl; + LL_ERRS() << "Bad vertex buffer allocation: " << nverts << " : " << nindices << LL_ENDL; } updateNumVerts(nverts); @@ -1502,11 +1502,11 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo bindGLBuffer(true); if (mFinal) { - llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; + LL_ERRS() << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << LL_ENDL; } if (!useVBOs() && !mMappedData && !mMappedIndexData) { - llerrs << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << llendl; + LL_ERRS() << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << LL_ENDL; } if (useVBOs()) @@ -1543,7 +1543,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (mVertexLocked && map_range) { - llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl; + LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL; } if (!mVertexLocked) @@ -1585,7 +1585,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (size < mSize) { - llerrs << "Invalid buffer size." << llendl; + LL_ERRS() << "Invalid buffer size." << LL_ENDL; } } @@ -1636,25 +1636,25 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo { //-------------------- //print out more debug info before crash - llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl; + LL_INFOS() << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << LL_ENDL; GLint size; glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size); - llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl; + LL_INFOS() << "GL_ARRAY_BUFFER_ARB size is " << size << LL_ENDL; //-------------------- GLint buff; glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); if ((GLuint)buff != mGLBuffer) { - llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL; } - llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl; + LL_ERRS() << "glMapBuffer returned NULL (no vertex data)" << LL_ENDL; } else { - llerrs << "memory allocation for vertex data failed." << llendl; + LL_ERRS() << "memory allocation for vertex data failed." << LL_ENDL; } } } @@ -1683,11 +1683,11 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range bindGLIndices(true); if (mFinal) { - llerrs << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << llendl; + LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << LL_ENDL; } if (!useVBOs() && !mMappedData && !mMappedIndexData) { - llerrs << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << llendl; + LL_ERRS() << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << LL_ENDL; } if (useVBOs()) @@ -1721,7 +1721,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (mIndexLocked && map_range) { - llerrs << "Attempted to map a specific range of a buffer that was already mapped." << llendl; + LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL; } if (!mIndexLocked) @@ -1737,7 +1737,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (elem != mGLIndices) { - llerrs << "Wrong index buffer bound!" << llendl; + LL_ERRS() << "Wrong index buffer bound!" << LL_ENDL; } } @@ -1815,14 +1815,14 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); if ((GLuint)buff != mGLIndices) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL; } - llerrs << "glMapBuffer returned NULL (no index data)" << llendl; + LL_ERRS() << "glMapBuffer returned NULL (no index data)" << LL_ENDL; } else { - llerrs << "memory allocation for Index data failed. " << llendl; + LL_ERRS() << "memory allocation for Index data failed. " << LL_ENDL; } } } @@ -2018,7 +2018,7 @@ template struct VertexBufferStrider if (ptr == NULL) { - llwarns << "mapIndexBuffer failed!" << llendl; + LL_WARNS() << "mapIndexBuffer failed!" << LL_ENDL; return false; } @@ -2034,7 +2034,7 @@ template struct VertexBufferStrider if (ptr == NULL) { - llwarns << "mapVertexBuffer failed!" << llendl; + LL_WARNS() << "mapVertexBuffer failed!" << LL_ENDL; return false; } @@ -2044,7 +2044,7 @@ template struct VertexBufferStrider } else { - llerrs << "VertexBufferStrider could not find valid vertex data." << llendl; + LL_ERRS() << "VertexBufferStrider could not find valid vertex data." << LL_ENDL; } return false; } @@ -2147,7 +2147,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind) LLFastTimer t(FTM_BIND_GL_BUFFER); /*if (sMapped) { - llerrs << "VBO bound while another VBO mapped!" << llendl; + LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL; }*/ glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer); sGLRenderBuffer = mGLBuffer; @@ -2178,7 +2178,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind) LLFastTimer t(FTM_BIND_GL_INDICES); /*if (sMapped) { - llerrs << "VBO bound while another VBO mapped!" << llendl; + LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL; }*/ glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices); sGLRenderIndices = mGLIndices; @@ -2230,7 +2230,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) U32 required = 1 << i; if ((data_mask & required) == 0) { - llwarns << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << llendl; + LL_WARNS() << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << LL_ENDL; } required_mask |= required; @@ -2239,7 +2239,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) if ((data_mask & required_mask) != required_mask) { - llwarns << "Shader consumption mismatches data provision." << llendl; + LL_WARNS() << "Shader consumption mismatches data provision." << LL_ENDL; } } } @@ -2271,7 +2271,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } else { - llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + LL_ERRS() << "Invalid GL vertex buffer bound: " << buff << LL_ENDL; } } @@ -2286,7 +2286,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } else { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + LL_ERRS() << "Invalid GL index buffer bound: " << buff << LL_ENDL; } } } @@ -2362,10 +2362,10 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) U32 mask = 1 << i; if (mask & data_mask && !(mask & mTypeMask)) { //bit set in data_mask, but not set in mTypeMask - llwarns << "Missing required component " << vb_type_name[i] << llendl; + LL_WARNS() << "Missing required component " << vb_type_name[i] << LL_ENDL; } } - llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl; + LL_ERRS() << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << LL_ENDL; } if (LLGLSLShader::sNoFixedFunction) diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 04806c1d8c..0b4b87f338 100755 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -119,7 +119,7 @@ public: const LLVertexBuffer& operator=(const LLVertexBuffer& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index d636161baf..b787794b95 100755 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -69,7 +69,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { - llinfos << "fit_parent works best when combined with single_expansion" << llendl; + LL_INFOS() << "fit_parent works best when combined with single_expansion" << LL_ENDL; } } @@ -845,7 +845,7 @@ void LLAccordionCtrl::sort() { if (!mTabComparator) { - llwarns << "No comparator specified for sorting accordion tabs." << llendl; + LL_WARNS() << "No comparator specified for sorting accordion tabs." << LL_ENDL; return; } diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 8ede4e3468..30cb18812b 100755 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -105,7 +105,7 @@ LLBadge::LLBadge(const LLBadge::Params& p) { if (mImage.isNull()) { - llwarns << "Badge: " << getName() << " with no image!" << llendl; + LL_WARNS() << "Badge: " << getName() << " with no image!" << LL_ENDL; } if (p.location_offset_hcenter.isProvided()) @@ -335,7 +335,7 @@ void LLBadge::draw() } else { - lldebugs << "No image for badge " << getName() << " on owner " << owner_view->getName() << llendl; + LL_DEBUGS() << "No image for badge " << getName() << " on owner " << owner_view->getName() << LL_ENDL; renderBadgeBackground(badge_center_x, badge_center_y, badge_width, badge_height, diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ed12f686a1..913793803c 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -252,7 +252,7 @@ LLButton::LLButton(const LLButton::Params& p) if (mImageUnselected.isNull()) { - llwarns << "Button: " << getName() << " with no image!" << llendl; + LL_WARNS() << "Button: " << getName() << " with no image!" << LL_ENDL; } if (p.click_callback.isProvided()) @@ -591,7 +591,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) // We only handle the click if the click both started and ended within us getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL; } return TRUE; } @@ -816,7 +816,7 @@ void LLButton::draw() else { // no image - lldebugs << "No image for button " << getName() << llendl; + LL_DEBUGS() << "No image for button " << getName() << LL_ENDL; // draw it in pink so we can find it gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, FALSE); } @@ -1039,7 +1039,7 @@ void LLButton::setImageUnselected(LLPointer image) mImageUnselected = image; if (mImageUnselected.isNull()) { - llwarns << "Setting default button image for: " << getName() << " to NULL" << llendl; + LL_WARNS() << "Setting default button image for: " << getName() << " to NULL" << LL_ENDL; } } diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 625fb8e870..74ef8dd0c3 100755 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -137,7 +137,7 @@ void LLCommandManager::addCommand(LLCommand * command) mCommandIndices[command_id.uuid()] = mCommands.size(); mCommands.push_back(command); - lldebugs << "Successfully added command: " << command->name() << llendl; + LL_DEBUGS() << "Successfully added command: " << command->name() << LL_ENDL; } //static @@ -153,13 +153,13 @@ bool LLCommandManager::load() if (!parser.readXUI(commands_file, commandsParams)) { - llerrs << "Unable to load xml file: " << commands_file << llendl; + LL_ERRS() << "Unable to load xml file: " << commands_file << LL_ENDL; return false; } if (!commandsParams.validateBlock()) { - llerrs << "Invalid commands file: " << commands_file << llendl; + LL_ERRS() << "Invalid commands file: " << commands_file << LL_ENDL; return false; } diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp index 6b1e3ce669..727fbe850e 100755 --- a/indra/llui/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -188,7 +188,7 @@ void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent) LLView *childp = *child_iter; if (!childp->getVisible()) { - llwarns << "Incorrect visibility!" << llendl; + LL_WARNS() << "Incorrect visibility!" << LL_ENDL; } LLRect child_rect = childp->getRequiredRect(); child_height += child_rect.getHeight(); diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index a36bc4743e..b7f67f8556 100755 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -365,13 +365,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) mDragLastScreenY += delta_y; getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 43c22f8bf3..299f5e42d4 100755 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -347,7 +347,7 @@ void LLFlatListView::sort() { if (!mItemComparator) { - llwarns << "No comparator specified for sorting FlatListView items." << llendl; + LL_WARNS() << "No comparator specified for sorting FlatListView items." << LL_ENDL; return; } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 11802904e4..7d0779d88d 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -133,7 +133,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b) { if (a.type() != b.type()) { - //llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl; + //LL_ERRS() << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << LL_ENDL; return false; } else if (a.isUndefined()) @@ -1102,7 +1102,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view) { if (NULL == other_view) { - llwarns << "other_view is NULL" << llendl; + LL_WARNS() << "other_view is NULL" << LL_ENDL; return FALSE; } @@ -3158,7 +3158,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str LLFastTimer _(FTM_EXTERNAL_FLOATER_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { - llwarns << "Couldn't parse panel from: " << xml_filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; return FALSE; } @@ -3239,7 +3239,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str if (!result) { - llerrs << "Failed to construct floater " << getName() << llendl; + LL_ERRS() << "Failed to construct floater " << getName() << LL_ENDL; } applyRectControl(); // If we have a saved rect control, apply it @@ -3284,20 +3284,20 @@ bool LLFloater::buildFromFile(const std::string& filename) if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't find (or parse) floater from: " << filename << llendl; + LL_WARNS() << "Couldn't find (or parse) floater from: " << filename << LL_ENDL; return false; } // root must be called floater if( !(root->hasName("floater") || root->hasName("multi_floater")) ) { - llwarns << "Root node should be named floater in: " << filename << llendl; + LL_WARNS() << "Root node should be named floater in: " << filename << LL_ENDL; return false; } bool res = true; - lldebugs << "Building floater " << filename << llendl; + LL_DEBUGS() << "Building floater " << filename << LL_ENDL; LLUICtrlFactory::instance().pushFileName(filename); { if (!getFactoryMap().empty()) diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 1cdddf0d5b..072addfa4a 100755 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -151,13 +151,13 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) res = build_func(key); if (!res) { - llwarns << "Failed to build floater type: '" << name << "'." << llendl; + LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL; return NULL; } bool success = res->buildFromFile(xui_file); if (!success) { - llwarns << "Failed to build floater type: '" << name << "'." << llendl; + LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL; return NULL; } @@ -179,7 +179,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) } if (!res) { - llwarns << "Floater type: '" << name << "' not registered." << llendl; + LL_WARNS() << "Floater type: '" << name << "' not registered." << LL_ENDL; } } return res; @@ -475,7 +475,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& if (!instance) { - lldebugs << "Unable to get instance of floater '" << name << "'" << llendl; + LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL; return; } diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 724d190307..c1fe70bc26 100755 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -358,11 +358,11 @@ void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor ) { if (new_captor) { - llinfos << "New mouse captor: " << new_captor->getName() << llendl; + LL_INFOS() << "New mouse captor: " << new_captor->getName() << LL_ENDL; } else { - llinfos << "New mouse captor: NULL" << llendl; + LL_INFOS() << "New mouse captor: NULL" << LL_ENDL; } } diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index b5ac7db4e7..92504ba8c2 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -636,7 +636,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } if (handled) { - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << LL_ENDL; } return handled; @@ -1753,7 +1753,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, { handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << LL_ENDL; } return TRUE; diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h index beac212441..f5364f4863 100755 --- a/indra/llui/llfunctorregistry.h +++ b/indra/llui/llfunctorregistry.h @@ -75,7 +75,7 @@ public: } else { - llerrs << "attempt to store duplicate name '" << name << "' in LLFunctorRegistry. NOT ADDED." << llendl; + LL_ERRS() << "attempt to store duplicate name '" << name << "' in LLFunctorRegistry. NOT ADDED." << LL_ENDL; retval = false; } @@ -86,7 +86,7 @@ public: { if (mMap.count(name) == 0) { - llwarns << "trying to remove '" << name << "' from LLFunctorRegistry but it's not there." << llendl; + LL_WARNS() << "trying to remove '" << name << "' from LLFunctorRegistry but it's not there." << LL_ENDL; return false; } mMap.erase(name); @@ -101,7 +101,7 @@ public: } else { - lldebugs << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << llendl; + LL_DEBUGS() << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << LL_ENDL; return mMap[LOGFUNCTOR]; } } @@ -113,7 +113,7 @@ private: static void log_functor(const LLSD& notification, const LLSD& payload) { - lldebugs << "log_functor called with payload: " << payload << llendl; + LL_DEBUGS() << "log_functor called with payload: " << payload << LL_ENDL; } static void do_nothing(const LLSD& notification, const LLSD& payload) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index f2e9843bf3..d410a2de33 100755 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -785,7 +785,7 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { - // llinfos << "MiddleMouseDown" << llendl; + // LL_INFOS() << "MiddleMouseDown" << LL_ENDL; setFocus( TRUE ); if( canPastePrimary() ) { @@ -855,14 +855,14 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) mKeystrokeTimer.reset(); getWindow()->setCursor(UI_CURSOR_IBEAM); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; handled = TRUE; } if( !handled ) { getWindow()->setCursor(UI_CURSOR_IBEAM); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } @@ -1347,7 +1347,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) case KEY_BACKSPACE: if (!mReadOnly) { - //llinfos << "Handling backspace" << llendl; + //LL_INFOS() << "Handling backspace" << LL_ENDL; if( hasSelection() ) { deleteSelection(); @@ -2379,7 +2379,7 @@ void LLLineEditor::resetPreedit() { if (hasPreeditString()) { - llwarns << "Preedit and selection!" << llendl; + LL_WARNS() << "Preedit and selection!" << LL_ENDL; deselect(); } else @@ -2543,7 +2543,7 @@ void LLLineEditor::markAsPreedit(S32 position, S32 length) setCursor(position); if (hasPreeditString()) { - llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + LL_WARNS() << "markAsPreedit invoked when hasPreeditString is true." << LL_ENDL; } mPreeditWString.assign( LLWString( mText.getWString(), position, length ) ); if (length > 0) diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 746ade4648..0609cd8b42 100755 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -96,7 +96,7 @@ void LLMenuButton::setMenu(const std::string& menu_filename, EMenuPosition posit LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); if (!menu) { - llwarns << "Error loading menu_button menu" << llendl; + LL_WARNS() << "Error loading menu_button menu" << LL_ENDL; return; } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 385dbc6e19..38afee9b79 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -280,7 +280,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list *listp) // warning.append("\n "); // warning.append(mLabel); - // llwarns << warning << llendl; + // LL_WARNS() << warning << LL_ENDL; // LLAlertDialog::modalAlert(warning); return FALSE; } @@ -1962,7 +1962,7 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction) break; } default: - llwarns << "Unknown scrolling direction: " << direction << llendl; + LL_WARNS() << "Unknown scrolling direction: " << direction << LL_ENDL; } mNeedsArrange = TRUE; @@ -2562,8 +2562,8 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { - llerrs << "** Attempt to attach menu to itself. This is certainly " - << "a logic error." << llendl; + LL_ERRS() << "** Attempt to attach menu to itself. This is certainly " + << "a logic error." << LL_ENDL; } BOOL success = TRUE; @@ -2591,7 +2591,7 @@ BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) { if (menu == this) { - llerrs << "Can't attach a context menu to itself" << llendl; + LL_ERRS() << "Can't attach a context menu to itself" << LL_ENDL; } LLContextMenuBranch *item; @@ -3114,7 +3114,7 @@ LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, BOOL recurse) c return menup; } } - llwarns << "Child Menu " << name << " not found in menu " << getName() << llendl; + LL_WARNS() << "Child Menu " << name << " not found in menu " << getName() << LL_ENDL; return NULL; } @@ -3419,8 +3419,8 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { - llerrs << "** Attempt to attach menu to itself. This is certainly " - << "a logic error." << llendl; + LL_ERRS() << "** Attempt to attach menu to itself. This is certainly " + << "a logic error." << LL_ENDL; } BOOL success = TRUE; diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 8aefef07e2..45505e232e 100755 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -65,7 +65,7 @@ LLModalDialog::~LLModalDialog() std::list::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); if (iter != sModalStack.end()) { - llerrs << "Attempt to delete dialog while still in sModalStack!" << llendl; + LL_ERRS() << "Attempt to delete dialog while still in sModalStack!" << LL_ENDL; } } @@ -126,7 +126,7 @@ void LLModalDialog::stopModal() } else { - llwarns << "LLModalDialog::stopModal not in list!" << llendl; + LL_WARNS() << "LLModalDialog::stopModal not in list!" << LL_ENDL; } } if (!sModalStack.empty()) @@ -181,7 +181,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask) if( childrenHandleHover(x, y, mask) == NULL ) { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL; } return TRUE; } @@ -300,7 +300,7 @@ void LLModalDialog::shutdownModals() // app, we shouldn't have to care WHAT's open. Put differently, if a modal // dialog is so crucial that we can't let the user terminate until s/he // addresses it, we should reject a termination request. The current state - // of affairs is that we accept it, but then produce an llerrs popup that + // of affairs is that we accept it, but then produce an LL_ERRS() popup that // simply makes our software look unreliable. sModalStack.clear(); } diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 179b251cdb..48b5b08c1b 100755 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -159,7 +159,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, if (!mTabContainer) { - llerrs << "Tab Container used without having been initialized." << llendl; + LL_ERRS() << "Tab Container used without having been initialized." << LL_ENDL; return; } diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index 17d07f4dae..0aa3e17075 100755 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -301,7 +301,7 @@ bool LLMultiSlider::findUnusedValue(F32& initVal) // stop if it's filled if(initVal == mInitialValue && !firstTry) { - llwarns << "Whoa! Too many multi slider elements to add one to" << llendl; + LL_WARNS() << "Whoa! Too many multi slider elements to add one to" << LL_ENDL; return false; } @@ -356,12 +356,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask) onCommit(); getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; } return TRUE; } diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 91e5b6b9de..c460a08afc 100755 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -450,7 +450,7 @@ void LLMultiSliderCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLMultiSliderCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLMultiSliderCtrl::setPrecision - precision out of range" << LL_ENDL; return; } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7932299281..fbeb8355db 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -246,7 +246,7 @@ LLNotificationForm::LLNotificationForm(const LLSD& sd) } else { - llwarns << "Invalid form data " << sd << llendl; + LL_WARNS() << "Invalid form data " << sd << LL_ENDL; mFormData = LLSD::emptyArray(); } } @@ -438,11 +438,11 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mUniqueContext.push_back(context.value); } - lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl; + LL_DEBUGS() << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL; BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags) { - lldebugs << " tag \"" << std::string(tag.value) << "\"" << llendl; + LL_DEBUGS() << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL; mTags.push_back(tag.value); } @@ -1405,7 +1405,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op if (selected_item.isUndefined()) { - llwarns << "Invalid option" << option << " for notification " << (std::string)params.name << llendl; + LL_WARNS() << "Invalid option" << option << " for notification " << (std::string)params.name << LL_ENDL; return; } response[selected_item["name"].asString()] = true; @@ -1439,12 +1439,12 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) if (found != replacements.end()) { replacement = found->second; - lldebugs << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << llendl; + LL_DEBUGS() << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL; it->second->setValue(replacement); } else { - llwarns << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << llendl; + LL_WARNS() << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << LL_ENDL; } } } @@ -1483,7 +1483,7 @@ void addPathIfExists(const std::string& new_path, std::vector& path bool LLNotifications::loadTemplates() { - llinfos << "Reading notifications template" << llendl; + LL_INFOS() << "Reading notifications template" << LL_ENDL; // Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it // output all relevant pathnames instead of just the ones from the most // specific skin. @@ -1496,7 +1496,7 @@ bool LLNotifications::loadTemplates() if (!success || root.isNull() || !root->hasName( "notifications" )) { - llerrs << "Problem reading XML from UI Notifications file: " << base_filename << llendl; + LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL; return false; } @@ -1506,7 +1506,7 @@ bool LLNotifications::loadTemplates() if(!params.validateBlock()) { - llerrs << "Problem reading XUI from UI Notifications file: " << base_filename << llendl; + LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL; return false; } @@ -1554,7 +1554,7 @@ bool LLNotifications::loadTemplates() mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification)); } - llinfos << "...done" << llendl; + LL_INFOS() << "...done" << LL_ENDL; return true; } @@ -1572,7 +1572,7 @@ bool LLNotifications::loadVisibilityRules() if(!params.validateBlock()) { - llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl; + LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL; return false; } @@ -1637,7 +1637,7 @@ void LLNotifications::add(const LLNotificationPtr pNotif) LLNotificationSet::iterator it=mItems.find(pNotif); if (it != mItems.end()) { - llerrs << "Notification added a second time to the master notification channel." << llendl; + LL_ERRS() << "Notification added a second time to the master notification channel." << LL_ENDL; } updateItem(LLSD().with("sigtype", "add").with("id", pNotif->id()), pNotif); @@ -1695,7 +1695,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid) LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { - LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl; + LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << LL_ENDL; return LLNotificationPtr((LLNotification*)NULL); } else @@ -1746,13 +1746,13 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++) { // An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule. - lldebugs + LL_DEBUGS() << "notification \"" << n->getName() << "\" " << "testing against " << ((*it)->mVisible?"show":"hide") << " rule, " << "name = \"" << (*it)->mName << "\" " << "tag = \"" << (*it)->mTag << "\" " << "type = \"" << (*it)->mType << "\" " - << llendl; + << LL_ENDL; if(!(*it)->mType.empty()) { @@ -1791,7 +1791,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) if((*it)->mResponse.empty()) { // Response property is empty. Cancel this notification. - lldebugs << "cancelling notification " << n->getName() << llendl; + LL_DEBUGS() << "cancelling notification " << n->getName() << LL_ENDL; cancel(n); } @@ -1802,7 +1802,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) // TODO: verify that the response template has an item with the correct name response[(*it)->mResponse] = true; - lldebugs << "responding to notification " << n->getName() << " with response = " << response << llendl; + LL_DEBUGS() << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL; n->respond(response); } @@ -1814,7 +1814,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) break; } - lldebugs << "allowing notification " << n->getName() << llendl; + LL_DEBUGS() << "allowing notification " << n->getName() << LL_ENDL; return true; } @@ -1875,7 +1875,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id, // from PE merge - we should figure out if this is the right thing to do if (name.empty()) { - llwarns << "Empty name received for Id: " << agent_id << llendl; + LL_WARNS() << "Empty name received for Id: " << agent_id << LL_ENDL; name = SYSTEM_FROM; } diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index f157d6a923..389d18a350 100755 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -391,7 +391,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ panelp = LLRegisterPanelClass::instance().createPanelClass(class_attr); if (!panelp) { - llwarns << "Panel class \"" << class_attr << "\" not registered." << llendl; + LL_WARNS() << "Panel class \"" << class_attr << "\" not registered." << LL_ENDL; } } @@ -529,7 +529,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { - llwarns << "Couldn't parse panel from: " << xml_filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; return FALSE; } @@ -599,11 +599,11 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate if(LLUI::sSettingGroups["config"]->getBOOL("QAMode")) { - llerrs << err_str << llendl; + LL_ERRS() << err_str << LL_ENDL; } else { - llwarns << err_str << llendl; + LL_WARNS() << err_str << LL_ENDL; } return LLStringUtil::null; } @@ -618,11 +618,11 @@ std::string LLPanel::getString(const std::string& name) const std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate if(LLUI::sSettingGroups["config"]->getBOOL("QAMode")) { - llerrs << err_str << llendl; + LL_ERRS() << err_str << LL_ENDL; } else { - llwarns << err_str << llendl; + LL_WARNS() << err_str << LL_ENDL; } return LLStringUtil::null; } @@ -976,18 +976,18 @@ BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't parse panel from: " << filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << filename << LL_ENDL; return didPost; } // root must be called panel if( !root->hasName("panel" ) ) { - llwarns << "Root node should be named panel in : " << filename << llendl; + LL_WARNS() << "Root node should be named panel in : " << filename << LL_ENDL; return didPost; } - lldebugs << "Building panel " << filename << llendl; + LL_DEBUGS() << "Building panel " << filename << LL_ENDL; LLUICtrlFactory::instance().pushFileName(filename); { diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 95a7d09382..b53bb16d97 100755 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -289,7 +289,7 @@ BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask) void LLRadioGroup::onClickButton(LLUICtrl* ctrl) { - // llinfos << "LLRadioGroup::onClickButton" << llendl; + // LL_INFOS() << "LLRadioGroup::onClickButton" << LL_ENDL; LLRadioCtrl* clicked_radio = dynamic_cast(ctrl); if (!clicked_radio) return; @@ -319,7 +319,7 @@ void LLRadioGroup::onClickButton(LLUICtrl* ctrl) index++; } - llwarns << "LLRadioGroup::onClickButton - clicked button that isn't a child" << llendl; + LL_WARNS() << "LLRadioGroup::onClickButton - clicked button that isn't a child" << LL_ENDL; } void LLRadioGroup::setValue( const LLSD& value ) diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 7488af2e05..6e924c1f19 100755 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -315,7 +315,7 @@ LLLocale::LLLocale(const std::string& locale_string) } //else //{ - // llinfos << "Set locale to " << new_locale_string << llendl; + // LL_INFOS() << "Set locale to " << new_locale_string << LL_ENDL; //} } diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index f92e8f41ea..76134144a0 100755 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) } getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; handled = TRUE; } else @@ -393,7 +393,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) if( !handled ) { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 93eea75952..e1d401d94a 100755 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -643,7 +643,7 @@ void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& const { if (!mScrolledView) { - llwarns << "LLScrollContainer::scrollToShowRect with no view!" << llendl; + LL_WARNS() << "LLScrollContainer::scrollToShowRect with no view!" << LL_ENDL; return; } diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index 9b65c2b79d..b6f2eb8ba2 100755 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -111,7 +111,7 @@ void LLScrollingPanelList::removePanel( U32 panel_index ) { if ( mPanelList.empty() || panel_index >= mPanelList.size() ) { - llwarns << "Panel index " << panel_index << " is out of range!" << llendl; + LL_WARNS() << "Panel index " << panel_index << " is out of range!" << LL_ENDL; return; } else diff --git a/indra/llui/llscrolllistitem.cpp b/indra/llui/llscrolllistitem.cpp index 5a1e96ab03..87cd71c505 100755 --- a/indra/llui/llscrolllistitem.cpp +++ b/indra/llui/llscrolllistitem.cpp @@ -82,7 +82,7 @@ void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell ) } else { - llerrs << "LLScrollListItem::setColumn: bad column: " << column << llendl; + LL_ERRS() << "LLScrollListItem::setColumn: bad column: " << column << LL_ENDL; } } diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index ddddbe6f30..ebbb951ee6 100755 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -188,12 +188,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue ); } getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; } return TRUE; } diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 583ed1ed2e..62c5ecb8f1 100755 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -403,7 +403,7 @@ void LLSliderCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLSliderCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLSliderCtrl::setPrecision - precision out of range" << LL_ENDL; return; } diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 8a728df2e7..ebdbdf59c0 100755 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -384,7 +384,7 @@ void LLSpinCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLSpinCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLSpinCtrl::setPrecision - precision out of range" << LL_ENDL; return; } @@ -400,7 +400,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label) } else { - llwarns << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << llendl; + LL_WARNS() << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << LL_ENDL; } updateLabelColor(); } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 415da0b3d6..180120c0cb 100755 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1572,7 +1572,7 @@ BOOL LLTabContainer::selectTabByName(const std::string& name) LLPanel* panel = getPanelByName(name); if (!panel) { - llwarns << "LLTabContainer::selectTabByName(" << name << ") failed" << llendl; + LL_WARNS() << "LLTabContainer::selectTabByName(" << name << ") failed" << LL_ENDL; return FALSE; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 7243931dbb..94cf93bd3c 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -687,7 +687,7 @@ void LLTextBase::drawText() seg_iter++; if (seg_iter == mSegments.end()) { - llwarns << "Ran off the segmentation end!" << llendl; + LL_WARNS() << "Ran off the segmentation end!" << LL_ENDL; return; } @@ -1487,7 +1487,7 @@ void LLTextBase::reflow() // use an even number of iterations to avoid user visible oscillation of the layout if(++reflow_count > 2) { - lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl; + LL_DEBUGS() << "Breaking out of reflow due to possible infinite loop in " << getName() << LL_ENDL; break; } @@ -2120,7 +2120,7 @@ void LLTextBase::setFont(const LLFontGL* font) void LLTextBase::needsReflow(S32 index) { - lldebugs << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << llendl; + LL_DEBUGS() << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << LL_ENDL; mReflowIndex = llmin(mReflowIndex, index); } @@ -3162,7 +3162,7 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) // we cannot replace a keyword tooltip that's loaded from a file if (mToken) { - llwarns << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << llendl; + LL_WARNS() << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << LL_ENDL; return; } memDisclaim(mTooltip); @@ -3220,14 +3220,14 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin if(getLength() < segment_offset + mStart) { - llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" - << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl; + LL_INFOS() << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" + << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << LL_ENDL; } if(offsetString.length() + 1 < max_chars) { - llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " - << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl; + LL_INFOS() << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " + << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << LL_ENDL; } S32 num_chars = mStyle->getFont()->maxDrawableChars(offsetString.c_str(), @@ -3257,13 +3257,13 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin void LLNormalTextSegment::dump() const { - llinfos << "Segment [" << + LL_INFOS() << "Segment [" << // mColor.mV[VX] << ", " << // mColor.mV[VY] << ", " << // mColor.mV[VZ] << "]\t[" << mStart << ", " << getEnd() << "]" << - llendl; + LL_ENDL; } /*virtual*/ diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index eb5a04d8e5..36431d3723 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -781,7 +781,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; } @@ -2586,20 +2586,20 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Linden text version %d", &version) ) { - llwarns << "Invalid Linden text file header " << llendl; + LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; return FALSE; } if( 1 != version ) { - llwarns << "Invalid Linden text file version: " << version << llendl; + LL_WARNS() << "Invalid Linden text file version: " << version << LL_ENDL; return FALSE; } instream.getline(tbuf, MAX_STRING); if( 0 != sscanf(tbuf, "{") ) { - llwarns << "Invalid Linden text file format" << llendl; + LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; return FALSE; } @@ -2607,13 +2607,13 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Text length %d", &text_len) ) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } if( text_len > mMaxTextByteLength ) { - llwarns << "Invalid Linden text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; return FALSE; } @@ -2622,21 +2622,21 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) char* text = new char[ text_len + 1]; if (text == NULL) { - llerrs << "Memory allocation failure." << llendl; + LL_ERRS() << "Memory allocation failure." << LL_ENDL; return FALSE; } instream.get(text, text_len + 1, '\0'); text[text_len] = '\0'; if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */ { - llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;/* Flawfinder: ignore */ + LL_WARNS() << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << LL_ENDL;/* Flawfinder: ignore */ success = FALSE; } instream.getline(tbuf, MAX_STRING); if( success && (0 != sscanf(tbuf, "}")) ) { - llwarns << "Invalid Linden text file format: missing terminal }" << llendl; + LL_WARNS() << "Invalid Linden text file format: missing terminal }" << LL_ENDL; success = FALSE; } @@ -2699,7 +2699,7 @@ void LLTextEditor::resetPreedit() { if (hasSelection()) { - llwarns << "Preedit and selection!" << llendl; + LL_WARNS() << "Preedit and selection!" << LL_ENDL; deselect(); } @@ -2889,7 +2889,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length) setCursorPos(position); if (hasPreeditString()) { - llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + LL_WARNS() << "markAsPreedit invoked when hasPreeditString is true." << LL_ENDL; } mPreeditWString = LLWString( getWText(), position, length ); if (length > 0) diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp index 8a85f99e0c..0b36241da0 100755 --- a/indra/llui/lltextparser.cpp +++ b/indra/llui/lltextparser.cpp @@ -228,7 +228,7 @@ bool LLTextParser::saveToDisk(LLSD highlights) std::string filename=getFileName(); if (filename.empty()) { - llwarns << "LLTextParser::saveToDisk() no valid user directory." << llendl; + LL_WARNS() << "LLTextParser::saveToDisk() no valid user directory." << LL_ENDL; return FALSE; } llofstream file; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index f683758962..8d1017c1b4 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -157,7 +157,7 @@ void LLToolBar::createContextMenu() } else { - llwarns << "Unable to load toolbars context menu." << llendl; + LL_WARNS() << "Unable to load toolbars context menu." << LL_ENDL; } } @@ -1063,7 +1063,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, mDragRank = getRankFromPosition(x, y); // Don't DaD if we're dragging a command on itself mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank-1) == orig_rank)) ? false : true); - //llinfos << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << llendl; + //LL_INFOS() << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << LL_ENDL; /* Do the following if you want to animate the button itself LLCommandId dragged_command(inv_item->getUUID()); removeCommand(dragged_command); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 782d26fccb..5e1f12996e 100755 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -484,7 +484,7 @@ void LLToolTipMgr::show(const LLToolTip::Params& params) params_with_defaults.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); if (!params_with_defaults.validateBlock()) { - llwarns << "Could not display tooltip!" << llendl; + LL_WARNS() << "Could not display tooltip!" << LL_ENDL; return; } diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp index 5388069c24..5131f6b704 100755 --- a/indra/llui/lltrans.cpp +++ b/indra/llui/lltrans.cpp @@ -63,8 +63,8 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set& defa std::string xml_filename = "(strings file)"; if (!root->hasName("strings")) { - llerrs << "Invalid root node name in " << xml_filename - << ": was " << root->getName() << ", expected \"strings\"" << llendl; + LL_ERRS() << "Invalid root node name in " << xml_filename + << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL; } StringTable string_table; @@ -73,7 +73,7 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set& defa if (!string_table.validateBlock()) { - llerrs << "Problem reading strings: " << xml_filename << llendl; + LL_ERRS() << "Problem reading strings: " << xml_filename << LL_ENDL; return false; } @@ -107,8 +107,8 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) std::string xml_filename = "(language strings file)"; if (!root->hasName("strings")) { - llerrs << "Invalid root node name in " << xml_filename - << ": was " << root->getName() << ", expected \"strings\"" << llendl; + LL_ERRS() << "Invalid root node name in " << xml_filename + << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL; } StringTable string_table; @@ -117,7 +117,7 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) if (!string_table.validateBlock()) { - llerrs << "Problem reading strings: " << xml_filename << llendl; + LL_ERRS() << "Problem reading strings: " << xml_filename << LL_ENDL; return false; } diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp index 80d079cbc8..220cee4c90 100755 --- a/indra/llui/lltransutil.cpp +++ b/indra/llui/lltransutil.cpp @@ -44,7 +44,7 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::setcontrolExists(name)) { - llwarns << "tried to make UI sound for unknown sound name: " << name << llendl; + LL_WARNS() << "tried to make UI sound for unknown sound name: " << name << LL_ENDL; } else { @@ -118,19 +118,19 @@ LLUUID find_ui_sound(const char * namep) { if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle")) { - llinfos << "UI sound name: " << name << " triggered but silent (null uuid)" << llendl; + LL_INFOS() << "UI sound name: " << name << " triggered but silent (null uuid)" << LL_ENDL; } } else { - llwarns << "UI sound named: " << name << " does not translate to a valid uuid" << llendl; + LL_WARNS() << "UI sound named: " << name << " does not translate to a valid uuid" << LL_ENDL; } } else if (LLUI::sAudioCallback != NULL) { if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle")) { - llinfos << "UI sound name: " << name << llendl; + LL_INFOS() << "UI sound name: " << name << LL_ENDL; } } } @@ -170,7 +170,7 @@ void LLUI::initClass(const settings_map_t& settings, (get_ptr_in_map(sSettingGroups, std::string("floater")) == NULL) || (get_ptr_in_map(sSettingGroups, std::string("ignores")) == NULL)) { - llerrs << "Failure to initialize configuration groups" << llendl; + LL_ERRS() << "Failure to initialize configuration groups" << LL_ENDL; } sAudioCallback = audio_callback; diff --git a/indra/llui/llui.h b/indra/llui/llui.h index f3ed3fcb49..f7426a703a 100755 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -171,7 +171,7 @@ public: { if (mMin > mMax) { - llwarns << "Bad interval range (" << mMin << ", " << mMax << ")" << llendl; + LL_WARNS() << "Bad interval range (" << mMin << ", " << mMax << ")" << LL_ENDL; // since max is usually the most dangerous one to ignore (buffer overflow, etc), prefer it // in the case of a malformed range mMin = mMax; @@ -410,7 +410,7 @@ private: static void initClass() { - llerrs << "No static initClass() method defined for " << typeid(T).name() << llendl; + LL_ERRS() << "No static initClass() method defined for " << typeid(T).name() << LL_ENDL; } }; @@ -425,7 +425,7 @@ private: static void destroyClass() { - llerrs << "No static destroyClass() method defined for " << typeid(T).name() << llendl; + LL_ERRS() << "No static destroyClass() method defined for " << typeid(T).name() << LL_ENDL; } }; diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index ffeff15968..244f0c6f00 100755 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -117,7 +117,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table unresolved_refs.erase(iter->second); } - llwarns << warning + ending_ref << llendl; + LL_WARNS() << warning + ending_ref << LL_ENDL; break; } @@ -156,7 +156,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table iter != visited_refs.end(); ++iter) { - llwarns << iter->first << " references a non-existent color" << llendl; + LL_WARNS() << iter->first << " references a non-existent color" << LL_ENDL; unresolved_refs.erase(iter->second); } @@ -293,13 +293,13 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_ if(!LLXMLNode::parseFile(filename, root, NULL)) { - llwarns << "Unable to parse color file " << filename << llendl; + LL_WARNS() << "Unable to parse color file " << filename << LL_ENDL; return false; } if(!root->hasName("colors")) { - llwarns << filename << " is not a valid color definition file" << llendl; + LL_WARNS() << filename << " is not a valid color definition file" << LL_ENDL; return false; } @@ -313,7 +313,7 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_ } else { - llwarns << filename << " failed to load" << llendl; + LL_WARNS() << filename << " failed to load" << LL_ENDL; return false; } diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 08358484ef..abcd5da6c4 100755 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -212,7 +212,7 @@ LLUICtrl::~LLUICtrl() if( gFocusMgr.getTopCtrl() == this ) { - llwarns << "UI Control holding top ctrl deleted: " << getName() << ". Top view removed." << llendl; + LL_WARNS() << "UI Control holding top ctrl deleted: " << getName() << ". Top view removed." << LL_ENDL; gFocusMgr.removeTopCtrlWithoutCallback( this ); } @@ -258,7 +258,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa } else if (!function_name.empty()) { - llwarns << "No callback found for: '" << function_name << "' in control: " << getName() << llendl; + LL_WARNS() << "No callback found for: '" << function_name << "' in control: " << getName() << LL_ENDL; } } return default_commit_handler; @@ -452,7 +452,7 @@ void LLUICtrl::setControlVariable(LLControlVariable* control) if (mControlVariable) { //RN: this will happen in practice, should we try to avoid it? - //llwarns << "setControlName called twice on same control!" << llendl; + //LL_WARNS() << "setControlName called twice on same control!" << LL_ENDL; mControlConnection.disconnect(); // disconnect current signal mControlVariable = NULL; } diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 60fee47ae0..291da2ce48 100755 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -131,11 +131,11 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid // for the child widget // You might need to add something like: // static ParentWidgetRegistry::Register register("child_widget_name"); - llwarns << child_name << " is not a valid child of " << node->getName()->mString << llendl; + LL_WARNS() << child_name << " is not a valid child of " << node->getName()->mString << LL_ENDL; } else { - llwarns << "Could not create widget named " << child_node->getName()->mString << llendl; + LL_WARNS() << "Could not create widget named " << child_node->getName()->mString << LL_ENDL; } } diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index f2fe4334ee..87b3937417 100755 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -171,7 +171,7 @@ public: if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) { - llwarns << "Couldn't parse XUI file: " << instance().getCurFileName() << llendl; + LL_WARNS() << "Couldn't parse XUI file: " << instance().getCurFileName() << LL_ENDL; goto fail; } @@ -182,7 +182,7 @@ public: // not of right type, so delete it if (!widget) { - llwarns << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << llendl; + LL_WARNS() << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << LL_ENDL; delete view; view = NULL; } @@ -225,7 +225,7 @@ private: if (!params.validateBlock()) { - llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl; + LL_WARNS() << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << LL_ENDL; //return NULL; } diff --git a/indra/llui/llundo.cpp b/indra/llui/llundo.cpp index 06b0514223..7c4c183a30 100755 --- a/indra/llui/llundo.cpp +++ b/indra/llui/llundo.cpp @@ -51,7 +51,7 @@ LLUndoBuffer::LLUndoBuffer( LLUndoAction (*create_func()), S32 initial_count ) mActions[i] = create_func(); if (!mActions[i]) { - llerrs << "Unable to create action for undo buffer" << llendl; + LL_ERRS() << "Unable to create action for undo buffer" << LL_ENDL; } } } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 99ee688888..bef9034e55 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -785,7 +785,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC if (path_parts < 3) // no parcel id { - llwarns << "Failed to parse url [" << url << "]" << llendl; + LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL; return url; } @@ -925,7 +925,7 @@ std::string LLUrlEntryRegion::getLabel(const std::string &url, const LLUrlLabelC if (path_parts < 3) // no region name { - llwarns << "Failed to parse url [" << url << "]" << llendl; + LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL; return url; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index daeb4d7939..ae62d72f73 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -159,10 +159,10 @@ LLView::LLView(const LLView::Params& p) LLView::~LLView() { dirtyRect(); - //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; + //LL_INFOS() << "Deleting view " << mName << ":" << (void*) this << LL_ENDL; if (LLView::sIsDrawing) { - lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl; + LL_DEBUGS() << "Deleting view " << mName << " during UI draw() phase" << LL_ENDL; } // llassert(LLView::sIsDrawing == FALSE); @@ -170,7 +170,7 @@ LLView::~LLView() if( hasMouseCapture() ) { - //llwarns << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << llendl; + //LL_WARNS() << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } @@ -300,7 +300,7 @@ bool LLView::addChild(LLView* child, S32 tab_group) } if (mParentView == child) { - llerrs << "Adding view " << child->getName() << " as child of itself" << llendl; + LL_ERRS() << "Adding view " << child->getName() << " as child of itself" << LL_ENDL; } // remove from current parent @@ -361,7 +361,7 @@ void LLView::removeChild(LLView* child) } else { - llwarns << "\"" << child->getName() << "\" is not a child of " << getName() << llendl; + LL_WARNS() << "\"" << child->getName() << "\" is not a child of " << getName() << LL_ENDL; } updateBoundingRect(); } @@ -687,12 +687,12 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask) void LLView::onMouseEnter(S32 x, S32 y, MASK mask) { - //llinfos << "Mouse entered " << getName() << llendl; + //LL_INFOS() << "Mouse entered " << getName() << LL_ENDL; } void LLView::onMouseLeave(S32 x, S32 y, MASK mask) { - //llinfos << "Mouse left " << getName() << llendl; + //LL_INFOS() << "Mouse left " << getName() << LL_ENDL; } bool LLView::visibleAndContains(S32 local_x, S32 local_y) @@ -727,7 +727,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m { if (LLView::sDebugKeys) { - llinfos << desc << " handled by " << viewp->getName() << llendl; + LL_INFOS() << desc << " handled by " << viewp->getName() << LL_ENDL; } return viewp; } @@ -920,7 +920,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) handled = handleKeyHere( key, mask ); if (handled && LLView::sDebugKeys) { - llinfos << "Key handled by " << getName() << llendl; + LL_INFOS() << "Key handled by " << getName() << LL_ENDL; } } } @@ -957,7 +957,7 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) handled = handleUnicodeCharHere(uni_char); if (handled && LLView::sDebugKeys) { - llinfos << "Unicode key handled by " << getName() << llendl; + LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL; } } } @@ -1130,7 +1130,7 @@ void LLView::drawChildren() // Check for bogus rectangle if (!getRect().isValid()) { - llwarns << "Bogus rectangle for " << getName() << " with " << mRect << llendl; + LL_WARNS() << "Bogus rectangle for " << getName() << " with " << mRect << LL_ENDL; } } } @@ -2000,7 +2000,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna } break; default: - llerrs << "Invalid snap edge" << llendl; + LL_ERRS() << "Invalid snap edge" << LL_ENDL; } } @@ -2102,7 +2102,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna } break; default: - llerrs << "Invalid snap edge" << llendl; + LL_ERRS() << "Invalid snap edge" << LL_ENDL; } } } @@ -2429,7 +2429,7 @@ static S32 invert_vertical(S32 y, LLView* parent) } else { - llwarns << "Attempting to convert layout to top-left with no parent" << llendl; + LL_WARNS() << "Attempting to convert layout to top-left with no parent" << LL_ENDL; return y; } } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index cd23ce7df1..e224233c3c 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -709,7 +709,7 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // did we find *something* with that name? if (child) { - llwarns << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << llendl; + LL_WARNS() << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << LL_ENDL; } result = getDefaultWidget(name); if (!result) @@ -721,11 +721,11 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // *NOTE: You cannot call mFoo = getChild("bar") // in a floater or panel constructor. The widgets will not // be ready. Instead, put it in postBuild(). - llwarns << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << llendl; + LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; } else { - llwarns << "Failed to create dummy " << typeid(T).name() << llendl; + LL_WARNS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; return NULL; } diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index b7e71b87a8..1bb17eae81 100755 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -110,7 +110,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) // File masks starting with "/" will match nothing, so we consider them invalid. if (LLStringUtil::startsWith(mask, getDirDelimiter())) { - llwarns << "Invalid file mask: " << mask << llendl; + LL_WARNS() << "Invalid file mask: " << mask << LL_ENDL; llassert(!"Invalid file mask"); } @@ -133,12 +133,12 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) { retry_count++; result = errno; - llwarns << "Problem removing " << fullpath << " - errorcode: " - << result << " attempt " << retry_count << llendl; + LL_WARNS() << "Problem removing " << fullpath << " - errorcode: " + << result << " attempt " << retry_count << LL_ENDL; if(retry_count >= 5) { - llwarns << "Failed to remove " << fullpath << llendl ; + LL_WARNS() << "Failed to remove " << fullpath << LL_ENDL ; return count ; } @@ -148,7 +148,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) { if (retry_count) { - llwarns << "Successfully removed " << fullpath << llendl; + LL_WARNS() << "Successfully removed " << fullpath << LL_ENDL; } break; } @@ -238,7 +238,7 @@ const std::string &LLDir::getLindenUserDir() const { if (mLindenUserDir.empty()) { - lldebugs << "getLindenUserDir() called early, we don't have the user name yet - returning empty string to caller" << llendl; + LL_DEBUGS() << "getLindenUserDir() called early, we don't have the user name yet - returning empty string to caller" << LL_ENDL; } return mLindenUserDir; @@ -491,9 +491,9 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd if (prefix.empty()) { - llwarns << ELLPathToString(location) + LL_WARNS() << ELLPathToString(location) << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename - << "': prefix is empty, possible bad filename" << llendl; + << "': prefix is empty, possible bad filename" << LL_ENDL; } std::string expanded_filename = add(add(prefix, subdir1), subdir2); @@ -802,7 +802,7 @@ void LLDir::setLindenUserDir(const std::string &username) } else { - llerrs << "NULL name for LLDir::setLindenUserDir" << llendl; + LL_ERRS() << "NULL name for LLDir::setLindenUserDir" << LL_ENDL; } dumpCurrentDirectories(); @@ -816,7 +816,7 @@ void LLDir::setChatLogsDir(const std::string &path) } else { - llwarns << "Invalid name for LLDir::setChatLogsDir" << llendl; + LL_WARNS() << "Invalid name for LLDir::setChatLogsDir" << LL_ENDL; } } @@ -841,7 +841,7 @@ void LLDir::setPerAccountChatLogsDir(const std::string &username) } else { - llerrs << "NULL name for LLDir::setPerAccountChatLogsDir" << llendl; + LL_ERRS() << "NULL name for LLDir::setPerAccountChatLogsDir" << LL_ENDL; } } @@ -1011,13 +1011,13 @@ void dir_exists_or_crash(const std::string &dir_name) { if(0 != LLFile::mkdir(dir_name, 0700)) // octal { - llerrs << "Unable to create directory: " << dir_name << llendl; + LL_ERRS() << "Unable to create directory: " << dir_name << LL_ENDL; } } else { - llerrs << "Unable to stat: " << dir_name << " errno = " << stat_rv - << llendl; + LL_ERRS() << "Unable to stat: " << dir_name << " errno = " << stat_rv + << LL_ENDL; } } else @@ -1025,7 +1025,7 @@ void dir_exists_or_crash(const std::string &dir_name) // data_dir exists, make sure it's a directory. if(!S_ISDIR(dir_stat.st_mode)) { - llerrs << "Data directory collision: " << dir_name << llendl; + LL_ERRS() << "Data directory collision: " << dir_name << LL_ENDL; } } #endif diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 6184095957..ebc8fdca33 100755 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -131,7 +131,7 @@ LLDir_Win32::LLDir_Win32() mAppRODataDir = mExecutableDir; } -// llinfos << "mAppRODataDir = " << mAppRODataDir << llendl; +// LL_INFOS() << "mAppRODataDir = " << mAppRODataDir << LL_ENDL; mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; @@ -144,7 +144,7 @@ LLDir_Win32::LLDir_Win32() { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << llendl; + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << LL_ENDL; } } @@ -176,8 +176,8 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, { if (errno != EEXIST) { - llwarns << "Couldn't create app user dir " << mOSUserAppDir << llendl; - llwarns << "Default to base dir" << mOSUserDir << llendl; + LL_WARNS() << "Couldn't create app user dir " << mOSUserAppDir << LL_ENDL; + LL_WARNS() << "Default to base dir" << mOSUserDir << LL_ENDL; mOSUserAppDir = mOSUserDir; } } @@ -188,7 +188,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << llendl; + LL_WARNS() << "Couldn't create LL_PATH_LOGS dir " << getExpandedFilename(LL_PATH_LOGS,"") << LL_ENDL; } } @@ -197,7 +197,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << llendl; + LL_WARNS() << "Couldn't create LL_PATH_USER_SETTINGS dir " << getExpandedFilename(LL_PATH_USER_SETTINGS,"") << LL_ENDL; } } @@ -206,7 +206,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << llendl; + LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; } } diff --git a/indra/llvfs/lldirguard.h b/indra/llvfs/lldirguard.h index 4330095ad0..37b9e9b83e 100755 --- a/indra/llvfs/lldirguard.h +++ b/indra/llvfs/lldirguard.h @@ -48,7 +48,7 @@ public: // Dir has changed std::string mOrigDirUtf8 = utf16str_to_utf8str(llutf16string(mOrigDir)); std::string mFinalDirUtf8 = utf16str_to_utf8str(llutf16string(mFinalDir)); - llinfos << "Resetting working dir from " << mFinalDirUtf8 << " to " << mOrigDirUtf8 << llendl; + LL_INFOS() << "Resetting working dir from " << mFinalDirUtf8 << " to " << mOrigDirUtf8 << LL_ENDL; SetCurrentDirectory(mOrigDir); } } diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index 460d2a8b4f..960212495a 100755 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -62,13 +62,13 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) } catch (const fs::filesystem_error& e) { - llwarns << e.what() << llendl; + LL_WARNS() << e.what() << LL_ENDL; return; } if (!is_dir) { - llwarns << "Invalid path: \"" << dir_path.string() << "\"" << llendl; + LL_WARNS() << "Invalid path: \"" << dir_path.string() << "\"" << LL_ENDL; return; } @@ -79,7 +79,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) } catch (const fs::filesystem_error& e) { - llwarns << e.what() << llendl; + LL_WARNS() << e.what() << LL_ENDL; return; } @@ -95,8 +95,8 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) } catch (boost::regex_error& e) { - llwarns << "\"" << exp << "\" is not a valid regular expression: " - << e.what() << llendl; + LL_WARNS() << "\"" << exp << "\" is not a valid regular expression: " + << e.what() << LL_ENDL; return; } @@ -113,7 +113,7 @@ bool LLDirIterator::Impl::next(std::string &fname) if (!mIsValid) { - llwarns << "The iterator is not correctly initialized." << llendl; + LL_WARNS() << "The iterator is not correctly initialized." << LL_ENDL; return false; } @@ -176,7 +176,7 @@ std::string glob_to_regex(const std::string& glob) case '}': if (!braces) { - llerrs << "glob_to_regex: Closing brace without an equivalent opening brace: " << glob << llendl; + LL_ERRS() << "glob_to_regex: Closing brace without an equivalent opening brace: " << glob << LL_ENDL; } regex+=')'; @@ -207,7 +207,7 @@ std::string glob_to_regex(const std::string& glob) if (braces) { - llerrs << "glob_to_regex: Unterminated brace expression: " << glob << llendl; + LL_ERRS() << "glob_to_regex: Unterminated brace expression: " << glob << LL_ENDL; } return regex; diff --git a/indra/llvfs/lllfsthread.cpp b/indra/llvfs/lllfsthread.cpp index 073b1af2a1..2fd2614cce 100755 --- a/indra/llvfs/lllfsthread.cpp +++ b/indra/llvfs/lllfsthread.cpp @@ -97,7 +97,7 @@ LLLFSThread::handle_t LLLFSThread::read(const std::string& filename, /* Flawfind bool res = addRequest(req); if (!res) { - llerrs << "LLLFSThread::read called after LLLFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLLFSThread::read called after LLLFSThread::cleanupClass()" << LL_ENDL; } return handle; @@ -119,7 +119,7 @@ LLLFSThread::handle_t LLLFSThread::write(const std::string& filename, bool res = addRequest(req); if (!res) { - llerrs << "LLLFSThread::read called after LLLFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLLFSThread::read called after LLLFSThread::cleanupClass()" << LL_ENDL; } return handle; @@ -144,7 +144,7 @@ LLLFSThread::Request::Request(LLLFSThread* thread, { if (numbytes <= 0) { - llwarns << "LLLFSThread: Request with numbytes = " << numbytes << llendl; + LL_WARNS() << "LLLFSThread: Request with numbytes = " << numbytes << LL_ENDL; } } @@ -166,7 +166,7 @@ void LLLFSThread::Request::deleteRequest() { if (getStatus() == STATUS_QUEUED) { - llerrs << "Attempt to delete a queued LLLFSThread::Request!" << llendl; + LL_ERRS() << "Attempt to delete a queued LLLFSThread::Request!" << LL_ENDL; } if (mResponder.notNull()) { @@ -186,7 +186,7 @@ bool LLLFSThread::Request::processRequest() infile.open(mFileName, LL_APR_RB, mThread->getLocalAPRFilePool()); if (!infile.getFileHandle()) { - llwarns << "LLLFS: Unable to read file: " << mFileName << llendl; + LL_WARNS() << "LLLFS: Unable to read file: " << mFileName << LL_ENDL; mBytesRead = 0; // fail return true; } @@ -198,7 +198,7 @@ bool LLLFSThread::Request::processRequest() llassert_always(off >= 0); mBytesRead = infile.read(mBuffer, mBytes ); complete = true; -// llinfos << "LLLFSThread::READ:" << mFileName << " Bytes: " << mBytesRead << llendl; +// LL_INFOS() << "LLLFSThread::READ:" << mFileName << " Bytes: " << mBytesRead << LL_ENDL; } else if (mOperation == FILE_WRITE) { @@ -209,7 +209,7 @@ bool LLLFSThread::Request::processRequest() outfile.open(mFileName, flags, mThread->getLocalAPRFilePool()); if (!outfile.getFileHandle()) { - llwarns << "LLLFS: Unable to write file: " << mFileName << llendl; + LL_WARNS() << "LLLFS: Unable to write file: " << mFileName << LL_ENDL; mBytesRead = 0; // fail return true; } @@ -218,18 +218,18 @@ bool LLLFSThread::Request::processRequest() S32 seek = outfile.seek(APR_SET, mOffset); if (seek < 0) { - llwarns << "LLLFS: Unable to write file (seek failed): " << mFileName << llendl; + LL_WARNS() << "LLLFS: Unable to write file (seek failed): " << mFileName << LL_ENDL; mBytesRead = 0; // fail return true; } } mBytesRead = outfile.write(mBuffer, mBytes ); complete = true; -// llinfos << "LLLFSThread::WRITE:" << mFileName << " Bytes: " << mBytesRead << "/" << mBytes << " Offset:" << mOffset << llendl; +// LL_INFOS() << "LLLFSThread::WRITE:" << mFileName << " Bytes: " << mBytesRead << "/" << mBytes << " Offset:" << mOffset << LL_ENDL; } else { - llerrs << "LLLFSThread::unknown operation: " << (S32)mOperation << llendl; + LL_ERRS() << "LLLFSThread::unknown operation: " << (S32)mOperation << LL_ENDL; } return complete; } diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index ea67b8027b..2120812f91 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -73,7 +73,7 @@ LLVFile::~LLVFile() { if (!(mMode & LLVFile::WRITE)) { - //llwarns << "Destroying LLVFile with pending async read/write, aborting..." << llendl; + //LL_WARNS() << "Destroying LLVFile with pending async read/write, aborting..." << LL_ENDL; sVFSThread->setFlags(mHandle, LLVFSThread::FLAG_AUTO_COMPLETE | LLVFSThread::FLAG_ABORT); } else // WRITE @@ -89,13 +89,13 @@ BOOL LLVFile::read(U8 *buffer, S32 bytes, BOOL async, F32 priority) { if (! (mMode & READ)) { - llwarns << "Attempt to read from file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << llendl; + LL_WARNS() << "Attempt to read from file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << LL_ENDL; return FALSE; } if (mHandle != LLVFSThread::nullHandle()) { - llwarns << "Attempt to read from vfile object " << mFileID << " with pending async operation" << llendl; + LL_WARNS() << "Attempt to read from vfile object " << mFileID << " with pending async operation" << LL_ENDL; return FALSE; } mPriority = priority; @@ -199,11 +199,11 @@ BOOL LLVFile::write(const U8 *buffer, S32 bytes) { if (! (mMode & WRITE)) { - llwarns << "Attempt to write to file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << llendl; + LL_WARNS() << "Attempt to write to file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << LL_ENDL; } if (mHandle != LLVFSThread::nullHandle()) { - llerrs << "Attempt to write to vfile object " << mFileID << " with pending async operation" << llendl; + LL_ERRS() << "Attempt to write to vfile object " << mFileID << " with pending async operation" << LL_ENDL; return FALSE; } BOOL success = TRUE; @@ -233,7 +233,7 @@ BOOL LLVFile::write(const U8 *buffer, S32 bytes) if (wrote < bytes) { - llwarns << "Tried to write " << bytes << " bytes, actually wrote " << wrote << llendl; + LL_WARNS() << "Tried to write " << bytes << " bytes, actually wrote " << wrote << LL_ENDL; success = FALSE; } @@ -253,7 +253,7 @@ BOOL LLVFile::seek(S32 offset, S32 origin) { if (mMode == APPEND) { - llwarns << "Attempt to seek on append-only file" << llendl; + LL_WARNS() << "Attempt to seek on append-only file" << LL_ENDL; return FALSE; } @@ -268,14 +268,14 @@ BOOL LLVFile::seek(S32 offset, S32 origin) if (new_pos > size) { - llwarns << "Attempt to seek past end of file" << llendl; + LL_WARNS() << "Attempt to seek past end of file" << LL_ENDL; mPosition = size; return FALSE; } else if (new_pos < 0) { - llwarns << "Attempt to seek past beginning of file" << llendl; + LL_WARNS() << "Attempt to seek past beginning of file" << LL_ENDL; mPosition = 0; return FALSE; @@ -309,7 +309,7 @@ BOOL LLVFile::setMaxSize(S32 size) { if (! (mMode & WRITE)) { - llwarns << "Attempt to change size of file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << llendl; + LL_WARNS() << "Attempt to change size of file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << LL_ENDL; return FALSE; } @@ -322,7 +322,7 @@ BOOL LLVFile::setMaxSize(S32 size) { if (count % 100 == 0) { - llinfos << "VFS catching up... Pending: " << sVFSThread->getPending() << llendl; + LL_INFOS() << "VFS catching up... Pending: " << sVFSThread->getPending() << LL_ENDL; } if (sVFSThread->isPaused()) { @@ -338,14 +338,14 @@ BOOL LLVFile::rename(const LLUUID &new_id, const LLAssetType::EType new_type) { if (! (mMode & WRITE)) { - llwarns << "Attempt to rename file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << llendl; + LL_WARNS() << "Attempt to rename file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << LL_ENDL; return FALSE; } if (mHandle != LLVFSThread::nullHandle()) { - llwarns << "Renaming file with pending async read" << llendl; + LL_WARNS() << "Renaming file with pending async read" << LL_ENDL; } waitForLock(VFSLOCK_READ); @@ -365,18 +365,18 @@ BOOL LLVFile::rename(const LLUUID &new_id, const LLAssetType::EType new_type) BOOL LLVFile::remove() { -// llinfos << "Removing file " << mFileID << llendl; +// LL_INFOS() << "Removing file " << mFileID << LL_ENDL; if (! (mMode & WRITE)) { // Leaving paranoia warning just because this should be a very infrequent // operation. - llwarns << "Remove file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << llendl; + LL_WARNS() << "Remove file " << mFileID << " opened with mode " << std::hex << mMode << std::dec << LL_ENDL; } if (mHandle != LLVFSThread::nullHandle()) { - llwarns << "Removing file with pending async read" << llendl; + LL_WARNS() << "Removing file with pending async read" << LL_ENDL; } // why not seek back to the beginning of the file too? diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 82c926620a..7b27579492 100755 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -637,7 +637,7 @@ void LLVFS::presizeDataFile(const U32 size) { if (!mDataFP) { - llerrs << "LLVFS::presizeDataFile() with no data file open" << llendl; + LL_ERRS() << "LLVFS::presizeDataFile() with no data file open" << LL_ENDL; return; } @@ -652,11 +652,11 @@ void LLVFS::presizeDataFile(const U32 size) if (tmp) { - llinfos << "Pre-sized VFS data file to " << ftell(mDataFP) << " bytes" << llendl; + LL_INFOS() << "Pre-sized VFS data file to " << ftell(mDataFP) << " bytes" << LL_ENDL; } else { - llwarns << "Failed to pre-size VFS data file" << llendl; + LL_WARNS() << "Failed to pre-size VFS data file" << LL_ENDL; } } @@ -666,7 +666,7 @@ BOOL LLVFS::getExists(const LLUUID &file_id, const LLAssetType::EType file_type) if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } lockData(); @@ -692,7 +692,7 @@ S32 LLVFS::getSize(const LLUUID &file_id, const LLAssetType::EType file_type) if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } @@ -719,7 +719,7 @@ S32 LLVFS::getMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } lockData(); @@ -755,15 +755,15 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } if (mReadOnly) { - llerrs << "Attempt to write to read-only VFS" << llendl; + LL_ERRS() << "Attempt to write to read-only VFS" << LL_ENDL; } if (max_size <= 0) { - llwarns << "VFS: Attempt to assign size " << max_size << " to vfile " << file_id << llendl; + LL_WARNS() << "VFS: Attempt to assign size " << max_size << " to vfile " << file_id << LL_ENDL; return FALSE; } @@ -810,7 +810,7 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type if (block->mLength < block->mSize) { // JC: Was a warning, but Ian says it's bad. - llerrs << "Truncating virtual file " << file_id << " to " << block->mLength << " bytes" << llendl; + LL_ERRS() << "Truncating virtual file " << file_id << " to " << block->mLength << " bytes" << LL_ENDL; block->mSize = block->mLength; } @@ -878,10 +878,10 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type fseek(mDataFP, new_data_location, SEEK_SET); if (fwrite(&buffer[0], block->mSize, 1, mDataFP) != 1) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } } else { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } } } @@ -898,7 +898,7 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type } else { - llwarns << "VFS: No space (" << max_size << ") to resize existing vfile " << file_id << llendl; + LL_WARNS() << "VFS: No space (" << max_size << ") to resize existing vfile " << file_id << LL_ENDL; //dumpMap(); unlockData(); dumpStatistics(); @@ -934,7 +934,7 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type } else { - llwarns << "VFS: No space (" << max_size << ") for new virtual file " << file_id << llendl; + LL_WARNS() << "VFS: No space (" << max_size << ") for new virtual file " << file_id << LL_ENDL; //dumpMap(); unlockData(); dumpStatistics(); @@ -953,11 +953,11 @@ void LLVFS::renameFile(const LLUUID &file_id, const LLAssetType::EType file_type { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } if (mReadOnly) { - llerrs << "Attempt to write to read-only VFS" << llendl; + LL_ERRS() << "Attempt to write to read-only VFS" << LL_ENDL; } lockData(); @@ -989,7 +989,7 @@ void LLVFS::renameFile(const LLUUID &file_id, const LLAssetType::EType file_type { if(dest_block->mLocks[i]) { - llerrs << "Renaming VFS block to a locked file." << llendl; + LL_ERRS() << "Renaming VFS block to a locked file." << LL_ENDL; } dest_block->mLocks[i] = src_block->mLocks[i]; } @@ -1009,7 +1009,7 @@ void LLVFS::renameFile(const LLUUID &file_id, const LLAssetType::EType file_type } else { - llwarns << "VFS: Attempt to rename nonexistent vfile " << file_id << ":" << file_type << llendl; + LL_WARNS() << "VFS: Attempt to rename nonexistent vfile " << file_id << ":" << file_type << LL_ENDL; } unlockData(); } @@ -1041,11 +1041,11 @@ void LLVFS::removeFile(const LLUUID &file_id, const LLAssetType::EType file_type { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } if (mReadOnly) { - llerrs << "Attempt to write to read-only VFS" << llendl; + LL_ERRS() << "Attempt to write to read-only VFS" << LL_ENDL; } lockData(); @@ -1059,7 +1059,7 @@ void LLVFS::removeFile(const LLUUID &file_id, const LLAssetType::EType file_type } else { - llwarns << "VFS: attempting to remove nonexistent file " << file_id << " type " << file_type << llendl; + LL_WARNS() << "VFS: attempting to remove nonexistent file " << file_id << " type " << file_type << LL_ENDL; } unlockData(); @@ -1072,7 +1072,7 @@ S32 LLVFS::getData(const LLUUID &file_id, const LLAssetType::EType file_type, U8 if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } llassert(location >= 0); llassert(length >= 0); @@ -1091,7 +1091,7 @@ S32 LLVFS::getData(const LLUUID &file_id, const LLAssetType::EType file_type, U8 if (location > block->mSize) { - llwarns << "VFS: Attempt to read location " << location << " in file " << file_id << " of length " << block->mSize << llendl; + LL_WARNS() << "VFS: Attempt to read location " << location << " in file " << file_id << " of length " << block->mSize << LL_ENDL; } else { @@ -1119,11 +1119,11 @@ S32 LLVFS::storeData(const LLUUID &file_id, const LLAssetType::EType file_type, { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } if (mReadOnly) { - llerrs << "Attempt to write to read-only VFS" << llendl; + LL_ERRS() << "Attempt to write to read-only VFS" << LL_ENDL; } llassert(length > 0); @@ -1148,22 +1148,22 @@ S32 LLVFS::storeData(const LLUUID &file_id, const LLAssetType::EType file_type, if (block->mLength == BLOCK_LENGTH_INVALID) { // Block was removed, ignore write - llwarns << "VFS: Attempt to write to invalid block" + LL_WARNS() << "VFS: Attempt to write to invalid block" << " in file " << file_id << " location: " << in_loc << " bytes: " << length - << llendl; + << LL_ENDL; unlockData(); return length; } else if (location > block->mLength) { - llwarns << "VFS: Attempt to write to location " << location + LL_WARNS() << "VFS: Attempt to write to location " << location << " in file " << file_id << " type " << S32(file_type) << " of size " << block->mSize << " block length " << block->mLength - << llendl; + << LL_ENDL; unlockData(); return length; } @@ -1171,7 +1171,7 @@ S32 LLVFS::storeData(const LLUUID &file_id, const LLAssetType::EType file_type, { if (length > block->mLength - location ) { - llwarns << "VFS: Truncating write to virtual file " << file_id << " type " << S32(file_type) << llendl; + LL_WARNS() << "VFS: Truncating write to virtual file " << file_id << " type " << S32(file_type) << LL_ENDL; length = block->mLength - location; } U32 file_location = location + block->mLocation; @@ -1180,7 +1180,7 @@ S32 LLVFS::storeData(const LLUUID &file_id, const LLAssetType::EType file_type, S32 write_len = (S32)fwrite(buffer, 1, length, mDataFP); if (write_len != length) { - llwarns << llformat("VFS Write Error: %d != %d",write_len,length) << llendl; + LL_WARNS() << llformat("VFS Write Error: %d != %d",write_len,length) << LL_ENDL; } // fflush(mDataFP); @@ -1243,7 +1243,7 @@ void LLVFS::decLock(const LLUUID &file_id, const LLAssetType::EType file_type, E } else { - llwarns << "VFS: Decrementing zero-value lock " << lock << llendl; + LL_WARNS() << "VFS: Decrementing zero-value lock " << lock << LL_ENDL; } mLockCounts[lock]--; } @@ -1295,7 +1295,7 @@ void LLVFS::eraseBlockLength(LLVFSBlock *block) } if(!found_block) { - llerrs << "eraseBlock could not find block" << llendl; + LL_ERRS() << "eraseBlock could not find block" << LL_ENDL; } } @@ -1318,7 +1318,7 @@ void LLVFS::addFreeBlock(LLVFSBlock *block) size_t dbgcount = mFreeBlocksByLocation.count(block->mLocation); if(dbgcount > 0) { - llerrs << "addFreeBlock called with block already in list" << llendl; + LL_ERRS() << "addFreeBlock called with block already in list" << LL_ENDL; } #endif @@ -1347,7 +1347,7 @@ void LLVFS::addFreeBlock(LLVFSBlock *block) if (merge_prev && merge_next) { - // llinfos << "VFS merge BOTH" << llendl; + // LL_INFOS() << "VFS merge BOTH" << LL_ENDL; // Previous block is changing length (a lot), so only need to update length map. // Next block is going away completely. JC eraseBlockLength(prev_block); @@ -1361,7 +1361,7 @@ void LLVFS::addFreeBlock(LLVFSBlock *block) } else if (merge_prev) { - // llinfos << "VFS merge previous" << llendl; + // LL_INFOS() << "VFS merge previous" << LL_ENDL; // Previous block is maintaining location, only changing length, // therefore only need to update the length map. JC eraseBlockLength(prev_block); @@ -1372,7 +1372,7 @@ void LLVFS::addFreeBlock(LLVFSBlock *block) } else if (merge_next) { - // llinfos << "VFS merge next" << llendl; + // LL_INFOS() << "VFS merge next" << LL_ENDL; // Next block is changing both location and length, // so both free lists must update. JC eraseBlock(next_block); @@ -1399,7 +1399,7 @@ void LLVFS::addFreeBlock(LLVFSBlock *block) //{ // if (!isValid()) // { -// llerrs << "Attempting to use invalid VFS!" << llendl; +// LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; // } // // TODO: could we optimize this with hints from the calling code? // blocks_location_map_t::iterator iter = mFreeBlocksByLocation.begin(); @@ -1458,11 +1458,11 @@ void LLVFS::sync(LLVFSFileBlock *block, BOOL remove) { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } if (mReadOnly) { - llwarns << "Attempt to sync read-only VFS" << llendl; + LL_WARNS() << "Attempt to sync read-only VFS" << LL_ENDL; return; } if (block->mLength == BLOCK_LENGTH_INVALID) @@ -1472,7 +1472,7 @@ void LLVFS::sync(LLVFSFileBlock *block, BOOL remove) } if (block->mLength == 0) { - llerrs << "VFS syncing zero-length block" << llendl; + LL_ERRS() << "VFS syncing zero-length block" << LL_ENDL; } BOOL set_index_to_end = FALSE; @@ -1524,7 +1524,7 @@ void LLVFS::sync(LLVFSFileBlock *block, BOOL remove) if (fwrite(buffer, LLVFSFileBlock::SERIAL_SIZE, 1, mIndexFP) != 1) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } // *NOTE: Why was this commented out? @@ -1540,7 +1540,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } LLVFSBlock *block = NULL; @@ -1585,7 +1585,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) if (lru_list.size() == 0) { // No more files to delete, and still not enough room! - llwarns << "VFS: Can't make " << size << " bytes of free space in VFS, giving up" << llendl; + LL_WARNS() << "VFS: Can't make " << size << " bytes of free space in VFS, giving up" << LL_ENDL; break; } @@ -1596,7 +1596,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) { // ditch this file and look again for a free block - should find it // TODO: it'll be faster just to assign the free block and break - llinfos << "LRU: Removing " << file_block->mFileID << ":" << file_block->mFileType << llendl; + LL_INFOS() << "LRU: Removing " << file_block->mFileID << ":" << file_block->mFileType << LL_ENDL; lru_list.erase(it); removeFileBlock(file_block); file_block = NULL; @@ -1604,7 +1604,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) } - llinfos << "VFS: LRU: Aggressive: " << (S32)lru_list.size() << " files remain" << llendl; + LL_INFOS() << "VFS: LRU: Aggressive: " << (S32)lru_list.size() << " files remain" << LL_ENDL; dumpLockCounts(); // Now it's time to aggressively make more space @@ -1619,7 +1619,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) file_block = *it; // TODO: it would be great to be able to batch all these sync() calls - // llinfos << "LRU2: Removing " << file_block->mFileID << ":" << file_block->mFileType << " last accessed" << file_block->mAccessTime << llendl; + // LL_INFOS() << "LRU2: Removing " << file_block->mFileID << ":" << file_block->mFileType << " last accessed" << file_block->mAccessTime << LL_ENDL; cleaned_up += file_block->mLength; lru_list.erase(it++); @@ -1633,7 +1633,7 @@ LLVFSBlock *LLVFS::findFreeBlock(S32 size, LLVFSFileBlock *immune) F32 time = timer.getElapsedTimeF32(); if (time > 0.5f) { - llwarns << "VFS: Spent " << time << " seconds in findFreeBlock!" << llendl; + LL_WARNS() << "VFS: Spent " << time << " seconds in findFreeBlock!" << LL_ENDL; } return block; @@ -1647,7 +1647,7 @@ void LLVFS::pokeFiles() { if (!isValid()) { - llerrs << "Attempting to use invalid VFS!" << llendl; + LL_ERRS() << "Attempting to use invalid VFS!" << LL_ENDL; } U32 word; @@ -1659,7 +1659,7 @@ void LLVFS::pokeFiles() fseek(mDataFP, 0, SEEK_SET); if (fwrite(&word, sizeof(word), 1, mDataFP) != 1) { - llwarns << "Could not write to data file" << llendl; + LL_WARNS() << "Could not write to data file" << LL_ENDL; } fflush(mDataFP); } @@ -1670,7 +1670,7 @@ void LLVFS::pokeFiles() fseek(mIndexFP, 0, SEEK_SET); if (fwrite(&word, sizeof(word), 1, mIndexFP) != 1) { - llwarns << "Could not write to index file" << llendl; + LL_WARNS() << "Could not write to index file" << LL_ENDL; } fflush(mIndexFP); } @@ -1679,20 +1679,20 @@ void LLVFS::pokeFiles() void LLVFS::dumpMap() { - llinfos << "Files:" << llendl; + LL_INFOS() << "Files:" << LL_ENDL; for (fileblock_map::iterator it = mFileBlocks.begin(); it != mFileBlocks.end(); ++it) { LLVFSFileBlock *file_block = (*it).second; - llinfos << "Location: " << file_block->mLocation << "\tLength: " << file_block->mLength << "\t" << file_block->mFileID << "\t" << file_block->mFileType << llendl; + LL_INFOS() << "Location: " << file_block->mLocation << "\tLength: " << file_block->mLength << "\t" << file_block->mFileID << "\t" << file_block->mFileType << LL_ENDL; } - llinfos << "Free Blocks:" << llendl; + LL_INFOS() << "Free Blocks:" << LL_ENDL; for (blocks_location_map_t::iterator iter = mFreeBlocksByLocation.begin(), end = mFreeBlocksByLocation.end(); iter != end; iter++) { LLVFSBlock *free_block = iter->second; - llinfos << "Location: " << free_block->mLocation << "\tLength: " << free_block->mLength << llendl; + LL_INFOS() << "Location: " << free_block->mLocation << "\tLength: " << free_block->mLength << LL_ENDL; } } @@ -1716,7 +1716,7 @@ void LLVFS::audit() if (fread(&buffer[0], 1, index_size, mIndexFP) != index_size) { - llwarns << "Index truncated" << llendl; + LL_WARNS() << "Index truncated" << LL_ENDL; vfs_corrupt = TRUE; } @@ -1745,7 +1745,7 @@ void LLVFS::audit() { if (mFileBlocks.find(*block) == mFileBlocks.end()) { - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " on disk, not in memory, loc " << block->mIndexLocation << llendl; + LL_WARNS() << "VFile " << block->mFileID << ":" << block->mFileType << " on disk, not in memory, loc " << block->mIndexLocation << LL_ENDL; } else if (found_files.find(*block) != found_files.end()) { @@ -1757,22 +1757,22 @@ void LLVFS::audit() mIndexFP = NULL; unlockAndClose(mDataFP); mDataFP = NULL; - llwarns << "VFS: Original block index " << block->mIndexLocation + LL_WARNS() << "VFS: Original block index " << block->mIndexLocation << " location " << block->mLocation << " length " << block->mLength << " size " << block->mSize << " id " << block->mFileID << " type " << block->mFileType - << llendl; - llwarns << "VFS: Duplicate block index " << dupe->mIndexLocation + << LL_ENDL; + LL_WARNS() << "VFS: Duplicate block index " << dupe->mIndexLocation << " location " << dupe->mLocation << " length " << dupe->mLength << " size " << dupe->mSize << " id " << dupe->mFileID << " type " << dupe->mFileType - << llendl; - llwarns << "VFS: Index size " << index_size << llendl; - llwarns << "VFS: INDEX CORRUPT" << llendl; + << LL_ENDL; + LL_WARNS() << "VFS: Index size " << index_size << LL_ENDL; + LL_WARNS() << "VFS: INDEX CORRUPT" << LL_ENDL; vfs_corrupt = TRUE; break; } @@ -1785,7 +1785,7 @@ void LLVFS::audit() { if (block->mLength) { - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " corrupt on disk" << llendl; + LL_WARNS() << "VFile " << block->mFileID << ":" << block->mFileType << " corrupt on disk" << LL_ENDL; } // else this is just a hole } @@ -1801,19 +1801,19 @@ void LLVFS::audit() { if (! found_files.count(*block)) { - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " in memory, not on disk, loc " << block->mIndexLocation<< llendl; + LL_WARNS() << "VFile " << block->mFileID << ":" << block->mFileType << " in memory, not on disk, loc " << block->mIndexLocation<< LL_ENDL; fseek(mIndexFP, block->mIndexLocation, SEEK_SET); U8 buf[LLVFSFileBlock::SERIAL_SIZE]; if (fread(buf, LLVFSFileBlock::SERIAL_SIZE, 1, mIndexFP) != 1) { - llwarns << "VFile " << block->mFileID - << " gave short read" << llendl; + LL_WARNS() << "VFile " << block->mFileID + << " gave short read" << LL_ENDL; } LLVFSFileBlock disk_block; disk_block.deserialize(buf, block->mIndexLocation); - llwarns << "Instead found " << disk_block.mFileID << ":" << block->mFileType << llendl; + LL_WARNS() << "Instead found " << disk_block.mFileID << ":" << block->mFileType << LL_ENDL; } else { @@ -1827,10 +1827,10 @@ void LLVFS::audit() iter != found_files.end(); iter++) { LLVFSFileBlock* block = iter->second; - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " szie:" << block->mSize << " leftover" << llendl; + LL_WARNS() << "VFile " << block->mFileID << ":" << block->mFileType << " szie:" << block->mSize << " leftover" << LL_ENDL; } - llinfos << "VFS: audit OK" << llendl; + LL_INFOS() << "VFS: audit OK" << LL_ENDL; // mutex released by LLMutexLock() destructor. } @@ -1857,12 +1857,12 @@ void LLVFS::checkMem() S32 index_loc = *iter; if (index_loc == block->mIndexLocation) { - llwarns << "VFile block " << block->mFileID << ":" << block->mFileType << " is marked as a hole" << llendl; + LL_WARNS() << "VFile block " << block->mFileID << ":" << block->mFileType << " is marked as a hole" << LL_ENDL; } } } - llinfos << "VFS: mem check OK" << llendl; + LL_INFOS() << "VFS: mem check OK" << LL_ENDL; unlockData(); } @@ -1872,7 +1872,7 @@ void LLVFS::dumpLockCounts() S32 i; for (i = 0; i < VFSLOCK_COUNT; i++) { - llinfos << "LockType: " << i << ": " << mLockCounts[i] << llendl; + LL_INFOS() << "LockType: " << i << ": " << mLockCounts[i] << LL_ENDL; } } @@ -1897,7 +1897,7 @@ void LLVFS::dumpStatistics() } else if (file_block->mLength <= 0) { - llinfos << "Bad file block at: " << file_block->mLocation << "\tLength: " << file_block->mLength << "\t" << file_block->mFileID << "\t" << file_block->mFileType << llendl; + LL_INFOS() << "Bad file block at: " << file_block->mLocation << "\tLength: " << file_block->mLength << "\t" << file_block->mFileID << "\t" << file_block->mFileType << LL_ENDL; size_counts[file_block->mLength]++; location_counts[file_block->mLocation]++; } @@ -1919,13 +1919,13 @@ void LLVFS::dumpStatistics() { S32 size = it->first; S32 size_count = it->second; - llinfos << "Bad files size " << size << " count " << size_count << llendl; + LL_INFOS() << "Bad files size " << size << " count " << size_count << LL_ENDL; } for (std::map::iterator it = location_counts.begin(); it != location_counts.end(); ++it) { U32 location = it->first; S32 location_count = it->second; - llinfos << "Bad files location " << location << " count " << location_count << llendl; + LL_INFOS() << "Bad files location " << location << " count " << location_count << LL_ENDL; } // Investigate free list. @@ -1939,14 +1939,14 @@ void LLVFS::dumpStatistics() LLVFSBlock *free_block = iter->second; if (free_block->mLength <= 0) { - llinfos << "Bad free block at: " << free_block->mLocation << "\tLength: " << free_block->mLength << llendl; + LL_INFOS() << "Bad free block at: " << free_block->mLocation << "\tLength: " << free_block->mLength << LL_ENDL; } else { - llinfos << "Block: " << free_block->mLocation + LL_INFOS() << "Block: " << free_block->mLocation << "\tLength: " << free_block->mLength << "\tEnd: " << free_block->mLocation + free_block->mLength - << llendl; + << LL_ENDL; total_free_size += free_block->mLength; } @@ -1961,38 +1961,38 @@ void LLVFS::dumpStatistics() // Dump histogram of free block sizes for (std::map::iterator it = free_length_counts.begin(); it != free_length_counts.end(); ++it) { - llinfos << "Free length " << it->first << " count " << it->second << llendl; + LL_INFOS() << "Free length " << it->first << " count " << it->second << LL_ENDL; } - llinfos << "Invalid blocks: " << invalid_file_count << llendl; - llinfos << "File blocks: " << mFileBlocks.size() << llendl; + LL_INFOS() << "Invalid blocks: " << invalid_file_count << LL_ENDL; + LL_INFOS() << "File blocks: " << mFileBlocks.size() << LL_ENDL; S32 length_list_count = (S32)mFreeBlocksByLength.size(); S32 location_list_count = (S32)mFreeBlocksByLocation.size(); if (length_list_count == location_list_count) { - llinfos << "Free list lengths match, free blocks: " << location_list_count << llendl; + LL_INFOS() << "Free list lengths match, free blocks: " << location_list_count << LL_ENDL; } else { - llwarns << "Free list lengths do not match!" << llendl; - llwarns << "By length: " << length_list_count << llendl; - llwarns << "By location: " << location_list_count << llendl; + LL_WARNS() << "Free list lengths do not match!" << LL_ENDL; + LL_WARNS() << "By length: " << length_list_count << LL_ENDL; + LL_WARNS() << "By location: " << location_list_count << LL_ENDL; } - llinfos << "Max file: " << max_file_size/1024 << "K" << llendl; - llinfos << "Max free: " << max_free_size/1024 << "K" << llendl; - llinfos << "Total file size: " << total_file_size/1024 << "K" << llendl; - llinfos << "Total free size: " << total_free_size/1024 << "K" << llendl; - llinfos << "Sum: " << (total_file_size + total_free_size) << " bytes" << llendl; - llinfos << llformat("%.0f%% full",((F32)(total_file_size)/(F32)(total_file_size+total_free_size))*100.f) << llendl; + LL_INFOS() << "Max file: " << max_file_size/1024 << "K" << LL_ENDL; + LL_INFOS() << "Max free: " << max_free_size/1024 << "K" << LL_ENDL; + LL_INFOS() << "Total file size: " << total_file_size/1024 << "K" << LL_ENDL; + LL_INFOS() << "Total free size: " << total_free_size/1024 << "K" << LL_ENDL; + LL_INFOS() << "Sum: " << (total_file_size + total_free_size) << " bytes" << LL_ENDL; + LL_INFOS() << llformat("%.0f%% full",((F32)(total_file_size)/(F32)(total_file_size+total_free_size))*100.f) << LL_ENDL; - llinfos << " " << llendl; + LL_INFOS() << " " << LL_ENDL; for (std::map >::iterator iter = filetype_counts.begin(); iter != filetype_counts.end(); ++iter) { - llinfos << "Type: " << LLAssetType::getDesc(iter->first) + LL_INFOS() << "Type: " << LLAssetType::getDesc(iter->first) << " Count: " << iter->second.first - << " Bytes: " << (iter->second.second>>20) << " MB" << llendl; + << " Bytes: " << (iter->second.second>>20) << " MB" << LL_ENDL; } // Look for potential merges @@ -2007,7 +2007,7 @@ void LLVFS::dumpStatistics() LLVFSBlock *second_block = iter->second; if (first_block->mLocation + first_block->mLength == second_block->mLocation) { - llinfos << "Potential merge at " << first_block->mLocation << llendl; + LL_INFOS() << "Potential merge at " << first_block->mLocation << LL_ENDL; } first_block = second_block; } @@ -2062,10 +2062,10 @@ void LLVFS::listFiles() { LLUUID id = file_spec.mFileID; std::string extension = get_extension(file_spec.mFileType); - llinfos << " File: " << id + LL_INFOS() << " File: " << id << " Type: " << LLAssetType::getDesc(file_spec.mFileType) << " Size: " << size - << llendl; + << LL_ENDL; } } @@ -2096,7 +2096,7 @@ void LLVFS::dumpFiles() std::string extension = get_extension(type); std::string filename = id.asString() + extension; - llinfos << " Writing " << filename << llendl; + LL_INFOS() << " Writing " << filename << LL_ENDL; LLAPRFile outfile; outfile.open(filename, LL_APR_WB); @@ -2109,7 +2109,7 @@ void LLVFS::dumpFiles() unlockData(); - llinfos << "Extracted " << files_extracted << " files out of " << mFileBlocks.size() << llendl; + LL_INFOS() << "Extracted " << files_extracted << " files out of " << mFileBlocks.size() << LL_ENDL; } //============================================================================ diff --git a/indra/llvfs/llvfsthread.cpp b/indra/llvfs/llvfsthread.cpp index a57e2b15ab..8cd85929e2 100755 --- a/indra/llvfs/llvfsthread.cpp +++ b/indra/llvfs/llvfsthread.cpp @@ -88,7 +88,7 @@ LLVFSThread::handle_t LLVFSThread::read(LLVFS* vfs, const LLUUID &file_id, const bool res = addRequest(req); if (!res) { - llerrs << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << LL_ENDL; req->deleteRequest(); handle = nullHandle(); } @@ -107,7 +107,7 @@ S32 LLVFSThread::readImmediate(LLVFS* vfs, const LLUUID &file_id, const LLAssetT S32 res = addRequest(req) ? 1 : 0; if (res == 0) { - llerrs << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << LL_ENDL; req->deleteRequest(); } else @@ -130,7 +130,7 @@ LLVFSThread::handle_t LLVFSThread::write(LLVFS* vfs, const LLUUID &file_id, cons bool res = addRequest(req); if (!res) { - llerrs << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << LL_ENDL; req->deleteRequest(); handle = nullHandle(); } @@ -149,7 +149,7 @@ S32 LLVFSThread::writeImmediate(LLVFS* vfs, const LLUUID &file_id, const LLAsset S32 res = addRequest(req) ? 1 : 0; if (res == 0) { - llerrs << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << llendl; + LL_ERRS() << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << LL_ENDL; req->deleteRequest(); } else @@ -175,7 +175,7 @@ S32 LLVFSThread::writeImmediate(LLVFS* vfs, const LLUUID &file_id, const LLAsset // bool res = addRequest(req); // if (!res) // { -// llerrs << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << llendl; +// LL_ERRS() << "LLVFSThread::read called after LLVFSThread::cleanupClass()" << LL_ENDL; // req->deleteRequest(); // handle = nullHandle(); // } @@ -203,17 +203,17 @@ LLVFSThread::Request::Request(handle_t handle, U32 priority, U32 flags, if (numbytes <= 0 && mOperation != FILE_RENAME) { - llwarns << "LLVFSThread: Request with numbytes = " << numbytes + LL_WARNS() << "LLVFSThread: Request with numbytes = " << numbytes << " operation = " << op << " offset " << offset - << " file_type " << file_type << llendl; + << " file_type " << file_type << LL_ENDL; } if (mOperation == FILE_WRITE) { S32 blocksize = mVFS->getMaxSize(mFileID, mFileType); if (blocksize < 0) { - llwarns << "VFS write to temporary block (shouldn't happen)" << llendl; + LL_WARNS() << "VFS write to temporary block (shouldn't happen)" << LL_ENDL; } mVFS->incLock(mFileID, mFileType, VFSLOCK_APPEND); } @@ -248,7 +248,7 @@ void LLVFSThread::Request::deleteRequest() { if (getStatus() == STATUS_QUEUED) { - llerrs << "Attempt to delete a queued LLVFSThread::Request!" << llendl; + LL_ERRS() << "Attempt to delete a queued LLVFSThread::Request!" << LL_ENDL; } if (mOperation == FILE_WRITE) { @@ -273,13 +273,13 @@ bool LLVFSThread::Request::processRequest() llassert(mOffset >= 0); mBytesRead = mVFS->getData(mFileID, mFileType, mBuffer, mOffset, mBytes); complete = true; - //llinfos << llformat("LLVFSThread::READ '%s': %d bytes arg:%d",getFilename(),mBytesRead) << llendl; + //LL_INFOS() << llformat("LLVFSThread::READ '%s': %d bytes arg:%d",getFilename(),mBytesRead) << LL_ENDL; } else if (mOperation == FILE_WRITE) { mBytesRead = mVFS->storeData(mFileID, mFileType, mBuffer, mOffset, mBytes); complete = true; - //llinfos << llformat("LLVFSThread::WRITE '%s': %d bytes arg:%d",getFilename(),mBytesRead) << llendl; + //LL_INFOS() << llformat("LLVFSThread::WRITE '%s': %d bytes arg:%d",getFilename(),mBytesRead) << LL_ENDL; } else if (mOperation == FILE_RENAME) { @@ -288,11 +288,11 @@ bool LLVFSThread::Request::processRequest() mVFS->renameFile(mFileID, mFileType, *new_idp, new_type); mFileID = *new_idp; complete = true; - //llinfos << llformat("LLVFSThread::RENAME '%s': %d bytes arg:%d",getFilename(),mBytesRead) << llendl; + //LL_INFOS() << llformat("LLVFSThread::RENAME '%s': %d bytes arg:%d",getFilename(),mBytesRead) << LL_ENDL; } else { - llerrs << llformat("LLVFSThread::unknown operation: %d", mOperation) << llendl; + LL_ERRS() << llformat("LLVFSThread::unknown operation: %d", mOperation) << LL_ENDL; } return complete; } diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index 15acddd987..d00d9ab47e 100755 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -242,11 +242,11 @@ class LLDragDropWin32Target: LLCoordWindow cursor_coord_window( pt_client.x, pt_client.y ); LLCoordGL gl_coord(cursor_coord_window.convert()); - llinfos << "### (Drop) URL is: " << mDropUrl << llendl; - llinfos << "### raw coords are: " << pt.x << " x " << pt.y << llendl; - llinfos << "### client coords are: " << pt_client.x << " x " << pt_client.y << llendl; - llinfos << "### GL coords are: " << gl_coord.mX << " x " << gl_coord.mY << llendl; - llinfos << llendl; + LL_INFOS() << "### (Drop) URL is: " << mDropUrl << LL_ENDL; + LL_INFOS() << "### raw coords are: " << pt.x << " x " << pt.y << LL_ENDL; + LL_INFOS() << "### client coords are: " << pt_client.x << " x " << pt_client.y << LL_ENDL; + LL_INFOS() << "### GL coords are: " << gl_coord.mX << " x " << gl_coord.mY << LL_ENDL; + LL_INFOS() << LL_ENDL; // no keyboard modifier option yet but we could one day MASK mask = gKeyboard->currentMask( TRUE ); diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp index 3579b5d42f..f34af324ef 100755 --- a/indra/llwindow/lldxhardware.cpp +++ b/indra/llwindow/lldxhardware.cpp @@ -120,7 +120,7 @@ BOOL LLVersion::set(const std::string &version_string) } if (count < 4) { - //llwarns << "Potentially bogus version string!" << version_string << llendl; + //LL_WARNS() << "Potentially bogus version string!" << version_string << LL_ENDL; for (i = 0; i < 4; i++) { mFields[i] = 0; @@ -160,10 +160,10 @@ std::string LLDXDriverFile::dump() gWriteDebug(mDateString.c_str()); gWriteDebug("\n"); } - llinfos << mFilepath << llendl; - llinfos << mName << llendl; - llinfos << mVersionString << llendl; - llinfos << mDateString << llendl; + LL_INFOS() << mFilepath << LL_ENDL; + LL_INFOS() << mName << LL_ENDL; + LL_INFOS() << mVersionString << LL_ENDL; + LL_INFOS() << mDateString << LL_ENDL; return ""; } @@ -185,11 +185,11 @@ std::string LLDXDevice::dump() gWriteDebug(mPCIString.c_str()); gWriteDebug("\n"); } - llinfos << llendl; - llinfos << "DeviceName:" << mName << llendl; - llinfos << "PCIString:" << mPCIString << llendl; - llinfos << "Drivers" << llendl; - llinfos << "-------" << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << "DeviceName:" << mName << LL_ENDL; + LL_INFOS() << "PCIString:" << mPCIString << LL_ENDL; + LL_INFOS() << "Drivers" << LL_ENDL; + LL_INFOS() << "-------" << LL_ENDL; for (driver_file_map_t::iterator iter = mDriverFiles.begin(), end = mDriverFiles.end(); iter != end; iter++) @@ -549,7 +549,7 @@ LLSD LLDXHardware::getDisplayInfo() IDxDiagContainer *driver_containerp = NULL; // CoCreate a IDxDiagProvider* - llinfos << "CoCreateInstance IID_IDxDiagProvider" << llendl; + LL_INFOS() << "CoCreateInstance IID_IDxDiagProvider" << LL_ENDL; hr = CoCreateInstance(CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER, @@ -558,7 +558,7 @@ LLSD LLDXHardware::getDisplayInfo() if (FAILED(hr)) { - llwarns << "No DXDiag provider found! DirectX 9 not installed!" << llendl; + LL_WARNS() << "No DXDiag provider found! DirectX 9 not installed!" << LL_ENDL; gWriteDebug("No DXDiag provider found! DirectX 9 not installed!\n"); goto LCleanup; } @@ -576,14 +576,14 @@ LLSD LLDXHardware::getDisplayInfo() dx_diag_init_params.bAllowWHQLChecks = TRUE; dx_diag_init_params.pReserved = NULL; - llinfos << "dx_diag_providerp->Initialize" << llendl; + LL_INFOS() << "dx_diag_providerp->Initialize" << LL_ENDL; hr = dx_diag_providerp->Initialize(&dx_diag_init_params); if(FAILED(hr)) { goto LCleanup; } - llinfos << "dx_diag_providerp->GetRootContainer" << llendl; + LL_INFOS() << "dx_diag_providerp->GetRootContainer" << LL_ENDL; hr = dx_diag_providerp->GetRootContainer( &dx_diag_rootp ); if(FAILED(hr) || !dx_diag_rootp) { @@ -593,7 +593,7 @@ LLSD LLDXHardware::getDisplayInfo() HRESULT hr; // Get display driver information - llinfos << "dx_diag_rootp->GetChildContainer" << llendl; + LL_INFOS() << "dx_diag_rootp->GetChildContainer" << LL_ENDL; hr = dx_diag_rootp->GetChildContainer(L"DxDiag_DisplayDevices", &devices_containerp); if(FAILED(hr) || !devices_containerp) { @@ -601,7 +601,7 @@ LLSD LLDXHardware::getDisplayInfo() } // Get device 0 - llinfos << "devices_containerp->GetChildContainer" << llendl; + LL_INFOS() << "devices_containerp->GetChildContainer" << LL_ENDL; hr = devices_containerp->GetChildContainer(L"0", &device_containerp); if(FAILED(hr) || !device_containerp) { diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index 41d4d41e83..f6f6c3931c 100755 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -187,7 +187,7 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) iter = mTranslateKeyMap.find(os_key); if (iter == mTranslateKeyMap.end()) { - //llwarns << "Unknown virtual key " << os_key << llendl; + //LL_WARNS() << "Unknown virtual key " << os_key << LL_ENDL; *out_key = 0; return FALSE; } @@ -258,7 +258,7 @@ BOOL LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask) handled = mCallbacks->handleTranslatedKeyUp(translated_key, translated_mask); } - LL_DEBUGS("UserInput") << "keyup -" << translated_key << "-" << llendl; + LL_DEBUGS("UserInput") << "keyup -" << translated_key << "-" << LL_ENDL; return handled; } @@ -321,7 +321,7 @@ BOOL LLKeyboard::keyFromString(const std::string& str, KEY *key) *key = res; return TRUE; } - llwarns << "keyFromString failed: " << str << llendl; + LL_WARNS() << "keyFromString failed: " << str << LL_ENDL; return FALSE; } @@ -363,7 +363,7 @@ std::string LLKeyboard::stringFromAccelerator( MASK accel_mask, KEY key ) if( trans == NULL ) { - llerrs << "No mKeyStringTranslator" << llendl; + LL_ERRS() << "No mKeyStringTranslator" << LL_ENDL; return res; } diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp index b76d526c5a..dc40dcdde0 100755 --- a/indra/llwindow/llkeyboardwin32.cpp +++ b/indra/llwindow/llkeyboardwin32.cpp @@ -266,7 +266,7 @@ void LLKeyboardWin32::scanKeyboard() // keydown in highest bit if (!pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000)) { - //llinfos << "Key up event missed, resetting" << llendl; + //LL_INFOS() << "Key up event missed, resetting" << LL_ENDL; mKeyLevel[key] = FALSE; } } diff --git a/indra/llwindow/llmousehandler.cpp b/indra/llwindow/llmousehandler.cpp index 8695e92f77..bea66e763c 100755 --- a/indra/llwindow/llmousehandler.cpp +++ b/indra/llwindow/llmousehandler.cpp @@ -39,7 +39,7 @@ BOOL LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType cli case CLICK_MIDDLE: handled = handleMiddleMouseDown(x, y, mask); break; case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break; default: - llwarns << "Unhandled enum." << llendl; + LL_WARNS() << "Unhandled enum." << LL_ENDL; } } else @@ -51,7 +51,7 @@ BOOL LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType cli case CLICK_MIDDLE: handled = handleMiddleMouseUp(x, y, mask); break; case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break; default: - llwarns << "Unhandled enum." << llendl; + LL_WARNS() << "Unhandled enum." << LL_ENDL; } } return handled; diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 6a8f0b59d1..466c3baccf 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -72,7 +72,7 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) S32 result = 0; #if LL_MESA_HEADLESS // !!! *FIX: (???) - llwarns << "OSMessageBox: " << text << llendl; + LL_WARNS() << "OSMessageBox: " << text << LL_ENDL; return OSBTN_OK; #elif LL_WINDOWS result = OSMessageBoxWin32(text, caption, type); @@ -422,7 +422,7 @@ LLWindow* LLWindowManager::createWindow( if (FALSE == new_window->isValid()) { delete new_window; - llwarns << "LLWindowManager::create() : Error creating window." << llendl; + LL_WARNS() << "LLWindowManager::create() : Error creating window." << LL_ENDL; return NULL; } sWindowList.insert(new_window); @@ -433,8 +433,8 @@ BOOL LLWindowManager::destroyWindow(LLWindow* window) { if (sWindowList.find(window) == sWindowList.end()) { - llerrs << "LLWindowManager::destroyWindow() : Window pointer not valid, this window doesn't exist!" - << llendl; + LL_ERRS() << "LLWindowManager::destroyWindow() : Window pointer not valid, this window doesn't exist!" + << LL_ENDL; return FALSE; } diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 6d887926fa..3ca659b78a 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -204,7 +204,7 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) // the case, since it is very unusual; these APIs are available from // the beginning, and all versions of IMM32.DLL should have them all. // Unfortunately, this code may be executed before initialization of - // the logging channel (llwarns), and we can't do it here... Yes, this + // the logging channel (LL_WARNS()), and we can't do it here... Yes, this // is one of disadvantages to use static constraction to DLL loading. FreeLibrary(mHImmDll); mHImmDll = NULL; @@ -1058,7 +1058,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO mhInstance, NULL); - LL_INFOS("Window") << "window is created." << llendl ; + LL_INFOS("Window") << "window is created." << LL_ENDL ; //----------------------------------------------------------------------- // Create GL drawing context @@ -1091,7 +1091,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO return FALSE; } - LL_INFOS("Window") << "Device context retrieved." << llendl ; + LL_INFOS("Window") << "Device context retrieved." << LL_ENDL ; if (!(pixel_format = ChoosePixelFormat(mhDC, &pfd))) { @@ -1101,7 +1101,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO return FALSE; } - LL_INFOS("Window") << "Pixel format chosen." << llendl ; + LL_INFOS("Window") << "Pixel format chosen." << LL_ENDL ; // Verify what pixel format we actually received. if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR), @@ -1114,35 +1114,35 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO } // (EXP-1765) dump pixel data to see if there is a pattern that leads to unreproducible crash - LL_INFOS("Window") << "--- begin pixel format dump ---" << llendl ; - LL_INFOS("Window") << "pixel_format is " << pixel_format << llendl ; - LL_INFOS("Window") << "pfd.nSize: " << pfd.nSize << llendl ; - LL_INFOS("Window") << "pfd.nVersion: " << pfd.nVersion << llendl ; - LL_INFOS("Window") << "pfd.dwFlags: 0x" << std::hex << pfd.dwFlags << std::dec << llendl ; - LL_INFOS("Window") << "pfd.iPixelType: " << (int)pfd.iPixelType << llendl ; - LL_INFOS("Window") << "pfd.cColorBits: " << (int)pfd.cColorBits << llendl ; - LL_INFOS("Window") << "pfd.cRedBits: " << (int)pfd.cRedBits << llendl ; - LL_INFOS("Window") << "pfd.cRedShift: " << (int)pfd.cRedShift << llendl ; - LL_INFOS("Window") << "pfd.cGreenBits: " << (int)pfd.cGreenBits << llendl ; - LL_INFOS("Window") << "pfd.cGreenShift: " << (int)pfd.cGreenShift << llendl ; - LL_INFOS("Window") << "pfd.cBlueBits: " << (int)pfd.cBlueBits << llendl ; - LL_INFOS("Window") << "pfd.cBlueShift: " << (int)pfd.cBlueShift << llendl ; - LL_INFOS("Window") << "pfd.cAlphaBits: " << (int)pfd.cAlphaBits << llendl ; - LL_INFOS("Window") << "pfd.cAlphaShift: " << (int)pfd.cAlphaShift << llendl ; - LL_INFOS("Window") << "pfd.cAccumBits: " << (int)pfd.cAccumBits << llendl ; - LL_INFOS("Window") << "pfd.cAccumRedBits: " << (int)pfd.cAccumRedBits << llendl ; - LL_INFOS("Window") << "pfd.cAccumGreenBits: " << (int)pfd.cAccumGreenBits << llendl ; - LL_INFOS("Window") << "pfd.cAccumBlueBits: " << (int)pfd.cAccumBlueBits << llendl ; - LL_INFOS("Window") << "pfd.cAccumAlphaBits: " << (int)pfd.cAccumAlphaBits << llendl ; - LL_INFOS("Window") << "pfd.cDepthBits: " << (int)pfd.cDepthBits << llendl ; - LL_INFOS("Window") << "pfd.cStencilBits: " << (int)pfd.cStencilBits << llendl ; - LL_INFOS("Window") << "pfd.cAuxBuffers: " << (int)pfd.cAuxBuffers << llendl ; - LL_INFOS("Window") << "pfd.iLayerType: " << (int)pfd.iLayerType << llendl ; - LL_INFOS("Window") << "pfd.bReserved: " << (int)pfd.bReserved << llendl ; - LL_INFOS("Window") << "pfd.dwLayerMask: " << pfd.dwLayerMask << llendl ; - LL_INFOS("Window") << "pfd.dwVisibleMask: " << pfd.dwVisibleMask << llendl ; - LL_INFOS("Window") << "pfd.dwDamageMask: " << pfd.dwDamageMask << llendl ; - LL_INFOS("Window") << "--- end pixel format dump ---" << llendl ; + LL_INFOS("Window") << "--- begin pixel format dump ---" << LL_ENDL ; + LL_INFOS("Window") << "pixel_format is " << pixel_format << LL_ENDL ; + LL_INFOS("Window") << "pfd.nSize: " << pfd.nSize << LL_ENDL ; + LL_INFOS("Window") << "pfd.nVersion: " << pfd.nVersion << LL_ENDL ; + LL_INFOS("Window") << "pfd.dwFlags: 0x" << std::hex << pfd.dwFlags << std::dec << LL_ENDL ; + LL_INFOS("Window") << "pfd.iPixelType: " << (int)pfd.iPixelType << LL_ENDL ; + LL_INFOS("Window") << "pfd.cColorBits: " << (int)pfd.cColorBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cRedBits: " << (int)pfd.cRedBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cRedShift: " << (int)pfd.cRedShift << LL_ENDL ; + LL_INFOS("Window") << "pfd.cGreenBits: " << (int)pfd.cGreenBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cGreenShift: " << (int)pfd.cGreenShift << LL_ENDL ; + LL_INFOS("Window") << "pfd.cBlueBits: " << (int)pfd.cBlueBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cBlueShift: " << (int)pfd.cBlueShift << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAlphaBits: " << (int)pfd.cAlphaBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAlphaShift: " << (int)pfd.cAlphaShift << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAccumBits: " << (int)pfd.cAccumBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAccumRedBits: " << (int)pfd.cAccumRedBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAccumGreenBits: " << (int)pfd.cAccumGreenBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAccumBlueBits: " << (int)pfd.cAccumBlueBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAccumAlphaBits: " << (int)pfd.cAccumAlphaBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cDepthBits: " << (int)pfd.cDepthBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cStencilBits: " << (int)pfd.cStencilBits << LL_ENDL ; + LL_INFOS("Window") << "pfd.cAuxBuffers: " << (int)pfd.cAuxBuffers << LL_ENDL ; + LL_INFOS("Window") << "pfd.iLayerType: " << (int)pfd.iLayerType << LL_ENDL ; + LL_INFOS("Window") << "pfd.bReserved: " << (int)pfd.bReserved << LL_ENDL ; + LL_INFOS("Window") << "pfd.dwLayerMask: " << pfd.dwLayerMask << LL_ENDL ; + LL_INFOS("Window") << "pfd.dwVisibleMask: " << pfd.dwVisibleMask << LL_ENDL ; + LL_INFOS("Window") << "pfd.dwDamageMask: " << pfd.dwDamageMask << LL_ENDL ; + LL_INFOS("Window") << "--- end pixel format dump ---" << LL_ENDL ; if (pfd.cColorBits < 32) { @@ -1184,7 +1184,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO return FALSE; } - LL_INFOS("Window") << "Drawing context is created." << llendl ; + LL_INFOS("Window") << "Drawing context is created." << LL_ENDL ; gGLManager.initWGL(); @@ -1241,7 +1241,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO while(!result && mFSAASamples > 0) { - llwarns << "FSAASamples: " << mFSAASamples << " not supported." << llendl ; + LL_WARNS() << "FSAASamples: " << mFSAASamples << " not supported." << LL_ENDL ; mFSAASamples /= 2 ; //try to decrease sample pixel number until to disable anti-aliasing if(mFSAASamples < 2) @@ -1263,13 +1263,13 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO if(result) { - llwarns << "Only support FSAASamples: " << mFSAASamples << llendl ; + LL_WARNS() << "Only support FSAASamples: " << mFSAASamples << LL_ENDL ; } } if (!result) { - llwarns << "mFSAASamples: " << mFSAASamples << llendl ; + LL_WARNS() << "mFSAASamples: " << mFSAASamples << LL_ENDL ; close(); show_window_creation_error("Error after wglChoosePixelFormatARB 32-bit"); @@ -1322,7 +1322,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO LL_INFOS("Window") << "Choosing pixel formats: " << num_formats << " pixel formats returned" << LL_ENDL; } - LL_INFOS("Window") << "pixel formats done." << llendl ; + LL_INFOS("Window") << "pixel formats done." << LL_ENDL ; S32 swap_method = 0; S32 cur_format = num_formats-1; @@ -1372,7 +1372,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO mhInstance, NULL); - LL_INFOS("Window") << "recreate window done." << llendl ; + LL_INFOS("Window") << "recreate window done." << LL_ENDL ; if (!(mhDC = GetDC(mWindowHandle))) { @@ -1481,8 +1481,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO } else { - llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) << - (LLRender::sGLCoreProfile ? " core" : " compatibility") << " context." << llendl; + LL_INFOS() << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) << + (LLRender::sGLCoreProfile ? " core" : " compatibility") << " context." << LL_ENDL; done = true; if (LLRender::sGLCoreProfile) @@ -1879,8 +1879,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_DEVICECHANGE"); if (gDebugWindowProc) { - llinfos << " WM_DEVICECHANGE: wParam=" << w_param - << "; lParam=" << l_param << llendl; + LL_INFOS() << " WM_DEVICECHANGE: wParam=" << w_param + << "; lParam=" << l_param << LL_ENDL; } if (w_param == DBT_DEVNODES_CHANGED || w_param == DBT_DEVICEARRIVAL) { @@ -2091,7 +2091,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_SETCONTEXT"); if (gDebugWindowProc) { - llinfos << "WM_IME_SETCONTEXT" << llendl; + LL_INFOS() << "WM_IME_SETCONTEXT" << LL_ENDL; } if (LLWinImm::isAvailable() && window_imp->mPreeditor) { @@ -2104,7 +2104,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_STARTCOMPOSITION"); if (gDebugWindowProc) { - llinfos << "WM_IME_STARTCOMPOSITION" << llendl; + LL_INFOS() << "WM_IME_STARTCOMPOSITION" << LL_ENDL; } if (LLWinImm::isAvailable() && window_imp->mPreeditor) { @@ -2117,7 +2117,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_ENDCOMPOSITION"); if (gDebugWindowProc) { - llinfos << "WM_IME_ENDCOMPOSITION" << llendl; + LL_INFOS() << "WM_IME_ENDCOMPOSITION" << LL_ENDL; } if (LLWinImm::isAvailable() && window_imp->mPreeditor) { @@ -2129,7 +2129,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_COMPOSITION"); if (gDebugWindowProc) { - llinfos << "WM_IME_COMPOSITION" << llendl; + LL_INFOS() << "WM_IME_COMPOSITION" << LL_ENDL; } if (LLWinImm::isAvailable() && window_imp->mPreeditor) { @@ -2142,7 +2142,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_IME_REQUEST"); if (gDebugWindowProc) { - llinfos << "WM_IME_REQUEST" << llendl; + LL_INFOS() << "WM_IME_REQUEST" << LL_ENDL; } if (LLWinImm::isAvailable() && window_imp->mPreeditor) { diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 666c03e9ff..36ee22e73e 100755 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -141,7 +141,7 @@ LLControlVariable::LLControlVariable(const std::string& name, eControlType type, { if (mPersist && mComment.empty()) { - llerrs << "Must supply a comment for control " << mName << llendl; + LL_ERRS() << "Must supply a comment for control " << mName << LL_ENDL; } //Push back versus setValue'ing here, since we don't want to call a signal yet mValues.push_back(initial); @@ -372,7 +372,7 @@ BOOL LLControlGroup::declareControl(const std::string& name, eControlType type, } else { - llwarns << "Control named " << name << " already exists, ignoring new declaration." << llendl; + LL_WARNS() << "Control named " << name << " already exists, ignoring new declaration." << LL_ENDL; } return TRUE; } @@ -593,7 +593,7 @@ void LLControlGroup::setUntypedValue(const std::string& name, const LLSD& val) } else { - CONTROL_ERRS << "Invalid control " << name << llendl; + CONTROL_ERRS << "Invalid control " << name << LL_ENDL; } } @@ -611,14 +611,14 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require if (!xml_controls.parseFile(filename)) { - llwarns << "Unable to open control file " << filename << llendl; + LL_WARNS() << "Unable to open control file " << filename << LL_ENDL; return 0; } LLXmlTreeNode* rootp = xml_controls.getRoot(); if (!rootp || !rootp->hasAttribute("version")) { - llwarns << "No valid settings header found in control file " << filename << llendl; + LL_WARNS() << "No valid settings header found in control file " << filename << LL_ENDL; return 0; } @@ -631,7 +631,7 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require // Check file version if (version != CURRENT_VERSION) { - llinfos << filename << " does not appear to be a version " << CURRENT_VERSION << " controls file" << llendl; + LL_INFOS() << filename << " does not appear to be a version " << CURRENT_VERSION << " controls file" << LL_ENDL; return 0; } @@ -649,7 +649,7 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require if (!name.empty()) { //read in to end of line - llwarns << "LLControlGroup::loadFromFile() : Trying to set \"" << name << "\", setting doesn't exist." << llendl; + LL_WARNS() << "LLControlGroup::loadFromFile() : Trying to set \"" << name << "\", setting doesn't exist." << LL_ENDL; } child_nodep = rootp->getNextChild(); continue; @@ -803,7 +803,7 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only LLControlVariable* control = iter->second; if (!control) { - llwarns << "Tried to save invalid control: " << iter->first << llendl; + LL_WARNS() << "Tried to save invalid control: " << iter->first << LL_ENDL; } if( control && control->isPersisted() ) @@ -818,7 +818,7 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only else { // Debug spam - // llinfos << "Skipping " << control->getName() << llendl; + // LL_INFOS() << "Skipping " << control->getName() << LL_ENDL; } } } @@ -828,12 +828,12 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only { LLSDSerialize::toPrettyXML(settings, file); file.close(); - llinfos << "Saved to " << filename << llendl; + LL_INFOS() << "Saved to " << filename << LL_ENDL; } else { // This is a warning because sometime we want to use settings files which can't be written... - llwarns << "Unable to open settings file: " << filename << llendl; + LL_WARNS() << "Unable to open settings file: " << filename << LL_ENDL; return 0; } return num_saved; @@ -846,14 +846,14 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v infile.open(filename); if(!infile.is_open()) { - llwarns << "Cannot find file " << filename << " to load." << llendl; + LL_WARNS() << "Cannot find file " << filename << " to load." << LL_ENDL; return 0; } if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXML(settings, infile)) { infile.close(); - llwarns << "Unable to parse LLSD control file " << filename << ". Trying Legacy Method." << llendl; + LL_WARNS() << "Unable to parse LLSD control file " << filename << ". Trying Legacy Method." << LL_ENDL; return loadFromFileLegacy(filename, TRUE, TYPE_STRING); } @@ -901,9 +901,9 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v } else { - llerrs << "Mismatched type of control variable '" + LL_ERRS() << "Mismatched type of control variable '" << name << "' found while loading '" - << filename << "'." << llendl; + << filename << "'." << LL_ENDL; } } else if(existing_control->isPersisted()) @@ -963,7 +963,7 @@ void main() BOOL_CONTROL baz; U32 count = gGlobals.loadFromFile("controls.ini"); - llinfos << "Loaded " << count << " controls" << llendl; + LL_INFOS() << "Loaded " << count << " controls" << LL_ENDL; // test insertion foo = new LLControlVariable("gFoo", 5.f, 1.f, 20.f); @@ -1120,7 +1120,7 @@ bool convert_from_llsd(const LLSD& sd, eControlType type, const std::strin return sd.asBoolean(); else { - CONTROL_ERRS << "Invalid BOOL value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid BOOL value for " << control_name << ": " << sd << LL_ENDL; return FALSE; } } @@ -1132,7 +1132,7 @@ S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return sd.asInteger(); else { - CONTROL_ERRS << "Invalid S32 value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid S32 value for " << control_name << ": " << sd << LL_ENDL; return 0; } } @@ -1144,7 +1144,7 @@ U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return sd.asInteger(); else { - CONTROL_ERRS << "Invalid U32 value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid U32 value for " << control_name << ": " << sd << LL_ENDL; return 0; } } @@ -1156,7 +1156,7 @@ F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return (F32) sd.asReal(); else { - CONTROL_ERRS << "Invalid F32 value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid F32 value for " << control_name << ": " << sd << LL_ENDL; return 0.0f; } } @@ -1168,7 +1168,7 @@ std::string convert_from_llsd(const LLSD& sd, eControlType type, co return sd.asString(); else { - CONTROL_ERRS << "Invalid string value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid string value for " << control_name << ": " << sd << LL_ENDL; return LLStringUtil::null; } } @@ -1186,7 +1186,7 @@ LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const return (LLVector3)sd; else { - CONTROL_ERRS << "Invalid LLVector3 value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid LLVector3 value for " << control_name << ": " << sd << LL_ENDL; return LLVector3::zero; } } @@ -1198,7 +1198,7 @@ LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, cons return (LLVector3d)sd; else { - CONTROL_ERRS << "Invalid LLVector3d value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid LLVector3d value for " << control_name << ": " << sd << LL_ENDL; return LLVector3d::zero; } } @@ -1210,7 +1210,7 @@ LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::s return LLRect(sd); else { - CONTROL_ERRS << "Invalid rect value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid rect value for " << control_name << ": " << sd << LL_ENDL; return LLRect::null; } } @@ -1224,26 +1224,26 @@ LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, const st LLColor4 color(sd); if (color.mV[VRED] < 0.f || color.mV[VRED] > 1.f) { - llwarns << "Color " << control_name << " red value out of range: " << color << llendl; + LL_WARNS() << "Color " << control_name << " red value out of range: " << color << LL_ENDL; } else if (color.mV[VGREEN] < 0.f || color.mV[VGREEN] > 1.f) { - llwarns << "Color " << control_name << " green value out of range: " << color << llendl; + LL_WARNS() << "Color " << control_name << " green value out of range: " << color << LL_ENDL; } else if (color.mV[VBLUE] < 0.f || color.mV[VBLUE] > 1.f) { - llwarns << "Color " << control_name << " blue value out of range: " << color << llendl; + LL_WARNS() << "Color " << control_name << " blue value out of range: " << color << LL_ENDL; } else if (color.mV[VALPHA] < 0.f || color.mV[VALPHA] > 1.f) { - llwarns << "Color " << control_name << " alpha value out of range: " << color << llendl; + LL_WARNS() << "Color " << control_name << " alpha value out of range: " << color << LL_ENDL; } return LLColor4(sd); } else { - CONTROL_ERRS << "Control " << control_name << " not a color" << llendl; + CONTROL_ERRS << "Control " << control_name << " not a color" << LL_ENDL; return LLColor4::white; } } @@ -1255,7 +1255,7 @@ LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const st return sd; else { - CONTROL_ERRS << "Invalid LLColor3 value for " << control_name << ": " << sd << llendl; + CONTROL_ERRS << "Invalid LLColor3 value for " << control_name << ": " << sd << LL_ENDL; return LLColor3::white; } } @@ -1290,13 +1290,13 @@ static LLCachedControl test_BrowserHomePage("BrowserHomePage", "hah void test_cached_control() { -#define TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl +#define TEST_LLCC(T, V) if((T)mySetting_##T != V) LL_ERRS() << "Fail "#T << LL_ENDL TEST_LLCC(U32, 666); TEST_LLCC(S32, (S32)-666); TEST_LLCC(F32, (F32)-666.666); TEST_LLCC(bool, true); TEST_LLCC(BOOL, FALSE); - if((std::string)mySetting_string != "Default String Value") llerrs << "Fail string" << llendl; + if((std::string)mySetting_string != "Default String Value") LL_ERRS() << "Fail string" << LL_ENDL; TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f)); TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f)); TEST_LLCC(LLRect, LLRect(0, 0, 100, 500)); @@ -1305,7 +1305,7 @@ void test_cached_control() TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255)); //There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd); - if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl; + if((std::string)test_BrowserHomePage != "http://www.secondlife.com") LL_ERRS() << "Fail BrowserHomePage" << LL_ENDL; } #endif // TEST_CACHED_CONTROL diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 2b8e449193..fd2b2fbccd 100755 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -159,7 +159,7 @@ typedef LLPointer LLControlVariablePtr; template eControlType get_control_type() { - llwarns << "Usupported control type: " << typeid(T).name() << "." << llendl; + LL_WARNS() << "Usupported control type: " << typeid(T).name() << "." << LL_ENDL; return TYPE_COUNT; } @@ -251,7 +251,7 @@ public: } else { - llwarns << "Control " << name << " not found." << llendl; + LL_WARNS() << "Control " << name << " not found." << LL_ENDL; return T(); } return convert_from_llsd(value, type, name); @@ -282,7 +282,7 @@ public: } else { - llwarns << "Invalid control " << name << llendl; + LL_WARNS() << "Invalid control " << name << LL_ENDL; } } @@ -318,7 +318,7 @@ public: { if(!declareTypedControl(group, name, default_value, comment)) { - llerrs << "The control could not be created!!!" << llendl; + LL_ERRS() << "The control could not be created!!!" << LL_ENDL; } } @@ -331,7 +331,7 @@ public: { if(!group.controlExists(name)) { - llerrs << "Control named " << name << "not found." << llendl; + LL_ERRS() << "Control named " << name << "not found." << LL_ENDL; } bindToControl(group, name); diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 7aa2ce9606..cb99496ef1 100755 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -388,7 +388,7 @@ void XMLCALL StartXMLNode(void *userData, if (NULL == parent) { - llwarns << "parent (userData) is NULL; aborting function" << llendl; + LL_WARNS() << "parent (userData) is NULL; aborting function" << LL_ENDL; return; } @@ -576,7 +576,7 @@ bool LLXMLNode::updateNode( if (!node || !update_node) { - llwarns << "Node invalid" << llendl; + LL_WARNS() << "Node invalid" << LL_ENDL; return FALSE; } @@ -700,10 +700,10 @@ bool LLXMLNode::parseBuffer( // Do the parsing if (XML_Parse(my_parser, (const char *)buffer, length, TRUE) != XML_STATUS_OK) { - llwarns << "Error parsing xml error code: " + LL_WARNS() << "Error parsing xml error code: " << XML_ErrorString(XML_GetErrorCode(my_parser)) << " on line " << XML_GetCurrentLineNumber(my_parser) - << llendl; + << LL_ENDL; } // Deinit @@ -711,8 +711,8 @@ bool LLXMLNode::parseBuffer( if (!file_node->mChildren || file_node->mChildren->map.size() != 1) { - llwarns << "Parse failure - wrong number of top-level nodes xml." - << llendl; + LL_WARNS() << "Parse failure - wrong number of top-level nodes xml." + << LL_ENDL; node = NULL ; return false; } @@ -755,10 +755,10 @@ bool LLXMLNode::parseStream( if (XML_Parse(my_parser, (const char *)buffer, count, !str.good()) != XML_STATUS_OK) { - llwarns << "Error parsing xml error code: " + LL_WARNS() << "Error parsing xml error code: " << XML_ErrorString(XML_GetErrorCode(my_parser)) << " on lne " << XML_GetCurrentLineNumber(my_parser) - << llendl; + << LL_ENDL; break; } } @@ -770,8 +770,8 @@ bool LLXMLNode::parseStream( if (!file_node->mChildren || file_node->mChildren->map.size() != 1) { - llwarns << "Parse failure - wrong number of top-level nodes xml." - << llendl; + LL_WARNS() << "Parse failure - wrong number of top-level nodes xml." + << LL_ENDL; node = NULL; return false; } @@ -839,7 +839,7 @@ bool LLXMLNode::getLayeredXMLNode(LLXMLNodePtr& root, if (!LLXMLNode::parseFile(filename, root, NULL)) { - llwarns << "Problem reading UI description file: " << filename << llendl; + LL_WARNS() << "Problem reading UI description file: " << filename << LL_ENDL; return false; } @@ -859,7 +859,7 @@ bool LLXMLNode::getLayeredXMLNode(LLXMLNodePtr& root, if (!LLXMLNode::parseFile(layer_filename, updateRoot, NULL)) { - llwarns << "Problem reading localized UI description file: " << layer_filename << llendl; + LL_WARNS() << "Problem reading localized UI description file: " << layer_filename << LL_ENDL; return false; } @@ -898,7 +898,7 @@ void LLXMLNode::writeToFile(LLFILE *out_file, const std::string& indent, bool us size_t written = fwrite(outstring.c_str(), 1, outstring.length(), out_file); if (written != outstring.length()) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } } @@ -1735,9 +1735,9 @@ U32 LLXMLNode::getBoolValue(U32 expected_length, BOOL *array) #if LL_DEBUG if (ret_length != expected_length) { - lldebugs << "LLXMLNode::getBoolValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getBoolValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << ret_length << llendl; + << "only found " << ret_length << LL_ENDL; } #endif return ret_length; @@ -1756,8 +1756,8 @@ U32 LLXMLNode::getByteValue(U32 expected_length, U8 *array, Encoding encoding) if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getByteValue asked for " << expected_length - << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getByteValue asked for " << expected_length + << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -1780,7 +1780,7 @@ U32 LLXMLNode::getByteValue(U32 expected_length, U8 *array, Encoding encoding) } if (value > 255 || is_negative) { - llwarns << "getByteValue: Value outside of valid range." << llendl; + LL_WARNS() << "getByteValue: Value outside of valid range." << LL_ENDL; break; } array[i] = U8(value); @@ -1788,9 +1788,9 @@ U32 LLXMLNode::getByteValue(U32 expected_length, U8 *array, Encoding encoding) #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getByteValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getByteValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif return i; @@ -1808,8 +1808,8 @@ U32 LLXMLNode::getIntValue(U32 expected_length, S32 *array, Encoding encoding) if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getIntValue asked for " << expected_length - << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getIntValue asked for " << expected_length + << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -1832,7 +1832,7 @@ U32 LLXMLNode::getIntValue(U32 expected_length, S32 *array, Encoding encoding) } if (value > 0x7fffffff) { - llwarns << "getIntValue: Value outside of valid range." << llendl; + LL_WARNS() << "getIntValue: Value outside of valid range." << LL_ENDL; break; } array[i] = S32(value) * (is_negative?-1:1); @@ -1841,9 +1841,9 @@ U32 LLXMLNode::getIntValue(U32 expected_length, S32 *array, Encoding encoding) #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getIntValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getIntValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif return i; @@ -1861,8 +1861,8 @@ U32 LLXMLNode::getUnsignedValue(U32 expected_length, U32 *array, Encoding encodi if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getUnsignedValue asked for " << expected_length - << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getUnsignedValue asked for " << expected_length + << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -1886,7 +1886,7 @@ U32 LLXMLNode::getUnsignedValue(U32 expected_length, U32 *array, Encoding encodi } if (is_negative || value > 0xffffffff) { - llwarns << "getUnsignedValue: Value outside of valid range." << llendl; + LL_WARNS() << "getUnsignedValue: Value outside of valid range." << LL_ENDL; break; } array[i] = U32(value); @@ -1895,9 +1895,9 @@ U32 LLXMLNode::getUnsignedValue(U32 expected_length, U32 *array, Encoding encodi #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getUnsignedValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getUnsignedValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif @@ -1916,7 +1916,7 @@ U32 LLXMLNode::getLongValue(U32 expected_length, U64 *array, Encoding encoding) if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getLongValue asked for " << expected_length << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getLongValue asked for " << expected_length << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -1940,7 +1940,7 @@ U32 LLXMLNode::getLongValue(U32 expected_length, U64 *array, Encoding encoding) } if (is_negative) { - llwarns << "getLongValue: Value outside of valid range." << llendl; + LL_WARNS() << "getLongValue: Value outside of valid range." << LL_ENDL; break; } array[i] = value; @@ -1949,9 +1949,9 @@ U32 LLXMLNode::getLongValue(U32 expected_length, U64 *array, Encoding encoding) #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getLongValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getLongValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif @@ -1970,7 +1970,7 @@ U32 LLXMLNode::getFloatValue(U32 expected_length, F32 *array, Encoding encoding) if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getFloatValue asked for " << expected_length << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getFloatValue asked for " << expected_length << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -1995,9 +1995,9 @@ U32 LLXMLNode::getFloatValue(U32 expected_length, F32 *array, Encoding encoding) #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getFloatValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getFloatValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif return i; @@ -2015,7 +2015,7 @@ U32 LLXMLNode::getDoubleValue(U32 expected_length, F64 *array, Encoding encoding if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getDoubleValue asked for " << expected_length << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getDoubleValue asked for " << expected_length << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -2040,9 +2040,9 @@ U32 LLXMLNode::getDoubleValue(U32 expected_length, F64 *array, Encoding encoding #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getDoubleValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getDoubleValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif return i; @@ -2056,7 +2056,7 @@ U32 LLXMLNode::getStringValue(U32 expected_length, std::string *array) if (mLength > 0 && mLength != expected_length) { - llwarns << "XMLNode::getStringValue asked for " << expected_length << " elements, while node has " << mLength << llendl; + LL_WARNS() << "XMLNode::getStringValue asked for " << expected_length << " elements, while node has " << mLength << LL_ENDL; return 0; } @@ -2088,9 +2088,9 @@ U32 LLXMLNode::getStringValue(U32 expected_length, std::string *array) #if LL_DEBUG if (num_returned_strings != expected_length) { - lldebugs << "LLXMLNode::getStringValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getStringValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << num_returned_strings << llendl; + << "only found " << num_returned_strings << LL_ENDL; } #endif @@ -2133,9 +2133,9 @@ U32 LLXMLNode::getUUIDValue(U32 expected_length, LLUUID *array) #if LL_DEBUG if (i != expected_length) { - lldebugs << "LLXMLNode::getUUIDValue() failed for node named '" + LL_DEBUGS() << "LLXMLNode::getUUIDValue() failed for node named '" << mName->mString << "' -- expected " << expected_length << " but " - << "only found " << i << llendl; + << "only found " << i << LL_ENDL; } #endif return i; @@ -2164,11 +2164,11 @@ U32 LLXMLNode::getNodeRefValue(U32 expected_length, LLXMLNode **array) root->findID(string_array[strnum], node_list); if (node_list.empty()) { - llwarns << "XML: Could not find node ID: " << string_array[strnum] << llendl; + LL_WARNS() << "XML: Could not find node ID: " << string_array[strnum] << LL_ENDL; } else if (node_list.size() > 1) { - llwarns << "XML: Node ID not unique: " << string_array[strnum] << llendl; + LL_WARNS() << "XML: Node ID not unique: " << string_array[strnum] << LL_ENDL; } else { diff --git a/indra/llxml/llxmlparser.cpp b/indra/llxml/llxmlparser.cpp index 7db4a90b57..1bdc283f67 100755 --- a/indra/llxml/llxmlparser.cpp +++ b/indra/llxml/llxmlparser.cpp @@ -121,7 +121,7 @@ exit_label: if( !success ) { - llwarns << mAuxErrorString << llendl; + LL_WARNS() << mAuxErrorString << LL_ENDL; } return success; diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index f2386700a1..ca98953f92 100755 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -72,7 +72,7 @@ BOOL LLXmlTree::parseFile(const std::string &path, BOOL keep_contents) { S32 line_number = parser.getCurrentLineNumber(); const char* error = parser.getErrorString(); - llwarns << "LLXmlTree parse failed. Line " << line_number << ": " << error << llendl; + LL_WARNS() << "LLXmlTree parse failed. Line " << line_number << ": " << error << LL_ENDL; } return success; } @@ -118,19 +118,19 @@ LLXmlTreeNode::~LLXmlTreeNode() void LLXmlTreeNode::dump( const std::string& prefix ) { - llinfos << prefix << mName ; + LL_INFOS() << prefix << mName ; if( !mContents.empty() ) { - llcont << " contents = \"" << mContents << "\""; + LL_CONT << " contents = \"" << mContents << "\""; } attribute_map_t::iterator iter; for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++) { LLStdStringHandle key = iter->first; const std::string* value = iter->second; - llcont << prefix << " " << key << "=" << (value->empty() ? "NULL" : *value); + LL_CONT << prefix << " " << key << "=" << (value->empty() ? "NULL" : *value); } - llcont << llendl; + LL_CONT << LL_ENDL; } BOOL LLXmlTreeNode::hasAttribute(const std::string& name) @@ -551,12 +551,12 @@ void LLXmlTreeParser::startElement(const char* name, const char **atts) { if( mDump ) { - llinfos << tabs() << "startElement " << name << llendl; + LL_INFOS() << tabs() << "startElement " << name << LL_ENDL; S32 i = 0; while( atts[i] && atts[i+1] ) { - llinfos << tabs() << "attribute: " << atts[i] << "=" << atts[i+1] << llendl; + LL_INFOS() << tabs() << "attribute: " << atts[i] << "=" << atts[i+1] << LL_ENDL; i += 2; } } @@ -593,7 +593,7 @@ void LLXmlTreeParser::endElement(const char* name) { if( mDump ) { - llinfos << tabs() << "endElement " << name << llendl; + LL_INFOS() << tabs() << "endElement " << name << LL_ENDL; } if( !mCurrent->mContents.empty() ) @@ -611,7 +611,7 @@ void LLXmlTreeParser::characterData(const char *s, int len) if (s) str = std::string(s, len); if( mDump ) { - llinfos << tabs() << "CharacterData " << str << llendl; + LL_INFOS() << tabs() << "CharacterData " << str << LL_ENDL; } if (mKeepContents) @@ -624,7 +624,7 @@ void LLXmlTreeParser::processingInstruction(const char *target, const char *data { if( mDump ) { - llinfos << tabs() << "processingInstruction " << data << llendl; + LL_INFOS() << tabs() << "processingInstruction " << data << LL_ENDL; } } @@ -632,7 +632,7 @@ void LLXmlTreeParser::comment(const char *data) { if( mDump ) { - llinfos << tabs() << "comment " << data << llendl; + LL_INFOS() << tabs() << "comment " << data << LL_ENDL; } } @@ -640,7 +640,7 @@ void LLXmlTreeParser::startCdataSection() { if( mDump ) { - llinfos << tabs() << "startCdataSection" << llendl; + LL_INFOS() << tabs() << "startCdataSection" << LL_ENDL; } } @@ -648,7 +648,7 @@ void LLXmlTreeParser::endCdataSection() { if( mDump ) { - llinfos << tabs() << "endCdataSection" << llendl; + LL_INFOS() << tabs() << "endCdataSection" << LL_ENDL; } } @@ -658,7 +658,7 @@ void LLXmlTreeParser::defaultData(const char *s, int len) { std::string str; if (s) str = std::string(s, len); - llinfos << tabs() << "defaultData " << str << llendl; + LL_INFOS() << tabs() << "defaultData " << str << LL_ENDL; } } @@ -671,12 +671,12 @@ void LLXmlTreeParser::unparsedEntityDecl( { if( mDump ) { - llinfos << tabs() << "unparsed entity:" << llendl; - llinfos << tabs() << " entityName " << entity_name << llendl; - llinfos << tabs() << " base " << base << llendl; - llinfos << tabs() << " systemId " << system_id << llendl; - llinfos << tabs() << " publicId " << public_id << llendl; - llinfos << tabs() << " notationName " << notation_name<< llendl; + LL_INFOS() << tabs() << "unparsed entity:" << LL_ENDL; + LL_INFOS() << tabs() << " entityName " << entity_name << LL_ENDL; + LL_INFOS() << tabs() << " base " << base << LL_ENDL; + LL_INFOS() << tabs() << " systemId " << system_id << LL_ENDL; + LL_INFOS() << tabs() << " publicId " << public_id << LL_ENDL; + LL_INFOS() << tabs() << " notationName " << notation_name<< LL_ENDL; } } diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h index 69fbc95bb0..a82fee0416 100755 --- a/indra/llxml/llxmltree.h +++ b/indra/llxml/llxmltree.h @@ -227,7 +227,7 @@ protected: LLXmlTree* mTree; LLXmlTreeNode* mRoot; LLXmlTreeNode* mCurrent; - BOOL mDump; // Dump parse tree to llinfos as it is read. + BOOL mDump; // Dump parse tree to LL_INFOS() as it is read. BOOL mKeepContents; }; diff --git a/indra/lscript/lscript_compile/lscript_bytecode.cpp b/indra/lscript/lscript_compile/lscript_bytecode.cpp index b6c3dd3a86..667e5dafc1 100755 --- a/indra/lscript/lscript_compile/lscript_bytecode.cpp +++ b/indra/lscript/lscript_compile/lscript_bytecode.cpp @@ -305,7 +305,7 @@ void LLScriptScriptCodeChunk::build(LLFILE *efp, LLFILE *bcfp) if (fwrite(mCompleteCode, 1, mTotalSize, bcfp) != (size_t)mTotalSize) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } } else diff --git a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp index 55d47b6de2..0ce5eb7dab 100755 --- a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp +++ b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp @@ -56,7 +56,7 @@ bool LLScriptResourceConsumer::switchScriptResourcePools(LLScriptResourcePool& n { if (&new_pool == &LLScriptResourcePool::null) { - llwarns << "New pool is null" << llendl; + LL_WARNS() << "New pool is null" << LL_ENDL; } if (isInPool(new_pool)) diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp index 70cdecbb18..5eb7ffc5a9 100755 --- a/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/indra/lscript/lscript_execute/lscript_execute.cpp @@ -76,7 +76,7 @@ LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp) S32 pos = 0; if (fread(&sizearray, 1, 4, fp) != 4) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; filesize = 0; } else { filesize = bytestream2integer(sizearray, pos); @@ -85,7 +85,7 @@ LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp) fseek(fp, 0, SEEK_SET); if (fread(mBuffer, 1, filesize, fp) != filesize) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } fclose(fp); @@ -289,7 +289,7 @@ void LLScriptExecuteLSL2::init() void LLScriptExecuteLSL2::recordBoundaryError( const LLUUID &id ) { set_fault(mBuffer, LSRF_BOUND_CHECK_ERROR); - llwarns << "Script boundary error for ID " << id << llendl; + LL_WARNS() << "Script boundary error for ID " << id << LL_ENDL; } @@ -517,7 +517,7 @@ void LLScriptExecuteLSL2::callNextQueuedEventHandler(U64 event_register, const L } else { - llwarns << "Somehow got an event that we're not registered for!" << llendl; + LL_WARNS() << "Somehow got an event that we're not registered for!" << LL_ENDL; } delete eventdata; } @@ -625,7 +625,7 @@ S32 LLScriptExecuteLSL2::writeState(U8 **dest, U32 header_size, U32 footer_size) // registers integer2bytestream(*dest, dest_offset, registers_size); - // llinfos << "Writing CE: " << getCurrentEvents() << llendl; + // LL_INFOS() << "Writing CE: " << getCurrentEvents() << LL_ENDL; bytestream2bytestream(*dest, dest_offset, mBuffer, src_offset, registers_size); // heap @@ -677,11 +677,11 @@ S32 LLScriptExecuteLSL2::readState(U8 *src) // copy data into register area bytestream2bytestream(mBuffer, dest_offset, src, src_offset, size); -// llinfos << "Read CE: " << getCurrentEvents() << llendl; +// LL_INFOS() << "Read CE: " << getCurrentEvents() << LL_ENDL; if (get_register(mBuffer, LREG_TM) != TOP_OF_MEMORY) { - llwarns << "Invalid state. Top of memory register does not match" - << " constant." << llendl; + LL_WARNS() << "Invalid state. Top of memory register does not match" + << " constant." << LL_ENDL; reset_hp_to_safe_spot(mBuffer); return -1; } @@ -4024,7 +4024,7 @@ void lscript_run(const std::string& filename, BOOL b_debug) if (filename.empty()) { - llerrs << "filename is NULL" << llendl; + LL_ERRS() << "filename is NULL" << LL_ENDL; // Just reporting error is likely not enough. Need // to check how to abort or error out gracefully // from this function. XXXTBD @@ -4049,8 +4049,8 @@ void lscript_run(const std::string& filename, BOOL b_debug) F32 time = timer.getElapsedTimeF32(); F32 ips = execute->mInstructionCount / time; - llinfos << execute->mInstructionCount << " instructions in " << time << " seconds" << llendl; - llinfos << ips/1000 << "K instructions per second" << llendl; + LL_INFOS() << execute->mInstructionCount << " instructions in " << time << " seconds" << LL_ENDL; + LL_INFOS() << ips/1000 << "K instructions per second" << LL_ENDL; printf("ip: 0x%X\n", get_register(execute->mBuffer, LREG_IP)); printf("sp: 0x%X\n", get_register(execute->mBuffer, LREG_SP)); printf("bp: 0x%X\n", get_register(execute->mBuffer, LREG_BP)); diff --git a/indra/lscript/lscript_execute/lscript_readlso.cpp b/indra/lscript/lscript_execute/lscript_readlso.cpp index 8b41cb5a72..4c69abf49d 100755 --- a/indra/lscript/lscript_execute/lscript_readlso.cpp +++ b/indra/lscript/lscript_execute/lscript_readlso.cpp @@ -37,7 +37,7 @@ LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp) S32 pos = 0; if (fread(&sizearray, 1, 4, fp) != 4) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; filesize = 0; } else { filesize = bytestream2integer(sizearray, pos); @@ -46,7 +46,7 @@ LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp) fseek(fp, 0, SEEK_SET); if (fread(mRawData, 1, filesize, fp) != filesize) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } initOpCodePrinting(); diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h index 89a473a627..f3dbb09196 100755 --- a/indra/lscript/lscript_library.h +++ b/indra/lscript/lscript_library.h @@ -240,7 +240,7 @@ public: mKey = new char[strlen(data.mKey) + 1]; /* Flawfinder: ignore */ if (mKey == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mKey, data.mKey); /* Flawfinder: ignore */ @@ -250,7 +250,7 @@ public: mString = new char[strlen(data.mString) + 1]; /* Flawfinder: ignore */ if (mString == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mString, data.mString); /* Flawfinder: ignore */ @@ -275,7 +275,7 @@ public: mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */ if (mKey == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mKey, temp); /* Flawfinder: ignore */ @@ -287,7 +287,7 @@ public: mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */ if (mString == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mString, temp); /* Flawfinder: ignore */ @@ -324,7 +324,7 @@ public: mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */ if (mKey == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mKey, temp); /* Flawfinder: ignore */ @@ -336,7 +336,7 @@ public: mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */ if (mString == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mString, temp); /* Flawfinder: ignore */ @@ -364,7 +364,7 @@ public: mString = new char[strlen(src) + 1]; /* Flawfinder: ignore */ if (mString == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mString, src); /* Flawfinder: ignore */ @@ -398,7 +398,7 @@ public: mString = new char[strlen(string) + 1]; /* Flawfinder: ignore */ if (mString == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; return; } strcpy(mString, string); /* Flawfinder: ignore */ diff --git a/indra/lscript/lscript_library/lscript_alloc.cpp b/indra/lscript/lscript_library/lscript_alloc.cpp index 92b1ab70fb..62ba029e8a 100755 --- a/indra/lscript/lscript_library/lscript_alloc.cpp +++ b/indra/lscript/lscript_library/lscript_alloc.cpp @@ -435,7 +435,7 @@ S32 lsa_create_data_block(U8 **buffer, LLScriptLibData *data, S32 base_offset) U8 *tbuff = new U8[size + listsize]; if (tbuff == NULL) { - llerrs << "Memory Allocation Failed" << llendl; + LL_ERRS() << "Memory Allocation Failed" << LL_ENDL; } memcpy(tbuff, *buffer, size); /*Flawfinder: ignore*/ memcpy(tbuff + size, listbuf, listsize); /*Flawfinder: ignore*/ diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index 7ffe53a307..84ce94eead 100755 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -498,7 +498,7 @@ void LLScriptLibrary::assignExec(const char *name, void (*exec_func)(LLScriptLib } } - llerrs << "Unknown LSL function in assignExec: " << name << llendl; + LL_ERRS() << "Unknown LSL function in assignExec: " << name << LL_ENDL; } void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma) diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 1812abd7d5..3edeef51e3 100755 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -220,7 +220,7 @@ private: char cwd[ FILENAME_MAX ]; // I *think* this is defined on all platforms we use if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) { - llwarns << "Couldn't get cwd - probably too long - failing to init." << llendl; + LL_WARNS() << "Couldn't get cwd - probably too long - failing to init." << LL_ENDL; return false; } std::string application_dir = std::string( cwd ); @@ -380,13 +380,13 @@ private: url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundB * 255.0f); url << "%22%3E%3C/body%3E%3C/html%3E"; - //lldebugs << "data url is: " << url.str() << llendl; + //LL_DEBUGS() << "data url is: " << url.str() << LL_ENDL; // always display loading overlay now #if LLQTWEBKIT_API_VERSION >= 16 LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, true); #else - llwarns << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << llendl; + LL_WARNS() << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << LL_ENDL; #endif str.clear(); str << "Loading overlay enabled = " << mEnableMediaPluginDebugging << " for mBrowserWindowId = " << mBrowserWindowId; @@ -426,7 +426,7 @@ private: break; default: - llwarns << "Unknown cursor ID: " << (int)llqt_cursor << llendl; + LL_WARNS() << "Unknown cursor ID: " << (int)llqt_cursor << LL_ENDL; break; } @@ -1326,7 +1326,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) F32 factor = (F32)message_in.getValueReal("factor"); LLQtWebKit::getInstance()->setPageZoomFactor(factor); #else - llwarns << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << llendl; + LL_WARNS() << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << LL_ENDL; #endif } else if(message_name == "clear_cache") @@ -1405,7 +1405,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) bool val = message_in.getValueBoolean("show"); LLQtWebKit::getInstance()->showWebInspector( val ); #else - llwarns << "Ignoring showWebInspector message (llqtwebkit version is too old)." << llendl; + LL_WARNS() << "Ignoring showWebInspector message (llqtwebkit version is too old)." << LL_ENDL; #endif } else if(message_name == "ignore_ssl_cert_errors") @@ -1413,7 +1413,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) #if LLQTWEBKIT_API_VERSION >= 3 LLQtWebKit::getInstance()->setIgnoreSSLCertErrors( message_in.getValueBoolean("ignore") ); #else - llwarns << "Ignoring ignore_ssl_cert_errors message (llqtwebkit version is too old)." << llendl; + LL_WARNS() << "Ignoring ignore_ssl_cert_errors message (llqtwebkit version is too old)." << LL_ENDL; #endif } else if(message_name == "add_certificate_file_path") @@ -1421,7 +1421,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) #if LLQTWEBKIT_API_VERSION >= 6 LLQtWebKit::getInstance()->setCAFile( message_in.getValue("path") ); #else - llwarns << "Ignoring add_certificate_file_path message (llqtwebkit version is too old)." << llendl; + LL_WARNS() << "Ignoring add_certificate_file_path message (llqtwebkit version is too old)." << LL_ENDL; #endif } else if(message_name == "init_history") diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index 7662a9689d..150b97baa5 100755 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -58,7 +58,7 @@ public: void errorWithContent( U32 statusNum, const std::string& reason, const LLSD& content ) { - llwarns << "Transport error [status:" << statusNum << "]: " << content <isUsingServerBakes() && (mRegionp->getCentralBakeVersion()>0)) { - llinfos << "update requested due to region transition" << llendl; + LL_INFOS() << "update requested due to region transition" << LL_ENDL; LLAppearanceMgr::instance().requestServerAppearanceUpdate(); } // new-style appearance entering a non-bake region, @@ -846,8 +846,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // host_name = regionp->getHost().getHostName(); std::string ip = regionp->getHost().getString(); - llinfos << "Moving agent into region: " << regionp->getName() - << " located at " << ip << llendl; + LL_INFOS() << "Moving agent into region: " << regionp->getName() + << " located at " << ip << LL_ENDL; if (mRegionp) { // We've changed regions, we're now going to change our agent coordinate frame. @@ -989,12 +989,12 @@ void LLAgent::sendMessage() { if (gDisconnected) { - llwarns << "Trying to send message when disconnected!" << llendl; + LL_WARNS() << "Trying to send message when disconnected!" << LL_ENDL; return; } if (!mRegionp) { - llerrs << "No region for agent yet!" << llendl; + LL_ERRS() << "No region for agent yet!" << LL_ENDL; return; } gMessageSystem->sendMessage(mRegionp->getHost()); @@ -1008,12 +1008,12 @@ void LLAgent::sendReliableMessage() { if (gDisconnected) { - lldebugs << "Trying to send message when disconnected!" << llendl; + LL_DEBUGS() << "Trying to send message when disconnected!" << LL_ENDL; return; } if (!mRegionp) { - lldebugs << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << llendl; + LL_DEBUGS() << "LLAgent::sendReliableMessage No region for agent yet, not sending message!" << LL_ENDL; return; } gMessageSystem->sendReliable(mRegionp->getHost()); @@ -1042,7 +1042,7 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent) { if (!pos_agent.isFinite()) { - llerrs << "setPositionAgent is not a number" << llendl; + LL_ERRS() << "setPositionAgent is not a number" << LL_ENDL; } if (isAgentAvatarValid() && gAgentAvatarp->getParent()) @@ -1166,7 +1166,7 @@ void LLAgent::resetAxes(const LLVector3 &look_at) LLVector3 cross(look_at % skyward); if (cross.isNull()) { - llinfos << "LLAgent::resetAxes cross-product is zero" << llendl; + LL_INFOS() << "LLAgent::resetAxes cross-product is zero" << LL_ENDL; return; } @@ -2297,7 +2297,7 @@ void LLAgent::setStartPosition( U32 location_id ) object = gObjectList.findObject(gAgentID); if (! object) { - llinfos << "setStartPosition - Can't find agent viewerobject id " << gAgentID << llendl; + LL_INFOS() << "setStartPosition - Can't find agent viewerobject id " << gAgentID << LL_ENDL; return; } // we've got the viewer object @@ -2398,7 +2398,7 @@ void LLAgent::requestStopMotion( LLMotion* motion ) // if motion is not looping, it could have stopped by running out of time // so we need to tell the server this -// llinfos << "Sending stop for motion " << motion->getName() << llendl; +// LL_INFOS() << "Sending stop for motion " << motion->getName() << LL_ENDL; sendAnimationRequest( anim_state, ANIM_REQUEST_STOP ); } @@ -2561,19 +2561,19 @@ void LLMaturityPreferencesResponder::result(const LLSD &pContent) if (actualMaturity != mPreferredMaturity) { - llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) + LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) << "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', the server responded with '" << LLViewerRegion::accessToString(actualMaturity) << "' [value:" << static_cast(actualMaturity) << ", llsd:" - << pContent << "]" << llendl; + << pContent << "]" << LL_ENDL; } mAgent->handlePreferredMaturityResult(actualMaturity); } void LLMaturityPreferencesResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent) { - llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) + LL_WARNS() << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity) << "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', we got an error with [status:" - << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << llendl; + << pStatus << "]: " << (pContent.isDefined() ? pContent : LLSD(pReason)) << LL_ENDL; mAgent->handlePreferredMaturityError(); } @@ -2622,8 +2622,8 @@ void LLAgent::handlePreferredMaturityResult(U8 pServerMaturity) // server by re-sending our last known request. Cap the re-tries at 3 just to be safe. else if (++mMaturityPreferenceNumRetries <= 3) { - llinfos << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '" - << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << llendl; + LL_INFOS() << "Retrying attempt #" << mMaturityPreferenceNumRetries << " to set viewer preferred maturity to '" + << LLViewerRegion::accessToString(mLastKnownRequestMaturity) << "'" << LL_ENDL; sendMaturityPreferenceToServer(mLastKnownRequestMaturity); } // Else, the viewer is style out of sync with the server after 3 retries, so inform the user @@ -2650,8 +2650,8 @@ void LLAgent::handlePreferredMaturityError() // the server, but not quite sure why we are if (mLastKnownRequestMaturity == mLastKnownResponseMaturity) { - llwarns << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity) - << "' seems to be in sync with the server" << llendl; + LL_WARNS() << "Got an error but maturity preference '" << LLViewerRegion::accessToString(mLastKnownRequestMaturity) + << "' seems to be in sync with the server" << LL_ENDL; reportPreferredMaturitySuccess(); } // Else, the more likely case is that the last request does not match the last response, @@ -2705,7 +2705,7 @@ void LLAgent::reportPreferredMaturityError() { bool tmpIsDoSendMaturityPreferenceToServer = mIsDoSendMaturityPreferenceToServer; mIsDoSendMaturityPreferenceToServer = false; - llinfos << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << llendl; + LL_INFOS() << "Setting viewer preferred maturity to '" << LLViewerRegion::accessToString(mLastKnownResponseMaturity) << "'" << LL_ENDL; gSavedSettings.setU32("PreferredMaturity", static_cast(mLastKnownResponseMaturity)); mIsDoSendMaturityPreferenceToServer = tmpIsDoSendMaturityPreferenceToServer; } @@ -2754,8 +2754,8 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity) LLSD body = LLSD::emptyMap(); body["access_prefs"] = access_prefs; - llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) - << "' via capability to: " << url << llendl; + LL_INFOS() << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) + << "' via capability to: " << url << LL_ENDL; LLSD headers; LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); } @@ -3194,7 +3194,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentDropGroup for agent other than me" << llendl; + LL_WARNS() << "processAgentDropGroup for agent other than me" << LL_ENDL; return; } @@ -3225,7 +3225,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) } else { - llwarns << "processAgentDropGroup, agent is not part of group " << group_id << llendl; + LL_WARNS() << "processAgentDropGroup, agent is not part of group " << group_id << LL_ENDL; } } @@ -3258,7 +3258,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode body["AgentData"].isArray() && body["AgentData"][0].isMap() ) { - llinfos << "VALID DROP GROUP" << llendl; + LL_INFOS() << "VALID DROP GROUP" << LL_ENDL; //there is only one set of data in the AgentData block LLSD agent_data = body["AgentData"][0]; @@ -3270,8 +3270,8 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode if (agent_id != gAgentID) { - llwarns - << "AgentDropGroup for agent other than me" << llendl; + LL_WARNS() + << "AgentDropGroup for agent other than me" << LL_ENDL; response->notFound(); return; @@ -3302,9 +3302,9 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode } else { - llwarns + LL_WARNS() << "AgentDropGroup, agent is not part of group " - << group_id << llendl; + << group_id << LL_ENDL; } response->result(LLSD()); @@ -3331,7 +3331,7 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3380,7 +3380,7 @@ class LLAgentGroupDataUpdateViewerNode : public LLHTTPNode if (agent_id != gAgentID) { - llwarns << "processAgentGroupDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentGroupDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3438,7 +3438,7 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **) if (agent_id != gAgentID) { - llwarns << "processAgentDataUpdate for agent other than me" << llendl; + LL_WARNS() << "processAgentDataUpdate for agent other than me" << LL_ENDL; return; } @@ -3606,7 +3606,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * if (!isAgentAvatarValid() || gAgentAvatarp->isDead()) { - llwarns << "No avatar for user in cached texture update!" << llendl; + LL_WARNS() << "No avatar for user in cached texture update!" << LL_ENDL; return; } @@ -3643,7 +3643,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * { if (texture_id.notNull()) { - //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; + //LL_INFOS() << "Received cached texture " << (U32)texture_index << ": " << texture_id << LL_ENDL; gAgentAvatarp->setCachedBakedTexture((ETextureIndex)texture_index, texture_id); //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); gAgentQueryManager.mActiveCacheQueries[baked_index] = 0; @@ -3658,7 +3658,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * } } } - llinfos << "Received cached texture response for " << num_results << " textures." << llendl; + LL_INFOS() << "Received cached texture response for " << num_results << " textures." << LL_ENDL; gAgentAvatarp->outputRezTiming("Fetched agent wearables textures from cache. Will now load them"); gAgentAvatarp->updateMeshTextures(); @@ -3736,7 +3736,7 @@ bool LLAgent::teleportCore(bool is_local) { if ((TELEPORT_NONE != mTeleportState) && (mTeleportState != TELEPORT_PENDING)) { - llwarns << "Attempt to teleport when already teleporting." << llendl; + LL_WARNS() << "Attempt to teleport when already teleporting." << LL_ENDL; return false; } @@ -4046,7 +4046,7 @@ void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global) else if(regionp && teleportCore(regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY]))) { - llwarns << "Using deprecated teleportlocationrequest." << llendl; + LL_WARNS() << "Using deprecated teleportlocationrequest." << LL_ENDL; // send the message LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_TeleportLocationRequest); @@ -4257,7 +4257,7 @@ void LLAgent::dumpSentAppearance(const std::string& dump_prefix) } else { - LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << llendl; + LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << LL_ENDL; } LLVisualParam* appearance_version_param = gAgentAvatarp->getVisualParam(11000); @@ -4300,7 +4300,7 @@ void LLAgent::sendAgentSetAppearance() gAgentAvatarp->bakedTextureOriginCounts(sb_count, host_count, both_count, neither_count); if (both_count != 0 || neither_count != 0) { - llwarns << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << llendl; + LL_WARNS() << "bad bake texture state " << sb_count << "," << host_count << "," << both_count << "," << neither_count << LL_ENDL; } if (sb_count != 0 && host_count == 0) { @@ -4312,7 +4312,7 @@ void LLAgent::sendAgentSetAppearance() } else if (sb_count + host_count > 0) { - llwarns << "unclear baked texture state, not sending appearance" << llendl; + LL_WARNS() << "unclear baked texture state, not sending appearance" << LL_ENDL; return; } @@ -4356,7 +4356,7 @@ void LLAgent::sendAgentSetAppearance() // IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) { - LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << llendl; + LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << LL_ENDL; textures_current = FALSE; break; } @@ -4424,7 +4424,7 @@ void LLAgent::sendAgentSetAppearance() } } - //llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl; + //LL_INFOS() << "Avatar XML num VisualParams transmitted = " << transmitted_params << LL_ENDL; sendReliableMessage(); } @@ -4465,8 +4465,8 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename) if (!success || !root || !root->hasName( "teleport_messages" )) { - llerrs << "Problem reading teleport string XML file: " - << xml_filename << llendl; + LL_ERRS() << "Problem reading teleport string XML file: " + << xml_filename << LL_ENDL; return; } @@ -4530,11 +4530,11 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire // static void LLAgent::dumpGroupInfo() { - llinfos << "group " << gAgent.mGroupName << llendl; - llinfos << "ID " << gAgent.mGroupID << llendl; - llinfos << "powers " << gAgent.mGroupPowers << llendl; - llinfos << "title " << gAgent.mGroupTitle << llendl; - //llinfos << "insig " << gAgent.mGroupInsigniaID << llendl; + LL_INFOS() << "group " << gAgent.mGroupName << LL_ENDL; + LL_INFOS() << "ID " << gAgent.mGroupID << LL_ENDL; + LL_INFOS() << "powers " << gAgent.mGroupPowers << LL_ENDL; + LL_INFOS() << "title " << gAgent.mGroupTitle << LL_ENDL; + //LL_INFOS() << "insig " << gAgent.mGroupInsigniaID << LL_ENDL; } // Draw a representation of current autopilot target diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index d02817df7b..93e0cddd64 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -563,10 +563,10 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) if (mFocusObject->mDrawable.isNull()) { #ifdef LL_RELEASE_FOR_DOWNLOAD - llwarns << "Focus object with no drawable!" << llendl; + LL_WARNS() << "Focus object with no drawable!" << LL_ENDL; #else mFocusObject->dump(); - llerrs << "Focus object with no drawable!" << llendl; + LL_ERRS() << "Focus object with no drawable!" << LL_ENDL; #endif obj_min_distance = 0.f; return TRUE; @@ -1385,7 +1385,7 @@ void LLAgentCamera::updateCamera() mCameraCurrentFOVZoomFactor = lerp(mCameraCurrentFOVZoomFactor, mCameraFOVZoomFactor, LLSmoothInterpolation::getInterpolant(FOV_ZOOM_HALF_LIFE)); -// llinfos << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << llendl; +// LL_INFOS() << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << LL_ENDL; LLVector3 focus_agent = gAgent.getPosAgentFromGlobal(mFocusGlobal); @@ -1689,7 +1689,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) { if (!isAgentAvatarValid() || gAgentAvatarp->mDrawable.isNull()) { - llwarns << "Null avatar drawable!" << llendl; + LL_WARNS() << "Null avatar drawable!" << LL_ENDL; return LLVector3d::zero; } head_offset.clearVec(); diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 87c44a391d..7887184a11 100755 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -193,8 +193,8 @@ void LLAgentListener::requestSit(LLSD const & event_data) const } else { - llwarns << "LLAgent requestSit could not find the sit target: " - << event_data << llendl; + LL_WARNS() << "LLAgent requestSit could not find the sit target: " + << event_data << LL_ENDL; } } @@ -276,8 +276,8 @@ void LLAgentListener::requestTouch(LLSD const & event_data) const } else { - llwarns << "LLAgent requestTouch could not find the touch target " - << event_data["obj_uuid"].asUUID() << llendl; + LL_WARNS() << "LLAgent requestTouch could not find the touch target " + << event_data["obj_uuid"].asUUID() << LL_ENDL; } } diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp index 7a04cfb48b..799060eeab 100755 --- a/indra/newview/llagentpicksinfo.cpp +++ b/indra/newview/llagentpicksinfo.cpp @@ -119,7 +119,7 @@ void LLAgentPicksInfo::onServerRespond(LLAvatarPicks* picks) { if(!picks) { - llerrs << "Unexpected value" << llendl; + LL_ERRS() << "Unexpected value" << LL_ENDL; return; } diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index 0dd107f349..44589f0d57 100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -72,7 +72,7 @@ void LLAgentPilot::load() } else { - lldebugs << "no autopilot file found" << llendl; + LL_DEBUGS() << "no autopilot file found" << LL_ENDL; return; } } @@ -88,13 +88,13 @@ void LLAgentPilot::loadTxt(const std::string& filename) if (!file) { - lldebugs << "Couldn't open " << filename - << ", aborting agentpilot load!" << llendl; + LL_DEBUGS() << "Couldn't open " << filename + << ", aborting agentpilot load!" << LL_ENDL; return; } else { - llinfos << "Opening pilot file " << filename << llendl; + LL_INFOS() << "Opening pilot file " << filename << LL_ENDL; } mActions.clear(); @@ -129,13 +129,13 @@ void LLAgentPilot::loadXML(const std::string& filename) if (!file) { - lldebugs << "Couldn't open " << filename - << ", aborting agentpilot load!" << llendl; + LL_DEBUGS() << "Couldn't open " << filename + << ", aborting agentpilot load!" << LL_ENDL; return; } else { - llinfos << "Opening pilot file " << filename << llendl; + LL_INFOS() << "Opening pilot file " << filename << LL_ENDL; } mActions.clear(); @@ -172,7 +172,7 @@ void LLAgentPilot::saveTxt(const std::string& filename) if (!file) { - llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl; + LL_INFOS() << "Couldn't open " << filename << ", aborting agentpilot save!" << LL_ENDL; } file << mActions.size() << '\n'; @@ -195,7 +195,7 @@ void LLAgentPilot::saveXML(const std::string& filename) if (!file) { - llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl; + LL_INFOS() << "Couldn't open " << filename << ", aborting agentpilot save!" << LL_ENDL; } S32 i; @@ -233,7 +233,7 @@ void LLAgentPilot::stopRecord() void LLAgentPilot::addAction(enum EActionType action_type) { - llinfos << "Adding waypoint: " << gAgent.getPositionGlobal() << llendl; + LL_INFOS() << "Adding waypoint: " << gAgent.getPositionGlobal() << LL_ENDL; Action action; action.mType = action_type; action.mTarget = gAgent.getPositionGlobal(); @@ -258,14 +258,14 @@ void LLAgentPilot::startPlayback() if (mActions.size()) { - llinfos << "Starting playback, moving to waypoint 0" << llendl; + LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL; gAgent.startAutoPilotGlobal(mActions[0].mTarget); moveCamera(); mStarted = FALSE; } else { - llinfos << "No autopilot data, cancelling!" << llendl; + LL_INFOS() << "No autopilot data, cancelling!" << LL_ENDL; mPlaying = FALSE; } } @@ -306,7 +306,7 @@ void LLAgentPilot::moveCamera() if ((t<0.0)||(t>1.0)) { - llwarns << "mCurrentAction is invalid, t = " << t << llendl; + LL_WARNS() << "mCurrentAction is invalid, t = " << t << LL_ENDL; return; } @@ -345,7 +345,7 @@ void LLAgentPilot::updateTarget() { if (!mStarted) { - llinfos << "At start, beginning playback" << llendl; + LL_INFOS() << "At start, beginning playback" << LL_ENDL; mTimer.reset(); mStarted = TRUE; } @@ -369,17 +369,17 @@ void LLAgentPilot::updateTarget() { if ((mNumRuns < 0) || (mNumRuns > 0)) { - llinfos << "Looping, restarting playback" << llendl; + LL_INFOS() << "Looping, restarting playback" << LL_ENDL; startPlayback(); } else if (mQuitAfterRuns) { - llinfos << "Done with all runs, quitting viewer!" << llendl; + LL_INFOS() << "Done with all runs, quitting viewer!" << LL_ENDL; LLAppViewer::instance()->forceQuit(); } else { - llinfos << "Done with all runs, disabling pilot" << llendl; + LL_INFOS() << "Done with all runs, disabling pilot" << LL_ENDL; stopPlayback(); } } diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 4a25b8c205..40a25848a2 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -91,48 +91,48 @@ void checkWearableAgainstInventory(LLViewerWearable *wearable) { if (!item->isWearableType()) { - llwarns << "wearable associated with non-wearable item" << llendl; + LL_WARNS() << "wearable associated with non-wearable item" << LL_ENDL; } if (item->getWearableType() != wearable->getType()) { - llwarns << "type mismatch: wearable " << wearable->getName() + LL_WARNS() << "type mismatch: wearable " << wearable->getName() << " has type " << wearable->getType() << " but inventory item " << item->getName() - << " has type " << item->getWearableType() << llendl; + << " has type " << item->getWearableType() << LL_ENDL; } } else { - llwarns << "wearable inventory item not found" << wearable->getName() - << " itemID " << wearable->getItemID().asString() << llendl; + LL_WARNS() << "wearable inventory item not found" << wearable->getName() + << " itemID " << wearable->getItemID().asString() << LL_ENDL; } } void LLAgentWearables::dump() { - llinfos << "LLAgentWearablesDump" << llendl; + LL_INFOS() << "LLAgentWearablesDump" << LL_ENDL; for (S32 i = 0; i < LLWearableType::WT_COUNT; i++) { U32 count = getWearableCount((LLWearableType::EType)i); - llinfos << "Type: " << i << " count " << count << llendl; + LL_INFOS() << "Type: " << i << " count " << count << LL_ENDL; for (U32 j=0; jgetName() - << " description " << wearable->getDescription() << llendl; + LL_INFOS() << " " << j << " Name " << wearable->getName() + << " description " << wearable->getDescription() << LL_ENDL; } } - llinfos << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << llendl; + LL_INFOS() << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << LL_ENDL; for (std::set::iterator it = mItemsAwaitingWearableUpdate.begin(); it != mItemsAwaitingWearableUpdate.end(); ++it) { - llinfos << (*it).asString() << llendl; + LL_INFOS() << (*it).asString() << LL_ENDL; } } @@ -141,15 +141,15 @@ struct LLAgentDumper LLAgentDumper(std::string name): mName(name) { - llinfos << llendl; - llinfos << "LLAgentDumper " << mName << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << "LLAgentDumper " << mName << LL_ENDL; gAgentWearables.dump(); } ~LLAgentDumper() { - llinfos << llendl; - llinfos << "~LLAgentDumper " << mName << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << "~LLAgentDumper " << mName << LL_ENDL; gAgentWearables.dump(); } @@ -191,7 +191,7 @@ void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) // wearables LLAgentWearables::createStandardWearablesAllDoneCallback::~createStandardWearablesAllDoneCallback() { - llinfos << "destructor - all done?" << llendl; + LL_INFOS() << "destructor - all done?" << LL_ENDL; gAgentWearables.createStandardWearablesAllDone(); } @@ -219,14 +219,14 @@ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInvento mCB(cb), mDescription(description) { - llinfos << "constructor" << llendl; + LL_INFOS() << "constructor" << LL_ENDL; } void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& inv_item) { if (mTodo & CALL_CREATESTANDARDDONE) { - llinfos << "callback fired, inv_item " << inv_item.asString() << llendl; + LL_INFOS() << "callback fired, inv_item " << inv_item.asString() << LL_ENDL; } if (inv_item.isNull()) @@ -266,7 +266,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy const LLUUID& item_id, LLViewerWearable* wearable) { - llinfos << "type " << type << " index " << index << " item " << item_id.asString() << llendl; + LL_INFOS() << "type " << type << " index " << index << " item " << item_id.asString() << LL_ENDL; if (item_id.isNull()) return; @@ -344,7 +344,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - lldebugs << "sendAgentWearablesUpdate()" << llendl; + LL_DEBUGS() << "sendAgentWearablesUpdate()" << LL_ENDL; // MULTI-WEARABLE: DEPRECATED: HACK: index to 0- server database tables don't support concept of multiwearables. for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { @@ -356,7 +356,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)type, 0); if (wearable) { - //llinfos << "Sending wearable " << wearable->getName() << llendl; + //LL_INFOS() << "Sending wearable " << wearable->getName() << LL_ENDL; LLUUID item_id = wearable->getItemID(); const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsLinkType()) @@ -369,11 +369,11 @@ void LLAgentWearables::sendAgentWearablesUpdate() } else { - //llinfos << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << llendl; + //LL_INFOS() << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << LL_ENDL; gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null); } - lldebugs << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; + LL_DEBUGS() << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL; } gAgent.sendReliableMessage(); } @@ -402,7 +402,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 std::string item_name = item->getName(); if (name_changed) { - llinfos << "saveWearable changing name from " << item->getName() << " to " << new_name << llendl; + LL_INFOS() << "saveWearable changing name from " << item->getName() << " to " << new_name << LL_ENDL; item_name = new_name; } // Update existing inventory item @@ -462,20 +462,20 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, { if (!isWearableCopyable(type, index)) { - llwarns << "LLAgent::saveWearableAs() not copyable." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() not copyable." << LL_ENDL; return; } LLViewerWearable* old_wearable = getViewerWearable(type, index); if (!old_wearable) { - llwarns << "LLAgent::saveWearableAs() no old wearable." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() no old wearable." << LL_ENDL; return; } LLInventoryItem* item = gInventory.getItem(getWearableItemID(type,index)); if (!item) { - llwarns << "LLAgent::saveWearableAs() no inventory item." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() no inventory item." << LL_ENDL; return; } std::string trunc_name(new_name); @@ -742,7 +742,7 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed) { wearable->setDefinitionVersion(22); U32 index = getWearableIndex(wearable); - llinfos << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << llendl; + LL_INFOS() << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << LL_ENDL; saveWearable(wearable->getType(),index,TRUE); } @@ -831,7 +831,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id); - //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; + //LL_DEBUGS() << "processAgentInitialWearablesUpdate()" << LL_ENDL; // Add wearables // MULTI-WEARABLE: DEPRECATED: Message only supports one wearable per type, will be ignored in future. gAgentWearables.mItemsAwaitingWearableUpdate.clear(); @@ -870,7 +870,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs outfit->add(wearable_data); } - lldebugs << " " << LLWearableType::getTypeLabel(type) << llendl; + LL_DEBUGS() << " " << LLWearableType::getTypeLabel(type) << LL_ENDL; } // Get the complete information on the items in the inventory and set up an observer @@ -898,7 +898,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; + LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL; LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); setWearable(type,index,new_wearable); @@ -939,7 +939,7 @@ void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearabl LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)wearable_type, wearable_index); if (!wearable) { - llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; + LL_ERRS() << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << LL_ENDL; return; } LLLocalTextureObject lto; @@ -952,18 +952,18 @@ public: OnWearableItemCreatedCB(): mWearablesAwaitingItems(LLWearableType::WT_COUNT,NULL) { - llinfos << "created callback" << llendl; + LL_INFOS() << "created callback" << LL_ENDL; } /* virtual */ void fire(const LLUUID& inv_item) { - llinfos << "One item created " << inv_item.asString() << llendl; + LL_INFOS() << "One item created " << inv_item.asString() << LL_ENDL; LLViewerInventoryItem *item = gInventory.getItem(inv_item); mItemsToLink.push_back(item); updatePendingWearable(inv_item); } ~OnWearableItemCreatedCB() { - llinfos << "All items created" << llendl; + LL_INFOS() << "All items created" << LL_ENDL; LLPointer link_waiter = new LLUpdateAppearanceOnDestroy; LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(), mItemsToLink, @@ -973,7 +973,7 @@ public: { if (!wearable) { - llwarns << "no wearable" << llendl; + LL_WARNS() << "no wearable" << LL_ENDL; return; } LLWearableType::EType type = wearable->getType(); @@ -983,7 +983,7 @@ public: } else { - llwarns << "invalid type " << type << llendl; + LL_WARNS() << "invalid type " << type << LL_ENDL; } } void updatePendingWearable(const LLUUID& inv_item) @@ -991,12 +991,12 @@ public: LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (!item) { - llwarns << "no item found" << llendl; + LL_WARNS() << "no item found" << LL_ENDL; return; } if (!item->isWearableType()) { - llwarns << "non-wearable item found" << llendl; + LL_WARNS() << "non-wearable item found" << LL_ENDL; return; } if (item && item->isWearableType()) @@ -1010,7 +1010,7 @@ public: } else { - llwarns << "invalid wearable type " << type << llendl; + LL_WARNS() << "invalid wearable type " << type << LL_ENDL; } } } @@ -1022,7 +1022,7 @@ private: void LLAgentWearables::createStandardWearables() { - llwarns << "Creating standard wearables" << llendl; + LL_WARNS() << "Creating standard wearables" << LL_ENDL; if (!isAgentAvatarValid()) return; @@ -1070,7 +1070,7 @@ void LLAgentWearables::createStandardWearables() void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index) { - llinfos << "type " << type << " index " << index << llendl; + LL_INFOS() << "type " << type << " index " << index << LL_ENDL; if (!isAgentAvatarValid()) return; gAgentAvatarp->updateVisualParams(); @@ -1080,7 +1080,7 @@ void LLAgentWearables::createStandardWearablesAllDone() { // ... because sendAgentWearablesUpdate will notify inventory // observers. - llinfos << "all done?" << llendl; + LL_INFOS() << "all done?" << LL_ENDL; mWearablesLoaded = TRUE; checkWearablesLoaded(); @@ -1238,7 +1238,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it const std::vector< LLViewerWearable* >& wearables, BOOL remove) { - llinfos << "setWearableOutfit() start" << llendl; + LL_INFOS() << "setWearableOutfit() start" << LL_ENDL; // TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later if (remove) @@ -1312,7 +1312,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it gAgentAvatarp->dumpAvatarTEs("setWearableOutfit"); - lldebugs << "setWearableOutfit() end" << llendl; + LL_DEBUGS() << "setWearableOutfit() end" << LL_ENDL; } @@ -1322,7 +1322,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab //LLAgentDumper dumper("setWearableItem"); if (isWearingItem(new_item->getUUID())) { - llwarns << "wearable " << new_item->getUUID() << " is already worn" << llendl; + LL_WARNS() << "wearable " << new_item->getUUID() << " is already worn" << LL_ENDL; return; } @@ -1339,7 +1339,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && (old_item_id == new_item->getUUID())) { - lldebugs << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << llendl; + LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL; return; } @@ -1403,8 +1403,8 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara new_wearable->setItemID(new_item->getUUID()); const bool trigger_updated = false; pushWearable(type, new_wearable, trigger_updated); - llinfos << "Added additional wearable for type " << type - << " size is now " << getWearableCount(type) << llendl; + LL_INFOS() << "Added additional wearable for type " << type + << " size is now " << getWearableCount(type) << LL_ENDL; checkWearableAgainstInventory(new_wearable); } else @@ -1426,11 +1426,11 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); gInventory.notifyObservers(); } - llinfos << "Replaced current element 0 for type " << type - << " size is now " << getWearableCount(type) << llendl; + LL_INFOS() << "Replaced current element 0 for type " << type + << " size is now " << getWearableCount(type) << LL_ENDL; } - //llinfos << "LLVOAvatar::setWearableItem()" << llendl; + //LL_INFOS() << "LLVOAvatar::setWearableItem()" << LL_ENDL; queryWearableCache(); //new_wearable->writeToAvatar(TRUE); @@ -1470,7 +1470,7 @@ void LLAgentWearables::queryWearableCache() ETextureIndex te_index = LLAvatarAppearanceDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); - //llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl; + //LL_INFOS() << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << LL_ENDL; gMessageSystem->nextBlockFast(_PREHASH_WearableData); gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id); gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)te_index); @@ -1589,7 +1589,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj } // S32 remove_count = objects_to_remove.size(); // S32 add_count = items_to_add.size(); - // llinfos << "remove " << remove_count << " add " << add_count << llendl; + // LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL; // Remove everything in objects_to_remove userRemoveMultipleAttachments(objects_to_remove); @@ -1816,20 +1816,20 @@ void LLAgentWearables::editWearable(const LLUUID& item_id) LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); if (!item) { - llwarns << "Failed to get linked item" << llendl; + LL_WARNS() << "Failed to get linked item" << LL_ENDL; return; } LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id); if (!wearable) { - llwarns << "Cannot get wearable" << llendl; + LL_WARNS() << "Cannot get wearable" << LL_ENDL; return; } if (!gAgentWearables.isWearableModifiable(item->getUUID())) { - llwarns << "Cannot modify wearable" << llendl; + LL_WARNS() << "Cannot modify wearable" << LL_ENDL; return; } @@ -1863,7 +1863,7 @@ void LLAgentWearables::updateServer() void LLAgentWearables::populateMyOutfitsFolder(void) { - llinfos << "starting outfit population" << llendl; + LL_INFOS() << "starting outfit population" << LL_ENDL; const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id); diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 4a8d122dd8..af0f02861d 100755 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -39,7 +39,7 @@ void order_my_outfits_cb() { if (!LLApp::isRunning()) { - llwarns << "called during shutdown, skipping" << llendl; + LL_WARNS() << "called during shutdown, skipping" << LL_ENDL; return; } @@ -58,7 +58,7 @@ void order_my_outfits_cb() return; } - llinfos << "Starting updating My Outfits with wearables ordering information" << llendl; + LL_INFOS() << "Starting updating My Outfits with wearables ordering information" << LL_ENDL; for (LLInventoryModel::cat_array_t::iterator outfit_iter = cats->begin(); outfit_iter != cats->end(); ++outfit_iter) @@ -72,7 +72,7 @@ void order_my_outfits_cb() LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(cat_id); } - llinfos << "Finished updating My Outfits with wearables ordering information" << llendl; + LL_INFOS() << "Finished updating My Outfits with wearables ordering information" << LL_ENDL; } LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : @@ -165,7 +165,7 @@ public: LLViewerInventoryItem *item = gInventory.getItem(*it); if (!item) { - llwarns << "fetch failed!" << llendl; + LL_WARNS() << "fetch failed!" << LL_ENDL; continue; } @@ -197,8 +197,8 @@ void LLInitialWearablesFetch::processWearablesMessage() } else { - llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID " - << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl; + LL_INFOS() << "Invalid wearable, type " << wearable_data->mType << " itemID " + << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << LL_ENDL; delete wearable_data; } } @@ -249,7 +249,7 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false) { - llinfos << "created" << llendl; + LL_INFOS() << "created" << LL_ENDL; mMyOutfitsID = LLUUID::null; mClothingID = LLUUID::null; @@ -260,12 +260,12 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : LLLibraryOutfitsFetch::~LLLibraryOutfitsFetch() { - llinfos << "destroyed" << llendl; + LL_INFOS() << "destroyed" << LL_ENDL; } void LLLibraryOutfitsFetch::done() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; // Delay this until idle() routine, since it's a heavy operation and // we also can't have it run within notifyObservers. @@ -275,7 +275,7 @@ void LLLibraryOutfitsFetch::done() void LLLibraryOutfitsFetch::doneIdle() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; gInventory.addObserver(this); // Add this back in since it was taken out during ::done() @@ -301,7 +301,7 @@ void LLLibraryOutfitsFetch::doneIdle() contentsDone(); break; default: - llwarns << "Got invalid state for outfit fetch: " << mCurrFetchStep << llendl; + LL_WARNS() << "Got invalid state for outfit fetch: " << mCurrFetchStep << LL_ENDL; mOutfitsPopulated = TRUE; break; } @@ -317,7 +317,7 @@ void LLLibraryOutfitsFetch::doneIdle() void LLLibraryOutfitsFetch::folderDone() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; @@ -364,7 +364,7 @@ void LLLibraryOutfitsFetch::folderDone() void LLLibraryOutfitsFetch::outfitsDone() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; @@ -443,7 +443,7 @@ private: // Copy the clothing folders from the library into the imported clothing folder void LLLibraryOutfitsFetch::libraryDone() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; if (mImportedClothingID != LLUUID::null) { @@ -468,13 +468,13 @@ void LLLibraryOutfitsFetch::libraryDone() const LLViewerInventoryCategory *cat = gInventory.getCategory(src_folder_id); if (!cat) { - llwarns << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << llendl; + LL_WARNS() << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << LL_ENDL; continue; } if (!LLAppearanceMgr::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id)) { - llinfos << "Skipping non-outfit folder name:" << cat->getName() << llendl; + LL_INFOS() << "Skipping non-outfit folder name:" << cat->getName() << LL_ENDL; continue; } @@ -500,7 +500,7 @@ void LLLibraryOutfitsFetch::libraryDone() void LLLibraryOutfitsFetch::importedFolderFetch() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; // Fetch the contents of the Imported Clothing Folder uuid_vec_t folders; @@ -517,7 +517,7 @@ void LLLibraryOutfitsFetch::importedFolderFetch() void LLLibraryOutfitsFetch::importedFolderDone() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; @@ -549,7 +549,7 @@ void LLLibraryOutfitsFetch::importedFolderDone() void LLLibraryOutfitsFetch::contentsDone() { - llinfos << "start" << llendl; + LL_INFOS() << "start" << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; @@ -564,7 +564,7 @@ void LLLibraryOutfitsFetch::contentsDone() const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id); if (!cat) { - llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl; + LL_WARNS() << "Library folder import for uuid:" << folder_id << " failed to find folder." << LL_ENDL; continue; } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a18448da6e..435fe9a32b 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -157,7 +157,7 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string return cat->getUUID(); else { - llwarns << "null cat" << llendl; + LL_WARNS() << "null cat" << LL_ENDL; return LLUUID(); } } @@ -216,11 +216,11 @@ public: // Request or re-request operation for specified item. void addItem(const LLUUID& item_id) { - LL_DEBUGS("Avatar") << "item_id " << item_id << llendl; + LL_DEBUGS("Avatar") << "item_id " << item_id << LL_ENDL; if (!requestOperation(item_id)) { - LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << llendl; + LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << LL_ENDL; return; } @@ -243,20 +243,20 @@ public: { if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateLateOpRate")) { - llwarns << "Simulating late operation by punting handling to later" << llendl; + LL_WARNS() << "Simulating late operation by punting handling to later" << LL_ENDL; doAfterInterval(boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,src_id,dst_id,timestamp), mRetryAfter); return; } mPendingRequests--; F32 elapsed = timestamp.getElapsedTimeF32(); - LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << llendl; + LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << LL_ENDL; if (mWaitTimes.find(src_id) == mWaitTimes.end()) { // No longer waiting for this item - either serviced // already or gave up after too many retries. - llwarns << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id - << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << llendl; + LL_WARNS() << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id + << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << LL_ENDL; } mTimeStats.push(elapsed); mWaitTimes.erase(src_id); @@ -291,13 +291,13 @@ public: void onFailure() { - llinfos << "failed" << llendl; + LL_INFOS() << "failed" << LL_ENDL; mOnFailureFunc(); } void onCompletion() { - llinfos << "done" << llendl; + LL_INFOS() << "done" << LL_ENDL; mOnCompletionFunc(); } @@ -316,7 +316,7 @@ public: if (!mWaitTimes.empty()) { - llwarns << "still waiting on " << mWaitTimes.size() << " items" << llendl; + LL_WARNS() << "still waiting on " << mWaitTimes.size() << " items" << LL_ENDL; for (std::map::iterator it = mWaitTimes.begin(); it != mWaitTimes.end();) { @@ -331,13 +331,13 @@ public: if (retries < mMaxRetries) { LL_DEBUGS("Avatar") << "Waited " << time_waited << - " for " << curr_it->first << ", retrying" << llendl; + " for " << curr_it->first << ", retrying" << LL_ENDL; mRetryCount++; addItem(curr_it->first); } else { - llwarns << "Giving up on " << curr_it->first << " after too many retries" << llendl; + LL_WARNS() << "Giving up on " << curr_it->first << " after too many retries" << LL_ENDL; mWaitTimes.erase(curr_it); mFailCount++; } @@ -354,16 +354,16 @@ public: void reportStats() { - LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << llendl; - LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << llendl; - LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << llendl; - LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << llendl; - LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << llendl; + LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << LL_ENDL; + LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << LL_ENDL; + LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << LL_ENDL; + LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << LL_ENDL; + LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << LL_ENDL; } virtual ~LLCallAfterInventoryBatchMgr() { - LL_DEBUGS("Avatar") << "deleting" << llendl; + LL_DEBUGS("Avatar") << "deleting" << LL_ENDL; } protected: @@ -402,10 +402,10 @@ public: { LLViewerInventoryItem *item = gInventory.getItem(item_id); llassert(item); - LL_DEBUGS("Avatar") << "copying item " << item_id << llendl; + LL_DEBUGS("Avatar") << "copying item " << item_id << LL_ENDL; if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } copy_inventory_item( @@ -444,14 +444,14 @@ public: { if (item->getParentUUID() == mDstCatID) { - LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << llendl; + LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << LL_ENDL; return false; } - LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << llendl; + LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << LL_ENDL; // create an inventory item link. if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } link_inventory_item(gAgent.getID(), @@ -470,7 +470,7 @@ public: LLViewerInventoryCategory *catp = gInventory.getCategory(item_id); if (!catp) { - llwarns << "link request failed, id not found as inventory item or category " << item_id << llendl; + LL_WARNS() << "link request failed, id not found as inventory item or category " << item_id << LL_ENDL; return false; } const LLUUID cof = LLAppearanceMgr::instance().getCOF(); @@ -482,10 +482,10 @@ public: { if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } - LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << llendl; + LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << LL_ENDL; link_inventory_item(gAgent.getID(), item_id, cof, catp->getName(), "", LLAssetType::AT_LINK_FOLDER, new LLBoostFuncInventoryCallback( @@ -621,11 +621,11 @@ LLWearableHoldingPattern::LLWearableHoldingPattern(): { if (sActiveHoldingPatterns.size()>0) { - llinfos << "Creating LLWearableHoldingPattern when " + LL_INFOS() << "Creating LLWearableHoldingPattern when " << sActiveHoldingPatterns.size() << " other attempts are active." << " Flagging others as invalid." - << llendl; + << LL_ENDL; for (type_set_hp::iterator it = sActiveHoldingPatterns.begin(); it != sActiveHoldingPatterns.end(); ++it) @@ -692,7 +692,7 @@ void LLWearableHoldingPattern::checkMissingWearables() if (!isMostRecent()) { // runway why don't we actually skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } std::vector found_by_type(LLWearableType::WT_COUNT,0); @@ -710,7 +710,7 @@ void LLWearableHoldingPattern::checkMissingWearables() { if (requested_by_type[type] > found_by_type[type]) { - llwarns << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << llendl; + LL_WARNS() << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << LL_ENDL; } if (found_by_type[type] > 0) continue; @@ -727,7 +727,7 @@ void LLWearableHoldingPattern::checkMissingWearables() mTypesToRecover.insert(type); mTypesToLink.insert(type); recoverMissingWearable((LLWearableType::EType)type); - llwarns << self_av_string() << "need to replace " << type << llendl; + LL_WARNS() << self_av_string() << "need to replace " << type << LL_ENDL; } } @@ -750,7 +750,7 @@ void LLWearableHoldingPattern::onAllComplete() if (!isMostRecent()) { // runway need to skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } // Activate all gestures in this folder @@ -802,7 +802,7 @@ void LLWearableHoldingPattern::onFetchCompletion() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } checkMissingWearables(); @@ -814,7 +814,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } bool completed = isFetchCompleted(); @@ -830,7 +830,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (timed_out) { - llwarns << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl; + LL_WARNS() << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << LL_ENDL; } onFetchCompletion(); @@ -842,11 +842,11 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L { if (!holder->isMostRecent()) { - llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; // runway skip here? } - llinfos << "Recovered item link for type " << type << llendl; + LL_INFOS() << "Recovered item link for type " << type << LL_ENDL; holder->eraseTypeToLink(type); // Add wearable to FoundData for actual wearing LLViewerInventoryItem *item = gInventory.getItem(item_id); @@ -870,12 +870,12 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L } else { - llwarns << self_av_string() << "inventory item not found for recovered wearable" << llendl; + LL_WARNS() << self_av_string() << "inventory item not found for recovered wearable" << LL_ENDL; } } else { - llwarns << self_av_string() << "inventory link not found for recovered wearable" << llendl; + LL_WARNS() << self_av_string() << "inventory link not found for recovered wearable" << LL_ENDL; } } @@ -884,7 +884,7 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView if (!holder->isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL; @@ -910,13 +910,13 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) - << " could not be downloaded. Replaced inventory item with default wearable." << llendl; + LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) + << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL; LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); // Add a new one in the lost and found folder. @@ -960,7 +960,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } bool timed_out = isTimedOut(); @@ -1009,11 +1009,11 @@ void LLWearableHoldingPattern::handleLateArrivals() } if (!isMostRecent()) { - llwarns << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << llendl; + LL_WARNS() << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << LL_ENDL; } if (!mIsAllComplete) { - llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl; + LL_WARNS() << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << LL_ENDL; } LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL; @@ -1092,19 +1092,19 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) { if (!isMostRecent()) { - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } mResolved += 1; // just counting callbacks, not successes. LL_DEBUGS("Avatar") << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << LL_ENDL; if (!wearable) { - llwarns << self_av_string() << "no wearable found" << llendl; + LL_WARNS() << self_av_string() << "no wearable found" << LL_ENDL; } if (mFired) { - llwarns << self_av_string() << "called after holder fired" << llendl; + LL_WARNS() << self_av_string() << "called after holder fired" << LL_ENDL; if (wearable) { mLateArrivals.insert(wearable); @@ -1130,7 +1130,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) // Failing this means inventory or asset server are corrupted in a way we don't handle. if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType)) { - llwarns << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl; + LL_WARNS() << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << LL_ENDL; break; } @@ -1251,7 +1251,7 @@ const LLUUID LLAppearanceMgr::getBaseOutfitUUID() if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT) { - llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl; + LL_WARNS() << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << LL_ENDL; return LLUUID::null; } @@ -1440,10 +1440,10 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds LLInventoryCategory *src_cat = gInventory.getCategory(src_id); if (!src_cat) { - llwarns << "folder not found for src " << src_id.asString() << llendl; + LL_WARNS() << "folder not found for src " << src_id.asString() << LL_ENDL; return; } - llinfos << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << llendl; + LL_INFOS() << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << LL_ENDL; LLUUID parent_id = dst_id; if(parent_id.isNull()) { @@ -1464,7 +1464,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL LLInventoryModel::cat_array_t* cats; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(src_id, cats, items); - llinfos << "copying " << items->size() << " items" << llendl; + LL_INFOS() << "copying " << items->size() << " items" << LL_ENDL; for (LLInventoryModel::item_array_t::const_iterator iter = items->begin(); iter != items->end(); ++iter) @@ -1504,7 +1504,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL case LLAssetType::AT_BODYPART: case LLAssetType::AT_GESTURE: { - llinfos << "copying inventory item " << item->getName() << llendl; + LL_INFOS() << "copying inventory item " << item->getName() << LL_ENDL; copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), @@ -1676,7 +1676,7 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin #if 0 if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL) { - llinfos << "preserved item" << llendl; + LL_INFOS() << "preserved item" << LL_ENDL; } else { @@ -1854,7 +1854,7 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer wearables; wearables.reserve(32); @@ -1988,7 +1988,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { if (mIsInUpdateAppearanceFromCOF) { - llwarns << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << llendl; + LL_WARNS() << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << LL_ENDL; return; } @@ -2024,7 +2024,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) LLUUID current_outfit_id = getCOF(); // Find all the wearables that are in the COF's subtree. - lldebugs << "LLAppearanceMgr::updateFromCOF()" << llendl; + LL_DEBUGS() << "LLAppearanceMgr::updateFromCOF()" << LL_ENDL; LLInventoryModel::item_array_t wear_items; LLInventoryModel::item_array_t obj_items; LLInventoryModel::item_array_t gest_items; @@ -2087,11 +2087,11 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { if (!item) { - llwarns << "Attempt to wear a null item " << llendl; + LL_WARNS() << "Attempt to wear a null item " << LL_ENDL; } else if (!linked_item) { - llwarns << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << llendl; + LL_WARNS() << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << LL_ENDL; } } } @@ -2103,7 +2103,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { LLFoundData& found = *it; - lldebugs << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl; + LL_DEBUGS() << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << LL_ENDL; // Fetch the wearables about to be worn. LLWearableList::instance().getAsset(found.mAssetID, @@ -2327,8 +2327,8 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name) } else { - llwarns << "Couldn't find outfit " <(item); if (!vitem) { - llwarns << "not an llviewerinventoryitem, failed" << llendl; + LL_WARNS() << "not an llviewerinventoryitem, failed" << LL_ENDL; return; } @@ -2699,7 +2699,7 @@ void LLAppearanceMgr::copyLibraryGestures() gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_GESTURE,false); if (lib_gesture_cat_id.isNull()) { - llwarns << "Unable to copy gestures, source category not found" << llendl; + LL_WARNS() << "Unable to copy gestures, source category not found" << LL_ENDL; } LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); @@ -2748,7 +2748,7 @@ void LLAppearanceMgr::copyLibraryGestures() LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name); if (cat_id.isNull()) { - llwarns << self_av_string() << "failed to find gesture folder for " << folder_name << llendl; + LL_WARNS() << self_av_string() << "failed to find gesture folder for " << folder_name << LL_ENDL; } else { @@ -2845,7 +2845,7 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& LLViewerInventoryItem *item = items.at(i); if (!item) { - LL_WARNS("Appearance") << "NULL item found" << llendl; + LL_WARNS("Appearance") << "NULL item found" << LL_ENDL; continue; } // Ignore non-wearables. @@ -3045,7 +3045,7 @@ public: // Error /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl; + LL_WARNS() << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << LL_ENDL; if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content); @@ -3060,7 +3060,7 @@ public: F32 seconds_to_wait; if (mRetryPolicy->shouldRetry(status,seconds_to_wait)) { - llinfos << "retrying" << llendl; + LL_INFOS() << "retrying" << LL_ENDL; doAfterInterval(boost::bind(&LLAppearanceMgr::requestServerAppearanceUpdate, LLAppearanceMgr::getInstance(), LLCurl::ResponderPtr(this)), @@ -3068,7 +3068,7 @@ public: } else { - llwarns << "giving up after too many retries" << llendl; + LL_WARNS() << "giving up after too many retries" << LL_ENDL; } } @@ -3083,7 +3083,7 @@ public: void debugCOF(const LLSD& content) { - LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl; + LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << LL_ENDL; std::set ais_items, local_items; const LLSD& cof_raw = content["cof_raw"]; for (LLSD::array_const_iterator it = cof_raw.beginArray(); @@ -3098,14 +3098,14 @@ public: LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } else if (item["type"].asInteger() == 25) // folder link { LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } else @@ -3113,12 +3113,12 @@ public: LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } } } - LL_DEBUGS("Avatar") << llendl; - LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << llendl; + LL_DEBUGS("Avatar") << LL_ENDL; + LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), @@ -3130,21 +3130,21 @@ public: LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID() << " linked_item_id: " << inv_item->getLinkedUUID() << " name: " << inv_item->getName() - << llendl; + << LL_ENDL; } - LL_DEBUGS("Avatar") << llendl; + LL_DEBUGS("Avatar") << LL_ENDL; for (std::set::iterator it = local_items.begin(); it != local_items.end(); ++it) { if (ais_items.find(*it) == ais_items.end()) { - LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl; + LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << LL_ENDL; } } for (std::set::iterator it = ais_items.begin(); it != ais_items.end(); ++it) { if (local_items.find(*it) == local_items.end()) { - LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl; + LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << LL_ENDL; } } } @@ -3178,17 +3178,17 @@ LLSD LLAppearanceMgr::dumpCOF() const const LLViewerInventoryItem* linked_item = inv_item->getLinkedItem(); if (NULL == linked_item) { - llwarns << "Broken link for item '" << inv_item->getName() + LL_WARNS() << "Broken link for item '" << inv_item->getName() << "' (" << inv_item->getUUID() - << ") during requestServerAppearanceUpdate" << llendl; + << ") during requestServerAppearanceUpdate" << LL_ENDL; continue; } // Some assets may be 'hidden' and show up as null in the viewer. //if (linked_item->getAssetUUID().isNull()) //{ - // llwarns << "Broken link (null asset) for item '" << inv_item->getName() + // LL_WARNS() << "Broken link (null asset) for item '" << inv_item->getName() // << "' (" << inv_item->getUUID() - // << ") during requestServerAppearanceUpdate" << llendl; + // << ") during requestServerAppearanceUpdate" << LL_ENDL; // continue; //} LLUUID linked_asset_id(linked_item->getAssetUUID()); @@ -3198,10 +3198,10 @@ LLSD LLAppearanceMgr::dumpCOF() const } else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType()) { - llwarns << "Non-link item '" << inv_item->getName() + LL_WARNS() << "Non-link item '" << inv_item->getName() << "' (" << inv_item->getUUID() << ") type " << (S32) inv_item->getActualType() - << " during requestServerAppearanceUpdate" << llendl; + << " during requestServerAppearanceUpdate" << LL_ENDL; continue; } links.append(item); @@ -3225,17 +3225,17 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond if (!gAgent.getRegion()) { - llwarns << "Region not set, cannot request server appearance update" << llendl; + LL_WARNS() << "Region not set, cannot request server appearance update" << LL_ENDL; return; } if (gAgent.getRegion()->getCentralBakeVersion()==0) { - llwarns << "Region does not support baking" << llendl; + LL_WARNS() << "Region does not support baking" << LL_ENDL; } std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance"); if (url.empty()) { - llwarns << "No cap for UpdateAvatarAppearance." << llendl; + LL_WARNS() << "No cap for UpdateAvatarAppearance." << LL_ENDL; return; } @@ -3253,7 +3253,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond body["cof_version"] = cof_version+999; } } - LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl; + LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << LL_ENDL; //LLCurl::ResponderPtr responder_ptr; if (!responder_ptr.get()) @@ -3279,7 +3279,7 @@ public: virtual void result(const LLSD &pContent) { - llinfos << "Successfully incremented agent's COF." << llendl; + LL_INFOS() << "Successfully incremented agent's COF." << LL_ENDL; S32 new_version = pContent["category"]["version"].asInteger(); // cof_version should have increased @@ -3289,12 +3289,12 @@ public: } virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& content) { - llwarns << "While attempting to increment the agent's cof we got an error with [status:" - << pStatus << "]: " << content << llendl; + LL_WARNS() << "While attempting to increment the agent's cof we got an error with [status:" + << pStatus << "]: " << content << LL_ENDL; F32 seconds_to_wait; if (mRetryPolicy->shouldRetry(pStatus,seconds_to_wait)) { - llinfos << "retrying" << llendl; + LL_INFOS() << "retrying" << LL_ENDL; doAfterInterval(boost::bind(&LLAppearanceMgr::incrementCofVersion, LLAppearanceMgr::getInstance(), LLHTTPClient::ResponderPtr(this)), @@ -3302,7 +3302,7 @@ public: } else { - llwarns << "giving up after too many retries" << llendl; + LL_WARNS() << "giving up after too many retries" << LL_ENDL; } } @@ -3314,19 +3314,19 @@ void LLAppearanceMgr::incrementCofVersion(LLHTTPClient::ResponderPtr responder_p // If we don't have a region, report it as an error if (gAgent.getRegion() == NULL) { - llwarns << "Region not set, cannot request cof_version increment" << llendl; + LL_WARNS() << "Region not set, cannot request cof_version increment" << LL_ENDL; return; } std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); if (url.empty()) { - llwarns << "No cap for IncrementCofVersion." << llendl; + LL_WARNS() << "No cap for IncrementCofVersion." << LL_ENDL; return; } - llinfos << "Requesting cof_version be incremented via capability to: " - << url << llendl; + LL_INFOS() << "Requesting cof_version be incremented via capability to: " + << url << LL_ENDL; LLSD headers; LLSD body = LLSD::emptyMap(); @@ -3351,7 +3351,7 @@ void show_created_outfit(LLUUID& folder_id, bool show_panel = true) { if (!LLApp::isRunning()) { - llwarns << "called during shutdown, skipping" << llendl; + LL_WARNS() << "called during shutdown, skipping" << LL_ENDL; return; } @@ -3413,7 +3413,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) { if (ids_to_remove.empty()) { - llwarns << "called with empty list, nothing to do" << llendl; + LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL; } for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { @@ -3503,18 +3503,18 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) gInventory.collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); #ifdef DUMP_CAT_VERBOSE - llinfos << llendl; - llinfos << str << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << str << LL_ENDL; S32 hitcount = 0; for(S32 i=0; igetName() <getName() < " << (int) val << llendl; + LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << LL_ENDL; mAttachmentInvLinkEnabled = val; } void dumpAttachmentSet(const std::set& atts, const std::string& msg) { - llinfos << msg << llendl; + LL_INFOS() << msg << LL_ENDL; for (std::set::const_iterator it = atts.begin(); it != atts.end(); ++it) @@ -3571,11 +3571,11 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) LLUUID item_id = *it; LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item) - llinfos << "atts " << item->getName() << llendl; + LL_INFOS() << "atts " << item->getName() << LL_ENDL; else - llinfos << "atts " << "UNKNOWN[" << item_id.asString() << "]" << llendl; + LL_INFOS() << "atts " << "UNKNOWN[" << item_id.asString() << "]" << LL_ENDL; } - llinfos << llendl; + LL_INFOS() << LL_ENDL; } void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) @@ -3591,7 +3591,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) } else { - //llinfos << "no link changes, inv link not enabled" << llendl; + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; } } @@ -3605,7 +3605,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } else { - //llinfos << "no link changes, inv link not enabled" << llendl; + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; } } @@ -3671,8 +3671,8 @@ public: } virtual void done() { - llinfos << this << " done with incomplete " << mIncomplete.size() - << " complete " << mComplete.size() << " calling callable" << llendl; + LL_INFOS() << this << " done with incomplete " << mIncomplete.size() + << " complete " << mComplete.size() << " calling callable" << LL_ENDL; gInventory.removeObserver(this); doOnIdleOneTime(mCallable); @@ -3707,8 +3707,8 @@ public: S32 count = item_array.size(); if(!count) { - llwarns << "Nothing fetched in category " << mComplete.front() - << llendl; + LL_WARNS() << "Nothing fetched in category " << mComplete.front() + << LL_ENDL; gInventory.removeObserver(this); doOnIdleOneTime(mCallable); @@ -3716,7 +3716,7 @@ public: return; } - llinfos << "stage1 got " << item_array.size() << " items, passing to stage2 " << llendl; + LL_INFOS() << "stage1 got " << item_array.size() << " items, passing to stage2 " << LL_ENDL; uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d544b992ef..0a1a78c5b4 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -688,7 +688,7 @@ LLAppViewer::LLAppViewer() { if(NULL != sInstance) { - llerrs << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << llendl; + LL_ERRS() << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << LL_ENDL; } setupErrorHandling(); @@ -1259,7 +1259,7 @@ LLFastTimer::DeclareTimer FTM_FRAME("Frame"); bool LLAppViewer::mainLoop() { - llinfos << "***********************Entering main_loop***********************" << LL_ENDL; + LL_INFOS() << "***********************Entering main_loop***********************" << LL_ENDL; mMainloopTimeout = new LLWatchdogTimeout(); @@ -1326,7 +1326,7 @@ bool LLAppViewer::mainLoop() LLFastTimer t2(FTM_MESSAGES); if (!restoreErrorTrap()) { - llwarns << " Someone took over my signal/exception handler (post messagehandling)!" << llendl; + LL_WARNS() << " Someone took over my signal/exception handler (post messagehandling)!" << LL_ENDL; } gViewerWindow->getWindow()->gatherInput(); @@ -1460,7 +1460,7 @@ bool LLAppViewer::mainLoop() if (mPeriodicSlowFrame && (gFrameCount % 10 == 0)) { - llinfos << "Periodic slow frame - sleeping 500 ms" << llendl; + LL_INFOS() << "Periodic slow frame - sleeping 500 ms" << LL_ENDL; ms_sleep(500); } @@ -1550,14 +1550,14 @@ bool LLAppViewer::mainLoop() if(mem_leak_instance) { mem_leak_instance->stop() ; - llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + LL_WARNS() << "Bad memory allocation in LLAppViewer::mainLoop()!" << LL_ENDL ; } else { //output possible call stacks to log file. LLError::LLCallStacks::print() ; - llerrs << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + LL_ERRS() << "Bad memory allocation in LLAppViewer::mainLoop()!" << LL_ENDL ; } } } @@ -1571,7 +1571,7 @@ bool LLAppViewer::mainLoop() } catch(std::bad_alloc) { - llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ; + LL_WARNS() << "Bad memory allocation when saveFinalSnapshot() is called!" << LL_ENDL ; //stop memory leaking simulation LLFloaterMemLeak* mem_leak_instance = @@ -1587,7 +1587,7 @@ bool LLAppViewer::mainLoop() destroyMainloopTimeout(); - llinfos << "***********************Exiting main_loop***********************" << LL_ENDL; + LL_INFOS() << "***********************Exiting main_loop***********************" << LL_ENDL; return true; } @@ -1620,7 +1620,7 @@ void LLAppViewer::flushVFSIO() { break; } - llinfos << "Waiting for pending IO to finish: " << pending << LL_ENDL; + LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL; ms_sleep(100); } } @@ -1638,7 +1638,7 @@ bool LLAppViewer::cleanup() if (LLFastTimerView::sAnalyzePerformance) { - llinfos << "Analyzing performance" << llendl; + LL_INFOS() << "Analyzing performance" << LL_ENDL; std::string baseline_name = LLTrace::TimeBlock::sLogName + "_baseline.slp"; std::string current_name = LLTrace::TimeBlock::sLogName + ".slp"; std::string report_name = LLTrace::TimeBlock::sLogName + "_report.csv"; @@ -1684,7 +1684,7 @@ bool LLAppViewer::cleanup() disconnectViewer(); - llinfos << "Viewer disconnected" << LL_ENDL; + LL_INFOS() << "Viewer disconnected" << LL_ENDL; display_cleanup(); @@ -1692,7 +1692,7 @@ bool LLAppViewer::cleanup() LLError::logToFixedBuffer(NULL); - llinfos << "Cleaning Up" << LL_ENDL; + LL_INFOS() << "Cleaning Up" << LL_ENDL; // shut down mesh streamer gMeshRepo.shutdown(); @@ -1707,7 +1707,7 @@ bool LLAppViewer::cleanup() LLHUDObject::updateAll(); LLHUDManager::getInstance()->cleanupEffects(); LLHUDObject::cleanupHUDObjects(); - llinfos << "HUD Objects cleaned up" << LL_ENDL; + LL_INFOS() << "HUD Objects cleaned up" << LL_ENDL; } LLKeyframeDataCache::clear(); @@ -1738,7 +1738,7 @@ bool LLAppViewer::cleanup() LLCalc::cleanUp(); - llinfos << "Global stuff deleted" << LL_ENDL; + LL_INFOS() << "Global stuff deleted" << LL_ENDL; if (gAudiop) { @@ -1762,7 +1762,7 @@ bool LLAppViewer::cleanup() // such that we can suck rectangle information out of // it. cleanupSavedSettings(); - llinfos << "Settings patched up" << LL_ENDL; + LL_INFOS() << "Settings patched up" << LL_ENDL; // delete some of the files left around in the cache. removeCacheFiles("*.wav"); @@ -1773,29 +1773,29 @@ bool LLAppViewer::cleanup() removeCacheFiles("*.bodypart"); removeCacheFiles("*.clothing"); - llinfos << "Cache files removed" << LL_ENDL; + LL_INFOS() << "Cache files removed" << LL_ENDL; // Wait for any pending VFS IO flushVFSIO(); - llinfos << "Shutting down Views" << LL_ENDL; + LL_INFOS() << "Shutting down Views" << LL_ENDL; // Destroy the UI if( gViewerWindow) gViewerWindow->shutdownViews(); - llinfos << "Cleaning up Inventory" << LL_ENDL; + LL_INFOS() << "Cleaning up Inventory" << LL_ENDL; // Cleanup Inventory after the UI since it will delete any remaining observers // (Deleted observers should have already removed themselves) gInventory.cleanupInventory(); - llinfos << "Cleaning up Selections" << LL_ENDL; + LL_INFOS() << "Cleaning up Selections" << LL_ENDL; // Clean up selection managers after UI is destroyed, as UI may be observing them. // Clean up before GL is shut down because we might be holding on to objects with texture references LLSelectMgr::cleanupGlobals(); - llinfos << "Shutting down OpenGL" << LL_ENDL; + LL_INFOS() << "Shutting down OpenGL" << LL_ENDL; // Shut down OpenGL if( gViewerWindow) @@ -1807,10 +1807,10 @@ bool LLAppViewer::cleanup() // Therefore must do this before destroying the message system. delete gViewerWindow; gViewerWindow = NULL; - llinfos << "ViewerWindow deleted" << LL_ENDL; + LL_INFOS() << "ViewerWindow deleted" << LL_ENDL; } - llinfos << "Cleaning up Keyboard & Joystick" << LL_ENDL; + LL_INFOS() << "Cleaning up Keyboard & Joystick" << LL_ENDL; // viewer UI relies on keyboard so keep it aound until viewer UI isa gone delete gKeyboard; @@ -1819,7 +1819,7 @@ bool LLAppViewer::cleanup() // Turn off Space Navigator and similar devices LLViewerJoystick::getInstance()->terminate(); - llinfos << "Cleaning up Objects" << LL_ENDL; + LL_INFOS() << "Cleaning up Objects" << LL_ENDL; LLViewerObject::cleanupVOClasses(); @@ -1841,11 +1841,11 @@ bool LLAppViewer::cleanup() LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager(); if (!volume_manager->cleanup()) { - llwarns << "Remaining references in the volume manager!" << LL_ENDL; + LL_WARNS() << "Remaining references in the volume manager!" << LL_ENDL; } LLPrimitive::cleanupVolumeManager(); - llinfos << "Additional Cleanup..." << LL_ENDL; + LL_INFOS() << "Additional Cleanup..." << LL_ENDL; LLViewerParcelMgr::cleanupGlobals(); @@ -1866,10 +1866,10 @@ bool LLAppViewer::cleanup() // Also after shutting down the messaging system since it has VFS dependencies // - llinfos << "Cleaning up VFS" << LL_ENDL; + LL_INFOS() << "Cleaning up VFS" << LL_ENDL; LLVFile::cleanupClass(); - llinfos << "Saving Data" << LL_ENDL; + LL_INFOS() << "Saving Data" << LL_ENDL; // Store the time of our current logoff gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); @@ -1884,19 +1884,19 @@ bool LLAppViewer::cleanup() // *FIX:Mani This should get really saved in a "logoff" mode. if (gSavedSettings.getString("PerAccountSettingsFile").empty()) { - llinfos << "Not saving per-account settings; don't know the account name yet." << llendl; + LL_INFOS() << "Not saving per-account settings; don't know the account name yet." << LL_ENDL; } // Only save per account settings if the previous login succeeded, otherwise // we might end up with a cleared out settings file in case a previous login // failed after loading per account settings. else if (!mSavePerAccountSettings) { - llinfos << "Not saving per-account settings; last login was not successful." << llendl; + LL_INFOS() << "Not saving per-account settings; last login was not successful." << LL_ENDL; } else { gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); - llinfos << "Saved settings" << LL_ENDL; + LL_INFOS() << "Saved settings" << LL_ENDL; } std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings")); @@ -1913,7 +1913,7 @@ bool LLAppViewer::cleanup() if (mPurgeOnExit) { - llinfos << "Purging all cache files on exit" << LL_ENDL; + LL_INFOS() << "Purging all cache files on exit" << LL_ENDL; gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*"); } @@ -1930,7 +1930,7 @@ bool LLAppViewer::cleanup() // Stop the plugin read thread if it's running. LLPluginProcessParent::setUseReadThread(false); - llinfos << "Shutting down Threads" << LL_ENDL; + LL_INFOS() << "Shutting down Threads" << LL_ENDL; // Let threads finish LLTimer idleTimer; @@ -1952,7 +1952,7 @@ bool LLAppViewer::cleanup() } else if(idle_time >= max_idle_time) { - llwarns << "Quitting with pending background tasks." << llendl; + LL_WARNS() << "Quitting with pending background tasks." << LL_ENDL; break; } } @@ -1968,7 +1968,7 @@ bool LLAppViewer::cleanup() sTextureFetch->shutDownTextureCacheThread() ; sTextureFetch->shutDownImageDecodeThread() ; - llinfos << "Shutting down message system" << LL_ENDL; + LL_INFOS() << "Shutting down message system" << LL_ENDL; end_messaging_system(); // *NOTE:Mani - The following call is not thread safe. @@ -1993,7 +1993,7 @@ bool LLAppViewer::cleanup() if (LLFastTimerView::sAnalyzePerformance) { - llinfos << "Analyzing performance" << llendl; + LL_INFOS() << "Analyzing performance" << LL_ENDL; std::string baseline_name = LLTrace::TimeBlock::sLogName + "_baseline.slp"; std::string current_name = LLTrace::TimeBlock::sLogName + ".slp"; @@ -2007,7 +2007,7 @@ bool LLAppViewer::cleanup() LLMetricPerformanceTesterBasic::cleanClass() ; - llinfos << "Cleaning up Media and Textures" << LL_ENDL; + LL_INFOS() << "Cleaning up Media and Textures" << LL_ENDL; //Note: //LLViewerMedia::cleanupClass() has to be put before gTextureList.shutdown() @@ -2023,14 +2023,14 @@ bool LLAppViewer::cleanup() LLLFSThread::cleanupClass(); #ifndef LL_RELEASE_FOR_DOWNLOAD - llinfos << "Auditing VFS" << llendl; + LL_INFOS() << "Auditing VFS" << LL_ENDL; if(gVFS) { gVFS->audit(); } #endif - llinfos << "Misc Cleanup" << LL_ENDL; + LL_INFOS() << "Misc Cleanup" << LL_ENDL; // For safety, the LLVFS has to be deleted *after* LLVFSThread. This should be cleaned up. // (LLVFS doesn't know about LLVFSThread so can't kill pending requests) -Steve @@ -2050,7 +2050,7 @@ bool LLAppViewer::cleanup() // is at the right resolution before we launch IE. if (!gLaunchFileOnQuit.empty()) { - llinfos << "Launch file on quit." << LL_ENDL; + LL_INFOS() << "Launch file on quit." << LL_ENDL; #if LL_WINDOWS // Indicate an application is starting. SetCursor(LoadCursor(NULL, IDC_WAIT)); @@ -2060,9 +2060,9 @@ bool LLAppViewer::cleanup() ms_sleep(1000); LLWeb::loadURLExternal( gLaunchFileOnQuit, false ); - llinfos << "File launched." << LL_ENDL; + LL_INFOS() << "File launched." << LL_ENDL; } - llinfos << "Cleaning up LLProxy." << llendl; + LL_INFOS() << "Cleaning up LLProxy." << LL_ENDL; LLProxy::cleanupClass(); LLWearableType::cleanupClass(); @@ -2074,13 +2074,13 @@ bool LLAppViewer::cleanup() ll_close_fail_log(); - llinfos << "Goodbye!" << LL_ENDL; + LL_INFOS() << "Goodbye!" << LL_ENDL; // return 0; return true; } -// A callback for llerrs to call during the watchdog error. +// A callback for LL_ERRS() to call during the watchdog error. void watchdog_llerrs_callback(const std::string &error_string) { gLLErrorActivated = true; @@ -2096,7 +2096,7 @@ void watchdog_llerrs_callback(const std::string &error_string) void watchdog_killer_callback() { LLError::setFatalFunction(watchdog_llerrs_callback); - llerrs << "Watchdog killer event" << llendl; + LL_ERRS() << "Watchdog killer event" << LL_ENDL; } bool LLAppViewer::initThreads() @@ -2221,7 +2221,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, { if (!mSettingsLocationList) { - llerrs << "Invalid settings location list" << llendl; + LL_ERRS() << "Invalid settings location list" << LL_ENDL; } BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) @@ -2232,19 +2232,19 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, ELLPath path_index = (ELLPath)group.path_index(); if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST) { - llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl; + LL_ERRS() << "Out of range path index in app_settings/settings_files.xml" << LL_ENDL; return false; } BOOST_FOREACH(const SettingsFile& file, group.files) { - llinfos << "Attempting to load settings for the group " << file.name() - << " - from location " << location_key << llendl; + LL_INFOS() << "Attempting to load settings for the group " << file.name() + << " - from location " << location_key << LL_ENDL; LLControlGroup* settings_group = LLControlGroup::getInstance(file.name); if(!settings_group) { - llwarns << "No matching settings group for name " << file.name() << llendl; + LL_WARNS() << "No matching settings group for name " << file.name() << LL_ENDL; continue; } @@ -2273,13 +2273,13 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent)) { // success! - llinfos << "Loaded settings file " << full_settings_path << llendl; + LL_INFOS() << "Loaded settings file " << full_settings_path << LL_ENDL; } else { // failed to load if(file.required) { - llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl; + LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL; return false; } else @@ -2287,7 +2287,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, // only complain if we actually have a filename at this point if (!full_settings_path.empty()) { - llinfos << "Cannot load " << full_settings_path << " - No settings found." << llendl; + LL_INFOS() << "Cannot load " << full_settings_path << " - No settings found." << LL_ENDL; } } } @@ -2327,17 +2327,17 @@ bool LLAppViewer::initConfiguration() //Load settings files list std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); //LLControlGroup settings_control("SettingsFiles"); - //llinfos << "Loading settings file list " << settings_file_list << llendl; + //LL_INFOS() << "Loading settings file list " << settings_file_list << LL_ENDL; //if (0 == settings_control.loadFromFile(settings_file_list)) //{ - // llerrs << "Cannot load default configuration file " << settings_file_list << llendl; + // LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; //} LLXMLNodePtr root; BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL); if (!success) { - llerrs << "Cannot load default configuration file " << settings_file_list << llendl; + LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; } mSettingsLocationList = new SettingsFiles(); @@ -2347,7 +2347,7 @@ bool LLAppViewer::initConfiguration() if (!mSettingsLocationList->validateBlock()) { - llerrs << "Invalid settings file list " << settings_file_list << llendl; + LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL; } // The settings and command line parsing have a fragile @@ -2429,9 +2429,9 @@ bool LLAppViewer::initConfiguration() if(!initParseCommandLine(clp)) { - llwarns << "Error parsing command line options. Command Line options ignored." << llendl; + LL_WARNS() << "Error parsing command line options. Command Line options ignored." << LL_ENDL; - llinfos << "Command line usage:\n" << clp << llendl; + LL_INFOS() << "Command line usage:\n" << clp << LL_ENDL; std::ostringstream msg; msg << LLTrans::getString("MBCmdLineError") << clp.getErrorMessage(); @@ -2449,8 +2449,8 @@ bool LLAppViewer::initConfiguration() gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, clp.getOption("settings")[0]); gSavedSettings.setString("ClientSettingsFile", user_settings_filename); - llinfos << "Using command line specified settings filename: " - << user_settings_filename << llendl; + LL_INFOS() << "Using command line specified settings filename: " + << user_settings_filename << LL_ENDL; } // - load overrides from user_settings @@ -2466,8 +2466,8 @@ bool LLAppViewer::initConfiguration() { std::string session_settings_filename = clp.getOption("sessionsettings")[0]; gSavedSettings.setString("SessionSettingsFile", session_settings_filename); - llinfos << "Using session settings filename: " - << session_settings_filename << llendl; + LL_INFOS() << "Using session settings filename: " + << session_settings_filename << LL_ENDL; } loadSettingsFromDirectory("Session"); @@ -2475,8 +2475,8 @@ bool LLAppViewer::initConfiguration() { std::string user_session_settings_filename = clp.getOption("usersessionsettings")[0]; gSavedSettings.setString("UserSessionSettingsFile", user_session_settings_filename); - llinfos << "Using user session settings filename: " - << user_session_settings_filename << llendl; + LL_INFOS() << "Using user session settings filename: " + << user_session_settings_filename << LL_ENDL; } loadSettingsFromDirectory("UserSession"); @@ -2489,7 +2489,7 @@ bool LLAppViewer::initConfiguration() // ASAP or we might miss init issue etc. if(clp.hasOption("disablecrashlogger")) { - llwarns << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << llendl; + LL_WARNS() << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << LL_ENDL; LLAppViewer::instance()->disableCrashlogger(); } @@ -2504,7 +2504,7 @@ bool LLAppViewer::initConfiguration() { std::ostringstream msg; msg << LLTrans::getString("MBCmdLineUsg") << "\n" << clp; - llinfos << msg.str() << llendl; + LL_INFOS() << msg.str() << LL_ENDL; OSMessageBox( msg.str().c_str(), @@ -2519,7 +2519,7 @@ bool LLAppViewer::initConfiguration() const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set"); if(0x1 & set_values.size()) { - llwarns << "Invalid '--set' parameter count." << llendl; + LL_WARNS() << "Invalid '--set' parameter count." << LL_ENDL; } else { @@ -2538,13 +2538,13 @@ bool LLAppViewer::initConfiguration() { group_part = name.substr(0, pos); name_part = name.substr(pos+1); - llinfos << "Setting " << group_part << "." << name_part << " to " << value << llendl; + LL_INFOS() << "Setting " << group_part << "." << name_part << " to " << value << LL_ENDL; LLControlGroup* g = LLControlGroup::getInstance(group_part); if (g) control = g->getControl(name_part); } else { - llinfos << "Setting Global." << name << " to " << value << llendl; + LL_INFOS() << "Setting Global." << name << " to " << value << LL_ENDL; control = gSavedSettings.getControl(name); } @@ -2554,7 +2554,7 @@ bool LLAppViewer::initConfiguration() } else { - llwarns << "Failed --set " << name << ": setting name unknown." << llendl; + LL_WARNS() << "Failed --set " << name << ": setting name unknown." << LL_ENDL; } } } @@ -2583,10 +2583,10 @@ bool LLAppViewer::initConfiguration() // '--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]; - llinfos << "'--logmetrics' argument : " << test_name << llendl; + LL_INFOS() << "'--logmetrics' argument : " << test_name << LL_ENDL; if (test_name == "") { - llwarns << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << llendl; + LL_WARNS() << "No '--logmetrics' argument given, will output all metrics to " << DEFAULT_METRIC_NAME << LL_ENDL; LLTrace::TimeBlock::sLogName = DEFAULT_METRIC_NAME; } else @@ -2600,7 +2600,7 @@ bool LLAppViewer::initConfiguration() const LLCommandLineParser::token_vector_t& value = clp.getOption("graphicslevel"); if(value.size() != 1) { - llwarns << "Usage: -graphicslevel <0-3>" << llendl; + LL_WARNS() << "Usage: -graphicslevel <0-3>" << LL_ENDL; } else { @@ -2623,7 +2623,7 @@ bool LLAppViewer::initConfiguration() break; default: mForceGraphicsDetail = FALSE; - llwarns << "Usage: -graphicslevel <0-3>" << llendl; + LL_WARNS() << "Usage: -graphicslevel <0-3>" << LL_ENDL; break; } } @@ -2717,7 +2717,7 @@ bool LLAppViewer::initConfiguration() // if (!skin_def_tree.parseFile(skin_def_file)) // { - // llerrs << "Failed to parse skin definition." << llendl; + // LL_ERRS() << "Failed to parse skin definition." << LL_ENDL; // } //} @@ -2909,10 +2909,10 @@ namespace { void apply_update_callback(LLSD const & notification, LLSD const & response) { - lldebugs << "LLUpdate user response: " << response << llendl; + LL_DEBUGS() << "LLUpdate user response: " << response << LL_ENDL; if(response["OK_okcancelbuttons"].asBoolean()) { - llinfos << "LLUpdate restarting viewer" << llendl; + LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL; static const bool install_if_ready = true; // *HACK - this lets us launch the installer immediately for now LLUpdaterService().startChecking(install_if_ready); @@ -2921,7 +2921,7 @@ namespace { void apply_update_ok_callback(LLSD const & notification, LLSD const & response) { - llinfos << "LLUpdate restarting viewer" << llendl; + LL_INFOS() << "LLUpdate restarting viewer" << LL_ENDL; static const bool install_if_ready = true; // *HACK - this lets us launch the installer immediately for now LLUpdaterService().startChecking(install_if_ready); @@ -3122,7 +3122,7 @@ void LLAppViewer::checkForCrash(void) #if LL_SEND_CRASH_REPORTS if (gLastExecEvent == LAST_EXEC_FROZE) { - llinfos << "Last execution froze, sending a crash report." << llendl; + LL_INFOS() << "Last execution froze, sending a crash report." << LL_ENDL; bool report_freeze = true; handleCrashReporting(report_freeze); @@ -3258,7 +3258,7 @@ bool LLAppViewer::initWindow() void LLAppViewer::writeDebugInfo() { std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); - llinfos << "Opening debug file " << debug_filename << llendl; + LL_INFOS() << "Opening debug file " << debug_filename << LL_ENDL; llofstream out_file(debug_filename); LLSDSerialize::toPrettyXML(gDebugInfo, out_file); out_file.close(); @@ -3381,9 +3381,9 @@ void LLAppViewer::writeSystemInfo() void LLAppViewer::handleViewerCrash() { - llinfos << "Handle viewer crash entry." << llendl; + LL_INFOS() << "Handle viewer crash entry." << LL_ENDL; - llinfos << "Last render pool type: " << LLPipeline::sCurRenderPoolType << llendl ; + LL_INFOS() << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ; LLMemory::logMemoryInfo(true) ; @@ -3515,7 +3515,7 @@ void LLAppViewer::handleViewerCrash() llofstream file(filename, llofstream::binary); if(file.good()) { - llinfos << "Handle viewer crash generating stats log." << llendl; + LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL; gMessageSystem->summarizeLogs(file); file.close(); } @@ -3805,7 +3805,7 @@ void LLAppViewer::fastQuit(S32 error_code) void LLAppViewer::requestQuit() { - llinfos << "requestQuit" << llendl; + LL_INFOS() << "requestQuit" << LL_ENDL; LLViewerRegion* region = gAgent.getRegion(); @@ -3890,7 +3890,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response) void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) { - llwarns << "app_early_exit: " << name << llendl; + LL_WARNS() << "app_early_exit: " << name << LL_ENDL; gDoDisconnect = TRUE; LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit); } @@ -3898,14 +3898,14 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) // case where we need the viewer to exit without any need for notifications void LLAppViewer::earlyExitNoNotify() { - llwarns << "app_early_exit with no notification: " << llendl; + LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL; gDoDisconnect = TRUE; finish_early_exit( LLSD(), LLSD() ); } void LLAppViewer::abortQuit() { - llinfos << "abortQuit()" << llendl; + LL_INFOS() << "abortQuit()" << LL_ENDL; mQuitRequested = false; } @@ -3937,7 +3937,7 @@ void LLAppViewer::migrateCacheDirectory() if (gDirUtilp->fileExists(old_cache_dir)) { - llinfos << "Migrating cache from " << old_cache_dir << " to " << new_cache_dir << llendl; + LL_INFOS() << "Migrating cache from " << old_cache_dir << " to " << new_cache_dir << LL_ENDL; // Migrate inventory cache to avoid pain to inventory database after mass update S32 file_count = 0; @@ -3955,7 +3955,7 @@ void LLAppViewer::migrateCacheDirectory() file_count++; } } - llinfos << "Moved " << file_count << " files" << llendl; + LL_INFOS() << "Moved " << file_count << " files" << LL_ENDL; // Nuke the old cache gDirUtilp->setCacheDir(old_cache_dir); @@ -3972,7 +3972,7 @@ void LLAppViewer::migrateCacheDirectory() #endif if (LLFile::rmdir(old_cache_dir) != 0) { - llwarns << "could not delete old cache directory " << old_cache_dir << llendl; + LL_WARNS() << "could not delete old cache directory " << old_cache_dir << LL_ENDL; } } } @@ -3981,10 +3981,10 @@ void LLAppViewer::migrateCacheDirectory() void dumpVFSCaches() { - llinfos << "======= Static VFS ========" << llendl; + LL_INFOS() << "======= Static VFS ========" << LL_ENDL; gStaticVFS->listFiles(); #if LL_WINDOWS - llinfos << "======= Dumping static VFS to StaticVFSDump ========" << llendl; + LL_INFOS() << "======= Dumping static VFS to StaticVFSDump ========" << LL_ENDL; WCHAR w_str[MAX_PATH]; GetCurrentDirectory(MAX_PATH, w_str); S32 res = LLFile::mkdir("StaticVFSDump"); @@ -3992,7 +3992,7 @@ void dumpVFSCaches() { if (errno != EEXIST) { - llwarns << "Couldn't create dir StaticVFSDump" << llendl; + LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL; } } SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str()); @@ -4000,16 +4000,16 @@ void dumpVFSCaches() SetCurrentDirectory(w_str); #endif - llinfos << "========= Dynamic VFS ====" << llendl; + LL_INFOS() << "========= Dynamic VFS ====" << LL_ENDL; gVFS->listFiles(); #if LL_WINDOWS - llinfos << "========= Dumping dynamic VFS to VFSDump ====" << llendl; + LL_INFOS() << "========= Dumping dynamic VFS to VFSDump ====" << LL_ENDL; res = LLFile::mkdir("VFSDump"); if (res == -1) { if (errno != EEXIST) { - llwarns << "Couldn't create dir VFSDump" << llendl; + LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL; } } SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str()); @@ -4187,7 +4187,7 @@ bool LLAppViewer::initCache() { sscanf(found_file.substr(start_pos+1).c_str(), "%d", &old_salt); } - LL_DEBUGS("AppCache") << "Default vfs data file not present, found: " << old_vfs_data_file << " Old salt: " << old_salt << llendl; + LL_DEBUGS("AppCache") << "Default vfs data file not present, found: " << old_vfs_data_file << " Old salt: " << old_salt << LL_ENDL; } } @@ -4526,7 +4526,7 @@ void LLAppViewer::idle() { if (gRenderStartTime.getElapsedTimeF32() > qas) { - llinfos << "Quitting after " << qas << " seconds. See setting \"QuitAfterSeconds\"." << llendl; + LL_INFOS() << "Quitting after " << qas << " seconds. See setting \"QuitAfterSeconds\"." << LL_ENDL; LLAppViewer::instance()->forceQuit(); } } @@ -4610,7 +4610,7 @@ void LLAppViewer::idle() // *FIX: (???) SAMANTHA if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected) { - llinfos << "Transmitting sessions stats" << llendl; + LL_INFOS() << "Transmitting sessions stats" << LL_ENDL; send_stats(); viewer_stats_timer.reset(); } @@ -4622,12 +4622,12 @@ void LLAppViewer::idle() object_debug_timer.reset(); if (gObjectList.mNumDeadObjectUpdates) { - llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl; + LL_INFOS() << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << LL_ENDL; gObjectList.mNumDeadObjectUpdates = 0; } if (gObjectList.mNumUnknownUpdates) { - llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl; + LL_INFOS() << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << LL_ENDL; gObjectList.mNumUnknownUpdates = 0; } @@ -5153,12 +5153,12 @@ void LLAppViewer::idleNetwork() if( remaining_possible_decodes <= 0 ) { - llinfos << "Maxed out number of messages per frame at " << MESSAGE_MAX_PER_FRAME << llendl; + LL_INFOS() << "Maxed out number of messages per frame at " << MESSAGE_MAX_PER_FRAME << LL_ENDL; } if (gPrintMessagesThisFrame) { - llinfos << "Decoded " << total_decoded << " msgs this frame!" << llendl; + LL_INFOS() << "Decoded " << total_decoded << " msgs this frame!" << LL_ENDL; gPrintMessagesThisFrame = FALSE; } } @@ -5197,7 +5197,7 @@ void LLAppViewer::disconnectViewer() // // Save snapshot for next time, if we made it through initialization - llinfos << "Disconnecting viewer!" << llendl; + LL_INFOS() << "Disconnecting viewer!" << LL_ENDL; // Dump our frame statistics @@ -5256,12 +5256,12 @@ void LLAppViewer::disconnectViewer() void LLAppViewer::forceErrorLLError() { - llerrs << "This is a deliberate llerror" << llendl; + LL_ERRS() << "This is a deliberate llerror" << LL_ENDL; } void LLAppViewer::forceErrorBreakpoint() { - llwarns << "Forcing a deliberate breakpoint" << llendl; + LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL; #ifdef LL_WINDOWS DebugBreak(); #endif @@ -5270,7 +5270,7 @@ void LLAppViewer::forceErrorBreakpoint() void LLAppViewer::forceErrorBadMemoryAccess() { - llwarns << "Forcing a deliberate bad memory access" << llendl; + LL_WARNS() << "Forcing a deliberate bad memory access" << LL_ENDL; S32* crash = NULL; *crash = 0xDEADBEEF; return; @@ -5278,7 +5278,7 @@ void LLAppViewer::forceErrorBadMemoryAccess() void LLAppViewer::forceErrorInfiniteLoop() { - llwarns << "Forcing a deliberate infinite loop" << llendl; + LL_WARNS() << "Forcing a deliberate infinite loop" << LL_ENDL; while(true) { ; @@ -5288,14 +5288,14 @@ void LLAppViewer::forceErrorInfiniteLoop() void LLAppViewer::forceErrorSoftwareException() { - llwarns << "Forcing a deliberate exception" << llendl; + LL_WARNS() << "Forcing a deliberate exception" << LL_ENDL; // *FIX: Any way to insure it won't be handled? throw; } void LLAppViewer::forceErrorDriverCrash() { - llwarns << "Forcing a deliberate driver crash" << llendl; + LL_WARNS() << "Forcing a deliberate driver crash" << LL_ENDL; glDeleteTextures(1, NULL); } @@ -5343,7 +5343,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) { // if(!restoreErrorTrap()) // { -// llwarns << "!!!!!!!!!!!!! Its an error trap!!!!" << state << llendl; +// LL_WARNS() << "!!!!!!!!!!!!! Its an error trap!!!!" << state << LL_ENDL; // } if(mMainloopTimeout) @@ -5402,7 +5402,7 @@ void LLAppViewer::handleLoginComplete() writeDebugInfo(); // we logged in successfully, so save settings on logout - llinfos << "Login successful, per account settings will be saved on log out." << llendl; + LL_INFOS() << "Login successful, per account settings will be saved on log out." << LL_ENDL; mSavePerAccountSettings=true; } @@ -5505,7 +5505,7 @@ void LLAppViewer::launchUpdater() // Although we already have the full set of paths with the filename // appended, the linux-updater.bin command-line switches require us to // snip the filename OFF and pass it as a separate switch argument. :-P - llinfos << "Got a XUI path: " << this_skin_path << llendl; + LL_INFOS() << "Got a XUI path: " << this_skin_path << LL_ENDL; xml_search_paths.append(delim); xml_search_paths.append(gDirUtilp->getDirName(this_skin_path)); delim = ","; @@ -5527,9 +5527,9 @@ void LLAppViewer::launchUpdater() GError *error = NULL; if (!g_spawn_command_line_async(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str(), &error)) { - llerrs << "Failed to launch updater: " + LL_ERRS() << "Failed to launch updater: " << error->message - << llendl; + << LL_ENDL; } if (error) { g_error_free(error); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 4805695e7f..24d90a3cbe 100755 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -73,7 +73,7 @@ extern "C" { void _wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line) { - llerrs << _Message << llendl; + LL_ERRS() << _Message << LL_ENDL; } } #endif @@ -89,7 +89,7 @@ void nvapi_error(NvAPI_Status status) { NvAPI_ShortString szDesc = {0}; NvAPI_GetErrorMessage(status, szDesc); - llwarns << szDesc << llendl; + LL_WARNS() << szDesc << LL_ENDL; //should always trigger when asserts are enabled //llassert(status == NVAPI_OK); @@ -254,7 +254,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, bool ok = viewer_app_ptr->init(); if(!ok) { - llwarns << "Application init failed." << llendl; + LL_WARNS() << "Application init failed." << LL_ENDL; return -1; } @@ -282,12 +282,12 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) { - llinfos << "Attempted to enable LFH for " << num_heaps << " heaps." << llendl; + LL_INFOS() << "Attempted to enable LFH for " << num_heaps << " heaps." << LL_ENDL; for(S32 i = 0; i < num_heaps; i++) { if (heap_enable_lfh_error[i]) { - llinfos << " Failed to enable LFH for heap: " << i << " Error: " << heap_enable_lfh_error[i] << llendl; + LL_INFOS() << " Failed to enable LFH for heap: " << i << " Error: " << heap_enable_lfh_error[i] << LL_ENDL; } } } @@ -306,14 +306,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // app cleanup if there was a problem. // #if WINDOWS_CRT_MEM_CHECKS - llinfos << "CRT Checking memory:" << LL_ENDL; + LL_INFOS() << "CRT Checking memory:" << LL_ENDL; if (!_CrtCheckMemory()) { - llwarns << "_CrtCheckMemory() failed at prior to cleanup!" << LL_ENDL; + LL_WARNS() << "_CrtCheckMemory() failed at prior to cleanup!" << LL_ENDL; } else { - llinfos << " No corruption detected." << LL_ENDL; + LL_INFOS() << " No corruption detected." << LL_ENDL; } #endif @@ -322,14 +322,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, viewer_app_ptr->cleanup(); #if WINDOWS_CRT_MEM_CHECKS - llinfos << "CRT Checking memory:" << LL_ENDL; + LL_INFOS() << "CRT Checking memory:" << LL_ENDL; if (!_CrtCheckMemory()) { - llwarns << "_CrtCheckMemory() failed after cleanup!" << LL_ENDL; + LL_WARNS() << "_CrtCheckMemory() failed after cleanup!" << LL_ENDL; } else { - llinfos << " No corruption detected." << LL_ENDL; + LL_INFOS() << " No corruption detected." << LL_ENDL; } #endif @@ -400,11 +400,11 @@ void LLAppViewerWin32::disableWinErrorReporting() if( 0 == pAddERExcludedApplicationA( executable_name ) ) { U32 error_code = GetLastError(); - llinfos << "AddERExcludedApplication() failed with error code " << error_code << llendl; + LL_INFOS() << "AddERExcludedApplication() failed with error code " << error_code << LL_ENDL; } else { - llinfos << "AddERExcludedApplication() success for " << executable_name << llendl; + LL_INFOS() << "AddERExcludedApplication() success for " << executable_name << LL_ENDL; } } FreeLibrary( fault_rep_dll_handle ); @@ -435,7 +435,7 @@ void create_console() h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); if (h_con_handle == -1) { - llwarns << "create_console() failed to open stdout handle" << llendl; + LL_WARNS() << "create_console() failed to open stdout handle" << LL_ENDL; } else { @@ -449,7 +449,7 @@ void create_console() h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); if (h_con_handle == -1) { - llwarns << "create_console() failed to open stdin handle" << llendl; + LL_WARNS() << "create_console() failed to open stdin handle" << LL_ENDL; } else { @@ -463,7 +463,7 @@ void create_console() h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); if (h_con_handle == -1) { - llwarns << "create_console() failed to open stderr handle" << llendl; + LL_WARNS() << "create_console() failed to open stderr handle" << LL_ENDL; } else { @@ -490,7 +490,7 @@ bool LLAppViewerWin32::init() // (Don't send our data to Microsoft--at least until we are Logo approved and have a way // of getting the data back from them.) // - // llinfos << "Turning off Windows error reporting." << llendl; + // LL_INFOS() << "Turning off Windows error reporting." << LL_ENDL; disableWinErrorReporting(); #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -669,7 +669,7 @@ bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url) if (other_window != NULL) { - lldebugs << "Found other window with the name '" << getWindowTitle() << "'" << llendl; + LL_DEBUGS() << "Found other window with the name '" << getWindowTitle() << "'" << LL_ENDL; COPYDATASTRUCT cds; const S32 SLURL_MESSAGE_TYPE = 0; cds.dwData = SLURL_MESSAGE_TYPE; @@ -677,8 +677,8 @@ bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url) cds.lpData = (void*)url.c_str(); LRESULT msg_result = SendMessage(other_window, WM_COPYDATA, NULL, (LPARAM)&cds); - lldebugs << "SendMessage(WM_COPYDATA) to other window '" - << getWindowTitle() << "' returned " << msg_result << llendl; + LL_DEBUGS() << "SendMessage(WM_COPYDATA) to other window '" + << getWindowTitle() << "' returned " << msg_result << LL_ENDL; return true; } return false; @@ -710,7 +710,7 @@ std::string LLAppViewerWin32::generateSerialNumber() } else { - llwarns << "GetVolumeInformation failed" << llendl; + LL_WARNS() << "GetVolumeInformation failed" << LL_ENDL; } return serial_md5; } diff --git a/indra/newview/llassetuploadqueue.cpp b/indra/newview/llassetuploadqueue.cpp index 4bdb690225..2b428aec4b 100755 --- a/indra/newview/llassetuploadqueue.cpp +++ b/indra/newview/llassetuploadqueue.cpp @@ -71,8 +71,8 @@ public: virtual void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns << "LLAssetUploadChainResponder Error [status:" - << statusNum << "]: " << content << llendl; + LL_WARNS() << "LLAssetUploadChainResponder Error [status:" + << statusNum << "]: " << content << LL_ENDL; LLUpdateTaskInventoryResponder::errorWithContent(statusNum, reason, content); LLAssetUploadQueue *queue = mSupplier->get(); if (queue) @@ -102,7 +102,7 @@ public: std::string uploader = content["uploader"]; mSupplier->log(std::string("Compiling " + mScriptName).c_str()); - llinfos << "Compiling " << llendl; + LL_INFOS() << "Compiling " << LL_ENDL; // postRaw takes ownership of mData and will delete it. LLHTTPClient::postRaw(uploader, mData, mDataSize, this); @@ -116,7 +116,7 @@ public: if (content["compiled"]) { mSupplier->log("Compilation succeeded"); - llinfos << "Compiled!" << llendl; + LL_INFOS() << "Compiled!" << LL_ENDL; } else { @@ -127,7 +127,7 @@ public: std::string str = line->asString(); str.erase(std::remove(str.begin(), str.end(), '\n'), str.end()); mSupplier->log(str); - llinfos << content["errors"] << llendl; + LL_INFOS() << content["errors"] << LL_ENDL; } } LLUpdateTaskInventoryResponder::uploadComplete(content); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 2564802387..d86e63589f 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -135,7 +135,7 @@ void on_new_single_inventory_upload_complete( inventory_item_flags = (U32) server_response["inventory_flags"].asInteger(); if (inventory_item_flags != 0) { - llinfos << "inventory_item_flags " << inventory_item_flags << llendl; + LL_INFOS() << "inventory_item_flags " << inventory_item_flags << LL_ENDL; } } S32 creation_date_now = time_corrected(); @@ -173,7 +173,7 @@ void on_new_single_inventory_upload_complete( } else { - llwarns << "Can't find a folder to put it in" << llendl; + LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL; } // remove the "Uploading..." message @@ -197,7 +197,7 @@ LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data, { if (!gVFS->getExists(vfile_id, asset_type)) { - llwarns << "LLAssetUploadResponder called with nonexistant vfile_id" << llendl; + LL_WARNS() << "LLAssetUploadResponder called with nonexistant vfile_id" << LL_ENDL; mVFileID.setNull(); mAssetType = LLAssetType::AT_NONE; return; @@ -227,8 +227,8 @@ LLAssetUploadResponder::~LLAssetUploadResponder() // virtual void LLAssetUploadResponder::errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llinfos << "LLAssetUploadResponder::error [status:" - << statusNum << "]: " << content << llendl; + LL_INFOS() << "LLAssetUploadResponder::error [status:" + << statusNum << "]: " << content << LL_ENDL; LLSD args; switch(statusNum) { @@ -253,7 +253,7 @@ void LLAssetUploadResponder::errorWithContent(U32 statusNum, const std::string& //virtual void LLAssetUploadResponder::result(const LLSD& content) { - lldebugs << "LLAssetUploadResponder::result from capabilities" << llendl; + LL_DEBUGS() << "LLAssetUploadResponder::result from capabilities" << LL_ENDL; std::string state = content["state"]; @@ -267,7 +267,7 @@ void LLAssetUploadResponder::result(const LLSD& content) if (mFileName.empty()) { // rename the file in the VFS to the actual asset id - // llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl; + // LL_INFOS() << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << LL_ENDL; gVFS->renameFile(mVFileID, mAssetType, content["new_asset"].asUUID(), mAssetType); } uploadComplete(content); @@ -358,11 +358,11 @@ void LLNewAgentInventoryResponder::uploadFailure(const LLSD& content) //virtual void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) { - lldebugs << "LLNewAgentInventoryResponder::result from capabilities" << llendl; + LL_DEBUGS() << "LLNewAgentInventoryResponder::result from capabilities" << LL_ENDL; //std::ostringstream llsdxml; //LLSDSerialize::toXML(content, llsdxml); - //llinfos << "upload complete content:\n " << llsdxml.str() << llendl; + //LL_INFOS() << "upload complete content:\n " << llsdxml.str() << LL_ENDL; LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString()); LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString()); @@ -473,7 +473,7 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content) std::string result = content["state"]; LLUUID new_id = content["new_asset"]; - llinfos << "result: " << result << " new_id: " << new_id << llendl; + LL_INFOS() << "result: " << result << " new_id: " << new_id << LL_ENDL; if (result == "complete" && mBakedUploadData != NULL) { // Invoke @@ -489,8 +489,8 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content) void LLSendTexLayerResponder::errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llinfos << "LLSendTexLayerResponder error [status:" - << statusNum << "]: " << content << llendl; + LL_INFOS() << "LLSendTexLayerResponder error [status:" + << statusNum << "]: " << content << LL_ENDL; // Invoke the original callback with an error result LLViewerTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakedUploadData, -1, LL_EXSTAT_NONE); @@ -516,14 +516,14 @@ LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder( //virtual void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content) { - llinfos << "LLUpdateAgentInventoryResponder::result from capabilities" << llendl; + LL_INFOS() << "LLUpdateAgentInventoryResponder::result from capabilities" << LL_ENDL; LLUUID item_id = mPostData["item_id"]; LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(item_id); if(!item) { - llwarns << "Inventory item for " << mVFileID - << " is no longer in agent inventory." << llendl; + LL_WARNS() << "Inventory item for " << mVFileID + << " is no longer in agent inventory." << LL_ENDL; return; } @@ -533,8 +533,8 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content) gInventory.updateItem(new_item); gInventory.notifyObservers(); - llinfos << "Inventory item " << item->getName() << " saved into " - << content["new_asset"].asString() << llendl; + LL_INFOS() << "Inventory item " << item->getName() << " saved into " + << content["new_asset"].asString() << LL_ENDL; LLInventoryType::EType inventory_type = new_item->getInventoryType(); switch(inventory_type) @@ -630,7 +630,7 @@ LLUpdateTaskInventoryResponder::LLUpdateTaskInventoryResponder(const LLSD& post_ //virtual void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) { - llinfos << "LLUpdateTaskInventoryResponder::result from capabilities" << llendl; + LL_INFOS() << "LLUpdateTaskInventoryResponder::result from capabilities" << LL_ENDL; LLUUID item_id = mPostData["item_id"]; LLUUID task_id = mPostData["task_id"]; @@ -711,9 +711,9 @@ public: { if (!gVFS->getExists(vfile_id, asset_type)) { - llwarns + LL_WARNS() << "LLAssetUploadResponder called with nonexistant " - << "vfile_id " << vfile_id << llendl; + << "vfile_id " << vfile_id << LL_ENDL; mVFileID.setNull(); mAssetType = LLAssetType::AT_NONE; } @@ -1014,9 +1014,9 @@ void LLNewAgentInventoryVariablePriceResponder::errorWithContent( const std::string& reason, const LLSD& content) { - lldebugs + LL_DEBUGS() << "LLNewAgentInventoryVariablePrice::error " << statusNum - << " reason: " << reason << llendl; + << " reason: " << reason << LL_ENDL; if ( content.has("error") ) { @@ -1060,7 +1060,7 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content) if (mImpl->getFilename().empty()) { // rename the file in the VFS to the actual asset id - // llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl; + // LL_INFOS() << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << LL_ENDL; gVFS->renameFile( mImpl->getVFileID(), asset_type, diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index ea0b8f00a4..256980eb04 100755 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -110,7 +110,7 @@ void LLAttachmentsMgr::onIdle() LLViewerInventoryItem* item = gInventory.getItem(attachment.mItemID); if (!item) { - llinfos << "Attempted to add non-existant item ID:" << attachment.mItemID << llendl; + LL_INFOS() << "Attempted to add non-existant item ID:" << attachment.mItemID << LL_ENDL; continue; } S32 attachment_pt = attachment.mAttachmentPt; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 1d774e6eac..9b874b7ddf 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -979,7 +979,7 @@ bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& respons case 1: // NO default: - llinfos << "No removal performed." << llendl; + LL_INFOS() << "No removal performed." << LL_ENDL; break; } } diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 0d1ecc9c47..7a49b77490 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -60,7 +60,7 @@ bool LLAvatarIconIDCache::LLAvatarIconIDCacheItem::expired() void LLAvatarIconIDCache::load () { - llinfos << "Loading avatar icon id cache." << llendl; + LL_INFOS() << "Loading avatar icon id cache." << LL_ENDL; // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); @@ -105,7 +105,7 @@ void LLAvatarIconIDCache::save () llofstream file (resolved_filename); if (!file.is_open()) { - llwarns << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << llendl; + LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL; return; } diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index f095ef25d1..856eb3414e 100755 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -170,11 +170,11 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* { if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null)) { - llwarns << "Sending avatarinfo update DENIED - invalid agent" << llendl; + LL_WARNS() << "Sending avatarinfo update DENIED - invalid agent" << LL_ENDL; return; } - llinfos << "Sending avatarinfo update" << llendl; + LL_INFOS() << "Sending avatarinfo update" << LL_ENDL; // This value is required by sendAvatarPropertiesUpdate method. //A profile should never be mature. (From the original code) diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp index 459123a5d8..1c69dadb12 100755 --- a/indra/newview/llbuycurrencyhtml.cpp +++ b/indra/newview/llbuycurrencyhtml.cpp @@ -148,7 +148,7 @@ void LLBuyCurrencyHTML::showDialog( bool specific_sum_requested, const std::stri } else { - llwarns << "Buy Currency (HTML) Floater not found" << llendl; + LL_WARNS() << "Buy Currency (HTML) Floater not found" << LL_ENDL; }; } diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp index 79ec43dfe9..59ecbdd0ea 100755 --- a/indra/newview/llcallbacklist.cpp +++ b/indra/newview/llcallbacklist.cpp @@ -56,7 +56,7 @@ void LLCallbackList::addFunction( callback_t func, void *data) { if (!func) { - llerrs << "LLCallbackList::addFunction - function is NULL" << llendl; + LL_ERRS() << "LLCallbackList::addFunction - function is NULL" << LL_ENDL; return; } @@ -234,14 +234,14 @@ void doPeriodically(bool_func_t callable, F32 seconds) void test1(void *data) { S32 *s32_data = (S32 *)data; - llinfos << "testfunc1 " << *s32_data << llendl; + LL_INFOS() << "testfunc1 " << *s32_data << LL_ENDL; } void test2(void *data) { S32 *s32_data = (S32 *)data; - llinfos << "testfunc2 " << *s32_data << llendl; + LL_INFOS() << "testfunc2 " << *s32_data << LL_ENDL; } @@ -252,54 +252,54 @@ LLCallbackList::test() S32 b = 2; LLCallbackList *list = new LLCallbackList; - llinfos << "Testing LLCallbackList" << llendl; + LL_INFOS() << "Testing LLCallbackList" << LL_ENDL; if (!list->deleteFunction(NULL)) { - llinfos << "passed 1" << llendl; + LL_INFOS() << "passed 1" << LL_ENDL; } else { - llinfos << "error, removed function from empty list" << llendl; + LL_INFOS() << "error, removed function from empty list" << LL_ENDL; } - // llinfos << "This should crash" << llendl; + // LL_INFOS() << "This should crash" << LL_ENDL; // list->addFunction(NULL); list->addFunction(&test1, &a); list->addFunction(&test1, &a); - llinfos << "Expect: test1 1, test1 1" << llendl; + LL_INFOS() << "Expect: test1 1, test1 1" << LL_ENDL; list->callFunctions(); list->addFunction(&test1, &b); list->addFunction(&test2, &b); - llinfos << "Expect: test1 1, test1 1, test1 2, test2 2" << llendl; + LL_INFOS() << "Expect: test1 1, test1 1, test1 2, test2 2" << LL_ENDL; list->callFunctions(); if (list->deleteFunction(&test1, &b)) { - llinfos << "passed 3" << llendl; + LL_INFOS() << "passed 3" << LL_ENDL; } else { - llinfos << "error removing function" << llendl; + LL_INFOS() << "error removing function" << LL_ENDL; } - llinfos << "Expect: test1 1, test1 1, test2 2" << llendl; + LL_INFOS() << "Expect: test1 1, test1 1, test2 2" << LL_ENDL; list->callFunctions(); list->deleteAllFunctions(); - llinfos << "Expect nothing" << llendl; + LL_INFOS() << "Expect nothing" << LL_ENDL; list->callFunctions(); - llinfos << "nothing :-)" << llendl; + LL_INFOS() << "nothing :-)" << LL_ENDL; delete list; - llinfos << "test complete" << llendl; + LL_INFOS() << "test complete" << LL_ENDL; } #endif // _DEBUG diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 3da77857c6..4fe451be46 100755 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -253,21 +253,21 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds) // IDEVO: is this necessary? name is unused? gCacheName->getFullName(agent_id, full_name); addChangedMask(LLFriendObserver::ADD, agent_id); - lldebugs << "Added buddy " << agent_id + LL_DEBUGS() << "Added buddy " << agent_id << ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline") << ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo() << ", FROM: " << mBuddyInfo[agent_id]->getRightsGrantedFrom() - << llendl; + << LL_ENDL; } else { LLRelationship* e_r = (*existing_buddy).second; LLRelationship* n_r = (*itr).second; - llwarns << "!! Add buddy for existing buddy: " << agent_id + LL_WARNS() << "!! Add buddy for existing buddy: " << agent_id << " [" << (e_r->isOnline() ? "Online" : "Offline") << "->" << (n_r->isOnline() ? "Online" : "Offline") << ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo() << ", " << e_r->getRightsGrantedTo() << "->" << n_r->getRightsGrantedTo() - << "]" << llendl; + << "]" << LL_ENDL; } } notifyObservers(); @@ -288,7 +288,7 @@ void LLAvatarTracker::copyBuddyList(buddy_map_t& buddies) const void LLAvatarTracker::terminateBuddy(const LLUUID& id) { - lldebugs << "LLAvatarTracker::terminateBuddy()" << llendl; + LL_DEBUGS() << "LLAvatarTracker::terminateBuddy()" << LL_ENDL; LLRelationship* buddy = get_ptr_in_map(mBuddyInfo, id); if(!buddy) return; mBuddyInfo.erase(id); @@ -326,12 +326,12 @@ void LLAvatarTracker::setBuddyOnline(const LLUUID& id, bool is_online) { info->online(is_online); addChangedMask(LLFriendObserver::ONLINE, id); - lldebugs << "Set buddy " << id << (is_online ? " Online" : " Offline") << llendl; + LL_DEBUGS() << "Set buddy " << id << (is_online ? " Online" : " Offline") << LL_ENDL; } else { - llwarns << "!! No buddy info found for " << id - << ", setting to " << (is_online ? "Online" : "Offline") << llendl; + LL_WARNS() << "!! No buddy info found for " << id + << ", setting to " << (is_online ? "Online" : "Offline") << LL_ENDL; } } @@ -378,7 +378,7 @@ void LLAvatarTracker::empower(const LLUUID& id, bool grant) void LLAvatarTracker::empowerList(const buddy_map_t& list, bool grant) { - llwarns << "LLAvatarTracker::empowerList() not implemented." << llendl; + LL_WARNS() << "LLAvatarTracker::empowerList() not implemented." << LL_ENDL; /* LLMessageSystem* msg = gMessageSystem; const char* message_name; @@ -590,14 +590,14 @@ void LLAvatarTracker::agentFound(const LLUUID& prey, // static void LLAvatarTracker::processOnlineNotification(LLMessageSystem* msg, void**) { - lldebugs << "LLAvatarTracker::processOnlineNotification()" << llendl; + LL_DEBUGS() << "LLAvatarTracker::processOnlineNotification()" << LL_ENDL; instance().processNotify(msg, true); } // static void LLAvatarTracker::processOfflineNotification(LLMessageSystem* msg, void**) { - lldebugs << "LLAvatarTracker::processOfflineNotification()" << llendl; + LL_DEBUGS() << "LLAvatarTracker::processOfflineNotification()" << LL_ENDL; instance().processNotify(msg, false); } @@ -649,7 +649,7 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg) void LLAvatarTracker::processChangeUserRights(LLMessageSystem* msg, void**) { - lldebugs << "LLAvatarTracker::processChangeUserRights()" << llendl; + LL_DEBUGS() << "LLAvatarTracker::processChangeUserRights()" << LL_ENDL; instance().processChange(msg); } @@ -658,7 +658,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock); BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification"); - lldebugs << "Received " << count << " online notifications **** " << llendl; + LL_DEBUGS() << "Received " << count << " online notifications **** " << LL_ENDL; if(count > 0) { LLUUID agent_id; @@ -680,8 +680,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) } else { - llwarns << "Received online notification for unknown buddy: " - << agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << llendl; + LL_WARNS() << "Received online notification for unknown buddy: " + << agent_id << " is " << (online ? "ONLINE" : "OFFLINE") << LL_ENDL; } if(tracking_id == agent_id) @@ -793,8 +793,8 @@ void LLTrackingData::agentFound(const LLUUID& prey, { if(prey != mAvatarID) { - llwarns << "LLTrackingData::agentFound() - found " << prey - << " but looking for " << mAvatarID << llendl; + LL_WARNS() << "LLTrackingData::agentFound() - found " << prey + << " but looking for " << mAvatarID << LL_ENDL; } mHaveInfo = true; mAgentGone.setTimerExpirySec(OFFLINE_SECONDS); diff --git a/indra/newview/llcaphttpsender.cpp b/indra/newview/llcaphttpsender.cpp index 16bb48da93..b2524d14f8 100755 --- a/indra/newview/llcaphttpsender.cpp +++ b/indra/newview/llcaphttpsender.cpp @@ -40,8 +40,8 @@ void LLCapHTTPSender::send(const LLHost& host, const std::string& message, const LLSD& body, LLHTTPClient::ResponderPtr response) const { - llinfos << "LLCapHTTPSender::send: message " << message - << " to host " << host << llendl; + LL_INFOS() << "LLCapHTTPSender::send: message " << message + << " to host " << host << LL_ENDL; LLSD llsd; llsd["message"] = message; llsd["body"] = body; diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 43757d0174..6c8d19d742 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -50,7 +50,7 @@ LLChannelManager::LLChannelManager() if(!gViewerWindow) { - llerrs << "LLChannelManager::LLChannelManager() - viwer window is not initialized yet" << llendl; + LL_ERRS() << "LLChannelManager::LLChannelManager() - viwer window is not initialized yet" << LL_ENDL; } } @@ -249,7 +249,7 @@ LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChann if (channel == NULL) { - llwarns << "Can't find screen channel by NotificationChannelUUID" << llendl; + LL_WARNS() << "Can't find screen channel by NotificationChannelUUID" << LL_ENDL; llassert(!"Can't find screen channel by NotificationChannelUUID"); } diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 9b57587237..0adf469858 100755 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -521,10 +521,10 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) } } - //llinfos << "GESTUREDEBUG " << trigger + //LL_INFOS() << "GESTUREDEBUG " << trigger // << " len " << length // << " outlen " << out_str.getLength() - // << llendl; + // << LL_ENDL; } } @@ -588,22 +588,22 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL { if (type == CHAT_TYPE_WHISPER) { - lldebugs << "You whisper " << utf8_text << llendl; + LL_DEBUGS() << "You whisper " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_NORMAL) { - lldebugs << "You say " << utf8_text << llendl; + LL_DEBUGS() << "You say " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_SHOUT) { - lldebugs << "You shout " << utf8_text << llendl; + LL_DEBUGS() << "You shout " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); } else { - llinfos << "send_chat_from_viewer() - invalid volume" << llendl; + LL_INFOS() << "send_chat_from_viewer() - invalid volume" << LL_ENDL; return; } } @@ -611,7 +611,7 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL { if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) { - lldebugs << "Channel chat: " << utf8_text << llendl; + LL_DEBUGS() << "Channel chat: " << utf8_text << LL_ENDL; } } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 88884042d4..06c452168c 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -192,7 +192,7 @@ void LLNotificationChiclet::createMenu() { if(mContextMenu) { - llwarns << "Menu already exists" << llendl; + LL_WARNS() << "Menu already exists" << LL_ENDL; return; } @@ -372,7 +372,7 @@ bool LLIMChiclet::canCreateMenu() { if(mPopupMenu) { - llwarns << "Menu already exists" << llendl; + LL_WARNS() << "Menu already exists" << LL_ENDL; return false; } if(getSessionId().isNull()) @@ -718,7 +718,7 @@ void LLChicletPanel::setChicletToggleState(const LLUUID& session_id, bool toggle { if(session_id.isNull()) { - llwarns << "Null Session ID" << llendl; + LL_WARNS() << "Null Session ID" << LL_ENDL; } // toggle off all chiclets, except specified diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index efaf03384a..d5e3a55fdf 100755 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -825,13 +825,13 @@ T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index) T* chiclet = LLUICtrlFactory::create(params); if(!chiclet) { - llwarns << "Could not create chiclet" << llendl; + LL_WARNS() << "Could not create chiclet" << LL_ENDL; return NULL; } if(!addChiclet(chiclet, index)) { delete chiclet; - llwarns << "Could not add chiclet to chiclet panel" << llendl; + LL_WARNS() << "Could not add chiclet to chiclet panel" << LL_ENDL; return NULL; } @@ -871,7 +871,7 @@ T* LLChicletPanel::findChiclet(const LLUUID& im_session_id) T* result = dynamic_cast(chiclet); if(!result) { - llwarns << "Found chiclet but of wrong type " << llendl; + LL_WARNS() << "Found chiclet but of wrong type " << LL_ENDL; continue; } return result; @@ -891,7 +891,7 @@ template T* LLChicletPanel::getChiclet(S32 index) T*result = dynamic_cast(chiclet); if(!result && chiclet) { - llwarns << "Found chiclet but of wrong type " << llendl; + LL_WARNS() << "Found chiclet but of wrong type " << LL_ENDL; } return result; } diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index a51c844775..28e367fbe1 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -90,16 +90,16 @@ void LLChicletBar::log(LLView* panel, const std::string& descr) void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) { static S32 debug_calling_number = 0; - lldebugs << "**************************************** " << ++debug_calling_number << llendl; + LL_DEBUGS() << "**************************************** " << ++debug_calling_number << LL_ENDL; S32 current_width = getRect().getWidth(); S32 delta_width = width - current_width; - lldebugs << "Reshaping: " + LL_DEBUGS() << "Reshaping: " << ", width: " << width << ", cur width: " << current_width << ", delta_width: " << delta_width << ", called_from_parent: " << called_from_parent - << llendl; + << LL_ENDL; if (mChicletPanel) log(mChicletPanel, "before"); @@ -155,7 +155,7 @@ void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) if (should_be_reshaped) { - lldebugs << "Reshape all children with width: " << width << llendl; + LL_DEBUGS() << "Reshape all children with width: " << width << LL_ENDL; LLPanel::reshape(width, height, called_from_parent); } @@ -174,23 +174,23 @@ S32 LLChicletBar::processWidthDecreased(S32 delta_width) // we have some space to decrease chiclet panel S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom); - lldebugs << "delta_width: " << delta_width + LL_DEBUGS() << "delta_width: " << delta_width << ", panel_delta_min: " << chiclet_panel_shrink_headroom << ", shrink_by: " << shrink_by - << llendl; + << LL_ENDL; // is chiclet panel wide enough to process resizing? delta_width += chiclet_panel_shrink_headroom; still_should_be_processed = delta_width < 0; - lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl; + LL_DEBUGS() << "Shrinking chiclet panel by " << shrink_by << " px" << LL_ENDL; mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after processing panel decreasing via chiclet panel"); - lldebugs << "RS_CHICLET_PANEL" + LL_DEBUGS() << "RS_CHICLET_PANEL" << ", delta_width: " << delta_width - << llendl; + << LL_ENDL; } S32 extra_shrink_width = 0; @@ -198,8 +198,8 @@ S32 LLChicletBar::processWidthDecreased(S32 delta_width) if (still_should_be_processed) { extra_shrink_width = -delta_width; - llwarns << "There is no enough width to reshape all children: " - << extra_shrink_width << llendl; + LL_WARNS() << "There is no enough width to reshape all children: " + << extra_shrink_width << LL_ENDL; } return extra_shrink_width; diff --git a/indra/newview/llclassifiedstatsresponder.cpp b/indra/newview/llclassifiedstatsresponder.cpp index 1e1c9039fb..bc7815fba2 100755 --- a/indra/newview/llclassifiedstatsresponder.cpp +++ b/indra/newview/llclassifiedstatsresponder.cpp @@ -61,5 +61,5 @@ void LLClassifiedStatsResponder::result(const LLSD& content) /*virtual*/ void LLClassifiedStatsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llinfos << "LLClassifiedStatsResponder::error [status:" << status << "]: " << content << llendl; + LL_INFOS() << "LLClassifiedStatsResponder::error [status:" << status << "]: " << content << LL_ENDL; } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index b5bb303b65..b2cd90af22 100755 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -382,14 +382,14 @@ void LLCOFWearables::refresh() const LLUUID cof_id = LLAppearanceMgr::instance().getCOF(); if (cof_id.isNull()) { - llwarns << "COF ID cannot be NULL" << llendl; + LL_WARNS() << "COF ID cannot be NULL" << LL_ENDL; return; } LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id); if (!catp) { - llwarns << "COF category cannot be NULL" << llendl; + LL_WARNS() << "COF category cannot be NULL" << LL_ENDL; return; } diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 17d403bbe1..559a02bbd9 100755 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -283,13 +283,13 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp) } catch(po::error& e) { - llwarns << "Caught Error:" << e.what() << llendl; + LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL; mErrorMsg = e.what(); return false; } catch(LLCLPError& e) { - llwarns << "Caught Error:" << e.what() << llendl; + LL_WARNS() << "Caught Error:" << e.what() << LL_ENDL; mErrorMsg = e.what(); return false; } @@ -329,7 +329,7 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp) << last_option << " " << last_value; - llwarns << msg.str() << llendl; + LL_WARNS() << msg.str() << LL_ENDL; mErrorMsg = msg.str(); return false; } @@ -401,7 +401,7 @@ void LLCommandLineParser::printOptions() const { oss << t_itr->c_str() << " "; } - llinfos << oss.str() << llendl; + LL_INFOS() << oss.str() << LL_ENDL; } } @@ -446,7 +446,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, case TYPE_BOOLEAN: if(value.size() > 1) { - llwarns << "Ignoring extra tokens." << llendl; + LL_WARNS() << "Ignoring extra tokens." << LL_ENDL; } if(value.size() > 0) @@ -485,7 +485,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, { if(value.size() > 1) { - llwarns << "Ignoring extra tokens mapped to the setting: " << opt_name << "." << llendl; + LL_WARNS() << "Ignoring extra tokens mapped to the setting: " << opt_name << "." << LL_ENDL; } LLSD llsdValue; @@ -498,10 +498,10 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, } else { - llwarns << "Command Line option mapping '" + LL_WARNS() << "Command Line option mapping '" << opt_name << "' not found! Ignoring." - << llendl; + << LL_ENDL; } } diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 055a69727e..b0916d769a 100755 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -111,8 +111,8 @@ void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object, S32, void* q_id) { - llinfos << "LLFloaterScriptQueue::inventoryChanged() for object " - << viewer_object->getID() << llendl; + LL_INFOS() << "LLFloaterScriptQueue::inventoryChanged() for object " + << viewer_object->getID() << LL_ENDL; //Remove this listener from the object since its //listener callback is now being executed. @@ -137,8 +137,8 @@ void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object, // something went wrong... // note that we're not working on this one, and move onto the // next object in the list. - llwarns << "No inventory for " << mCurrentObjectID - << llendl; + LL_WARNS() << "No inventory for " << mCurrentObjectID + << LL_ENDL; nextObject(); } } @@ -184,16 +184,16 @@ BOOL LLFloaterScriptQueue::nextObject() do { count = mObjectIDs.size(); - llinfos << "LLFloaterScriptQueue::nextObject() - " << count - << " objects left to process." << llendl; + LL_INFOS() << "LLFloaterScriptQueue::nextObject() - " << count + << " objects left to process." << LL_ENDL; mCurrentObjectID.setNull(); if(count > 0) { successful_start = popNext(); } - llinfos << "LLFloaterScriptQueue::nextObject() " + LL_INFOS() << "LLFloaterScriptQueue::nextObject() " << (successful_start ? "successful" : "unsuccessful") - << llendl; + << LL_ENDL; } while((mObjectIDs.size() > 0) && !successful_start); if(isDone() && !mDone) { @@ -215,14 +215,14 @@ BOOL LLFloaterScriptQueue::popNext() if(mCurrentObjectID.isNull() && (count > 0)) { mCurrentObjectID = mObjectIDs.at(0); - llinfos << "LLFloaterScriptQueue::popNext() - mCurrentID: " - << mCurrentObjectID << llendl; + LL_INFOS() << "LLFloaterScriptQueue::popNext() - mCurrentID: " + << mCurrentObjectID << LL_ENDL; mObjectIDs.erase(mObjectIDs.begin()); LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID); if(obj) { - llinfos << "LLFloaterScriptQueue::popNext() requesting inv for " - << mCurrentObjectID << llendl; + LL_INFOS() << "LLFloaterScriptQueue::popNext() requesting inv for " + << mCurrentObjectID << LL_ENDL; LLUUID* id = new LLUUID(getKey().asUUID()); registerVOInventoryListener(obj,id); requestVOInventory(); @@ -328,7 +328,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object, viewer_object->getID(), itemp->getUUID()); - //llinfos << "ITEM NAME 2: " << names.get(i) << llendl; + //LL_INFOS() << "ITEM NAME 2: " << names.get(i) << LL_ENDL; gAssetStorage->getInvItemAsset(viewer_object->getRegion()->getHost(), gAgent.getID(), gAgent.getSessionID(), @@ -349,7 +349,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl; + LL_INFOS() << "LLFloaterCompileQueue::scriptArrived()" << LL_ENDL; LLScriptQueueData* data = (LLScriptQueueData*)user_data; if(!data) { @@ -360,7 +360,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, std::string buffer; if(queue && (0 == status)) { - //llinfos << "ITEM NAME 3: " << data->mScriptName << llendl; + //LL_INFOS() << "ITEM NAME 3: " << data->mScriptName << LL_ENDL; // Dump this into a file on the local disk so we can compile it. std::string filename; @@ -414,7 +414,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, buffer = LLTrans::getString("CompileQueueUnknownFailure") + (" ") + data->mScriptName; } - llwarns << "Problem downloading script asset." << llendl; + LL_WARNS() << "Problem downloading script asset." << LL_ENDL; if(queue) queue->removeItemByItemID(data->mItemId); } if(queue && (buffer.size() > 0)) @@ -546,7 +546,7 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue() void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id) { - llinfos << "LLFloaterCompileQueue::removeItemByAssetID()" << llendl; + LL_INFOS() << "LLFloaterCompileQueue::removeItemByAssetID()" << LL_ENDL; for(S32 i = 0; i < mCurrentScripts.size(); ) { if(asset_id == mCurrentScripts.at(i)->getUUID()) diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 7ecc572a8a..8dd148e304 100755 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -455,14 +455,14 @@ bool LLConversationLog::saveToFile(const std::string& filename) { if (!filename.size()) { - llwarns << "Call log list filename is empty!" << llendl; + LL_WARNS() << "Call log list filename is empty!" << LL_ENDL; return false; } LLFILE* fp = LLFile::fopen(filename, "wb"); if (!fp) { - llwarns << "Couldn't open call log list" << filename << llendl; + LL_WARNS() << "Couldn't open call log list" << filename << LL_ENDL; return false; } @@ -496,14 +496,14 @@ bool LLConversationLog::loadFromFile(const std::string& filename) { if(!filename.size()) { - llwarns << "Call log list filename is empty!" << llendl; + LL_WARNS() << "Call log list filename is empty!" << LL_ENDL; return false; } LLFILE* fp = LLFile::fopen(filename, "rb"); if (!fp) { - llwarns << "Couldn't open call log list" << filename << llendl; + LL_WARNS() << "Couldn't open call log list" << filename << LL_ENDL; return false; } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index c74ce24872..fffc1c7ced 100755 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -360,7 +360,7 @@ void LLConversationItemSession::setDistance(const LLUUID& participant_id, F64 di void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLConversationItemParticipant::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; @@ -431,7 +431,7 @@ const bool LLConversationItemSession::getTime(F64& time) const void LLConversationItemSession::dumpDebugData(bool dump_children) { // Session info - llinfos << "Merov debug : session " << this << ", uuid = " << mUUID << ", name = " << mName << ", is loaded = " << mIsLoaded << llendl; + LL_INFOS() << "Merov debug : session " << this << ", uuid = " << mUUID << ", name = " << mName << ", is loaded = " << mIsLoaded << LL_ENDL; // Children info if (dump_children) { @@ -549,7 +549,7 @@ LLConversationItemSession* LLConversationItemParticipant::getParentSession() void LLConversationItemParticipant::dumpDebugData() { - llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << llendl; + LL_INFOS() << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << LL_ENDL; } void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp index 8af2f4ea33..131675310e 100755 --- a/indra/newview/lldaycyclemanager.cpp +++ b/indra/newview/lldaycyclemanager.cpp @@ -193,7 +193,7 @@ bool LLDayCycleManager::loadPreset(const std::string& path) LLSD data = LLWLDayCycle::loadDayCycleFromPath(path); if (data.isUndefined()) { - llwarns << "Error loading day cycle from " << path << llendl; + LL_WARNS() << "Error loading day cycle from " << path << LL_ENDL; return false; } diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp index 9ad812ab1e..c8b9b1ac63 100755 --- a/indra/newview/lldebugmessagebox.cpp +++ b/indra/newview/lldebugmessagebox.cpp @@ -112,7 +112,7 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy addChild(mSlider3); break; default: - llwarns << "Unhandled var type " << var_type << llendl; + LL_WARNS() << "Unhandled var type " << var_type << LL_ENDL; break; } @@ -234,7 +234,7 @@ void LLDebugVarMessageBox::sliderChanged(const LLSD& data) break; } default: - llwarns << "Unhandled var type " << mVarType << llendl; + LL_WARNS() << "Unhandled var type " << mVarType << LL_ENDL; break; } } @@ -263,7 +263,7 @@ void LLDebugVarMessageBox::draw() break; } default: - llwarns << "Unhandled var type " << mVarType << llendl; + LL_WARNS() << "Unhandled var type " << mVarType << LL_ENDL; break; } mText->setText(text); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index c59ce04646..ad3df55ef1 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -163,7 +163,7 @@ void LLDrawable::destroy() if (LLSpatialGroup::sNoDelete) { - llerrs << "Illegal deletion of LLDrawable!" << llendl; + LL_ERRS() << "Illegal deletion of LLDrawable!" << LL_ENDL; } std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); @@ -172,7 +172,7 @@ void LLDrawable::destroy() /*if (!(sNumZombieDrawables % 10)) { - llinfos << "- Zombie drawables: " << sNumZombieDrawables << llendl; + LL_INFOS() << "- Zombie drawables: " << sNumZombieDrawables << LL_ENDL; }*/ } @@ -181,7 +181,7 @@ void LLDrawable::markDead() { if (isDead()) { - llwarns << "Warning! Marking dead multiple times!" << llendl; + LL_WARNS() << "Warning! Marking dead multiple times!" << LL_ENDL; return; } setState(DEAD); @@ -281,7 +281,7 @@ void LLDrawable::cleanupDeadDrawables() { if (sDeadList[i]->getNumRefs() > 1) { - llwarns << "Dead drawable has " << sDeadList[i]->getNumRefs() << " remaining refs" << llendl; + LL_WARNS() << "Dead drawable has " << sDeadList[i]->getNumRefs() << " remaining refs" << LL_ENDL; gPipeline.findReferences(sDeadList[i]); } } @@ -294,7 +294,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) S32 count = 0; if (mParent == drawablep) { - llinfos << this << ": parent reference" << llendl; + LL_INFOS() << this << ": parent reference" << LL_ENDL; count++; } return count; @@ -311,7 +311,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) face = new LLFace(this, mVObjp); } - if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl; + if (!face) LL_ERRS() << "Allocating new Face: " << mFaces.size() << LL_ENDL; if (face) { @@ -468,7 +468,7 @@ void LLDrawable::deleteFaces(S32 offset, S32 count) void LLDrawable::update() { - llerrs << "Shouldn't be called!" << llendl; + LL_ERRS() << "Shouldn't be called!" << LL_ENDL; } @@ -490,7 +490,7 @@ void LLDrawable::makeActive() pcode == LLViewerObject::LL_VO_GROUND || pcode == LLViewerObject::LL_VO_SKY) { - llerrs << "Static viewer object has active drawable!" << llendl; + LL_ERRS() << "Static viewer object has active drawable!" << LL_ENDL; } } #endif @@ -561,7 +561,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled) { if (child_drawable->getParent() != this) { - llwarns << "Child drawable has unknown parent." << llendl; + LL_WARNS() << "Child drawable has unknown parent." << LL_ENDL; } child_drawable->makeStatic(warning_enabled); } @@ -734,7 +734,7 @@ BOOL LLDrawable::updateMove() { if (isDead()) { - llwarns << "Update move on dead drawable!" << llendl; + LL_WARNS() << "Update move on dead drawable!" << LL_ENDL; return TRUE; } @@ -809,7 +809,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) { if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD) { - llwarns << "Attempted to update distance for non-world camera." << llendl; + LL_WARNS() << "Attempted to update distance for non-world camera." << LL_ENDL; return; } @@ -874,7 +874,7 @@ void LLDrawable::updateTexture() { if (isDead()) { - llwarns << "Dead drawable updating texture!" << llendl; + LL_WARNS() << "Dead drawable updating texture!" << LL_ENDL; return; } @@ -900,7 +900,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) { if (isDead()) { - llwarns << "Shifting dead drawable" << llendl; + LL_WARNS() << "Shifting dead drawable" << LL_ENDL; return; } @@ -1020,7 +1020,7 @@ F32 LLDrawable::getVisibilityRadius() const { return llmax(getRadius(), vov->getLightRadius()); } else { - // llwarns ? + // LL_WARNS() ? } } return getRadius(); @@ -1317,26 +1317,26 @@ void LLDrawable::setVisible(LLCamera& camera, std::vector* results, { if (isActive() && !mParent->isActive()) { - llerrs << "Active drawable has static parent!" << llendl; + LL_ERRS() << "Active drawable has static parent!" << LL_ENDL; } if (isStatic() && !mParent->isStatic()) { - llerrs << "Static drawable has active parent!" << llendl; + LL_ERRS() << "Static drawable has active parent!" << LL_ENDL; } if (mSpatialBridge) { - llerrs << "Child drawable has spatial bridge!" << llendl; + LL_ERRS() << "Child drawable has spatial bridge!" << LL_ENDL; } } else if (isActive() && !mSpatialBridge) { - llerrs << "Active root drawable has no spatial bridge!" << llendl; + LL_ERRS() << "Active root drawable has no spatial bridge!" << LL_ENDL; } else if (isStatic() && mSpatialBridge.notNull()) { - llerrs << "Static drawable has spatial bridge!" << llendl; + LL_ERRS() << "Static drawable has spatial bridge!" << LL_ENDL; } } #endif @@ -1512,7 +1512,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update) void LLSpatialBridge::makeActive() { //it is an error to make a spatial bridge active (it's already active) - llerrs << "makeActive called on spatial bridge" << llendl; + LL_ERRS() << "makeActive called on spatial bridge" << LL_ENDL; } void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 08fbd7d211..efb3e1d89d 100755 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -71,7 +71,7 @@ public: const LLDrawable& operator=(const LLDrawable& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } @@ -315,19 +315,19 @@ private: inline LLFace* LLDrawable::getFace(const S32 i) const { - //switch these asserts to llerrs -- davep + //switch these asserts to LL_ERRS() -- davep //llassert((U32)i < mFaces.size()); //llassert(mFaces[i]); if ((U32) i >= mFaces.size()) { - llwarns << "Invalid face index." << llendl; + LL_WARNS() << "Invalid face index." << LL_ENDL; return NULL; } if (!mFaces[i]) { - llwarns << "Null face found." << llendl; + LL_WARNS() << "Null face found." << LL_ENDL; return NULL; } diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 04e31e6486..deec199bc4 100755 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -113,7 +113,7 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0) poolp = new LLDrawPoolWLSky(); break; default: - llerrs << "Unknown draw pool type!" << llendl; + LL_ERRS() << "Unknown draw pool type!" << LL_ENDL; return NULL; } @@ -257,7 +257,7 @@ void LLFacePool::destroy() { if (!mReferences.empty()) { - llinfos << mReferences.size() << " references left on deletion of draw pool!" << llendl; + LL_INFOS() << mReferences.size() << " references left on deletion of draw pool!" << LL_ENDL; } } @@ -332,7 +332,7 @@ BOOL LLFacePool::verify() const const LLFace* facep = *iter; if (facep->getPool() != this) { - llinfos << "Face in wrong pool!" << llendl; + LL_INFOS() << "Face in wrong pool!" << LL_ENDL; facep->printDebugInfo(); ok = FALSE; } @@ -347,7 +347,7 @@ BOOL LLFacePool::verify() const void LLFacePool::printDebugInfo() const { - llinfos << "Pool " << this << " Type: " << getType() << llendl; + LL_INFOS() << "Pool " << this << " Type: " << getType() << LL_ENDL; } BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE; @@ -385,9 +385,9 @@ LLRenderPass::~LLRenderPass() LLDrawPool* LLRenderPass::instancePool() { #if LL_RELEASE_FOR_DOWNLOAD - llwarns << "Attempting to instance a render pass. Invalid operation." << llendl; + LL_WARNS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL; #else - llerrs << "Attempting to instance a render pass. Invalid operation." << llendl; + LL_ERRS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL; #endif return NULL; } diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 0fed6d1d17..604a9b1530 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -344,7 +344,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) if ((params.mVertexBuffer->getTypeMask() & mask) != mask) { //FIXME! - llwarns << "Missing required components, skipping render batch." << llendl; + LL_WARNS() << "Missing required components, skipping render batch." << LL_ENDL; continue; } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index c3afe63bdd..39d1b3de50 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1948,12 +1948,12 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) { if (type >= NUM_RIGGED_PASSES) { - llerrs << "Invalid rigged face type." << llendl; + LL_ERRS() << "Invalid rigged face type." << LL_ENDL; } if (facep->getRiggedIndex(type) != -1) { - llerrs << "Tried to add a rigged face that's referenced elsewhere." << llendl; + LL_ERRS() << "Tried to add a rigged face that's referenced elsewhere." << LL_ENDL; } facep->setRiggedIndex(type, mRiggedFace[type].size()); @@ -1982,7 +1982,7 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) } else { - llerrs << "Face reference data corrupt for rigged type " << i << llendl; + LL_ERRS() << "Face reference data corrupt for rigged type " << i << LL_ENDL; } } } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 155e289c9d..6c4226a9a6 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -104,7 +104,7 @@ void LLStandardBumpmap::addstandard() // can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps. //llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 ); clear(); - llinfos << "Adding standard bumpmaps." << llendl; + LL_INFOS() << "Adding standard bumpmaps." << LL_ENDL; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("None"); // BE_NO_BUMP gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Brightness"); // BE_BRIGHTNESS gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount++] = LLStandardBumpmap("Darkness"); // BE_DARKNESS @@ -113,7 +113,7 @@ void LLStandardBumpmap::addstandard() LLFILE* file = LLFile::fopen( file_name, "rt" ); /*Flawfinder: ignore*/ if( !file ) { - llwarns << "Could not open std_bump <" << file_name << ">" << llendl; + LL_WARNS() << "Could not open std_bump <" << file_name << ">" << LL_ENDL; return; } @@ -122,13 +122,13 @@ void LLStandardBumpmap::addstandard() S32 fields_read = fscanf( file, "LLStandardBumpmap version %d", &file_version ); if( fields_read != 1 ) { - llwarns << "Bad LLStandardBumpmap header" << llendl; + LL_WARNS() << "Bad LLStandardBumpmap header" << LL_ENDL; return; } if( file_version > STD_BUMP_LATEST_FILE_VERSION ) { - llwarns << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << llendl; + LL_WARNS() << "LLStandardBumpmap has newer version (" << file_version << ") than viewer (" << STD_BUMP_LATEST_FILE_VERSION << ")" << LL_ENDL; return; } @@ -145,11 +145,11 @@ void LLStandardBumpmap::addstandard() } if( fields_read != 2 ) { - llwarns << "Bad LLStandardBumpmap entry" << llendl; + LL_WARNS() << "Bad LLStandardBumpmap entry" << LL_ENDL; return; } -// llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl; +// LL_INFOS() << "Loading bumpmap: " << bump_image_id << " from viewerart" << LL_ENDL; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id)); @@ -165,7 +165,7 @@ void LLStandardBumpmap::addstandard() // static void LLStandardBumpmap::clear() { - llinfos << "Clearing standard bumpmaps." << llendl; + LL_INFOS() << "Clearing standard bumpmaps." << LL_ENDL; for( U32 i = 0; i < LLStandardBumpmap::sStandardBumpmapCount; i++ ) { gStandardBumpmapList[i].mLabel.assign(""); @@ -927,7 +927,7 @@ void LLBumpImageList::init() void LLBumpImageList::clear() { - llinfos << "Clearing dynamic bumpmaps." << llendl; + LL_INFOS() << "Clearing dynamic bumpmaps." << LL_ENDL; // these will be re-populated on-demand mBrightnessEntries.clear(); mDarknessEntries.clear(); @@ -1003,7 +1003,7 @@ void LLBumpImageList::updateImages() if( destroy ) { - //llinfos << "*** Destroying bright " << (void*)image << llendl; + //LL_INFOS() << "*** Destroying bright " << (void*)image << LL_ENDL; mBrightnessEntries.erase(curiter); // deletes the image thanks to reference counting } } @@ -1030,7 +1030,7 @@ void LLBumpImageList::updateImages() if( destroy ) { - //llinfos << "*** Destroying dark " << (void*)image << llendl;; + //LL_INFOS() << "*** Destroying dark " << (void*)image << LL_ENDL;; mDarknessEntries.erase(curiter); // deletes the image thanks to reference counting } } diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 9a5743919d..0e118c7420 100755 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -98,7 +98,7 @@ void LLDrawPoolWater::restoreGL() LLDrawPool *LLDrawPoolWater::instancePool() { - llerrs << "Should never be calling instancePool on a water pool!" << llendl; + LL_ERRS() << "Should never be calling instancePool on a water pool!" << LL_ENDL; return NULL; } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index b5faff7968..c3ba6c672d 100755 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -54,12 +54,12 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) : LLDrawPool(POOL_WL_SKY) { const std::string cloudNoiseFilename(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", "clouds2.tga")); - llinfos << "loading WindLight cloud noise from " << cloudNoiseFilename << llendl; + LL_INFOS() << "loading WindLight cloud noise from " << cloudNoiseFilename << LL_ENDL; LLPointer cloudNoiseFile(LLImageFormatted::createFromExtension(cloudNoiseFilename)); if(cloudNoiseFile.isNull()) { - llerrs << "Error: Failed to load cloud noise image " << cloudNoiseFilename << llendl; + LL_ERRS() << "Error: Failed to load cloud noise image " << cloudNoiseFilename << LL_ENDL; } if(cloudNoiseFile->load(cloudNoiseFilename)) @@ -69,8 +69,8 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) : if(cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f)) { //debug use - lldebugs << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " << - (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << llendl ; + LL_DEBUGS() << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " << + (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << LL_ENDL ; llassert_always(sCloudNoiseRawImage->getData()) ; sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE); @@ -86,7 +86,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) : LLDrawPoolWLSky::~LLDrawPoolWLSky() { - //llinfos << "destructing wlsky draw pool." << llendl; + //LL_INFOS() << "destructing wlsky draw pool." << LL_ENDL; sCloudNoiseTexture = NULL; sCloudNoiseRawImage = NULL; } @@ -196,7 +196,7 @@ void LLDrawPoolWLSky::renderStars(void) const // If start_brightness is not set, exit if( error ) { - llwarns << "star_brightness missing in mCurParams" << llendl; + LL_WARNS() << "star_brightness missing in mCurParams" << LL_ENDL; return; } @@ -389,7 +389,7 @@ void LLDrawPoolWLSky::render(S32 pass) void LLDrawPoolWLSky::prerender() { - //llinfos << "wlsky prerendering pass." << llendl; + //LL_INFOS() << "wlsky prerendering pass." << LL_ENDL; } LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool() diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 29ad4f34d2..fa9a0712fa 100755 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -99,7 +99,7 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum { if (mComponents < 1 || mComponents > 4) { - llerrs << "Bad number of components in dynamic texture: " << mComponents << llendl; + LL_ERRS() << "Bad number of components in dynamic texture: " << mComponents << LL_ENDL; } LLPointer raw_image = new LLImageRaw(mFullWidth, mFullHeight, mComponents); diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index 86fe6754dc..755bf57cc0 100755 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -40,7 +40,7 @@ std::string LLEnvPrefs::getWaterPresetName() const { if (mWaterPresetName.empty()) { - llwarns << "Water preset name is empty" << llendl; + LL_WARNS() << "Water preset name is empty" << LL_ENDL; } return mWaterPresetName; @@ -50,7 +50,7 @@ std::string LLEnvPrefs::getSkyPresetName() const { if (mSkyPresetName.empty()) { - llwarns << "Sky preset name is empty" << llendl; + LL_WARNS() << "Sky preset name is empty" << LL_ENDL; } return mSkyPresetName; @@ -60,7 +60,7 @@ std::string LLEnvPrefs::getDayCycleName() const { if (mDayCycleName.empty()) { - llwarns << "Day cycle name is empty" << llendl; + LL_WARNS() << "Day cycle name is empty" << LL_ENDL; } return mDayCycleName; @@ -196,7 +196,7 @@ bool LLEnvManagerNew::useSkyPreset(const std::string& name) if (!sky_mgr.getParamSet(LLWLParamKey(name, LLEnvKey::SCOPE_LOCAL), param_set)) { - llwarns << "No sky preset named " << name << llendl; + LL_WARNS() << "No sky preset named " << name << LL_ENDL; return false; } @@ -227,7 +227,7 @@ bool LLEnvManagerNew::useDayCycle(const std::string& name, LLEnvKey::EScope scop if (!LLDayCycleManager::instance().getPreset(name, params)) { - llwarns << "No day cycle named " << name << llendl; + LL_WARNS() << "No day cycle named " << name << LL_ENDL; return false; } } @@ -255,7 +255,7 @@ void LLEnvManagerNew::setUseWaterPreset(const std::string& name) // *TODO: make sure the preset exists. if (name.empty()) { - llwarns << "Empty water preset name passed" << llendl; + LL_WARNS() << "Empty water preset name passed" << LL_ENDL; return; } @@ -269,7 +269,7 @@ void LLEnvManagerNew::setUseSkyPreset(const std::string& name) // *TODO: make sure the preset exists. if (name.empty()) { - llwarns << "Empty sky preset name passed" << llendl; + LL_WARNS() << "Empty sky preset name passed" << LL_ENDL; return; } @@ -282,7 +282,7 @@ void LLEnvManagerNew::setUseDayCycle(const std::string& name) { if (!LLDayCycleManager::instance().presetExists(name)) { - llwarns << "Invalid day cycle name passed" << llendl; + LL_WARNS() << "Invalid day cycle name passed" << LL_ENDL; return; } @@ -580,7 +580,7 @@ void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate) LLWaterParamSet params; if (!water_mgr.getParamSet(water, params)) { - llwarns << "No water preset named " << water << ", falling back to defaults" << llendl; + LL_WARNS() << "No water preset named " << water << ", falling back to defaults" << LL_ENDL; water_mgr.getParamSet("Default", params); // *TODO: Fix user preferences accordingly. diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index 2669b0340f..761adc5942 100755 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -93,7 +93,7 @@ void LLEstateInfoModel::update(const strings_t& strings) LL_DEBUGS("Windlight Sync") << "Received estate info: " << "is_sun_fixed = " << getUseFixedSun() << ", sun_hour = " << getSunHour() << LL_ENDL; - lldebugs << getInfoDump() << llendl; + LL_DEBUGS() << getInfoDump() << LL_ENDL; // Update region owner. LLViewerRegion* regionp = gAgent.getRegion(); @@ -117,14 +117,14 @@ public: // if we get a normal response, handle it here virtual void result(const LLSD& content) { - llinfos << "Committed estate info" << llendl; + LL_INFOS() << "Committed estate info" << LL_ENDL; LLEstateInfoModel::instance().notifyCommit(); } // if we get an error response virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "Failed to commit estate info [status:" << status << "]: " << content << llendl; + LL_WARNS() << "Failed to commit estate info [status:" << status << "]: " << content << LL_ENDL; } }; @@ -155,7 +155,7 @@ bool LLEstateInfoModel::commitEstateInfoCaps() LL_DEBUGS("Windlight Sync") << "Sending estate caps: " << "is_sun_fixed = " << getUseFixedSun() << ", sun_hour = " << getSunHour() << LL_ENDL; - lldebugs << body << LL_ENDL; + LL_DEBUGS() << body << LL_ENDL; // we use a responder so that we can re-get the data after committing to the database LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder); @@ -174,7 +174,7 @@ void LLEstateInfoModel::commitEstateInfoDataserver() LL_DEBUGS("Windlight Sync") << "Sending estate info: " << "is_sun_fixed = " << getUseFixedSun() << ", sun_hour = " << getSunHour() << LL_ENDL; - lldebugs << getInfoDump() << LL_ENDL; + LL_DEBUGS() << getInfoDump() << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessage("EstateOwnerMessage"); diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index bedab75f98..e3c17f9877 100755 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -167,7 +167,7 @@ bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventD { LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName); - llinfos << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << llendl; + LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL; if(!new_enp->isValid()) { delete new_enp; diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index c1630318e8..fbd9466afe 100755 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -109,15 +109,15 @@ namespace const std::string& pollURL, const LLHost& sender) { LLHTTPClient::ResponderPtr result = new LLEventPollResponder(pollURL, sender); - llinfos << "LLEventPollResponder::start <" << sCount << "> " - << pollURL << llendl; + LL_INFOS() << "LLEventPollResponder::start <" << sCount << "> " + << pollURL << LL_ENDL; return result; } void LLEventPollResponder::stop() { - llinfos << "LLEventPollResponder::stop <" << mCount << "> " - << mPollURL << llendl; + LL_INFOS() << "LLEventPollResponder::stop <" << mCount << "> " + << mPollURL << LL_ENDL; // there should be a way to stop a LLHTTPClient request in progress mDone = true; } @@ -134,18 +134,18 @@ namespace LLViewerRegion *regionp = gAgent.getRegion(); if (!regionp) { - llerrs << "LLEventPoll initialized before region is added." << llendl; + LL_ERRS() << "LLEventPoll initialized before region is added." << LL_ENDL; } mSender = sender.getIPandPort(); - llinfos << "LLEventPoll initialized with sender " << mSender << llendl; + LL_INFOS() << "LLEventPoll initialized with sender " << mSender << LL_ENDL; makeRequest(); } LLEventPollResponder::~LLEventPollResponder() { stop(); - lldebugs << "LLEventPollResponder::~Impl <" << mCount << "> " - << mPollURL << llendl; + LL_DEBUGS() << "LLEventPollResponder::~Impl <" << mCount << "> " + << mPollURL << LL_ENDL; } // virtual @@ -172,8 +172,8 @@ namespace request["ack"] = mAcknowledge; request["done"] = mDone; - lldebugs << "LLEventPollResponder::makeRequest <" << mCount << "> ack = " - << LLSDXMLStreamer(mAcknowledge) << llendl; + LL_DEBUGS() << "LLEventPollResponder::makeRequest <" << mCount << "> ack = " + << LLSDXMLStreamer(mAcknowledge) << LL_ENDL; LLHTTPClient::post(mPollURL, request, this); } @@ -207,13 +207,13 @@ namespace + mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC , this); - llwarns << "LLEventPollResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "LLEventPollResponder error [status:" << status << "]: " << content << LL_ENDL; } else { - llwarns << "LLEventPollResponder error <" << mCount + LL_WARNS() << "LLEventPollResponder error <" << mCount << "> [status:" << status << "]: " << content - << (mDone ? " -- done" : "") << llendl; + << (mDone ? " -- done" : "") << LL_ENDL; stop(); // At this point we have given up and the viewer will not receive HTTP messages from the simulator. @@ -227,7 +227,7 @@ namespace // continue running. if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) { - llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; + LL_WARNS() << "Forcing disconnect due to stalled main region event poll." << LL_ENDL; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); } } @@ -236,8 +236,8 @@ namespace //virtual void LLEventPollResponder::result(const LLSD& content) { - lldebugs << "LLEventPollResponder::result <" << mCount << ">" - << (mDone ? " -- done" : "") << llendl; + LL_DEBUGS() << "LLEventPollResponder::result <" << mCount << ">" + << (mDone ? " -- done" : "") << LL_ENDL; if (mDone) return; @@ -246,7 +246,7 @@ namespace if (!content.get("events") || !content.get("id")) { - llwarns << "received event poll with no events or id key" << llendl; + LL_WARNS() << "received event poll with no events or id key" << LL_ENDL; makeRequest(); return; } @@ -256,12 +256,12 @@ namespace if(mAcknowledge.isUndefined()) { - llwarns << "LLEventPollResponder: id undefined" << llendl; + LL_WARNS() << "LLEventPollResponder: id undefined" << LL_ENDL; } - // was llinfos but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG - lldebugs << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " - << LLSDXMLStreamer(mAcknowledge) << ")" << llendl; + // was LL_INFOS() but now that CoarseRegionUpdate is TCP @ 1/second, it'd be too verbose for viewer logs. -MG + LL_DEBUGS() << "LLEventPollResponder::completed <" << mCount << "> " << events.size() << "events (id " + << LLSDXMLStreamer(mAcknowledge) << ")" << LL_ENDL; LLSD::array_const_iterator i = events.beginArray(); LLSD::array_const_iterator end = events.endArray(); diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 9480e54809..df9c848cb8 100755 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -44,7 +44,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env std::string cmd = findCommand(env_var, override); if (cmd.empty()) { - llwarns << "Editor command is empty or not set" << llendl; + LL_WARNS() << "Editor command is empty or not set" << LL_ENDL; return EC_NOT_SPECIFIED; } @@ -55,7 +55,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env std::string bin_path = tokens[0]; if (!LLFile::isfile(bin_path)) { - llwarns << "Editor binary [" << bin_path << "] not found" << llendl; + LL_WARNS() << "Editor binary [" << bin_path << "] not found" << LL_ENDL; return EC_BINARY_NOT_FOUND; } @@ -71,10 +71,10 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env if (cmd.find(sFilenameMarker) == std::string::npos) { mProcessParams.args.add(sFilenameMarker); - llinfos << "Adding the filename marker (" << sFilenameMarker << ")" << llendl; + LL_INFOS() << "Adding the filename marker (" << sFilenameMarker << ")" << LL_ENDL; } - llinfos << "Setting command [" << mProcessParams << "]" << llendl; + LL_INFOS() << "Setting command [" << mProcessParams << "]" << LL_ENDL; return EC_SUCCESS; } @@ -83,7 +83,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path) { if (std::string(mProcessParams.executable).empty() || mProcessParams.args.empty()) { - llwarns << "Editor command not set" << llendl; + LL_WARNS() << "Editor command not set" << LL_ENDL; return EC_NOT_SPECIFIED; } @@ -181,12 +181,12 @@ std::string LLExternalEditor::findCommand( if (!override.empty()) // try the supplied override first { cmd = override; - llinfos << "Using override" << llendl; + LL_INFOS() << "Using override" << LL_ENDL; } else if (!LLUI::sSettingGroups["config"]->getString(sSetting).empty()) { cmd = LLUI::sSettingGroups["config"]->getString(sSetting); - llinfos << "Using setting" << llendl; + LL_INFOS() << "Using setting" << LL_ENDL; } else // otherwise use the path specified by the environment variable { @@ -194,10 +194,10 @@ std::string LLExternalEditor::findCommand( if (env_var_val) { cmd = env_var_val; - llinfos << "Using env var " << env_var << llendl; + LL_INFOS() << "Using env var " << env_var << LL_ENDL; } } - llinfos << "Found command [" << cmd << "]" << llendl; + LL_INFOS() << "Found command [" << cmd << "]" << LL_ENDL; return cmd; } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index aadbbbacbb..7882fe6f33 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -222,7 +222,7 @@ void LLFace::initClass() void LLFace::setWorldMatrix(const LLMatrix4 &mat) { - llerrs << "Faces on this drawable are not independently modifiable\n" << llendl; + LL_ERRS() << "Faces on this drawable are not independently modifiable\n" << LL_ENDL; } void LLFace::setPool(LLFacePool* pool) @@ -234,7 +234,7 @@ void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) { if (!new_pool) { - llerrs << "Setting pool to null!" << llendl; + LL_ERRS() << "Setting pool to null!" << LL_ENDL; } if (new_pool != mDrawPoolp) @@ -338,7 +338,7 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture) if(!new_texture) { - llerrs << "Can not switch to a null texture." << llendl; + LL_ERRS() << "Can not switch to a null texture." << LL_ENDL; return; } @@ -420,7 +420,7 @@ void LLFace::setTextureIndex(U8 index) { if (mDrawInfo && !mDrawInfo->mTextureList.empty()) { - llerrs << "Face with no texture index references indexed texture draw info." << llendl; + LL_ERRS() << "Face with no texture index references indexed texture draw info." << LL_ENDL; } } } @@ -612,29 +612,29 @@ void LLFace::setDrawInfo(LLDrawInfo* draw_info) void LLFace::printDebugInfo() const { LLFacePool *poolp = getPool(); - llinfos << "Object: " << getViewerObject()->mID << llendl; + LL_INFOS() << "Object: " << getViewerObject()->mID << LL_ENDL; if (getDrawable()) { - llinfos << "Type: " << LLPrimitive::pCodeToString(getDrawable()->getVObj()->getPCode()) << llendl; + LL_INFOS() << "Type: " << LLPrimitive::pCodeToString(getDrawable()->getVObj()->getPCode()) << LL_ENDL; } if (getTexture()) { - llinfos << "Texture: " << getTexture() << " Comps: " << (U32)getTexture()->getComponents() << llendl; + LL_INFOS() << "Texture: " << getTexture() << " Comps: " << (U32)getTexture()->getComponents() << LL_ENDL; } else { - llinfos << "No texture: " << llendl; + LL_INFOS() << "No texture: " << LL_ENDL; } - llinfos << "Face: " << this << llendl; - llinfos << "State: " << getState() << llendl; - llinfos << "Geom Index Data:" << llendl; - llinfos << "--------------------" << llendl; - llinfos << "GI: " << mGeomIndex << " Count:" << mGeomCount << llendl; - llinfos << "Face Index Data:" << llendl; - llinfos << "--------------------" << llendl; - llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl; - llinfos << llendl; + LL_INFOS() << "Face: " << this << LL_ENDL; + LL_INFOS() << "State: " << getState() << LL_ENDL; + LL_INFOS() << "Geom Index Data:" << LL_ENDL; + LL_INFOS() << "--------------------" << LL_ENDL; + LL_INFOS() << "GI: " << mGeomIndex << " Count:" << mGeomCount << LL_ENDL; + LL_INFOS() << "Face Index Data:" << LL_ENDL; + LL_INFOS() << "--------------------" << LL_ENDL; + LL_INFOS() << "II: " << mIndicesIndex << " Count:" << mIndicesCount << LL_ENDL; + LL_INFOS() << LL_ENDL; if (poolp) { @@ -647,20 +647,20 @@ void LLFace::printDebugInfo() const LLFace *facep = *iter; if (facep == this) { - llinfos << "Pool reference: " << pool_references << llendl; + LL_INFOS() << "Pool reference: " << pool_references << LL_ENDL; pool_references++; } } if (pool_references != 1) { - llinfos << "Incorrect number of pool references!" << llendl; + LL_INFOS() << "Incorrect number of pool references!" << LL_ENDL; } } #if 0 - llinfos << "Indices:" << llendl; - llinfos << "--------------------" << llendl; + LL_INFOS() << "Indices:" << LL_ENDL; + LL_INFOS() << "--------------------" << LL_ENDL; const U32 *indicesp = getRawIndices(); S32 indices_count = getIndicesCount(); @@ -668,17 +668,17 @@ void LLFace::printDebugInfo() const for (S32 i = 0; i < indices_count; i++) { - llinfos << i << ":" << indicesp[i] << ":" << (S32)(indicesp[i] - geom_start) << llendl; + LL_INFOS() << i << ":" << indicesp[i] << ":" << (S32)(indicesp[i] - geom_start) << LL_ENDL; } - llinfos << llendl; + LL_INFOS() << LL_ENDL; - llinfos << "Vertices:" << llendl; - llinfos << "--------------------" << llendl; + LL_INFOS() << "Vertices:" << LL_ENDL; + LL_INFOS() << "--------------------" << LL_ENDL; for (S32 i = 0; i < mGeomCount; i++) { - llinfos << mGeomIndex + i << ":" << poolp->getVertex(mGeomIndex + i) << llendl; + LL_INFOS() << mGeomIndex + i << ":" << poolp->getVertex(mGeomIndex + i) << LL_ENDL; } - llinfos << llendl; + LL_INFOS() << LL_ENDL; #endif } @@ -785,7 +785,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, if (f >= volume.getNumVolumeFaces()) { - llwarns << "Generating bounding box for invalid face index!" << llendl; + LL_WARNS() << "Generating bounding box for invalid face index!" << LL_ENDL; f = 0; } @@ -1213,13 +1213,13 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { - llwarns << "Index buffer overflow!" << llendl; - llwarns << "Indices Count: " << mIndicesCount + LL_WARNS() << "Index buffer overflow!" << LL_ENDL; + LL_WARNS() << "Indices Count: " << mIndicesCount << " VF Num Indices: " << num_indices << " Indices Index: " << mIndicesIndex - << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; - llwarns << " Face Index: " << f - << " Pool Type: " << mPoolType << llendl; + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << LL_ENDL; + LL_WARNS() << " Face Index: " << f + << " Pool Type: " << mPoolType << LL_ENDL; } return FALSE; } @@ -1228,7 +1228,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (gDebugGL) { - llwarns << "Vertex buffer overflow!" << llendl; + LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL; } return FALSE; } @@ -2397,7 +2397,7 @@ BOOL LLFace::verify(const U32* indices_array) const if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts()) { ok = FALSE; - llinfos << "Face references invalid vertices!" << llendl; + LL_INFOS() << "Face references invalid vertices!" << LL_ENDL; } S32 indices_count = (S32)getIndicesCount(); @@ -2410,13 +2410,13 @@ BOOL LLFace::verify(const U32* indices_array) const if (indices_count > LL_MAX_INDICES_COUNT) { ok = FALSE; - llinfos << "Face has bogus indices count" << llendl; + LL_INFOS() << "Face has bogus indices count" << LL_ENDL; } if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices()) { ok = FALSE; - llinfos << "Face references invalid indices!" << llendl; + LL_INFOS() << "Face references invalid indices!" << LL_ENDL; } #if 0 @@ -2430,14 +2430,14 @@ BOOL LLFace::verify(const U32* indices_array) const S32 delta = indicesp[i] - geom_start; if (0 > delta) { - llwarns << "Face index too low!" << llendl; - llinfos << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << llendl; + LL_WARNS() << "Face index too low!" << LL_ENDL; + LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << LL_ENDL; ok = FALSE; } else if (delta >= geom_count) { - llwarns << "Face index too high!" << llendl; - llinfos << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << llendl; + LL_WARNS() << "Face index too high!" << LL_ENDL; + LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << LL_ENDL; ok = FALSE; } } diff --git a/indra/newview/llface.h b/indra/newview/llface.h index c4832b67cd..fc22daa4a3 100755 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -75,7 +75,7 @@ public: const LLFace& operator=(const LLFace& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 4037b5ebdd..bb9e474098 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -836,7 +836,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target std::ifstream target_is(target.c_str()); if (!base_is.is_open() || !target_is.is_open()) { - llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl; + LL_WARNS() << "'-analyzeperformance' error : baseline or current target file inexistent" << LL_ENDL; base_is.close(); target_is.close(); return; @@ -980,7 +980,7 @@ void LLFastTimerView::printLineStats() it.skipDescendants(); } } - llinfos << legend_stat << llendl; + LL_INFOS() << legend_stat << LL_ENDL; std::string timer_stat; first = true; @@ -1014,7 +1014,7 @@ void LLFastTimerView::printLineStats() it.skipDescendants(); } } - llinfos << timer_stat << llendl; + LL_INFOS() << timer_stat << LL_ENDL; mStatsIndex = -1; } } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index fc531a0c74..3c47545121 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -478,7 +478,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (item->getParentUUID() == favorites_id) { - llwarns << "Attemt to copy a favorite item into the same folder." << llendl; + LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL; break; } @@ -621,7 +621,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con cb); } - llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl; + LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL; } //virtual @@ -858,7 +858,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer(fav_btn_params); if (NULL == fav_btn) { - llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl; + LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL; return NULL; } @@ -1146,7 +1146,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata) void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) { std::string action = userdata.asString(); - llinfos << "Action = " << action << " Item = " << mSelectedItemID.asString() << llendl; + LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL; LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID); if (!item) @@ -1473,14 +1473,14 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() // Do not change the file if we are not logged in yet. if (!LLLoginInstance::getInstance()->authSuccess()) { - llwarns << "Cannot save favorites: not logged in" << llendl; + LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL; return; } std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); if (user_dir.empty()) { - llwarns << "Cannot save favorites: empty user dir name" << llendl; + LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL; return; } @@ -1508,13 +1508,13 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); if (slurl_iter != mSLURLs.end()) { - lldebugs << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; + LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; value["slurl"] = slurl_iter->second; user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; } else { - llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; + LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; } } @@ -1522,7 +1522,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() LLAvatarNameCache::get( gAgentID, &av_name ); // Note : use the "John Doe" and not the "john.doe" version of the name // as we'll compare it with the stored credentials in the login panel. - lldebugs << "Saved favorites for " << av_name.getUserName() << llendl; + LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL; fav_llsd[av_name.getUserName()] = user_llsd; llofstream file; @@ -1543,7 +1543,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLAvatarNameCache::get( gAgentID, &av_name ); // Note : use the "John Doe" and not the "john.doe" version of the name. // See saveFavoritesSLURLs() here above for the reason why. - lldebugs << "Removed favorites for " << av_name.getUserName() << llendl; + LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL; if (fav_llsd.has(av_name.getUserName())) { fav_llsd.erase(av_name.getUserName()); @@ -1576,7 +1576,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) { - lldebugs << "Saving landmark SLURL: " << slurl << llendl; + LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL; mSLURLs[asset_id] = slurl; } diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index c05f27d2ee..01596f0b4b 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -127,7 +127,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name) BOOL LLFeatureList::maskList(LLFeatureList &mask) { - //llinfos << "Masking with " << mask.mName << llendl; + //LL_INFOS() << "Masking with " << mask.mName << LL_ENDL; // // Lookup the specified feature mask, and overlay it on top of the // current feature mask. @@ -265,7 +265,7 @@ BOOL LLFeatureManager::loadFeatureTables() BOOL LLFeatureManager::parseFeatureTable(std::string filename) { - llinfos << "Looking for feature table in " << filename << llendl; + LL_INFOS() << "Looking for feature table in " << filename << LL_ENDL; llifstream file; std::string name; @@ -524,7 +524,7 @@ public: { // write to file - llinfos << "writing feature table to " << mFilename << llendl; + LL_INFOS() << "writing feature table to " << mFilename << LL_ENDL; S32 file_size = buffer->countAfter(channels.in(), NULL); if (file_size > 0) @@ -569,7 +569,7 @@ void fetch_feature_table(std::string table) const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); - llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl; + LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL; LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path)); } @@ -584,7 +584,7 @@ void fetch_gpu_table(std::string table) const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); - llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl; + LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL; LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path)); } @@ -621,7 +621,7 @@ void LLFeatureManager::applyRecommendedSettings() // cap the level at 2 (high) S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); - llinfos << "Applying Recommended Features" << llendl; + LL_INFOS() << "Applying Recommended Features" << LL_ENDL; setGraphicsLevel(level, false); gSavedSettings.setU32("RenderQualityPerformance", level); @@ -667,7 +667,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); if(ctrl == NULL) { - llwarns << "AHHH! Control setting " << mIt->first << " does not exist!" << llendl; + LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; continue; } @@ -690,7 +690,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) } else { - llwarns << "AHHH! Control variable is not a numeric type!" << llendl; + LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL; } } } @@ -863,7 +863,7 @@ void LLFeatureManager::applyBaseMasks() } } - //llinfos << "Masking features from gpu table match: " << gpustr << llendl; + //LL_INFOS() << "Masking features from gpu table match: " << gpustr << LL_ENDL; maskFeatures(gpustr); // now mask cpu type ones diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index d13f85baa2..a288d8e4de 100755 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -629,7 +629,7 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB #endif else if (filter == FFLOAD_SLOBJECT) { - llwarns << "*** navOpenFilterProc: FFLOAD_SLOBJECT NOT IMPLEMENTED ***" << llendl; + LL_WARNS() << "*** navOpenFilterProc: FFLOAD_SLOBJECT NOT IMPLEMENTED ***" << LL_ENDL; } else if (filter == FFLOAD_RAW) { @@ -1061,13 +1061,13 @@ void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data) { display_name += (char)((*str >= 0x20 && *str <= 0x7E) ? *str : '?'); } - llwarns << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << llendl; + LL_WARNS() << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << LL_ENDL; } if (filename_utf8) { picker->mFiles.push_back(std::string(filename_utf8)); - lldebugs << "ADDED FILE " << filename_utf8 << llendl; + LL_DEBUGS() << "ADDED FILE " << filename_utf8 << LL_ENDL; g_free(filename_utf8); } @@ -1079,7 +1079,7 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer { LLFilePicker* picker = (LLFilePicker*)user_data; - lldebugs << "GTK DIALOG RESPONSE " << response << llendl; + LL_DEBUGS() << "GTK DIALOG RESPONSE " << response << LL_ENDL; if (response == GTK_RESPONSE_ACCEPT) { @@ -1154,7 +1154,7 @@ GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder, std::stri } else { - llwarns << "Hmm, couldn't get xwid to use for transient." << llendl; + LL_WARNS() << "Hmm, couldn't get xwid to use for transient." << LL_ENDL; } # endif //LL_X11 @@ -1467,8 +1467,8 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename reset(); - llinfos << "getSaveFile suggested filename is [" << filename - << "]" << llendl; + LL_INFOS() << "getSaveFile suggested filename is [" << filename + << "]" << LL_ENDL; if (!filename.empty()) { mFiles.push_back(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); @@ -1498,7 +1498,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) default: break; } mFiles.push_back(filename); - llinfos << "getOpenFile: Will try to open file: " << filename << llendl; + LL_INFOS() << "getOpenFile: Will try to open file: " << filename << LL_ENDL; return TRUE; } diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 229a55ad23..84f0d115ae 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -473,9 +473,9 @@ void LLServerReleaseNotesURLFetcher::startFetch() // virtual void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::string& reason, const LLSD& content) { - lldebugs << "Status: " << status << llendl; - lldebugs << "Reason: " << reason << llendl; - lldebugs << "Headers: " << content << llendl; + LL_DEBUGS() << "Status: " << status << LL_ENDL; + LL_DEBUGS() << "Reason: " << reason << LL_ENDL; + LL_DEBUGS() << "Headers: " << content << LL_ENDL; LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance("sl_about"); if (floater_about) diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 3c40e2d4bc..51b59a7a74 100755 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -194,7 +194,7 @@ void LLFloaterAuction::onClickSnapshot(void* data) { gViewerWindow->playSnapshotAnimAndSound(); } - llinfos << "Writing TGA..." << llendl; + LL_INFOS() << "Writing TGA..." << LL_ENDL; LLPointer tga = new LLImageTGA; tga->encode(raw); @@ -202,7 +202,7 @@ void LLFloaterAuction::onClickSnapshot(void* data) raw->biasedScaleToPowerOfTwo(LLViewerTexture::MAX_IMAGE_SIZE_DEFAULT); - llinfos << "Writing J2C..." << llendl; + LL_INFOS() << "Writing J2C..." << LL_ENDL; LLPointer j2c = new LLImageJ2C; j2c->encode(raw, 0.0f); @@ -214,7 +214,7 @@ void LLFloaterAuction::onClickSnapshot(void* data) } else { - llwarns << "Unable to take snapshot" << llendl; + LL_WARNS() << "Unable to take snapshot" << LL_ENDL; } } @@ -359,8 +359,8 @@ void LLFloaterAuction::doResetParcel() body["user_look_at"] = ll_sd_from_vector3( LLVector3::zero ); body["landing_type"] = (U8) LLParcel::L_DIRECT; - llinfos << "Sending parcel update to reset for auction via capability to: " - << mParcelUpdateCapUrl << llendl; + LL_INFOS() << "Sending parcel update to reset for auction via capability to: " + << mParcelUpdateCapUrl << LL_ENDL; LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder()); // Send a message to clear the object return time @@ -509,8 +509,8 @@ void LLFloaterAuction::doSellToAnyone() body["sale_price"] = parcelp->getArea(); // Sell for L$1 per square meter body["auth_buyer_id"] = LLUUID::null; // To anyone - llinfos << "Sending parcel update to sell to anyone for L$1 via capability to: " - << mParcelUpdateCapUrl << llendl; + LL_INFOS() << "Sending parcel update to sell to anyone for L$1 via capability to: " + << mParcelUpdateCapUrl << LL_ENDL; LLHTTPClient::post(mParcelUpdateCapUrl, body, new LLHTTPClient::Responder()); // clean up floater, and get out @@ -526,8 +526,8 @@ void LLFloaterAuction::doSellToAnyone() void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { std::string* name = (std::string*)(user_data); - llinfos << "Upload of asset '" << *name << "' " << asset_id - << " returned " << status << llendl; + LL_INFOS() << "Upload of asset '" << *name << "' " << asset_id + << " returned " << status << LL_ENDL; delete name; gViewerWindow->getWindow()->decBusyCount(); @@ -547,8 +547,8 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { std::string* name = (std::string*)(user_data); - llinfos << "Upload of asset '" << *name << "' " << asset_id - << " returned " << status << llendl; + LL_INFOS() << "Upload of asset '" << *name << "' " << asset_id + << " returned " << status << LL_ENDL; delete name; gViewerWindow->getWindow()->decBusyCount(); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 76773f914d..8d5352e2a6 100755 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -70,7 +70,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, LLFloaterReg::showTypedInstance("avatar_picker", LLSD(name)); if (!floater) { - llwarns << "Cannot instantiate avatar picker" << llendl; + LL_WARNS() << "Cannot instantiate avatar picker" << LL_ENDL; return NULL; } @@ -468,7 +468,7 @@ public: { //std::ostringstream ss; //LLSDSerialize::toPrettyXML(content, ss); - //llinfos << ss.str() << llendl; + //LL_INFOS() << ss.str() << LL_ENDL; // in case of invalid characters, the avatar picker returns a 400 // just set it to process so it displays 'not found' @@ -483,7 +483,7 @@ public: } else { - llwarns << "avatar picker failed [status:" << status << "]: " << content << llendl; + LL_WARNS() << "avatar picker failed [status:" << status << "]: " << content << LL_ENDL; } } @@ -514,7 +514,7 @@ void LLFloaterAvatarPicker::find() } url += "?page_size=100&names="; url += LLURI::escape(text); - llinfos << "avatar picker " << url << llendl; + LL_INFOS() << "avatar picker " << url << LL_ENDL; LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID, getKey().asString())); } else diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 317bdd8d46..78807a8e99 100755 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -187,16 +187,16 @@ void LLFloaterAvatarTextures::onClickDump(void* data) } if (id != IMG_DEFAULT_AVATAR) { - llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl; + LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << id << LL_ENDL; } else { - llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "" << llendl; + LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << "" << LL_ENDL; } } else { - llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl; + LL_INFOS() << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << LL_ENDL; } } } diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 086da158ad..c202ca1b05 100755 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -99,7 +99,7 @@ void LLFloaterBulkPermission::doApply() mDone = FALSE; if (!start()) { - llwarns << "Unexpected bulk permission change failure." << llendl; + LL_WARNS() << "Unexpected bulk permission change failure." << LL_ENDL; } } } @@ -113,7 +113,7 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, S32, void* q_id) { - //llinfos << "changed object: " << viewer_object->getID() << llendl; + //LL_INFOS() << "changed object: " << viewer_object->getID() << LL_ENDL; //Remove this listener from the object since its //listener callback is now being executed. @@ -138,7 +138,7 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, // something went wrong... // note that we're not working on this one, and move onto the // next object in the list. - llwarns << "No inventory for " << mCurrentObjectID << llendl; + LL_WARNS() << "No inventory for " << mCurrentObjectID << LL_ENDL; nextObject(); } } @@ -181,12 +181,12 @@ BOOL LLFloaterBulkPermission::nextObject() do { count = mObjectIDs.size(); - //llinfos << "Objects left to process = " << count << llendl; + //LL_INFOS() << "Objects left to process = " << count << LL_ENDL; mCurrentObjectID.setNull(); if(count > 0) { successful_start = popNext(); - //llinfos << (successful_start ? "successful" : "unsuccessful") << llendl; + //LL_INFOS() << (successful_start ? "successful" : "unsuccessful") << LL_ENDL; } } while((mObjectIDs.size() > 0) && !successful_start); @@ -208,12 +208,12 @@ BOOL LLFloaterBulkPermission::popNext() if(mCurrentObjectID.isNull() && (count > 0)) { mCurrentObjectID = mObjectIDs.at(0); - //llinfos << "mCurrentID: " << mCurrentObjectID << llendl; + //LL_INFOS() << "mCurrentID: " << mCurrentObjectID << LL_ENDL; mObjectIDs.erase(mObjectIDs.begin()); LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID); if(obj) { - //llinfos << "requesting inv for " << mCurrentObjectID << llendl; + //LL_INFOS() << "requesting inv for " << mCurrentObjectID << LL_ENDL; LLUUID* id = new LLUUID(mID); registerVOInventoryListener(obj,id); requestVOInventory(); @@ -221,7 +221,7 @@ BOOL LLFloaterBulkPermission::popNext() } else { - llinfos<<"NULL LLViewerObject" <mType << llendl; + LL_INFOS() << "LLFloaterBump::add unknown mean collision type " + << mcd->mType << LL_ENDL; return; } diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 087b0007e1..5a9cdbba44 100755 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -194,14 +194,14 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, { if (!obj) { - llwarns << "No object in LLFloaterBuy::inventoryChanged" << llendl; + LL_WARNS() << "No object in LLFloaterBuy::inventoryChanged" << LL_ENDL; return; } if (!inv) { - llwarns << "No inventory in LLFloaterBuy::inventoryChanged" - << llendl; + LL_WARNS() << "No inventory in LLFloaterBuy::inventoryChanged" + << LL_ENDL; removeVOInventoryListener(); return; } diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index aa6ace2a61..b32ac860aa 100755 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -145,7 +145,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, { if (!obj) { - llwarns << "No object in LLFloaterBuyContents::inventoryChanged" << llendl; + LL_WARNS() << "No object in LLFloaterBuyContents::inventoryChanged" << LL_ENDL; return; } @@ -160,8 +160,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, if (!inv) { - llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged" - << llendl; + LL_WARNS() << "No inventory in LLFloaterBuyContents::inventoryChanged" + << LL_ENDL; return; } diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp index 013cf74c7b..0c408f556d 100755 --- a/indra/newview/llfloaterbuycurrencyhtml.cpp +++ b/indra/newview/llfloaterbuycurrencyhtml.cpp @@ -82,7 +82,7 @@ void LLFloaterBuyCurrencyHTML::navigateToFinalURL() LLStringUtil::format( buy_currency_url, replace ); // write final URL to debug console - llinfos << "Buy currency HTML parsed URL is " << buy_currency_url << llendl; + LL_INFOS() << "Buy currency HTML parsed URL is " << buy_currency_url << LL_ENDL; // kick off the navigation mBrowser->navigateTo( buy_currency_url, "text/html" ); diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 84e2956b29..da499f96d2 100755 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -877,7 +877,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCVa method = "buyLandPrep"; break; default: - llwarns << "LLFloaterBuyLandUI: Unknown transaction type!" << llendl; + LL_WARNS() << "LLFloaterBuyLandUI: Unknown transaction type!" << LL_ENDL; return; } diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index f2deb6a805..a22f5770bf 100755 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -228,7 +228,7 @@ BOOL LLFloaterBvhPreview::postBuild() if (!infile.getFileHandle()) { - llwarns << "Can't open BVH file:" << mFilename << llendl; + LL_WARNS() << "Can't open BVH file:" << mFilename << LL_ENDL; } else { @@ -239,7 +239,7 @@ BOOL LLFloaterBvhPreview::postBuild() if (file_size == infile.read(file_buffer, file_size)) { file_buffer[file_size] = '\0'; - llinfos << "Loading BVH file " << mFilename << llendl; + LL_INFOS() << "Loading BVH file " << mFilename << LL_ENDL; ELoadStatus load_status = E_ST_OK; S32 line_number = 0; loaderp = new LLBVHLoader(file_buffer, load_status, line_number); @@ -247,11 +247,11 @@ BOOL LLFloaterBvhPreview::postBuild() if(load_status == E_ST_NO_XLT_FILE) { - llwarns << "NOTE: No translation table found." << llendl; + LL_WARNS() << "NOTE: No translation table found." << LL_ENDL; } else { - llwarns << "ERROR: [line: " << line_number << "] " << status << llendl; + LL_WARNS() << "ERROR: [line: " << line_number << "] " << status << LL_ENDL; } } @@ -1009,7 +1009,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) } else { - llwarns << "Failure writing animation data." << llendl; + LL_WARNS() << "Failure writing animation data." << LL_ENDL; LLNotificationsUtil::add("WriteAnimationFail"); } } diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp index d08aa81cfe..bb11c813b4 100755 --- a/indra/newview/llfloaterdeleteenvpreset.cpp +++ b/indra/newview/llfloaterdeleteenvpreset.cpp @@ -144,7 +144,7 @@ void LLFloaterDeleteEnvPreset::onBtnDelete() } else { - llwarns << "Unrecognized key" << llendl; + LL_WARNS() << "Unrecognized key" << LL_ENDL; } LLSD args; @@ -176,7 +176,7 @@ void LLFloaterDeleteEnvPreset::populatePresetsList() } else { - llwarns << "Unrecognized key" << llendl; + LL_WARNS() << "Unrecognized key" << LL_ENDL; } } diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index e2cef5630b..596e8c0dbe 100755 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -127,7 +127,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success, // Request failed, notify the user std::string error_tag = content["error_tag"].asString(); - llinfos << "set name failure error_tag " << error_tag << llendl; + LL_INFOS() << "set name failure error_tag " << error_tag << LL_ENDL; // We might have a localized string for this message // error_args will usually be empty from the server. diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp index b63677b258..e987a0e0b1 100755 --- a/indra/newview/llfloatereditdaycycle.cpp +++ b/indra/newview/llfloatereditdaycycle.cpp @@ -172,7 +172,7 @@ void LLFloaterEditDayCycle::loadTrack() // add sliders - lldebugs << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << llendl; + LL_DEBUGS() << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << LL_ENDL; LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay; for (std::map::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it) @@ -192,12 +192,12 @@ void LLFloaterEditDayCycle::loadTrack() void LLFloaterEditDayCycle::applyTrack() { - lldebugs << "Applying track (" << mSliderToKey.size() << ")" << llendl; + LL_DEBUGS() << "Applying track (" << mSliderToKey.size() << ")" << LL_ENDL; // if no keys, do nothing if (mSliderToKey.size() == 0) { - lldebugs << "No keys, not syncing" << llendl; + LL_DEBUGS() << "No keys, not syncing" << LL_ENDL; return; } @@ -342,7 +342,7 @@ void LLFloaterEditDayCycle::onKeyTimeMoved() // check to see if a key exists LLWLParamKey key = mSliderToKey[cur_sldr].keyframe; - lldebugs << "Setting key time: " << time24 << LL_ENDL; + LL_DEBUGS() << "Setting key time: " << time24 << LL_ENDL; mSliderToKey[cur_sldr].time = time24; // if it exists, turn on check box @@ -368,7 +368,7 @@ void LLFloaterEditDayCycle::onKeyTimeChanged() F32 time = mKeysSlider->getCurSliderValue() / sHoursPerDay; // now set the key's time in the sliderToKey map - lldebugs << "Setting key time: " << time << LL_ENDL; + LL_DEBUGS() << "Setting key time: " << time << LL_ENDL; mSliderToKey[cur_sldr].time = time; applyTrack(); @@ -564,7 +564,7 @@ void LLFloaterEditDayCycle::saveRegionDayCycle() #else // Temporary disabled ability to upload new region settings from the Day Cycle Editor. if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings)) { - llwarns << "Error applying region environment settings" << llendl; + LL_WARNS() << "Error applying region environment settings" << LL_ENDL; return; } @@ -637,7 +637,7 @@ void LLFloaterEditDayCycle::onRegionSettingsChange() // Change preference if requested. if (mMakeDefaultCheckBox->getValue()) { - LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << llendl; + LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << LL_ENDL; LLEnvManagerNew::instance().setUseRegionSettings(true); } @@ -699,7 +699,7 @@ void LLFloaterEditDayCycle::onDayCycleSelected() { if (!LLDayCycleManager::instance().getPreset(dc_key.name, day_data)) { - llwarns << "No day cycle named " << dc_key.name << llendl; + LL_WARNS() << "No day cycle named " << dc_key.name << LL_ENDL; return; } } @@ -708,7 +708,7 @@ void LLFloaterEditDayCycle::onDayCycleSelected() day_data = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle(); if (day_data.size() == 0) { - llwarns << "Empty region day cycle" << llendl; + LL_WARNS() << "Empty region day cycle" << LL_ENDL; llassert(day_data.size() > 0); return; } @@ -742,7 +742,7 @@ void LLFloaterEditDayCycle::onBtnSave() if (name.empty()) { // *TODO: show an alert - llwarns << "Empty day cycle name" << llendl; + LL_WARNS() << "Empty day cycle name" << LL_ENDL; return; } @@ -795,7 +795,7 @@ void LLFloaterEditDayCycle::onSaveConfirmed() // Change preference if requested. if (mMakeDefaultCheckBox->getValue()) { - LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << llendl; + LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << LL_ENDL; LLEnvManagerNew::instance().setUseDayCycle(name); } diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp index 352361ce9e..d809211ea7 100755 --- a/indra/newview/llfloatereditsky.cpp +++ b/indra/newview/llfloatereditsky.cpp @@ -721,7 +721,7 @@ void LLFloaterEditSky::saveRegionSky() LLWLParamKey key(getSelectedSkyPreset()); llassert(key.scope == LLEnvKey::SCOPE_REGION); - LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << llendl; + LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << LL_ENDL; LLWLParamManager& wl_mgr = LLWLParamManager::instance(); wl_mgr.mCurParams.mName = key.name; wl_mgr.setParamSet(key, wl_mgr.mCurParams); @@ -819,7 +819,7 @@ void LLFloaterEditSky::onSaveConfirmed() // Change preference if requested. if (mMakeDefaultCheckBox->getValue()) { - LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << llendl; + LL_DEBUGS("Windlight") << key.name << " is now the new preferred sky preset" << LL_ENDL; LLEnvManagerNew::instance().setUseSkyPreset(key.name); } @@ -842,7 +842,7 @@ void LLFloaterEditSky::onBtnSave() if (name.empty()) { // *TODO: show an alert - llwarns << "Empty sky preset name" << llendl; + LL_WARNS() << "Empty sky preset name" << LL_ENDL; return; } diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp index 64cfc4054f..43b44eae37 100755 --- a/indra/newview/llfloatereditwater.cpp +++ b/indra/newview/llfloatereditwater.cpp @@ -546,7 +546,7 @@ void LLFloaterEditWater::saveRegionWater() { llassert(getCurrentScope() == LLEnvKey::SCOPE_REGION); // make sure we're editing region water - LL_DEBUGS("Windlight") << "Saving region water preset" << llendl; + LL_DEBUGS("Windlight") << "Saving region water preset" << LL_ENDL; //LLWaterParamSet region_water = water_mgr.mCurParams; @@ -665,7 +665,7 @@ void LLFloaterEditWater::onSaveConfirmed() // Change preference if requested. if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue()) { - LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << llendl; + LL_DEBUGS("Windlight") << name << " is now the new preferred water preset" << LL_ENDL; LLEnvManagerNew::instance().setUseWaterPreset(name); } @@ -688,7 +688,7 @@ void LLFloaterEditWater::onBtnSave() if (name.empty()) { // *TODO: show an alert - llwarns << "Empty water preset name" << llendl; + LL_WARNS() << "Empty water preset name" << LL_ENDL; return; } diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index fe6223fbf5..6966ca5639 100755 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -796,7 +796,7 @@ void LLPanelRegionTools::onSwapTerrain() void LLPanelRegionTools::onSelectRegion() { - llinfos << "LLPanelRegionTools::onSelectRegion" << llendl; + LL_INFOS() << "LLPanelRegionTools::onSelectRegion" << LL_ENDL; LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(gAgent.getPositionGlobal()); if (!regionp) @@ -1262,8 +1262,8 @@ void LLPanelRequestTools::sendRequest(const std::string& request, const std::string& parameter, const LLHost& host) { - llinfos << "Sending request '" << request << "', '" - << parameter << "' to " << host << llendl; + LL_INFOS() << "Sending request '" << request << "', '" + << parameter << "' to " << host << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessage("GodlikeMessage"); msg->nextBlockFast(_PREHASH_AgentData); @@ -1316,7 +1316,7 @@ void terrain_download_done(void** data, S32 status, LLExtStat ext_status) void test_callback(const LLTSCode status) { - llinfos << "Test transfer callback returned!" << llendl; + LL_INFOS() << "Test transfer callback returned!" << LL_ENDL; } diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp index 49da4e64b3..e1639d9e63 100755 --- a/indra/newview/llfloatergroupinvite.cpp +++ b/indra/newview/llfloatergroupinvite.cpp @@ -115,7 +115,7 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agen // Make sure group_id isn't null if (group_id.isNull()) { - llwarns << "LLFloaterGroupInvite::showForGroup with null group_id!" << llendl; + LL_WARNS() << "LLFloaterGroupInvite::showForGroup with null group_id!" << LL_ENDL; return; } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index b40789db9c..c1cd3d1d93 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -412,7 +412,7 @@ bool LLFloaterIMContainer::onConversationModelEvent(const LLSD& event) // For debug only //std::ostringstream llsd_value; //llsd_value << LLSDOStreamer(event) << std::endl; - //llinfos << "LLFloaterIMContainer::onConversationModelEvent, event = " << llsd_value.str() << llendl; + //LL_INFOS() << "LLFloaterIMContainer::onConversationModelEvent, event = " << llsd_value.str() << LL_ENDL; // end debug // Note: In conversations, the model is not responsible for creating the view, which is a good thing. This means that @@ -1527,7 +1527,7 @@ LLConversationItem* LLFloaterIMContainer::addConversationListItem(const LLUUID& } if (!item) { - llwarns << "Couldn't create conversation session item : " << display_name << llendl; + LL_WARNS() << "Couldn't create conversation session item : " << display_name << LL_ENDL; return NULL; } item->renameItem(display_name); @@ -1709,7 +1709,7 @@ bool LLFloaterIMContainer::isGroupModerator() LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant(); if (NULL == speaker_manager) { - llwarns << "Speaker manager is missing" << llendl; + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; return false; } @@ -1801,7 +1801,7 @@ LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant() LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem(); if (NULL == selectedItem) { - llwarns << "Current selected item is null" << llendl; + LL_WARNS() << "Current selected item is null" << LL_ENDL; return NULL; } @@ -1819,7 +1819,7 @@ LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant() } if (NULL == conversation_uuidp) { - llwarns << "Cannot find conversation item widget" << llendl; + LL_WARNS() << "Cannot find conversation item widget" << LL_ENDL; return NULL; } @@ -1831,14 +1831,14 @@ LLSpeaker * LLFloaterIMContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr * { if (NULL == speaker_managerp) { - llwarns << "Speaker manager is missing" << llendl; + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; return NULL; } const LLConversationItem * participant_itemp = getCurSelectedViewModelItem(); if (NULL == participant_itemp) { - llwarns << "Cannot evaluate current selected view model item" << llendl; + LL_WARNS() << "Cannot evaluate current selected view model item" << LL_ENDL; return NULL; } diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 2287277acf..886af6ed15 100755 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -498,10 +498,10 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke() mInputEditor->endOfDoc(); } - //llinfos << "GESTUREDEBUG " << trigger + //LL_INFOS() << "GESTUREDEBUG " << trigger // << " len " << length // << " outlen " << out_str.getLength() - // << llendl; + // << LL_ENDL; } } @@ -688,22 +688,22 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType { if (type == CHAT_TYPE_WHISPER) { - lldebugs << "You whisper " << utf8_text << llendl; + LL_DEBUGS() << "You whisper " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_NORMAL) { - lldebugs << "You say " << utf8_text << llendl; + LL_DEBUGS() << "You say " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_SHOUT) { - lldebugs << "You shout " << utf8_text << llendl; + LL_DEBUGS() << "You shout " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); } else { - llinfos << "send_chat_from_viewer() - invalid volume" << llendl; + LL_INFOS() << "send_chat_from_viewer() - invalid volume" << LL_ENDL; return; } } @@ -711,7 +711,7 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType { if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) { - lldebugs << "Channel chat: " << utf8_text << llendl; + LL_DEBUGS() << "Channel chat: " << utf8_text << LL_ENDL; } } diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 9ce5e12897..e0fcbb58f6 100755 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -111,7 +111,7 @@ public: virtual void deleteAllChildren() { - LL_DEBUGS("NearbyChat") << "Clearing toast pool" << llendl; + LL_DEBUGS("NearbyChat") << "Clearing toast pool" << LL_ENDL; m_toast_pool.clear(); m_active_toasts.clear(); LLScreenChannelBase::deleteAllChildren(); @@ -122,7 +122,7 @@ protected: void addToToastPool(LLToast* toast) { if (!toast) return; - LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl; + LL_DEBUGS("NearbyChat") << "Pooling toast" << LL_ENDL; toast->setVisible(FALSE); toast->stopTimer(); toast->setIsHidden(true); @@ -193,7 +193,7 @@ void LLFloaterIMNearbyChatScreenChannel::deactivateToast(LLToast* toast) return; } - LL_DEBUGS("NearbyChat") << "Deactivating toast" << llendl; + LL_DEBUGS("NearbyChat") << "Deactivating toast" << LL_ENDL; m_active_toasts.erase(pos); } @@ -204,7 +204,7 @@ void LLFloaterIMNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 tim void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool app_quitting) { - LL_DEBUGS("NearbyChat") << "Toast destroyed (app_quitting=" << app_quitting << ")" << llendl; + LL_DEBUGS("NearbyChat") << "Toast destroyed (app_quitting=" << app_quitting << ")" << LL_ENDL; if (app_quitting) { @@ -223,7 +223,7 @@ void LLFloaterIMNearbyChatScreenChannel::onToastDestroyed(LLToast* toast, bool a void LLFloaterIMNearbyChatScreenChannel::onToastFade(LLToast* toast) { - LL_DEBUGS("NearbyChat") << "Toast fading" << llendl; + LL_DEBUGS("NearbyChat") << "Toast fading" << LL_ENDL; //fade mean we put toast to toast pool if(!toast) @@ -277,7 +277,7 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() // If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352). toast->setOnToastDestroyedCallback(boost::bind(&LLFloaterIMNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); - LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl; + LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << LL_ENDL; m_toast_pool.push_back(toast->getHandle()); return true; } @@ -318,7 +318,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) if(m_toast_pool.empty()) { //"pool" is empty - create one more panel - LL_DEBUGS("NearbyChat") << "Empty pool" << llendl; + LL_DEBUGS("NearbyChat") << "Empty pool" << LL_ENDL; if(!createPoolToast())//created toast will go to pool. so next call will find it return; addChat(chat); @@ -338,7 +338,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) //take 1st element from pool, (re)initialize it, put it in active toasts - LL_DEBUGS("NearbyChat") << "Getting toast from pool" << llendl; + LL_DEBUGS("NearbyChat") << "Getting toast from pool" << LL_ENDL; LLToast* toast = m_toast_pool.back().get(); m_toast_pool.pop_back(); @@ -406,7 +406,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() LLToast* toast = it->get(); if (!toast) { - llwarns << "NULL found in the active chat toasts list!" << llendl; + LL_WARNS() << "NULL found in the active chat toasts list!" << LL_ENDL; continue; } diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 6116f693e6..af76551bd4 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -148,7 +148,7 @@ void LLFloaterIMSession::onClickCloseBtn() } else { - llwarns << "Empty session with id: " << (mSessionID.asString()) << llendl; + LL_WARNS() << "Empty session with id: " << (mSessionID.asString()) << LL_ENDL; return; } @@ -250,7 +250,7 @@ void LLFloaterIMSession::sendMsgFromInputEditor() } else { - llinfos << "Cannot send IM to everyone unless you're a god." << llendl; + LL_INFOS() << "Cannot send IM to everyone unless you're a god." << LL_ENDL; } } @@ -1159,8 +1159,8 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns << "Error inviting all agents to session [status:" - << statusNum << "]: " << content << llendl; + LL_WARNS() << "Error inviting all agents to session [status:" + << statusNum << "]: " << content << LL_ENDL; //throw something back to the viewer here? } @@ -1179,7 +1179,7 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) if( isInviteAllowed() && (count > 0) ) { - llinfos << "LLFloaterIMSession::inviteToSession() - inviting participants" << llendl; + LL_INFOS() << "LLFloaterIMSession::inviteToSession() - inviting participants" << LL_ENDL; std::string url = region->getCapability("ChatSessionRequest"); @@ -1195,9 +1195,9 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) } else { - llinfos << "LLFloaterIMSession::inviteToSession -" + LL_INFOS() << "LLFloaterIMSession::inviteToSession -" << " no need to invite agents for " - << mDialog << llendl; + << mDialog << LL_ENDL; // successful add, because everyone that needed to get added // was added. } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2194c1112a..544eee396b 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -936,7 +936,7 @@ void LLPanelLandGeneral::onClickRelease(void*) // static void LLPanelLandGeneral::onClickReclaim(void*) { - lldebugs << "LLPanelLandGeneral::onClickReclaim()" << llendl; + LL_DEBUGS() << "LLPanelLandGeneral::onClickReclaim()" << LL_ENDL; LLViewerParcelMgr::getInstance()->reclaimParcel(); } @@ -1541,8 +1541,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo if (!self) { - llwarns << "Received message for nonexistent LLPanelLandObject" - << llendl; + LL_WARNS() << "Received message for nonexistent LLPanelLandObject" + << LL_ENDL; return; } @@ -1612,8 +1612,8 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo self->mOwnerList->addNameItemRow(item_params); - lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") - << ") owns " << object_count << " objects." << llendl; + LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") + << ") owns " << object_count << " objects." << LL_ENDL; } // check for no results if (0 == self->mOwnerList->getItemCount()) @@ -1894,7 +1894,7 @@ BOOL LLPanelLandOptions::postBuild() } else { - llwarns << "LLUICtrlFactory::getTexturePickerByName() returned NULL for 'snapshot_ctrl'" << llendl; + LL_WARNS() << "LLUICtrlFactory::getTexturePickerByName() returned NULL for 'snapshot_ctrl'" << LL_ENDL; } diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index ea94dcd7b6..cf03087afb 100755 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -194,7 +194,7 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 ) { msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i); - llinfos << "Land sku: " << land_sku << llendl; + LL_INFOS() << "Land sku: " << land_sku << LL_ENDL; land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); } else diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 49ddcc7d18..0dcfdf61bb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -292,14 +292,14 @@ bool validate_face(const LLVolumeFace& face) { if (face.mIndices[i] >= face.mNumVertices) { - llwarns << "Face has invalid index." << llendl; + LL_WARNS() << "Face has invalid index." << LL_ENDL; return false; } } if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0) { - llwarns << "Face has invalid number of indices." << llendl; + LL_WARNS() << "Face has invalid number of indices." << LL_ENDL; return false; } @@ -317,7 +317,7 @@ bool validate_face(const LLVolumeFace& face) if (ll_is_degenerate(v1,v2,v3)) { - llwarns << "Degenerate face found!" << llendl; + LL_WARNS() << "Degenerate face found!" << LL_ENDL; return false; } }*/ @@ -329,7 +329,7 @@ bool validate_model(const LLModel* mdl) { if (mdl->getNumVolumeFaces() == 0) { - llwarns << "Model has no faces!" << llendl; + LL_WARNS() << "Model has no faces!" << LL_ENDL; return false; } @@ -337,13 +337,13 @@ bool validate_model(const LLModel* mdl) { if (mdl->getVolumeFace(i).mNumVertices == 0) { - llwarns << "Face has no vertices." << llendl; + LL_WARNS() << "Face has no vertices." << LL_ENDL; return false; } if (mdl->getVolumeFace(i).mNumIndices == 0) { - llwarns << "Face has no indices." << llendl; + LL_WARNS() << "Face has no indices." << LL_ENDL; return false; } @@ -362,7 +362,7 @@ BOOL stop_gloderror() if (error != GLOD_NO_ERROR) { - llwarns << "GLOD error detected, cannot generate LOD: " << std::hex << error << llendl; + LL_WARNS() << "GLOD error detected, cannot generate LOD: " << std::hex << error << LL_ENDL; return TRUE; } @@ -930,7 +930,7 @@ void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data) { if (LLConvexDecomposition::getInstance() == NULL) { - llinfos << "convex decomposition tool is a stub on this platform. cannot get decomp." << llendl; + LL_INFOS() << "convex decomposition tool is a stub on this platform. cannot get decomp." << LL_ENDL; return; } @@ -978,7 +978,7 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data) { if (!sInstance->mCurRequest.empty()) { - llinfos << "Decomposition request still pending." << llendl; + LL_INFOS() << "Decomposition request still pending." << LL_ENDL; return; } @@ -1029,13 +1029,13 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata) } else { - llwarns << "no iface" << llendl; + LL_WARNS() << "no iface" << LL_ENDL; return; } if (which_mode <= 0) { - llwarns << "which_mode out of range, " << which_mode << llendl; + LL_WARNS() << "which_mode out of range, " << which_mode << LL_ENDL; } S32 file_mode = iface->getItemCount() - 1; @@ -1120,8 +1120,8 @@ void LLFloaterModelPreview::initDecompControls() // protected against stub by stage_count being 0 for stub above LLConvexDecomposition::getInstance()->registerCallback(j, LLPhysicsDecomp::llcdCallback); - //llinfos << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << llendl; - //llinfos << "------------------------------------" << llendl; + //LL_INFOS() << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << LL_ENDL; + //LL_INFOS() << "------------------------------------" << LL_ENDL; for (S32 i = 0; i < param_count; ++i) { @@ -1135,12 +1135,12 @@ void LLFloaterModelPreview::initDecompControls() std::string type = "unknown"; - llinfos << name << " - " << description << llendl; + LL_INFOS() << name << " - " << description << LL_ENDL; if (param[i].mType == LLCDParam::LLCD_FLOAT) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mFloat); - //llinfos << "Type: float, Default: " << param[i].mDefault.mFloat << llendl; + //LL_INFOS() << "Type: float, Default: " << param[i].mDefault.mFloat << LL_ENDL; LLUICtrl* ctrl = getChild(name); @@ -1190,7 +1190,7 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_INTEGER) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue); - //llinfos << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << llendl; + //LL_INFOS() << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL; LLUICtrl* ctrl = getChild(name); @@ -1216,7 +1216,7 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_BOOLEAN) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mBool); - //llinfos << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << llendl; + //LL_INFOS() << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << LL_ENDL; LLCheckBoxCtrl* check_box = getChild(name); if (check_box) @@ -1228,16 +1228,16 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_ENUM) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue); - //llinfos << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << llendl; + //LL_INFOS() << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL; { //plug into combo box - //llinfos << "Accepted values: " << llendl; + //LL_INFOS() << "Accepted values: " << LL_ENDL; LLComboBox* combo_box = getChild(name); for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k) { - //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue - // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl; + //LL_INFOS() << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue + // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << LL_ENDL; std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName); std::string localized_name; @@ -1250,9 +1250,9 @@ void LLFloaterModelPreview::initDecompControls() combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); } - //llinfos << "----" << llendl; + //LL_INFOS() << "----" << LL_ENDL; } - //llinfos << "-----------------------------" << llendl; + //LL_INFOS() << "-----------------------------" << LL_ENDL; } } @@ -1499,14 +1499,14 @@ bool LLModelLoader::doLoadModel() if (!dom) { - llinfos<<" Error with dae - traditionally indicates a corrupt file."<getVersion(); //0=1.4 @@ -1516,7 +1516,7 @@ bool LLModelLoader::doLoadModel() { docVersion = VERSIONTYPE_COUNT; } - llinfos<<"Dae version "<getDomRoot(); if (!root) { - llwarns << "document has no root" << llendl; + LL_WARNS() << "document has no root" << LL_ENDL; return false; } @@ -1698,7 +1698,7 @@ bool LLModelLoader::doLoadModel() daeElement* pScene = root->getDescendant("visual_scene"); if ( !pScene ) { - llwarns<<"No visual scene - unable to parse bone offsets "<typeID() != domTranslate::ID() ) { - llwarns<< "The found element is not a translate node" <getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) @@ -1916,7 +1916,7 @@ bool LLModelLoader::doLoadModel() else { //Most likely an error in the asset. - llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl; + LL_WARNS()<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << LL_ENDL; } } } @@ -1944,7 +1944,7 @@ bool LLModelLoader::doLoadModel() } else { - llwarns<<"Possibly misnamed/missing joint [" < &jointListFromA } if ( !result ) { - llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl; + LL_INFOS()<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< LL_ENDL; break; } } @@ -2468,7 +2468,7 @@ bool LLModelPreview::isRigSuitableForJointPositionUpload( const std::vectorgetName() == NULL ) { - llinfos<<"Parsed node has no name "<getId() ) { - llinfos<<"Parsed node ID: "<getId()<getId()<getVertices(); if ( !pVertices ) { - llinfos<<"No vertices!"<getName() == NULL) { - llwarns << "nameless node, can't process" << llendl; + LL_WARNS() << "nameless node, can't process" << LL_ENDL; return; } - //llwarns<<"ProcessJointNode# Node:" <getName()<getName()<typeID() != domTranslate::ID() ) { - //llwarns<< "The found element is not a translate node" <( jointResolver.getElement() ); if ( pMatrix ) { - //llinfos<<"A matrix SID was however found!"<getValue(); for ( int i = 0; i < 4; i++ ) { @@ -2731,7 +2731,7 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr } else { - llwarns<< "The found element is not translate or matrix node - most likely a corrupt export!" <getAttribute("id") << "\"" << llendl; + LL_WARNS()<< "Could not find a child [" << name << "] for the element: \"" << pElement->getAttribute("id") << "\"" << LL_ENDL; return NULL; } @@ -2850,7 +2850,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement ) if (mTransform.determinant() < 0) { //negative scales are not supported - llinfos << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << llendl; + LL_INFOS() << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << LL_ENDL; badElement = true; } @@ -2880,7 +2880,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement ) } else { - llinfos<<"Unable to resolve geometry URL."< LLModel::NUM_LODS - 1) { - llwarns << "Invalid level of detail: " << lod << llendl; + LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL; assert(lod >= LLModel::LOD_IMPOSTOR && lod < LLModel::NUM_LODS); return; } @@ -3538,7 +3538,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable if (mModelLoader) { - llwarns << "Incompleted model load operation pending." << llendl; + LL_WARNS() << "Incompleted model load operation pending." << LL_ENDL; return; } @@ -3848,7 +3848,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim // Allow LoD from -1 to LLModel::LOD_PHYSICS if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1) { - llwarns << "Invalid level of detail: " << which_lod << llendl; + LL_WARNS() << "Invalid level of detail: " << which_lod << LL_ENDL; assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS); return; } @@ -4136,7 +4136,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (!validate_face(target_model->getVolumeFace(names[i]))) { - llerrs << "Invalid face generated during LOD generation." << llendl; + LL_ERRS() << "Invalid face generated during LOD generation." << LL_ENDL; } } @@ -4151,7 +4151,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (!validate_model(target_model)) { - llerrs << "Invalid model generated when creating LODs" << llendl; + LL_ERRS() << "Invalid model generated when creating LODs" << LL_ENDL; } delete [] sizes; @@ -4596,7 +4596,7 @@ void LLModelPreview::updateLodControls(S32 lod) { if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::LOD_HIGH) { - llwarns << "Invalid level of detail: " << lod << llendl; + LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL; assert(lod >= LLModel::LOD_IMPOSTOR && lod <= LLModel::LOD_HIGH); return; } @@ -4909,7 +4909,7 @@ void LLModelPreview::createPreviewAvatar( void ) } else { - llinfos<<"Failed to create preview avatar for upload model window"<("response"); LLCtrlListInterface* response_list = responses_combo->getListInterface(); const std::string& trigger = response_list->getSelectedValue().asString(); - //llinfos << trigger << llendl; + //LL_INFOS() << trigger << LL_ENDL; LLSD response = mNote->getResponseTemplate(); response[trigger] = true; diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index 0862cd2897..94bf8974bb 100755 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -207,7 +207,7 @@ void LLFloaterObjectWeights::refresh() } else { - llwarns << "Failed to get region capabilities" << llendl; + LL_WARNS() << "Failed to get region capabilities" << LL_ENDL; } } } diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 298454724b..012979508c 100755 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -207,7 +207,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) if ( LLPathingLib::getInstance() == NULL ) { setConsoleState(kConsoleStateLibraryNotImplemented); - llwarns <<"Errror: cannot find pathing library implementation."<getPermissions()); @@ -732,14 +732,14 @@ void LLFloaterProperties::onCommitPermissions() // static void LLFloaterProperties::onCommitSaleInfo() { - //llinfos << "LLFloaterProperties::onCommitSaleInfo()" << llendl; + //LL_INFOS() << "LLFloaterProperties::onCommitSaleInfo()" << LL_ENDL; updateSaleInfo(); } // static void LLFloaterProperties::onCommitSaleType() { - //llinfos << "LLFloaterProperties::onCommitSaleType()" << llendl; + //LL_INFOS() << "LLFloaterProperties::onCommitSaleType()" << LL_ENDL; updateSaleInfo(); } diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp index 3a7ca17b73..bed34abee8 100755 --- a/indra/newview/llfloaterregiondebugconsole.cpp +++ b/indra/newview/llfloaterregiondebugconsole.cpp @@ -123,8 +123,8 @@ namespace const LLSD& context, const LLSD& input) const { - llinfos << "Received response from the debug console: " - << input << llendl; + LL_INFOS() << "Received response from the debug console: " + << input << LL_ENDL; sConsoleReplySignal(input["body"].asString()); } }; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index bc8a208030..bdd97a51c8 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -280,7 +280,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) LLDispatcher::unpackMessage(msg, request, invoice, strings); if(invoice != getLastInvoice()) { - llwarns << "Mismatched Estate message: " << request << llendl; + LL_WARNS() << "Mismatched Estate message: " << request << LL_ENDL; return; } @@ -558,7 +558,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage( const LLUUID& invoice, const strings_t& strings) { - llinfos << "Sending estate request '" << request << "'" << llendl; + LL_INFOS() << "Sending estate request '" << request << "'" << LL_ENDL; msg->newMessage("EstateOwnerMessage"); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -653,7 +653,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild() void LLPanelRegionGeneralInfo::onClickKick() { - llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl; + LL_INFOS() << "LLPanelRegionGeneralInfo::onClickKick" << LL_ENDL; // this depends on the grandparent view being a floater // in order to set up floater dependency @@ -690,7 +690,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const uuid_vec_t& ids) // static void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata) { - llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl; + LL_INFOS() << "LLPanelRegionGeneralInfo::onClickKickAll" << LL_ENDL; LLNotificationsUtil::add("KickUsersFromRegion", LLSD(), LLSD(), @@ -718,7 +718,7 @@ bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const L // static void LLPanelRegionGeneralInfo::onClickMessage(void* userdata) { - llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl; + LL_INFOS() << "LLPanelRegionGeneralInfo::onClickMessage" << LL_ENDL; LLNotificationsUtil::add("MessageRegion", LLSD(), LLSD(), @@ -733,7 +733,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L std::string text = response["message"].asString(); if (text.empty()) return false; - llinfos << "Message to everyone: " << text << llendl; + LL_INFOS() << "Message to everyone: " << text << LL_ENDL; strings_t strings; // [0] grid_x, unused here // [1] grid_y, unused here @@ -760,8 +760,8 @@ public: /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "ConsoleRequestResponder error requesting mesh_rez_enabled [status:" - << status << "]: " << content << llendl; + LL_WARNS() << "ConsoleRequestResponder error requesting mesh_rez_enabled [status:" + << status << "]: " << content << LL_ENDL; } }; @@ -773,8 +773,8 @@ public: /* virtual */ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "ConsoleRequestResponder error updating mesh enabled region setting [status:" - << status << "]: " << content << llendl; + LL_WARNS() << "ConsoleRequestResponder error updating mesh enabled region setting [status:" + << status << "]: " << content << LL_ENDL; } }; @@ -806,7 +806,7 @@ void LLFloaterRegionInfo::requestMeshRezInfo() // strings[9] = 'Y' - block parcel search, 'N' - allow BOOL LLPanelRegionGeneralInfo::sendUpdate() { - llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl; + LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL; // First try using a Cap. If that fails use the old method. LLSD body; @@ -918,7 +918,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) // virtual BOOL LLPanelRegionDebugInfo::sendUpdate() { - llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl; + LL_INFOS() << "LLPanelRegionDebugInfo::sendUpdate" << LL_ENDL; strings_t strings; std::string buffer; @@ -1090,7 +1090,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() S32 width = img->getFullWidth(); S32 height = img->getFullHeight(); - //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl; + //LL_INFOS() << "texture detail " << i << " is " << width << "x" << height << "x" << components << LL_ENDL; if (components != 3) { @@ -1176,8 +1176,8 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) texture_ctrl = getChild(buffer); if(texture_ctrl) { - lldebugs << "Detail Texture " << i << ": " - << compp->getDetailTextureID(i) << llendl; + LL_DEBUGS() << "Detail Texture " << i << ": " + << compp->getDetailTextureID(i) << LL_ENDL; LLUUID tmp_id(compp->getDetailTextureID(i)); texture_ctrl->setImageAssetID(tmp_id); } @@ -1193,7 +1193,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) } else { - lldebugs << "no region set" << llendl; + LL_DEBUGS() << "no region set" << LL_ENDL; getChild("region_text")->setValue(LLSD("")); } @@ -1208,7 +1208,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) // virtual BOOL LLPanelRegionTerrainInfo::sendUpdate() { - llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl; + LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL; std::string buffer; strings_t strings; LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); @@ -1277,7 +1277,7 @@ void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data) LLFilePicker& picker = LLFilePicker::instance(); if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw")) { - llwarns << "No file" << llendl; + LL_WARNS() << "No file" << LL_ENDL; return; } std::string filepath = picker.getFirstFile(); @@ -1297,7 +1297,7 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data) LLFilePicker& picker = LLFilePicker::instance(); if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW)) { - llwarns << "No file" << llendl; + LL_WARNS() << "No file" << LL_ENDL; return; } std::string filepath = picker.getFirstFile(); @@ -2047,7 +2047,7 @@ void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) { - llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl; + LL_INFOS() << "LLPanelEstateInfo::estateUpdate()" << LL_ENDL; return false; } @@ -2147,7 +2147,7 @@ void LLPanelEstateInfo::refreshFromEstate() BOOL LLPanelEstateInfo::sendUpdate() { - llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl; + LL_INFOS() << "LLPanelEsateInfo::sendUpdate()" << LL_ENDL; LLNotification::Params params("ChangeLindenEstate"); params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); @@ -2242,7 +2242,7 @@ public: // if we get a normal response, handle it here virtual void result(const LLSD& content) { - LL_INFOS("Windlight") << "Successfully committed estate info" << llendl; + LL_INFOS("Windlight") << "Successfully committed estate info" << LL_ENDL; // refresh the panel from the database LLPanelEstateInfo* panel = dynamic_cast(mpPanel.get()); @@ -2253,8 +2253,8 @@ public: // if we get an error response virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llinfos << "LLEstateChangeInfoResponder::error [status:" - << status << "]: " << content << llendl; + LL_INFOS() << "LLEstateChangeInfoResponder::error [status:" + << status << "]: " << content << LL_ENDL; } private: LLHandle mpPanel; @@ -2289,7 +2289,7 @@ void LLPanelEstateInfo::clearAccessLists() // static void LLPanelEstateInfo::onClickMessageEstate(void* userdata) { - llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl; + LL_INFOS() << "LLPanelEstateInfo::onClickMessageEstate" << LL_ENDL; LLNotificationsUtil::add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2)); } @@ -2299,7 +2299,7 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re std::string text = response["message"].asString(); if(option != 0) return false; if(text.empty()) return false; - llinfos << "Message to everyone: " << text << llendl; + LL_INFOS() << "Message to everyone: " << text << LL_ENDL; strings_t strings; //integers_t integers; std::string name; @@ -2376,7 +2376,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) // virtual bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) { - llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl; + LL_INFOS() << "LLPanelEstateCovenant::estateUpdate()" << LL_ENDL; return true; } @@ -2510,7 +2510,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; + LL_INFOS() << "LLPanelEstateCovenant::onLoadComplete()" << LL_ENDL; LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; if( panelp ) { @@ -2529,7 +2529,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, { if( !panelp->mEditor->importBuffer( &buffer[0], file_length+1 ) ) { - llwarns << "Problem importing estate covenant." << llendl; + LL_WARNS() << "Problem importing estate covenant." << LL_ENDL; LLNotificationsUtil::add("ProblemImportingEstateCovenant"); } else @@ -2559,7 +2559,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, LLNotificationsUtil::add("UnableToLoadNotecardAsset"); } - llwarns << "Problem loading notecard: " << status << llendl; + LL_WARNS() << "Problem loading notecard: " << status << LL_ENDL; } panelp->mAssetStatus = ASSET_LOADED; panelp->setCovenantID(asset_uuid); @@ -2681,7 +2681,7 @@ bool LLDispatchEstateUpdateInfo::operator()( const LLUUID& invoice, const sparam_t& strings) { - lldebugs << "Received estate update" << llendl; + LL_DEBUGS() << "Received estate update" << LL_ENDL; // Update estate info model. // This will call LLPanelEstateInfo::refreshFromEstate(). @@ -2723,22 +2723,22 @@ bool LLDispatchSetEstateAccess::operator()( if (num_allowed_agents > 0 && !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS)) { - llwarns << "non-zero count for allowed agents, but no corresponding flag" << llendl; + LL_WARNS() << "non-zero count for allowed agents, but no corresponding flag" << LL_ENDL; } if (num_allowed_groups > 0 && !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS)) { - llwarns << "non-zero count for allowed groups, but no corresponding flag" << llendl; + LL_WARNS() << "non-zero count for allowed groups, but no corresponding flag" << LL_ENDL; } if (num_banned_agents > 0 && !(access_flags & ESTATE_ACCESS_BANNED_AGENTS)) { - llwarns << "non-zero count for banned agents, but no corresponding flag" << llendl; + LL_WARNS() << "non-zero count for banned agents, but no corresponding flag" << LL_ENDL; } if (num_estate_managers > 0 && !(access_flags & ESTATE_ACCESS_MANAGERS)) { - llwarns << "non-zero count for managers, but no corresponding flag" << llendl; + LL_WARNS() << "non-zero count for managers, but no corresponding flag" << LL_ENDL; } // grab the UUID's out of the string fields @@ -3044,7 +3044,7 @@ void LLPanelEnvironmentInfo::fixEstateSun() LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); if (estate_info.getUseFixedSun()) { - llinfos << "Switching estate to global sun" << llendl; + LL_INFOS() << "Switching estate to global sun" << LL_ENDL; estate_info.setUseFixedSun(false); estate_info.sendEstateInfo(); } @@ -3185,7 +3185,7 @@ bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params) LLWaterParamSet param_set; if (!LLWaterParamManager::instance().getParamSet(water_key.name, param_set)) { - llwarns << "Error getting water preset: " << water_key.name << llendl; + LL_WARNS() << "Error getting water preset: " << water_key.name << LL_ENDL; return false; } @@ -3204,7 +3204,7 @@ bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string& LLWLParamSet param_set; if (!LLWLParamManager::instance().getParamSet(preset, param_set)) { - llwarns << "Error getting sky params: " << preset.toLLSD() << llendl; + LL_WARNS() << "Error getting sky params: " << preset.toLLSD() << LL_ENDL; return false; } @@ -3229,7 +3229,7 @@ bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sk { if (!LLDayCycleManager::instance().getPreset(dc.name, day_cycle)) { - llwarns << "Error getting day cycle " << dc.name << llendl; + LL_WARNS() << "Error getting day cycle " << dc.name << LL_ENDL; return false; } @@ -3396,7 +3396,7 @@ void LLPanelEnvironmentInfo::onBtnApply() new_region_settings.saveParams(day_cycle, sky_map, water_params, 0.0f); if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings)) { - llwarns << "Error applying region environment settings" << llendl; + LL_WARNS() << "Error applying region environment settings" << LL_ENDL; return; } diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index b42118a0c1..825159703c 100755 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -460,7 +460,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) { if (COMPLAINT_REPORT != report_type) { - llwarns << "Unknown LLViewerReporter type : " << report_type << llendl; + LL_WARNS() << "Unknown LLViewerReporter type : " << report_type << LL_ENDL; return; } @@ -746,7 +746,7 @@ void LLFloaterReporter::takeScreenshot() LLPointer raw = new LLImageRaw; if( !gViewerWindow->rawSnapshot(raw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE, FALSE)) { - llwarns << "Unable to take screenshot" << llendl; + LL_WARNS() << "Unable to take screenshot" << LL_ENDL; return; } LLPointer upload_data = LLViewerTextureList::convertToUploadFile(raw); @@ -765,7 +765,7 @@ void LLFloaterReporter::takeScreenshot() } else { - llwarns << "Unknown LLFloaterReporter type" << llendl; + LL_WARNS() << "Unknown LLFloaterReporter type" << LL_ENDL; } mResourceDatap->mAssetInfo.mCreatorID = gAgentID; mResourceDatap->mAssetInfo.setName("screenshot_name"); @@ -796,11 +796,11 @@ void LLFloaterReporter::takeScreenshot() void LLFloaterReporter::uploadImage() { - llinfos << "*** Uploading: " << llendl; - llinfos << "Type: " << LLAssetType::lookup(mResourceDatap->mAssetInfo.mType) << llendl; - llinfos << "UUID: " << mResourceDatap->mAssetInfo.mUuid << llendl; - llinfos << "Name: " << mResourceDatap->mAssetInfo.getName() << llendl; - llinfos << "Desc: " << mResourceDatap->mAssetInfo.getDescription() << llendl; + LL_INFOS() << "*** Uploading: " << LL_ENDL; + LL_INFOS() << "Type: " << LLAssetType::lookup(mResourceDatap->mAssetInfo.mType) << LL_ENDL; + LL_INFOS() << "UUID: " << mResourceDatap->mAssetInfo.mUuid << LL_ENDL; + LL_INFOS() << "Name: " << mResourceDatap->mAssetInfo.getName() << LL_ENDL; + LL_INFOS() << "Desc: " << mResourceDatap->mAssetInfo.getDescription() << LL_ENDL; gAssetStorage->storeAssetData(mResourceDatap->mAssetInfo.mTransactionID, mResourceDatap->mAssetInfo.mType, @@ -824,20 +824,20 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, std::string err_msg("There was a problem uploading a report screenshot"); err_msg += " due to the following reason: " + args["REASON"].asString(); - llwarns << err_msg << llendl; + LL_WARNS() << err_msg << LL_ENDL; return; } if (data->mPreferredLocation != LLResourceData::INVALID_LOCATION) { - llwarns << "Unknown report type : " << data->mPreferredLocation << llendl; + LL_WARNS() << "Unknown report type : " << data->mPreferredLocation << LL_ENDL; } LLFloaterReporter *self = LLFloaterReg::findTypedInstance("reporter"); if (self) { self->mScreenID = uuid; - llinfos << "Got screen shot " << uuid << llendl; + LL_INFOS() << "Got screen shot " << uuid << LL_ENDL; self->sendReportViaLegacy(self->gatherReport()); self->closeFloater(); } diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 13cb3c2eb0..2ed7bb842d 100755 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -58,7 +58,7 @@ // debug switches, won't work in release #ifndef LL_RELEASE_FOR_DOWNLOAD -// dump responder replies to llinfos for debugging +// dump responder replies to LL_INFOS() for debugging //#define DUMP_REPLIES_TO_LLINFOS #ifdef DUMP_REPLIES_TO_LLINFOS @@ -106,7 +106,7 @@ BOOL LLFloaterScriptLimits::postBuild() if(!mTab) { - llwarns << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << llendl; + LL_WARNS() << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << LL_ENDL; return FALSE; } @@ -195,7 +195,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content) OSMessageBox(nice_llsd.str(), "main cap response:", 0); - llinfos << "main cap response:" << content << llendl; + LL_INFOS() << "main cap response:" << content << LL_ENDL; #endif @@ -210,7 +210,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content) LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance("script_limits"); if(!instance) { - llwarns << "Failed to get llfloaterscriptlimits instance" << llendl; + LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL; } } @@ -223,7 +223,7 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content) void fetchScriptLimitsRegionInfoResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << content << LL_ENDL; } void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref) @@ -277,14 +277,14 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref) OSMessageBox(nice_llsd.str(), "summary response:", 0); - llwarns << "summary response:" << *content << llendl; + LL_WARNS() << "summary response:" << *content << LL_ENDL; #endif LLFloaterScriptLimits* instance = LLFloaterReg::getTypedInstance("script_limits"); if(!instance) { - llwarns << "Failed to get llfloaterscriptlimits instance" << llendl; + LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL; } else { @@ -310,7 +310,7 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref) void fetchScriptLimitsRegionSummaryResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << content << LL_ENDL; } void fetchScriptLimitsRegionDetailsResponder::result(const LLSD& content_ref) @@ -385,7 +385,7 @@ result (map) OSMessageBox(nice_llsd.str(), "details response:", 0); - llinfos << "details response:" << content << llendl; + LL_INFOS() << "details response:" << content << LL_ENDL; #endif @@ -393,7 +393,7 @@ result (map) if(!instance) { - llwarns << "Failed to get llfloaterscriptlimits instance" << llendl; + LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL; } else { @@ -407,19 +407,19 @@ result (map) } else { - llwarns << "Failed to get scriptlimits memory panel" << llendl; + LL_WARNS() << "Failed to get scriptlimits memory panel" << LL_ENDL; } } else { - llwarns << "Failed to get scriptlimits_panels" << llendl; + LL_WARNS() << "Failed to get scriptlimits_panels" << LL_ENDL; } } } void fetchScriptLimitsRegionDetailsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << content << LL_ENDL; } void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref) @@ -473,7 +473,7 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref) OSMessageBox(nice_llsd.str(), "attachment response:", 0); - llinfos << "attachment response:" << content << llendl; + LL_INFOS() << "attachment response:" << content << LL_ENDL; #endif @@ -481,7 +481,7 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref) if(!instance) { - llwarns << "Failed to get llfloaterscriptlimits instance" << llendl; + LL_WARNS() << "Failed to get llfloaterscriptlimits instance" << LL_ENDL; } else { @@ -503,19 +503,19 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref) } else { - llwarns << "Failed to get script_limits_my_avatar_panel" << llendl; + LL_WARNS() << "Failed to get script_limits_my_avatar_panel" << LL_ENDL; } } else { - llwarns << "Failed to get scriptlimits_panels" << llendl; + LL_WARNS() << "Failed to get scriptlimits_panels" << LL_ENDL; } } } void fetchScriptLimitsAttachmentInfoResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << content << LL_ENDL; } ///---------------------------------------------------------------------------- @@ -588,7 +588,7 @@ void LLPanelScriptLimitsRegionMemory::setParcelID(const LLUUID& parcel_id) // virtual void LLPanelScriptLimitsRegionMemory::setErrorStatus(U32 status, const std::string& reason) { - llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<getName() - << " does not support RemoteParcelRequest" << llendl; + << " does not support RemoteParcelRequest" << LL_ENDL; std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestError"); getChild("loading_text")->setValue(LLSD(msg_waiting)); @@ -990,7 +990,7 @@ void LLPanelScriptLimitsRegionMemory::onClickRefresh(void* userdata) } else { - llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl; + LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << LL_ENDL; return; } } @@ -1036,7 +1036,7 @@ void LLPanelScriptLimitsRegionMemory::onClickHighlight(void* userdata) } else { - llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; + LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << LL_ENDL; return; } } @@ -1141,7 +1141,7 @@ void LLPanelScriptLimitsRegionMemory::onClickReturn(void* userdata) } else { - llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << llendl; + LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after highlight button clicked" << LL_ENDL; return; } } @@ -1273,7 +1273,7 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content) } else { - llwarns << "attachment details don't contain memory summary info" << llendl; + LL_WARNS() << "attachment details don't contain memory summary info" << LL_ENDL; return; } @@ -1291,7 +1291,7 @@ void LLPanelScriptLimitsAttachment::setAttachmentSummary(LLSD content) } else { - llwarns << "attachment details don't contain urls summary info" << llendl; + LL_WARNS() << "attachment details don't contain urls summary info" << LL_ENDL; return; } @@ -1343,7 +1343,7 @@ void LLPanelScriptLimitsAttachment::onClickRefresh(void* userdata) } else { - llwarns << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << llendl; + LL_WARNS() << "could not find LLPanelScriptLimitsRegionMemory instance after refresh button clicked" << LL_ENDL; return; } } diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 07f5220ab7..fb202b4c40 100755 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -194,8 +194,8 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) { - llwarns << "Could not find all desired controls by name" - << llendl; + LL_WARNS() << "Could not find all desired controls by name" + << LL_ENDL; return; } diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index 491723471f..e3c77ab9a6 100755 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -74,7 +74,7 @@ public: T* panel = dynamic_cast(getPanel(floater_name, panel_name)); if (!panel) { - llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; + LL_WARNS() << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << LL_ENDL; } return panel; } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 285f52fcd6..7e6bf4cd7e 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -328,7 +328,7 @@ F32 LLSnapshotLivePreview::getImageAspect() void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay) { // Invalidate current image. - lldebugs << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << llendl; + LL_DEBUGS() << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL; if (getSnapshotUpToDate()) { S32 old_image_index = mCurImageIndex; @@ -501,7 +501,7 @@ void LLSnapshotLivePreview::draw() } else if (mShineAnimTimer.getStarted()) { - lldebugs << "Drawing shining animation" << llendl; + LL_DEBUGS() << "Drawing shining animation" << LL_ENDL; F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME); // draw "shine" effect @@ -578,7 +578,7 @@ void LLSnapshotLivePreview::draw() S32 old_image_index = (mCurImageIndex + 1) % 2; if (mViewerImage[old_image_index].notNull() && mFallAnimTimer.getElapsedTimeF32() < FALL_TIME) { - lldebugs << "Drawing fall animation" << llendl; + LL_DEBUGS() << "Drawing fall animation" << LL_ENDL; F32 fall_interp = mFallAnimTimer.getElapsedTimeF32() / FALL_TIME; F32 alpha = clamp_rescale(fall_interp, 0.f, 1.f, 0.8f, 0.4f); LLColor4 image_color(1.f, 1.f, 1.f, alpha); @@ -622,7 +622,7 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare LLView::reshape(width, height, called_from_parent); if (old_rect.getWidth() != width || old_rect.getHeight() != height) { - lldebugs << "window reshaped, updating thumbnail" << llendl; + LL_DEBUGS() << "window reshaped, updating thumbnail" << LL_ENDL; updateSnapshot(FALSE, TRUE); } } @@ -755,7 +755,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview; if (previewp->getWidth() == 0 || previewp->getHeight() == 0) { - llwarns << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << llendl; + LL_WARNS() << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << LL_ENDL; return FALSE; } @@ -769,7 +769,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mCameraRot = new_camera_rot; // request a new snapshot whenever the camera moves, with a time delay BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot"); - lldebugs << "camera moved, updating thumbnail" << llendl; + LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL; previewp->updateSnapshot( autosnap, // whether a new snapshot is needed or merely invalidate the existing one FALSE, // or if 1st arg is false, whether to produce a new thumbnail image. @@ -788,7 +788,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // time to produce a snapshot previewp->setThumbnailImageSize(); - lldebugs << "producing snapshot" << llendl; + LL_DEBUGS() << "producing snapshot" << LL_ENDL; if (!previewp->mPreviewImage) { previewp->mPreviewImage = new LLImageRaw; @@ -824,7 +824,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE) { - lldebugs << "Encoding new image of format J2C" << llendl; + LL_DEBUGS() << "Encoding new image of format J2C" << LL_ENDL; LLPointer formatted = new LLImageJ2C; LLPointer scaled = new LLImageRaw( previewp->mPreviewImage->getData(), @@ -846,7 +846,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mFormattedImage = NULL; // now create the new one of the appropriate format. LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotFormat(); - lldebugs << "Encoding new image of format " << format << llendl; + LL_DEBUGS() << "Encoding new image of format " << format << LL_ENDL; switch(format) { @@ -926,7 +926,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) { previewp->generateThumbnailImage() ; } - lldebugs << "done creating snapshot" << llendl; + LL_DEBUGS() << "done creating snapshot" << LL_ENDL; LLFloaterSnapshot::postUpdate(); return TRUE; @@ -934,7 +934,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) void LLSnapshotLivePreview::setSize(S32 w, S32 h) { - lldebugs << "setSize(" << w << ", " << h << ")" << llendl; + LL_DEBUGS() << "setSize(" << w << ", " << h << ")" << LL_ENDL; setWidth(w); setHeight(h); } @@ -947,7 +947,7 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const void LLSnapshotLivePreview::saveTexture() { - lldebugs << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << llendl; + LL_DEBUGS() << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << LL_ENDL; // gen a new uuid for this asset LLTransactionID tid; tid.generate(); @@ -960,7 +960,7 @@ void LLSnapshotLivePreview::saveTexture() mPreviewImage->getComponents()); scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE); - lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl; + LL_DEBUGS() << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << LL_ENDL; if (formatted->encode(scaled, 0.0f)) { @@ -989,7 +989,7 @@ void LLSnapshotLivePreview::saveTexture() else { LLNotificationsUtil::add("ErrorEncodingSnapshot"); - llwarns << "Error encoding snapshot" << llendl; + LL_WARNS() << "Error encoding snapshot" << LL_ENDL; } add(LLStatViewer::SNAPSHOT, 1); @@ -1015,7 +1015,7 @@ void LLSnapshotLivePreview::saveWeb() LLImageJPEG* jpg = dynamic_cast(mFormattedImage.get()); if(!jpg) { - llwarns << "Formatted image not a JPEG" << llendl; + LL_WARNS() << "Formatted image not a JPEG" << LL_ENDL; return; } @@ -1353,13 +1353,13 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) if (width_ctrl->getValue().asInteger() == 0) { S32 w = gViewerWindow->getWindowWidthRaw(); - lldebugs << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << llendl; + LL_DEBUGS() << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << LL_ENDL; width_ctrl->setValue(w); } if (height_ctrl->getValue().asInteger() == 0) { S32 h = gViewerWindow->getWindowHeightRaw(); - lldebugs << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << llendl; + LL_DEBUGS() << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << LL_ENDL; height_ctrl->setValue(h); } @@ -1394,7 +1394,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards - lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; + LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL; LLLocale locale(LLLocale::USER_LOCALE); std::string bytes_string; @@ -1458,7 +1458,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) info["have-snapshot"] = got_snap; current_panel->updateControls(info); } - lldebugs << "finished updating controls" << llendl; + LL_DEBUGS() << "finished updating controls" << LL_ENDL; } // static @@ -1505,7 +1505,7 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, if (previewp) { BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot"); - lldebugs << "updating " << (autosnap ? "snapshot" : "thumbnail") << llendl; + LL_DEBUGS() << "updating " << (autosnap ? "snapshot" : "thumbnail") << LL_ENDL; previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); } } @@ -1518,7 +1518,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data) if (previewp && view) { view->impl.setStatus(Impl::STATUS_READY); - lldebugs << "updating snapshot" << llendl; + LL_DEBUGS() << "updating snapshot" << LL_ENDL; previewp->updateSnapshot(TRUE); } } @@ -1595,7 +1595,7 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL previewp->getSize(w, h) ; updateSpinners(view, previewp, w, h, TRUE); // may change w and h - lldebugs << "updating thumbnail" << llendl; + LL_DEBUGS() << "updating thumbnail" << LL_ENDL; previewp->setSize(w, h) ; previewp->updateSnapshot(FALSE, TRUE); checkAutoSnapshot(previewp, TRUE); @@ -1731,7 +1731,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL if (width == 0 || height == 0) { // take resolution from current window size - lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL; previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); } else if (width == -1 || height == -1) @@ -1741,7 +1741,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL LLPanelSnapshot* spanel = getActivePanel(view); if (spanel) { - lldebugs << "Loading typed res from panel " << spanel->getName() << llendl; + LL_DEBUGS() << "Loading typed res from panel " << spanel->getName() << LL_ENDL; new_width = spanel->getTypedPreviewWidth(); new_height = spanel->getTypedPreviewHeight(); @@ -1754,8 +1754,8 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL } else { - lldebugs << "No custom res chosen, setting preview res from window: " - << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + LL_DEBUGS() << "No custom res chosen, setting preview res from window: " + << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL; new_width = gViewerWindow->getWindowWidthRaw(); new_height = gViewerWindow->getWindowHeightRaw(); } @@ -1766,7 +1766,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL else { // use the resolution from the selected pre-canned drop-down choice - lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; + LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL; previewp->setSize(width, height); } @@ -1794,11 +1794,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL // hide old preview as the aspect ratio could be wrong checkAutoSnapshot(previewp, FALSE); - lldebugs << "updating thumbnail" << llendl; + LL_DEBUGS() << "updating thumbnail" << LL_ENDL; getPreviewView(view)->updateSnapshot(FALSE, TRUE); if(do_update) { - lldebugs << "Will update controls" << llendl; + LL_DEBUGS() << "Will update controls" << LL_ENDL; updateControls(view); setNeedRefresh(view, true); } @@ -1841,7 +1841,7 @@ void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshot* view) if (view) { gSavedSettings.setS32("SnapshotFormat", getImageFormat(view)); - lldebugs << "image format changed, updating snapshot" << llendl; + LL_DEBUGS() << "image format changed, updating snapshot" << LL_ENDL; getPreviewView(view)->updateSnapshot(TRUE); updateControls(view); setNeedRefresh(view, false); // we're refreshing @@ -1924,7 +1924,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32 { bool need_refresh = false; - lldebugs << "applyCustomResolution(" << w << ", " << h << ")" << llendl; + LL_DEBUGS() << "applyCustomResolution(" << w << ", " << h << ")" << LL_ENDL; if (!view) return; LLSnapshotLivePreview* previewp = getPreviewView(view); @@ -1942,7 +1942,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32 previewp->setSize(w,h); checkAutoSnapshot(previewp, FALSE); - lldebugs << "applied custom resolution, updating thumbnail" << llendl; + LL_DEBUGS() << "applied custom resolution, updating thumbnail" << LL_ENDL; previewp->updateSnapshot(FALSE, TRUE); comboSetCustom(view, "profile_size_combo"); comboSetCustom(view, "postcard_size_combo"); @@ -2157,7 +2157,7 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(this); if(preview) { - lldebugs << "opened, updating snapshot" << llendl; + LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL; preview->updateSnapshot(TRUE); } focusFirstItem(FALSE); @@ -2239,7 +2239,7 @@ void LLFloaterSnapshot::update() return; BOOL changed = FALSE; - lldebugs << "npreviews: " << LLSnapshotLivePreview::sList.size() << llendl; + LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL; for (std::set::iterator iter = LLSnapshotLivePreview::sList.begin(); iter != LLSnapshotLivePreview::sList.end(); ++iter) { @@ -2247,7 +2247,7 @@ void LLFloaterSnapshot::update() } if(changed) { - lldebugs << "changed" << llendl; + LL_DEBUGS() << "changed" << LL_ENDL; inst->impl.updateControls(inst); } } @@ -2261,7 +2261,7 @@ LLFloaterSnapshot* LLFloaterSnapshot::getInstance() // static void LLFloaterSnapshot::saveTexture() { - lldebugs << "saveTexture" << llendl; + LL_DEBUGS() << "saveTexture" << LL_ENDL; // FIXME: duplicated code LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot"); @@ -2283,7 +2283,7 @@ void LLFloaterSnapshot::saveTexture() // static BOOL LLFloaterSnapshot::saveLocal() { - lldebugs << "saveLocal" << llendl; + LL_DEBUGS() << "saveLocal" << LL_ENDL; // FIXME: duplicated code LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance("snapshot"); if (!instance) @@ -2384,7 +2384,7 @@ LLPointer LLFloaterSnapshot::getImageData() LLPointer img = previewp->getFormattedImage(); if (!img.get()) { - llwarns << "Empty snapshot image data" << llendl; + LL_WARNS() << "Empty snapshot image data" << LL_ENDL; llassert(img.get() != NULL); } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 14923eec3c..159a31d743 100755 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -266,7 +266,7 @@ BOOL LLFloaterTools::postBuild() found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t])); mButtons.push_back( found ); }else{ - llwarns << "Tool button not found! DOA Pending." << llendl; + LL_WARNS() << "Tool button not found! DOA Pending." << LL_ENDL; } } mCheckCopySelection = getChild("checkbox copy selection"); @@ -500,7 +500,7 @@ void LLFloaterTools::refresh() } else { - llwarns << "Failed to get selected object" << llendl; + LL_WARNS() << "Failed to get selected object" << LL_ENDL; } } @@ -1095,7 +1095,7 @@ void LLFloaterTools::setTool(const LLSD& user_data) else if (control_name == "Land" ) LLToolMgr::getInstance()->getCurrentToolset()->selectTool( (LLTool *) LLToolSelectLand::getInstance()); else - llwarns<<" no parameter name "<getSelectedItemLabel(1); // get the file name of the currently-selected floater if (file_name.empty()) // if no item is selected { - llwarns << "No file selected" << llendl; + LL_WARNS() << "No file selected" << LL_ENDL; return; // ignore click } file_path = getLocalizedDirectory() + file_name; @@ -1268,8 +1268,8 @@ void LLFloaterUIPreview::highlightChangedElements() // if we still didn't find it... if(NULL == element) { - llinfos << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName << - "\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << llendl; + LL_INFOS() << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName << + "\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << LL_ENDL; failed = TRUE; break; } diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 3fe2518de6..bc445caa39 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -186,7 +186,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height) width + getRect().getWidth() - browser_rect.getWidth(), height + getRect().getHeight() - browser_rect.getHeight()); - lldebugs << "geometry change: " << geom << llendl; + LL_DEBUGS() << "geometry change: " << geom << LL_ENDL; LLRect new_rect; getParent()->screenRectToLocal(geom, &new_rect); @@ -196,7 +196,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height) // static void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p) { - lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl; + LL_DEBUGS() << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << LL_ENDL; if (!p.id.isProvided()) { @@ -215,11 +215,11 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p) // and close the least recently opened one if this will put us over the limit. LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class); - lldebugs << "total instance count is " << instances.size() << llendl; + LL_DEBUGS() << "total instance count is " << instances.size() << LL_ENDL; for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++) { - lldebugs << " " << (*iter)->getKey()["target"] << llendl; + LL_DEBUGS() << " " << (*iter)->getKey()["target"] << LL_ENDL; } if(instances.size() >= (size_t)browser_window_limit) diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp index c41f6f148f..a46f1d8af2 100755 --- a/indra/newview/llfloaterwebprofile.cpp +++ b/indra/newview/llfloaterwebprofile.cpp @@ -47,11 +47,11 @@ void LLFloaterWebProfile::onOpen(const LLSD& key) // virtual void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user) { - lldebugs << "handleReshape: " << new_rect << llendl; + LL_DEBUGS() << "handleReshape: " << new_rect << LL_ENDL; if (by_user && !isMinimized()) { - lldebugs << "Storing new rect" << llendl; + LL_DEBUGS() << "Storing new rect" << LL_ENDL; gSavedSettings.setRect("WebProfileFloaterRect", new_rect); } @@ -68,7 +68,7 @@ LLFloater* LLFloaterWebProfile::create(const LLSD& key) void LLFloaterWebProfile::applyPreferredRect() { const LLRect preferred_rect = gSavedSettings.getRect("WebProfileFloaterRect"); - lldebugs << "Applying preferred rect: " << preferred_rect << llendl; + LL_DEBUGS() << "Applying preferred rect: " << preferred_rect << LL_ENDL; // Don't override position that may have been set by floater stacking code. LLRect new_rect = getRect(); diff --git a/indra/newview/llfollowcam.cpp b/indra/newview/llfollowcam.cpp index 3110d0391f..612afc0d18 100755 --- a/indra/newview/llfollowcam.cpp +++ b/indra/newview/llfollowcam.cpp @@ -876,12 +876,12 @@ bool LLFollowCamMgr::isScriptedCameraSource(const LLUUID& source) void LLFollowCamMgr::dump() { S32 param_count = 0; - llinfos << "Scripted camera active stack" << llendl; + LL_INFOS() << "Scripted camera active stack" << LL_ENDL; for (param_stack_t::iterator param_it = sParamStack.begin(); param_it != sParamStack.end(); ++param_it) { - llinfos << param_count++ << + LL_INFOS() << param_count++ << " rot_limit: " << (*param_it)->getBehindnessAngle() << " rot_lag: " << (*param_it)->getBehindnessLag() << " distance: " << (*param_it)->getDistance() << @@ -894,7 +894,7 @@ void LLFollowCamMgr::dump() " pos: " << (*param_it)->getPosition() << " pos_lag: " << (*param_it)->getPositionLag() << " pos_lock: " << ((*param_it)->getPositionLocked() ? "Y" : "N") << - " pos_thresh: " << (*param_it)->getPositionThreshold() << llendl; + " pos_thresh: " << (*param_it)->getPositionThreshold() << LL_ENDL; } } diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 1771a8f491..6566ef5dca 100755 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -172,14 +172,14 @@ LLFriendCardsManager::~LLFriendCardsManager() void LLFriendCardsManager::putAvatarData(const LLUUID& avatarID) { - llinfos << "Store avatar data, avatarID: " << avatarID << llendl; + LL_INFOS() << "Store avatar data, avatarID: " << avatarID << LL_ENDL; std::pair< avatar_uuid_set_t::iterator, bool > pr; pr = mBuddyIDSet.insert(avatarID); if (pr.second == false) { - llwarns << "Trying to add avatar UUID for the stored avatar: " + LL_WARNS() << "Trying to add avatar UUID for the stored avatar: " << avatarID - << llendl; + << LL_ENDL; } } @@ -189,7 +189,7 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID) avatar_uuid_set_t::iterator it = mBuddyIDSet.find(avatarID); if (mBuddyIDSet.end() == it) { - llwarns << "Call method for non-existent avatar name in the map: " << avatarID << llendl; + LL_WARNS() << "Call method for non-existent avatar name in the map: " << avatarID << LL_ENDL; } else { @@ -431,7 +431,7 @@ void LLFriendCardsManager::ensureFriendsFolderExists() { LLViewerInventoryCategory* cat = gInventory.getCategory(calling_cards_folder_ID); std::string cat_name = cat ? cat->getName() : "unknown"; - llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; + LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL; } friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID, @@ -462,7 +462,7 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists() { LLViewerInventoryCategory* cat = gInventory.getCategory(friends_folder_ID); std::string cat_name = cat ? cat->getName() : "unknown"; - llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; + LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL; } friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID, @@ -507,7 +507,7 @@ void LLFriendCardsManager::syncFriendsFolder() // 2. Add missing Friend Cards for friends LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); - llinfos << "try to build friends, count: " << all_buddies.size() << llendl; + LL_INFOS() << "try to build friends, count: " << all_buddies.size() << LL_ENDL; for(; buddy_it != all_buddies.end(); ++buddy_it) { const LLUUID& buddy_id = (*buddy_it).first; @@ -535,26 +535,26 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) LLAvatarNameCache::get(avatarID, &av_name); const std::string& name = av_name.getAccountName(); - lldebugs << "Processing buddy name: " << name + LL_DEBUGS() << "Processing buddy name: " << name << ", id: " << avatarID - << llendl; + << LL_ENDL; if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull()) { shouldBeAdded = false; - lldebugs << "is found in Inventory: " << name << llendl; + LL_DEBUGS() << "is found in Inventory: " << name << LL_ENDL; } if (shouldBeAdded && isAvatarDataStored(avatarID)) { shouldBeAdded = false; - lldebugs << "is found in sentRequests: " << name << llendl; + LL_DEBUGS() << "is found in sentRequests: " << name << LL_ENDL; } if (shouldBeAdded) { putAvatarData(avatarID); - lldebugs << "Sent create_inventory_item for " << avatarID << ", " << name << llendl; + LL_DEBUGS() << "Sent create_inventory_item for " << avatarID << ", " << name << LL_ENDL; // TODO: mantipov: Is CreateFriendCardCallback really needed? Probably not LLPointer cb = new CreateFriendCardCallback; diff --git a/indra/newview/llgesturelistener.cpp b/indra/newview/llgesturelistener.cpp index 2fff506681..6fd749d83e 100755 --- a/indra/newview/llgesturelistener.cpp +++ b/indra/newview/llgesturelistener.cpp @@ -101,12 +101,12 @@ void LLGestureListener::isGesturePlaying(const LLSD& event_data) const } else { - llwarns << "isGesturePlaying did not find a gesture object for " << gesture_id << llendl; + LL_WARNS() << "isGesturePlaying did not find a gesture object for " << gesture_id << LL_ENDL; } } else { - llwarns << "isGesturePlaying didn't have 'id' value passed in" << llendl; + LL_WARNS() << "isGesturePlaying didn't have 'id' value passed in" << LL_ENDL; } LLSD reply = LLSD::emptyMap(); @@ -148,12 +148,12 @@ void LLGestureListener::startOrStopGesture(LLSD const & event_data, bool start) } else { - llwarns << "startOrStopGesture did not find a gesture object for " << gesture_id << llendl; + LL_WARNS() << "startOrStopGesture did not find a gesture object for " << gesture_id << LL_ENDL; } } else { - llwarns << "startOrStopGesture didn't have 'id' value passed in" << llendl; + LL_WARNS() << "startOrStopGesture didn't have 'id' value passed in" << LL_ENDL; } } diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 876db96085..0b10fbb03f 100755 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -257,19 +257,19 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id, if( !gAssetStorage ) { - llwarns << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << llendl; + LL_WARNS() << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << LL_ENDL; return; } // If gesture is already active, nothing to do. if (isGestureActive(item_id)) { - llwarns << "Tried to loadGesture twice " << item_id << llendl; + LL_WARNS() << "Tried to loadGesture twice " << item_id << LL_ENDL; return; } // if (asset_id.isNull()) // { -// llwarns << "loadGesture() - gesture has no asset" << llendl; +// LL_WARNS() << "loadGesture() - gesture has no asset" << LL_ENDL; // return; // } @@ -305,7 +305,7 @@ void LLGestureMgr::deactivateGesture(const LLUUID& item_id) item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) { - llwarns << "deactivateGesture for inactive gesture " << item_id << llendl; + LL_WARNS() << "deactivateGesture for inactive gesture " << item_id << LL_ENDL; return; } @@ -469,7 +469,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) { - llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; + LL_WARNS() << "replaceGesture for inactive gesture " << base_item_id << LL_ENDL; return; } @@ -511,7 +511,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id); if (it == mActive.end()) { - llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; + LL_WARNS() << "replaceGesture for inactive gesture " << base_item_id << LL_ENDL; return; } @@ -586,7 +586,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) } default: { - llwarns << "Unknown gesture step type: " << step->getType() << llendl; + LL_WARNS() << "Unknown gesture step type: " << step->getType() << LL_ENDL; } } } @@ -907,8 +907,8 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_ANIM_SECS) { // we've waited too long for an animation - llinfos << "Waited too long for animations to stop, continuing gesture." - << llendl; + LL_INFOS() << "Waited too long for animations to stop, continuing gesture." + << LL_ENDL; gesture->mWaitingAnimations = FALSE; gesture->mCurrentStep++; } @@ -1129,7 +1129,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Unable to load gesture" << llendl; + LL_WARNS() << "Unable to load gesture" << LL_ENDL; self.mActive.erase(item_id); @@ -1149,7 +1149,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, LLDelayedGestureError::gestureFailedToLoad( item_id ); } - llwarns << "Problem loading gesture: " << status << llendl; + LL_WARNS() << "Problem loading gesture: " << status << LL_ENDL; LLGestureMgr::instance().mActive.erase(item_id); } @@ -1185,7 +1185,7 @@ void LLGestureMgr::onAssetLoadComplete(LLVFS *vfs, } default: { - llwarns << "Unexpected asset type: " << type << llendl; + LL_WARNS() << "Unexpected asset type: " << type << LL_ENDL; // We don't want to return from this callback without // an animation or sound callback being fired @@ -1240,7 +1240,7 @@ bool LLGestureMgr::hasLoadingAssets(LLMultiGesture* gesture) } default: { - llwarns << "Unknown gesture step type: " << step->getType() << llendl; + LL_WARNS() << "Unknown gesture step type: " << step->getType() << LL_ENDL; } } } @@ -1322,7 +1322,7 @@ void LLGestureMgr::removeObserver(LLGestureManagerObserver* observer) // from the list. void LLGestureMgr::notifyObservers() { - lldebugs << "LLGestureMgr::notifyObservers" << llendl; + LL_DEBUGS() << "LLGestureMgr::notifyObservers" << LL_ENDL; for(std::vector::iterator iter = mObservers.begin(); iter != mObservers.end(); diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index 2ecd9fa7f7..493dea62ff 100755 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -192,7 +192,7 @@ bool LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent, { bool res = true; - llinfos << "LLGiveInventory::giveInventory()" << llendl; + LL_INFOS() << "LLGiveInventory::giveInventory()" << LL_ENDL; if (!isInventoryGiveAcceptable(item)) { return false; @@ -230,8 +230,8 @@ bool LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent, { return false; } - llinfos << "LLGiveInventory::giveInventoryCategory() - " - << cat->getUUID() << llendl; + LL_INFOS() << "LLGiveInventory::giveInventoryCategory() - " + << cat->getUUID() << LL_ENDL; if (!isAgentAvatarValid()) { @@ -484,8 +484,8 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, { return false; } - llinfos << "LLGiveInventory::commitGiveInventoryCategory() - " - << cat->getUUID() << llendl; + LL_INFOS() << "LLGiveInventory::commitGiveInventoryCategory() - " + << cat->getUUID() << LL_ENDL; // add buddy to recent people list LLRecentPeople::instance().add(to_agent); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 0324629c6e..5c015c58c4 100755 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -130,14 +130,14 @@ void LLGroupActions::startCall(const LLUUID& group_id) if (!gAgent.getGroupData(group_id, gdata)) { - llwarns << "Error getting group data" << llendl; + LL_WARNS() << "Error getting group data" << LL_ENDL; return; } LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true); if (session_id == LLUUID::null) { - llwarns << "Error adding session" << llendl; + LL_WARNS() << "Error adding session" << LL_ENDL; return; } @@ -183,8 +183,8 @@ void LLGroupActions::join(const LLUUID& group_id) } else { - llwarns << "LLGroupMgr::getInstance()->getGroupData(" << group_id - << ") was NULL" << llendl; + LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData(" << group_id + << ") was NULL" << LL_ENDL; } } diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index ba4927e622..67778ebcab 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -329,7 +329,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat } else { - llwarns << "Change being made to non-existant role " << role_id << llendl; + LL_WARNS() << "Change being made to non-existant role " << role_id << LL_ENDL; } } @@ -343,7 +343,7 @@ void LLGroupMgrGroupData::createRole(const LLUUID& role_id, LLRoleData role_data { if (mRoleChanges.find(role_id) != mRoleChanges.end()) { - llwarns << "create role for existing role! " << role_id << llendl; + LL_WARNS() << "create role for existing role! " << role_id << LL_ENDL; } else { @@ -380,7 +380,7 @@ void LLGroupMgrGroupData::addRolePower(const LLUUID &role_id, U64 power) } else { - llwarns << "addRolePower: no role data found for " << role_id << llendl; + LL_WARNS() << "addRolePower: no role data found for " << role_id << LL_ENDL; } } @@ -394,7 +394,7 @@ void LLGroupMgrGroupData::removeRolePower(const LLUUID &role_id, U64 power) } else { - llwarns << "removeRolePower: no role data found for " << role_id << llendl; + LL_WARNS() << "removeRolePower: no role data found for " << role_id << LL_ENDL; } } @@ -407,7 +407,7 @@ U64 LLGroupMgrGroupData::getRolePowers(const LLUUID& role_id) } else { - llwarns << "getRolePowers: no role data found for " << role_id << llendl; + LL_WARNS() << "getRolePowers: no role data found for " << role_id << LL_ENDL; return GP_NO_POWERS; } } @@ -491,8 +491,8 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (ri == mRoles.end() || mi == mMembers.end() ) { - if (ri == mRoles.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << llendl; - if (mi == mMembers.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << llendl; + if (ri == mRoles.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << LL_ENDL; + if (mi == mMembers.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << LL_ENDL; return false; } @@ -501,13 +501,13 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (!grd || !gmd) { - llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << llendl; + LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << LL_ENDL; return false; } if (RMC_ADD == rmc) { - llinfos << " adding member to role." << llendl; + LL_INFOS() << " adding member to role." << LL_ENDL; grd->addMember(member_id); gmd->addRole(role_id,grd); @@ -517,7 +517,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, } else if (RMC_REMOVE == rmc) { - llinfos << " removing member from role." << llendl; + LL_INFOS() << " removing member from role." << LL_ENDL; grd->removeMember(member_id); gmd->removeRole(role_id); @@ -536,9 +536,9 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (it->second.mChange == rmc) { // Already recorded this change? Weird. - llinfos << "Received duplicate change for " + LL_INFOS() << "Received duplicate change for " << " role: " << role_id << " member " << member_id - << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << llendl; + << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << LL_ENDL; } else { @@ -546,7 +546,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, // If that changes this will need more logic if (rmc == RMC_NONE) { - llwarns << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << llendl; + LL_WARNS() << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << LL_ENDL; LLRoleMemberChange rc(role_id,member_id,rmc); mRoleMemberChanges[role_member] = rc; } @@ -864,12 +864,12 @@ static void formatDateString(std::string &date_string) // static void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupMembersReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupMembersReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group members reply for another agent!" << llendl; + LL_WARNS() << "Got group members reply for another agent!" << LL_ENDL; return; } @@ -882,7 +882,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mMemberRequestID != request_id)) { - llwarns << "processGroupMembersReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -920,7 +920,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) formatDateString(online_status); // reformat for sorting, e.g. 12/25/2008 -> 2008/12/25 } - //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl; + //LL_INFOS() << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << LL_ENDL; LLGroupMemberData* newdata = new LLGroupMemberData(member_id, contribution, agent_powers, @@ -931,14 +931,14 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(member_id); if (mit != group_datap->mMembers.end()) { - llinfos << " *** Received duplicate member data for agent " << member_id << llendl; + LL_INFOS() << " *** Received duplicate member data for agent " << member_id << LL_ENDL; } #endif group_datap->mMembers[member_id] = newdata; } else { - llinfos << "Received null group member data." << llendl; + LL_INFOS() << "Received null group member data." << LL_ENDL; } } @@ -970,12 +970,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) //static void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupPropertiesReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupPropertiesReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group properties reply for another agent!" << llendl; + LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL; return; } @@ -1037,12 +1037,12 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupRoleDataReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupRoleDataReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group role data reply for another agent!" << llendl; + LL_WARNS() << "Got group role data reply for another agent!" << LL_ENDL; return; } @@ -1055,7 +1055,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mRoleDataRequestID != request_id)) { - llwarns << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -1098,7 +1098,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) - lldebugs << "Adding role data: " << name << " {" << role_id << "}" << llendl; + LL_DEBUGS() << "Adding role data: " << name << " {" << role_id << "}" << LL_ENDL; LLGroupRoleData* rd = new LLGroupRoleData(role_id,name,title,desc,powers,member_count); group_datap->mRoles[role_id] = rd; } @@ -1122,12 +1122,12 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupRoleMembersReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupRoleMembersReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group role members reply for another agent!" << llendl; + LL_WARNS() << "Got group role members reply for another agent!" << LL_ENDL; return; } @@ -1143,7 +1143,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mRoleMembersRequestID != request_id)) { - llwarns << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -1183,14 +1183,14 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) if (rd && md) { - lldebugs << "Adding role-member pair: " << role_id << ", " << member_id << llendl; + LL_DEBUGS() << "Adding role-member pair: " << role_id << ", " << member_id << LL_ENDL; rd->addMember(member_id); md->addRole(role_id,rd); } else { - if (!rd) llwarns << "Received role data for unknown role " << role_id << " in group " << group_id << llendl; - if (!md) llwarns << "Received role data for unknown member " << member_id << " in group " << group_id << llendl; + if (!rd) LL_WARNS() << "Received role data for unknown role " << role_id << " in group " << group_id << LL_ENDL; + if (!md) LL_WARNS() << "Received role data for unknown member " << member_id << " in group " << group_id << LL_ENDL; } } } @@ -1204,7 +1204,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) LLGroupRoleData* everyone = group_datap->mRoles[LLUUID::null]; if (!everyone) { - llwarns << "Everyone role not found!" << llendl; + LL_WARNS() << "Everyone role not found!" << LL_ENDL; } else { @@ -1230,12 +1230,12 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupTitlesReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupTitlesReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group properties reply for another agent!" << llendl; + LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL; return; } @@ -1247,7 +1247,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mTitlesRequestID != request_id)) { - llwarns << "processGroupTitlesReply: Received incorrect (stale?) group" << llendl; + LL_WARNS() << "processGroupTitlesReply: Received incorrect (stale?) group" << LL_ENDL; return; } @@ -1263,7 +1263,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) if (!title.mTitle.empty()) { - lldebugs << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << llendl; + LL_DEBUGS() << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << LL_ENDL; group_datap->mTitles.push_back(title); } } @@ -1275,7 +1275,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processEjectGroupMemberReply" << llendl; + LL_DEBUGS() << "processEjectGroupMemberReply" << LL_ENDL; LLUUID group_id; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); BOOL success; @@ -1291,7 +1291,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data // static void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processJoinGroupReply" << llendl; + LL_DEBUGS() << "processJoinGroupReply" << LL_ENDL; LLUUID group_id; BOOL success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); @@ -1311,7 +1311,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) // static void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processLeaveGroupReply" << llendl; + LL_DEBUGS() << "processLeaveGroupReply" << LL_ENDL; LLUUID group_id; BOOL success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); @@ -1473,7 +1473,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap) void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupPropertiesRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupPropertiesRequest" << LL_ENDL; // This will happen when we get the reply //LLGroupMgrGroupData* group_datap = createGroupData(group_id); @@ -1489,7 +1489,7 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupMembersRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupMembersRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mMemberRequestID.isNull()) { @@ -1511,7 +1511,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleDataRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleDataRequestID.isNull()) { @@ -1532,7 +1532,7 @@ void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMembersRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleMembersRequestID.isNull()) @@ -1542,9 +1542,9 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) || !group_datap->isRoleDataComplete()) { // *TODO: KLW FIXME: Should we start a member or role data request? - llinfos << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N") + LL_INFOS() << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N") << " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N") - << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << llendl; + << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL; group_datap->mPendingRoleMemberRequest = TRUE; return; } @@ -1566,7 +1566,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupTitlesRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupTitlesRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); group_datap->mTitles.clear(); @@ -1585,7 +1585,7 @@ void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id) { - lldebugs << "LLGroupMgr::sendGroupTitleUpdate" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupTitleUpdate" << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessage("GroupTitleUpdate"); @@ -1644,7 +1644,7 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name, void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendUpdateGroupInfo" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendUpdateGroupInfo" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); LLMessageSystem* msg = gMessageSystem; @@ -1673,7 +1673,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMemberChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleMemberChanges.empty()) return; @@ -2027,7 +2027,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = getGroupData(group_id); if (group_datap && group_datap->pendingRoleChanges()) @@ -2042,7 +2042,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::cancelGroupRoleChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::cancelGroupRoleChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = getGroupData(group_id); if (group_datap) group_datap->cancelRoleChanges(); @@ -2057,7 +2057,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) if (!success || !root || !root->hasName( "role_actions" )) { - llerrs << "Problem reading UI role_actions file: " << xml_filename << llendl; + LL_ERRS() << "Problem reading UI role_actions file: " << xml_filename << LL_ENDL; return false; } @@ -2076,12 +2076,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) std::string action_set_name; if (action_set->getAttributeString("name", action_set_name)) { - lldebugs << "Loading action set " << action_set_name << llendl; + LL_DEBUGS() << "Loading action set " << action_set_name << LL_ENDL; role_action_data->mName = action_set_name; } else { - llwarns << "Unable to parse action set with no name" << llendl; + LL_WARNS() << "Unable to parse action set with no name" << LL_ENDL; delete role_action_set; delete role_action_data; continue; @@ -2117,12 +2117,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) std::string action_name; if (action->getAttributeString("name", action_name)) { - lldebugs << "Loading action " << action_name << llendl; + LL_DEBUGS() << "Loading action " << action_name << LL_ENDL; role_action->mName = action_name; } else { - llwarns << "Unable to parse action with no name" << llendl; + LL_WARNS() << "Unable to parse action with no name" << LL_ENDL; delete role_action; continue; } diff --git a/indra/newview/llhomelocationresponder.cpp b/indra/newview/llhomelocationresponder.cpp index 37428c4a44..eefa8bd42a 100755 --- a/indra/newview/llhomelocationresponder.cpp +++ b/indra/newview/llhomelocationresponder.cpp @@ -90,7 +90,7 @@ void LLHomeLocationResponder::result( const LLSD& content ) if( ! error ) { - llinfos << "setting home position" << llendl; + LL_INFOS() << "setting home position" << LL_ENDL; LLViewerRegion *viewer_region = gAgent.getRegion(); gAgent.setHomePosRegion( viewer_region->getHandle(), agent_pos ); @@ -99,5 +99,5 @@ void LLHomeLocationResponder::result( const LLSD& content ) void LLHomeLocationResponder::errorWithContent( U32 status, const std::string& reason, const LLSD& content ) { - llwarns << "LLHomeLocationResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "LLHomeLocationResponder error [status:" << status << "]: " << content << LL_ENDL; } diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp index 159ec6c803..eff5587610 100755 --- a/indra/newview/llhudeffect.cpp +++ b/indra/newview/llhudeffect.cpp @@ -71,7 +71,7 @@ void LLHUDEffect::unpackData(LLMessageSystem *mesgsys, S32 blocknum) void LLHUDEffect::render() { - llerrs << "Never call this!" << llendl; + LL_ERRS() << "Never call this!" << LL_ENDL; } void LLHUDEffect::setID(const LLUUID &id) diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index 8abad3d292..54e683e048 100755 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -78,7 +78,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) { if (!mSourceObject) { - llwarns << "Missing source object!" << llendl; + LL_WARNS() << "Missing source object!" << LL_ENDL; } // Pack the default data @@ -115,7 +115,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) { - llerrs << "Got beam!" << llendl; + LL_ERRS() << "Got beam!" << LL_ENDL; BOOL use_target_object; LLVector3d new_target; U8 packed_data[41]; @@ -126,7 +126,7 @@ void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != 41) { - llwarns << "Beam effect with bad size " << size << llendl; + LL_WARNS() << "Beam effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 41, blocknum); @@ -172,7 +172,7 @@ void LLHUDEffectBeam::setSourceObject(LLViewerObject *objp) { if (objp->isDead()) { - llwarns << "HUDEffectBeam: Source object is dead!" << llendl; + LL_WARNS() << "HUDEffectBeam: Source object is dead!" << LL_ENDL; mSourceObject = NULL; return; } @@ -210,7 +210,7 @@ void LLHUDEffectBeam::setTargetObject(LLViewerObject *objp) { if (mTargetObject->isDead()) { - llwarns << "HUDEffectBeam: Target object is dead!" << llendl; + LL_WARNS() << "HUDEffectBeam: Target object is dead!" << LL_ENDL; } mTargetObject = objp; diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 9dde65ceb6..f3a48625a4 100755 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -204,7 +204,7 @@ static BOOL loadAttentions() //------------------------------------------------------------------------- if( !root->hasName( "linden_attentions" ) ) { - llwarns << "Invalid linden_attentions file header: " << filename << llendl; + LL_WARNS() << "Invalid linden_attentions file header: " << filename << LL_ENDL; return FALSE; } @@ -212,7 +212,7 @@ static BOOL loadAttentions() static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { - llwarns << "Invalid linden_attentions file version: " << version << llendl; + LL_WARNS() << "Invalid linden_attentions file version: " << version << LL_ENDL; return FALSE; } @@ -322,7 +322,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != PKT_SIZE) { - llwarns << "LookAt effect with bad size " << size << llendl; + LL_WARNS() << "LookAt effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); @@ -336,7 +336,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } else { - //llwarns << "Could not find source avatar for lookat effect" << llendl; + //LL_WARNS() << "Could not find source avatar for lookat effect" << LL_ENDL; return; } @@ -356,7 +356,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } else { - //llwarns << "Could not find target object for lookat effect" << llendl; + //LL_WARNS() << "Could not find target object for lookat effect" << LL_ENDL; } U8 lookAtTypeUnpacked = 0; @@ -400,7 +400,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec if (target_type >= LOOKAT_NUM_TARGETS) { - llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl; + LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL; return FALSE; } diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index 114a633821..44c8db19c0 100755 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -159,7 +159,7 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != PKT_SIZE) { - llwarns << "PointAt effect with bad size " << size << llendl; + LL_WARNS() << "PointAt effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum); @@ -176,7 +176,7 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) } else { - //llwarns << "Could not find source avatar for pointat effect" << llendl; + //LL_WARNS() << "Could not find source avatar for pointat effect" << LL_ENDL; return; } @@ -228,7 +228,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob if (target_type >= POINTAT_NUM_TARGETS) { - llwarns << "Bad target_type " << (int)target_type << " - ignoring." << llendl; + LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL; return FALSE; } @@ -252,7 +252,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob mLastSentOffsetGlobal = position; setDuration(POINTAT_TIMEOUTS[target_type]); setNeedsSendToSim(TRUE); -// llinfos << "Sending pointat data" << llendl; +// LL_INFOS() << "Sending pointat data" << LL_ENDL; } if (target_type == POINTAT_TARGET_CLEAR) diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index 39b526c1b5..8771219034 100755 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -85,7 +85,7 @@ void LLHUDEffectSpiral::packData(LLMessageSystem *mesgsys) { if (!mSourceObject) { - //llwarns << "Missing object in trail pack!" << llendl; + //LL_WARNS() << "Missing object in trail pack!" << LL_ENDL; } LLHUDEffect::packData(mesgsys); @@ -117,7 +117,7 @@ void LLHUDEffectSpiral::unpackData(LLMessageSystem *mesgsys, S32 blocknum) size_t size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != EFFECT_SIZE) { - llwarns << "Spiral effect with bad size " << size << llendl; + LL_WARNS() << "Spiral effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index 8ad432fbad..fd28fdeab9 100755 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -79,12 +79,12 @@ void LLHUDManager::sendEffects() LLHUDEffect *hep = mHUDEffects[i]; if (hep->isDead()) { - llwarns << "Trying to send dead effect!" << llendl; + LL_WARNS() << "Trying to send dead effect!" << LL_ENDL; continue; } if (hep->mType < LLHUDObject::LL_HUD_EFFECT_BEAM) { - llwarns << "Trying to send effect of type " << hep->mType << " which isn't really an effect and shouldn't be in this list!" << llendl; + LL_WARNS() << "Trying to send effect of type " << hep->mType << " which isn't really an effect and shouldn't be in this list!" << LL_ENDL; continue; } if (hep->getNeedsSendToSim() && hep->getOriginatedHere()) @@ -164,14 +164,14 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat LLHUDEffect *cur_effectp = LLHUDManager::getInstance()->mHUDEffects[i]; if (!cur_effectp) { - llwarns << "Null effect in effect manager, skipping" << llendl; + LL_WARNS() << "Null effect in effect manager, skipping" << LL_ENDL; LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i); i--; continue; } if (cur_effectp->isDead()) { - // llwarns << "Dead effect in effect manager, removing" << llendl; + // LL_WARNS() << "Dead effect in effect manager, removing" << LL_ENDL; LLHUDManager::getInstance()->mHUDEffects.erase(LLHUDManager::getInstance()->mHUDEffects.begin() + i); i--; continue; @@ -180,7 +180,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat { if (cur_effectp->getType() != effect_type) { - llwarns << "Viewer effect update doesn't match old type!" << llendl; + LL_WARNS() << "Viewer effect update doesn't match old type!" << LL_ENDL; } effectp = cur_effectp; break; @@ -201,10 +201,10 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat } else { - llwarns << "Received viewer effect of type " << effect_type << " which isn't really an effect!" << llendl; + LL_WARNS() << "Received viewer effect of type " << effect_type << " which isn't really an effect!" << LL_ENDL; } } - //llinfos << "Got viewer effect: " << effect_id << llendl; + //LL_INFOS() << "Got viewer effect: " << effect_id << LL_ENDL; } diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 19a4165b49..31d832e524 100755 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -538,7 +538,7 @@ void LLHUDNameTag::updateVisibility() if (!mSourceObject) { - //llwarns << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << llendl; + //LL_WARNS() << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL; mVisible = TRUE; sVisibleTextObjects.push_back(LLPointer (this)); return; diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 95d57d08d8..165201c8a1 100755 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -123,7 +123,7 @@ void LLHUDObject::cleanupHUDObjects() (*object_it)->markDead(); if ((*object_it)->getNumRefs() > 1) { - llinfos << "LLHUDObject " << (LLHUDObject *)(*object_it) << " type " << (S32)(*object_it)->getType() << " has " << (*object_it)->getNumRefs() << " refs!" << llendl; + LL_INFOS() << "LLHUDObject " << (LLHUDObject *)(*object_it) << " type " << (S32)(*object_it)->getType() << " has " << (*object_it)->getNumRefs() << " refs!" << LL_ENDL; } } sHUDObjects.clear(); @@ -146,7 +146,7 @@ LLHUDObject *LLHUDObject::addHUDObject(const U8 type) hud_objectp = new LLHUDNameTag(type); break; default: - llwarns << "Unknown type of hud object:" << (U32) type << llendl; + LL_WARNS() << "Unknown type of hud object:" << (U32) type << LL_ENDL; } if (hud_objectp) { @@ -242,7 +242,7 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type) hud_objectp = new LLHUDEffectBlob(type); break; default: - llwarns << "Unknown type of hud effect:" << (U32) type << llendl; + LL_WARNS() << "Unknown type of hud effect:" << (U32) type << LL_ENDL; } if (hud_objectp) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 3c6bcd9829..f648d7baae 100755 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -346,7 +346,7 @@ void LLHUDText::updateVisibility() if (!mSourceObject) { - //llwarns << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << llendl; + //LL_WARNS() << "LLHUDText::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL; mVisible = TRUE; if (mOnHUDAttachment) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 89ea5ff73a..236dc47169 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -848,13 +848,13 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co { if (name.empty()) { - llwarns << "Attempt to create a new session with empty name; id = " << session_id << llendl; + LL_WARNS() << "Attempt to create a new session with empty name; id = " << session_id << LL_ENDL; return false; } if (findIMSession(session_id)) { - llwarns << "IM Session " << session_id << " already exists" << llendl; + LL_WARNS() << "IM Session " << session_id << " already exists" << LL_ENDL; return false; } @@ -900,7 +900,7 @@ void LLIMModel::getMessagesSilently(const LLUUID& session_id, std::list& m LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return; } @@ -922,7 +922,7 @@ void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id) LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return; } @@ -942,7 +942,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return false; } @@ -1017,7 +1017,7 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return NULL; } @@ -1054,7 +1054,7 @@ const std::string LLIMModel::getName(const LLUUID& session_id) const if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return LLTrans::getString("no_session_message"); } @@ -1066,7 +1066,7 @@ const S32 LLIMModel::getNumUnread(const LLUUID& session_id) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return -1; } @@ -1078,7 +1078,7 @@ const LLUUID& LLIMModel::getOtherParticipantID(const LLUUID& session_id) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << " does not exist " << llendl; + LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL; return LLUUID::null; } @@ -1090,7 +1090,7 @@ EInstantMessage LLIMModel::getType(const LLUUID& session_id) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return IM_COUNT; } @@ -1102,7 +1102,7 @@ LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id ) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << "does not exist " << llendl; + LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL; return NULL; } @@ -1114,7 +1114,7 @@ LLIMSpeakerMgr* LLIMModel::getSpeakerManager( const LLUUID& session_id ) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << " does not exist " << llendl; + LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL; return NULL; } @@ -1126,7 +1126,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const LLIMSession* session = findIMSession(session_id); if (!session) { - llwarns << "session " << session_id << " does not exist " << llendl; + LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL; return LLStringUtil::null; } @@ -1413,8 +1413,8 @@ public: mAgents); } - llwarns << "LLStartConferenceChatResponder error [status:" - << statusNum << "]: " << content << llendl; + LL_WARNS() << "LLStartConferenceChatResponder error [status:" + << statusNum << "]: " << content << LL_ENDL; //else throw an error back to the client? //in theory we should have just have these error strings @@ -1563,8 +1563,8 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns << "LLViewerChatterBoxInvitationAcceptResponder error [status:" - << statusNum << "]: " << content << llendl; + LL_WARNS() << "LLViewerChatterBoxInvitationAcceptResponder error [status:" + << statusNum << "]: " << content << LL_ENDL; //throw something back to the viewer here? if ( gIMMgr ) { @@ -1626,7 +1626,7 @@ LLUUID LLIMMgr::computeSessionID( if (gAgent.isInGroup(session_id) && (session_id != other_participant_id)) { - llwarns << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << llendl; + LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL; } return session_id; } @@ -2372,7 +2372,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload std::string correct_session_name = session_name; if (session_name.empty()) { - llwarns << "Received an empty session name from a server" << llendl; + LL_WARNS() << "Received an empty session name from a server" << LL_ENDL; switch(type){ case IM_SESSION_CONFERENCE_START: @@ -2394,7 +2394,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload correct_session_name.append(ADHOC_NAME_SUFFIX); } } - llinfos << "Corrected session name is " << correct_session_name << llendl; + LL_INFOS() << "Corrected session name is " << correct_session_name << LL_ENDL; break; default: LL_WARNS() << "Received an empty session name from a server and failed to generate a new proper session name" << LL_ENDL; @@ -2634,10 +2634,10 @@ void LLIMMgr::addMessage( // code, but the session has to be established inside the server before it can be left. if (LLMuteList::getInstance()->isMuted(other_participant_id) && !LLMuteList::getInstance()->isLinden(from)) { - llwarns << "Leaving IM session from initiating muted resident " << from << llendl; + LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL; if(!gIMMgr->leaveSession(new_session_id)) { - llinfos << "Session " << new_session_id << " does not exist." << llendl; + LL_INFOS() << "Session " << new_session_id << " does not exist." << LL_ENDL; } return; } @@ -2852,7 +2852,7 @@ LLUUID LLIMMgr::addSession( //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; - llinfos << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << llendl; + LL_INFOS() << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << LL_ENDL; //Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609) //*TODO After February 2010 remove this commented out line if no one will be missing that warning @@ -2889,7 +2889,7 @@ void LLIMMgr::removeSession(const LLUUID& session_id) LLIMModel::getInstance()->clearSession(session_id); - llinfos << "LLIMMgr::removeSession, session removed, session id = " << session_id << llendl; + LL_INFOS() << "LLIMMgr::removeSession, session removed, session id = " << session_id << LL_ENDL; notifyObserverSessionRemoved(session_id); } @@ -2954,7 +2954,7 @@ void LLIMMgr::inviteToSession( { if (voice_invite && "VoiceInviteQuestionDefault" == question_type) { - llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl; + LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL; LLIncomingCallDialog::processCallResponse(1, payload); } return; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 9c6db3676f..b75140238e 100755 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -295,7 +295,7 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) /* prep# virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) - llwarns << "MuteVoiceResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "MuteVoiceResponder error [status:" << status << "]: " << content << LL_ENDL; */ void LLInspectAvatar::updateVolumeSlider() diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index f4fe5dec01..0bc7bd188d 100755 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -63,7 +63,7 @@ LLInspectToast::LLInspectToast(const LLSD& notification_id) : mScreenChannel = dynamic_cast(channel); if(NULL == mScreenChannel) { - llwarns << "Could not get requested screen channel." << llendl; + LL_WARNS() << "Could not get requested screen channel." << LL_ENDL; return; } @@ -83,7 +83,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id) LLToast* toast = mScreenChannel->getToastByNotificationID(notification_id); if (toast == NULL) { - llwarns << "Could not get requested toast from screen channel." << llendl; + LL_WARNS() << "Could not get requested toast from screen channel." << LL_ENDL; return; } mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1)); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6915ba4557..8809530ad8 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -733,7 +733,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLInvFVBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; if(isItemInTrash()) @@ -1032,7 +1032,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_TEXTURE: if(!(inv_type == LLInventoryType::IT_TEXTURE || inv_type == LLInventoryType::IT_SNAPSHOT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLTextureBridge(inventory, root, uuid, inv_type); break; @@ -1040,7 +1040,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_SOUND: if(!(inv_type == LLInventoryType::IT_SOUND)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLSoundBridge(inventory, root, uuid); break; @@ -1048,7 +1048,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLLandmarkBridge(inventory, root, uuid, flags); break; @@ -1056,7 +1056,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_CALLINGCARD: if(!(inv_type == LLInventoryType::IT_CALLINGCARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLCallingCardBridge(inventory, root, uuid); break; @@ -1064,7 +1064,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_SCRIPT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLItemBridge(inventory, root, uuid); break; @@ -1072,7 +1072,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_OBJECT: if(!(inv_type == LLInventoryType::IT_OBJECT || inv_type == LLInventoryType::IT_ATTACHMENT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLObjectBridge(inventory, root, uuid, inv_type, flags); break; @@ -1080,7 +1080,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_NOTECARD: if(!(inv_type == LLInventoryType::IT_NOTECARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLNotecardBridge(inventory, root, uuid); break; @@ -1088,7 +1088,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_ANIMATION: if(!(inv_type == LLInventoryType::IT_ANIMATION)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLAnimationBridge(inventory, root, uuid); break; @@ -1096,7 +1096,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_GESTURE: if(!(inv_type == LLInventoryType::IT_GESTURE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLGestureBridge(inventory, root, uuid); break; @@ -1104,7 +1104,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_LSL_TEXT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLLSLTextBridge(inventory, root, uuid); break; @@ -1113,7 +1113,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_BODYPART: if(!(inv_type == LLInventoryType::IT_WEARABLE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (LLWearableType::EType)flags); break; @@ -1134,19 +1134,19 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_MESH: if(!(inv_type == LLInventoryType::IT_MESH)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLMeshBridge(inventory, root, uuid); break; case LLAssetType::AT_IMAGE_TGA: case LLAssetType::AT_IMAGE_JPEG: - //llwarns << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << llendl; + //LL_WARNS() << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << LL_ENDL; break; default: - llinfos << "Unhandled asset type (llassetstorage.h): " - << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << llendl; + LL_INFOS() << "Unhandled asset type (llassetstorage.h): " + << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << LL_ENDL; break; } @@ -1427,7 +1427,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) } else if (isMarketplaceCopyAction(action)) { - llinfos << "Copy item to marketplace action!" << llendl; + LL_INFOS() << "Copy item to marketplace action!" << LL_ENDL; LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; @@ -1594,7 +1594,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const if (get_is_item_worn(mUUID)) { - // llinfos << "BOLD" << llendl; + // LL_INFOS() << "BOLD" << LL_ENDL; font |= LLFontGL::BOLD; } else if(item && item->getIsLinkType()) @@ -2195,7 +2195,7 @@ int get_folder_path_length(const LLUUID& ancestor_id, const LLUUID& descendant_i category = gInventory.getCategory(parent_id); } - llwarns << "get_folder_path_length() couldn't trace a path from the descendant to the ancestor" << llendl; + LL_WARNS() << "get_folder_path_length() couldn't trace a path from the descendant to the ancestor" << LL_ENDL; return -1; } @@ -2586,7 +2586,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, LLViewerObject* object = gObjectList.findObject(object_id); if(!object) { - llinfos << "Object not found for drop." << llendl; + LL_INFOS() << "Object not found for drop." << LL_ENDL; return FALSE; } @@ -2597,7 +2597,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if (inventory_objects.empty()) { - llinfos << "Object contents not found for drop." << llendl; + LL_INFOS() << "Object contents not found for drop." << LL_ENDL; return FALSE; } @@ -2613,7 +2613,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, LLInventoryItem* item = dynamic_cast(it->get()); if (!item) { - llwarns << "Invalid inventory item for drop" << llendl; + LL_WARNS() << "Invalid inventory item for drop" << LL_ENDL; continue; } @@ -2681,7 +2681,7 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer) // Bail out immediately if no descendents if( mComplete.empty() ) { - llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; + LL_WARNS() << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << LL_ENDL; if (clear_observer) { gInventory.removeObserver(this); @@ -2839,8 +2839,8 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) LLViewerInventoryCategory* category = gInventory.getCategory(mCatID); if (NULL == category) { - llwarns << "gInventory.getCategory(" << mCatID - << ") was NULL" << llendl; + LL_WARNS() << "gInventory.getCategory(" << mCatID + << ") was NULL" << LL_ENDL; } else { @@ -2946,7 +2946,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) #endif else if (isMarketplaceCopyAction(action)) { - llinfos << "Copy folder to marketplace action!" << llendl; + LL_INFOS() << "Copy folder to marketplace action!" << LL_ENDL; LLInventoryCategory * cat = gInventory.getCategory(mUUID); if (!cat) return; @@ -2957,7 +2957,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) #if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU else if (isMarketplaceSendAction(action)) { - llinfos << "Send to marketplace action!" << llendl; + LL_INFOS() << "Send to marketplace action!" << LL_ENDL; LLInventoryCategory * cat = gInventory.getCategory(mUUID); if (!cat) return; @@ -2969,7 +2969,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) void LLFolderBridge::openItem() { - lldebugs << "LLFolderBridge::openItem()" << llendl; + LL_DEBUGS() << "LLFolderBridge::openItem()" << LL_ENDL; LLInventoryModel* model = getInventoryModel(); if(!model) return; if(mUUID.isNull()) return; @@ -3604,7 +3604,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t items; menuentry_vec_t disabled_items; - lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLFolderBridge::buildContextMenu()" << LL_ENDL; LLInventoryModel* model = getInventoryModel(); if(!model) return; @@ -3633,7 +3633,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - //llinfos << "LLFolderBridge::dragOrDrop()" << llendl; + //LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL; BOOL accept = FALSE; switch(cargo_type) { @@ -3682,7 +3682,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_NONE: break; default: - llwarns << "Unhandled cargo type for drag&drop " << cargo_type << llendl; + LL_WARNS() << "Unhandled cargo type for drag&drop " << cargo_type << LL_ENDL; break; } return accept; @@ -4152,7 +4152,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, object = gObjectList.findObject(inv_item->getParentUUID()); if (!object) { - llinfos << "Object not found for drop." << llendl; + LL_INFOS() << "Object not found for drop." << LL_ENDL; return FALSE; } @@ -4318,7 +4318,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else { - llwarns << "unhandled drag source" << llendl; + LL_WARNS() << "unhandled drag source" << LL_ENDL; } return accept; } @@ -4423,7 +4423,7 @@ bool LLTextureBridge::canSaveTexture(void) void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLTextureBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; if(isItemInTrash()) @@ -4493,7 +4493,7 @@ void LLSoundBridge::openSoundPreview(void* which) void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLSoundBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLSoundBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; @@ -4554,7 +4554,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t items; menuentry_vec_t disabled_items; - lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLLandmarkBridge::buildContextMenu()" << LL_ENDL; if(isOutboxFolder()) { addOutboxContextMenuOptions(flags, items, disabled_items); @@ -4786,7 +4786,7 @@ void LLCallingCardBridge::openItem() void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLCallingCardBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; @@ -5052,7 +5052,7 @@ BOOL LLGestureBridge::removeItem() void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLGestureBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLGestureBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; if(isItemInTrash()) @@ -5112,7 +5112,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t items; menuentry_vec_t disabled_items; - lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLAnimationBridge::buildContextMenu()" << LL_ENDL; if(isOutboxFolder()) { items.push_back(std::string("Delete")); @@ -5295,7 +5295,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach (gAgentAvatarp->attachmentWasRequested(item_id) || gAgentAvatarp->isWearingAttachment(item_id))) { - llwarns << "duplicate attachment request, ignoring" << llendl; + LL_WARNS() << "duplicate attachment request, ignoring" << LL_ENDL; return; } gAgentAvatarp->addAttachmentRequest(item_id); @@ -5607,7 +5607,7 @@ void LLWearableBridge::openItem() void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLWearableBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLWearableBridge::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; if(isItemInTrash()) @@ -5771,7 +5771,7 @@ void LLWearableBridge::onWearOnAvatarArrived( LLViewerWearable* wearable, void* } else { - llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; + LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL; } } } @@ -5798,7 +5798,7 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, voi } else { - llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; + LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL; } } } @@ -5842,7 +5842,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) void LLWearableBridge::removeFromAvatar() { - llwarns << "safe to remove?" << llendl; + LL_WARNS() << "safe to remove?" << LL_ENDL; if (get_is_item_worn(mUUID)) { LLAppearanceMgr::instance().removeItemFromAvatar(mUUID); @@ -5860,7 +5860,7 @@ std::string LLLinkItemBridge::sPrefix("Link: "); void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLLink::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; @@ -5900,7 +5900,7 @@ void LLMeshBridge::openItem() void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - lldebugs << "LLMeshBridge::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLMeshBridge::buildContextMenu()" << LL_ENDL; std::vector items; std::vector disabled_items; @@ -5957,7 +5957,7 @@ LLUIImagePtr LLLinkFolderBridge::getIcon() const void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; + LL_DEBUGS() << "LLLink::buildContextMenu()" << LL_ENDL; menuentry_vec_t items; menuentry_vec_t disabled_items; diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 92f2d33073..baf93a0469 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -123,7 +123,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const const LLFolderViewModelItemInventory* listener = dynamic_cast(item); if (!listener) { - llerrs << "Folder view event listener not found." << llendl; + LL_ERRS() << "Folder view event listener not found." << LL_ENDL; return false; } @@ -741,7 +741,7 @@ void LLInventoryFilter::setModified(EFilterModified behavior) mFirstSuccessGeneration = mCurrentGeneration; break; default: - llerrs << "Bad filter behavior specified" << llendl; + LL_ERRS() << "Bad filter behavior specified" << LL_ENDL; } } @@ -1085,7 +1085,7 @@ bool LLInventoryFilter::FilterOps::DateRange::validateBlock( bool emit_errors { if (emit_errors) { - llwarns << "max_date should be greater or equal to min_date" << llendl; + LL_WARNS() << "max_date should be greater or equal to min_date" << LL_ENDL; } valid = false; } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f1a4889f5a..f16b9330be 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -436,7 +436,7 @@ void show_item_original(const LLUUID& item_uuid) LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory"); if (!floater_inventory) { - llwarns << "Could not find My Inventory floater" << llendl; + LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL; return; } @@ -928,7 +928,7 @@ bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventory return !get_is_category_removable(&gInventory, cat->getUUID()); } - llwarns << "Not a category and not an item?" << llendl; + LL_WARNS() << "Not a category and not an item?" << LL_ENDL; return false; } diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 348d7ebcec..a84aa452dc 100755 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -208,7 +208,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrang { if (!item) { - llwarns << "No inventory item. Couldn't create flat list item." << llendl; + LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL; llassert(item != NULL); } @@ -219,7 +219,7 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrang bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange); if (!is_item_added) { - llwarns << "Couldn't add flat list item." << llendl; + LL_WARNS() << "Couldn't add flat list item." << LL_ENDL; llassert(is_item_added); } } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 81c72fd320..61accb01f1 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -513,13 +513,13 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, LLUUID id; if(!isInventoryUsable()) { - llwarns << "Inventory is broken." << llendl; + LL_WARNS() << "Inventory is broken." << LL_ENDL; return id; } if(LLFolderType::lookup(preferred_type) == LLFolderType::badLookup()) { - lldebugs << "Attempt to create undefined category." << llendl; + LL_DEBUGS() << "Attempt to create undefined category." << LL_ENDL; return id; } @@ -781,7 +781,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) if(!isInventoryUsable()) { - llwarns << "Inventory is broken." << llendl; + LL_WARNS() << "Inventory is broken." << LL_ENDL; return mask; } @@ -844,7 +844,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) } else { - llwarns << "Couldn't find parent-child item tree for " << new_item->getName() << llendl; + LL_WARNS() << "Couldn't find parent-child item tree for " << new_item->getName() << LL_ENDL; } } else @@ -873,8 +873,8 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) else { // Whoops! No such parent, make one. - llinfos << "Lost item: " << new_item->getUUID() << " - " - << new_item->getName() << llendl; + LL_INFOS() << "Lost item: " << new_item->getUUID() << " - " + << new_item->getName() << LL_ENDL; parent_id = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); new_item->setParent(parent_id); item_array = get_ptr_in_map(mParentChildItemTree, parent_id); @@ -887,7 +887,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) } else { - llwarns << "Lost and found Not there!!" << llendl; + LL_WARNS() << "Lost and found Not there!!" << LL_ENDL; } } } @@ -961,7 +961,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) if(!isInventoryUsable()) { - llwarns << "Inventory is broken." << llendl; + LL_WARNS() << "Inventory is broken." << LL_ENDL; return; } @@ -1024,17 +1024,17 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) { - lldebugs << "LLInventoryModel::moveObject()" << llendl; + LL_DEBUGS() << "LLInventoryModel::moveObject()" << LL_ENDL; if(!isInventoryUsable()) { - llwarns << "Inventory is broken." << llendl; + LL_WARNS() << "Inventory is broken." << LL_ENDL; return; } if((object_id == cat_id) || !is_in_map(mCategoryMap, cat_id)) { - llwarns << "Could not move inventory object " << object_id << " to " - << cat_id << llendl; + LL_WARNS() << "Could not move inventory object " << object_id << " to " + << cat_id << LL_ENDL; return; } LLPointer cat = getCategory(object_id); @@ -1126,15 +1126,15 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat, // Delete a particular inventory object by ID. void LLInventoryModel::deleteObject(const LLUUID& id) { - lldebugs << "LLInventoryModel::deleteObject()" << llendl; + LL_DEBUGS() << "LLInventoryModel::deleteObject()" << LL_ENDL; LLPointer obj = getObject(id); if (!obj) { - llwarns << "Deleting non-existent object [ id: " << id << " ] " << llendl; + LL_WARNS() << "Deleting non-existent object [ id: " << id << " ] " << LL_ENDL; return; } - lldebugs << "Deleting inventory object " << id << llendl; + LL_DEBUGS() << "Deleting inventory object " << id << LL_ENDL; mLastItem = NULL; LLUUID parent_id = obj->getParentUUID(); mCategoryMap.erase(id); @@ -1173,7 +1173,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id) // Delete a particular inventory item by ID, and remove it from the server. void LLInventoryModel::purgeObject(const LLUUID &id) { - lldebugs << "LLInventoryModel::purgeObject() [ id: " << id << " ] " << llendl; + LL_DEBUGS() << "LLInventoryModel::purgeObject() [ id: " << id << " ] " << LL_ENDL; LLPointer obj = getObject(id); if(obj) { @@ -1212,7 +1212,7 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) EHasChildren children = categoryHasChildren(id); if(children == CHILDREN_NO) { - llinfos << "Not purging descendents of " << id << llendl; + LL_INFOS() << "Not purging descendents of " << id << LL_ENDL; return; } LLPointer cat = getCategory(id); @@ -1221,8 +1221,8 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode()) { // Something on the clipboard is in "cut mode" and needs to be preserved - llinfos << "LLInventoryModel::purgeDescendentsOf " << cat->getName() - << " iterate and purge non hidden items" << llendl; + LL_INFOS() << "LLInventoryModel::purgeDescendentsOf " << cat->getName() + << " iterate and purge non hidden items" << LL_ENDL; cat_array_t* categories; item_array_t* items; // Get the list of direct descendants in tha categoy passed as argument @@ -1251,8 +1251,8 @@ void LLInventoryModel::purgeDescendentsOf(const LLUUID& id) { // Fast purge // do the cache accounting - llinfos << "LLInventoryModel::purgeDescendentsOf " << cat->getName() - << llendl; + LL_INFOS() << "LLInventoryModel::purgeDescendentsOf " << cat->getName() + << LL_ENDL; S32 descendents = cat->getDescendentCount(); if(descendents > 0) { @@ -1349,7 +1349,7 @@ void LLInventoryModel::notifyObservers() // Within notifyObservers, something called notifyObservers // again. This type of recursion is unsafe because it causes items to be // processed twice, and this can easily lead to infinite loops. - llwarns << "Call was made to notifyObservers within notifyObservers!" << llendl; + LL_WARNS() << "Call was made to notifyObservers within notifyObservers!" << LL_ENDL; return; } @@ -1378,7 +1378,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) // Something marked an item for change within a call to notifyObservers // (which is in the process of processing the list of items marked for change). // This means the change may fail to be processed. - llwarns << "Adding changed mask within notify observers! Change will likely be lost." << llendl; + LL_WARNS() << "Adding changed mask within notify observers! Change will likely be lost." << LL_ENDL; } mModifyMask |= mask; @@ -1404,8 +1404,8 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) agent_id = content["agent_id"].asUUID(); if(agent_id != gAgent.getID()) { - llwarns << "Got a inventory update for the wrong agent: " << agent_id - << llendl; + LL_WARNS() << "Got a inventory update for the wrong agent: " << agent_id + << LL_ENDL; return; }*/ item_array_t items; @@ -1418,8 +1418,8 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) LLPointer titem = new LLViewerInventoryItem; titem->unpackMessage(content["items"][i]); - lldebugs << "LLInventoryModel::messageUpdateCore() item id:" - << titem->getUUID() << llendl; + LL_DEBUGS() << "LLInventoryModel::messageUpdateCore() item id:" + << titem->getUUID() << LL_ENDL; items.push_back(titem); // examine update for changes. LLViewerInventoryItem* itemp = gInventory.getItem(titem->getUUID()); @@ -1458,7 +1458,7 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) //If we get back an error (not found, etc...), handle it here void LLInventoryModel::fetchInventoryResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "fetchInventory error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "fetchInventory error [status:" << status << "]: " << content << LL_ENDL; gInventory.notifyObservers(); } @@ -1466,14 +1466,14 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const { if(folder_id.isNull()) { - llwarns << "Calling fetch descendents on NULL folder id!" << llendl; + LL_WARNS() << "Calling fetch descendents on NULL folder id!" << LL_ENDL; return false; } LLViewerInventoryCategory* cat = getCategory(folder_id); if(!cat) { - llwarns << "Asked to fetch descendents of non-existent folder: " - << folder_id << llendl; + LL_WARNS() << "Asked to fetch descendents of non-existent folder: " + << folder_id << LL_ENDL; return false; } //S32 known_descendents = 0; @@ -1494,8 +1494,8 @@ void LLInventoryModel::cache( const LLUUID& parent_folder_id, const LLUUID& agent_id) { - lldebugs << "Caching " << parent_folder_id << " for " << agent_id - << llendl; + LL_DEBUGS() << "Caching " << parent_folder_id << " for " << agent_id + << LL_ENDL; LLViewerInventoryCategory* root_cat = getCategory(parent_folder_id); if(!root_cat) return; cat_array_t categories; @@ -1520,19 +1520,19 @@ void LLInventoryModel::cache( gzip_filename.append(".gz"); if(gzip_file(inventory_filename, gzip_filename)) { - lldebugs << "Successfully compressed " << inventory_filename << llendl; + LL_DEBUGS() << "Successfully compressed " << inventory_filename << LL_ENDL; LLFile::remove(inventory_filename); } else { - llwarns << "Unable to compress " << inventory_filename << llendl; + LL_WARNS() << "Unable to compress " << inventory_filename << LL_ENDL; } } void LLInventoryModel::addCategory(LLViewerInventoryCategory* category) { - //llinfos << "LLInventoryModel::addCategory()" << llendl; + //LL_INFOS() << "LLInventoryModel::addCategory()" << LL_ENDL; if(category) { // We aren't displaying the Meshes folder @@ -1561,7 +1561,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item) if ((item->getType() == LLAssetType::AT_NONE) || LLAssetType::lookup(item->getType()) == LLAssetType::badLookup()) { - llwarns << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << llendl; + LL_WARNS() << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << LL_ENDL; return; } @@ -1569,7 +1569,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item) // The item will show up as a broken link. if (item->getIsBrokenLink()) { - llinfos << "Adding broken link [ name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ) parent: " << item->getParentUUID() << llendl; + LL_INFOS() << "Adding broken link [ name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ) parent: " << item->getParentUUID() << LL_ENDL; } mItemMap[item->getUUID()] = item; @@ -1579,7 +1579,7 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item) // Empty the entire contents void LLInventoryModel::empty() { -// llinfos << "LLInventoryModel::empty()" << llendl; +// LL_INFOS() << "LLInventoryModel::empty()" << LL_ENDL; std::for_each( mParentChildCategoryTree.begin(), mParentChildCategoryTree.end(), @@ -1620,9 +1620,9 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const descendents_actual += update.mDescendentDelta; cat->setDescendentCount(descendents_actual); cat->setVersion(++version); - lldebugs << "accounted: '" << cat->getName() << "' " + LL_DEBUGS() << "accounted: '" << cat->getName() << "' " << version << " with " << descendents_actual - << " descendents." << llendl; + << " descendents." << LL_ENDL; } } if(!accounted) @@ -1630,13 +1630,13 @@ void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const // Error condition, this means that the category did not register that // it got new descendents (perhaps because it is still being loaded) // which means its descendent count will be wrong. - llwarns << "Accounting failed for '" << cat->getName() << "' version:" - << version << llendl; + LL_WARNS() << "Accounting failed for '" << cat->getName() << "' version:" + << version << LL_ENDL; } } else { - llwarns << "No category found for update " << update.mCategoryID << llendl; + LL_WARNS() << "No category found for update " << update.mCategoryID << LL_ENDL; } } @@ -1676,18 +1676,18 @@ void LLInventoryModel::incrementCategoryVersion(const LLUUID& category_id) if(LLViewerInventoryCategory::VERSION_UNKNOWN != version) { cat->setVersion(version + 1); - llinfos << "IncrementVersion: " << cat->getName() << " " - << cat->getVersion() << llendl; + LL_INFOS() << "IncrementVersion: " << cat->getName() << " " + << cat->getVersion() << LL_ENDL; } else { - llinfos << "Attempt to increment version when unknown: " - << category_id << llendl; + LL_INFOS() << "Attempt to increment version when unknown: " + << category_id << LL_ENDL; } } else { - llinfos << "Attempt to increment category: " << category_id << llendl; + LL_INFOS() << "Attempt to increment category: " << category_id << LL_ENDL; } } void LLInventoryModel::incrementCategorySetVersion( @@ -1766,7 +1766,7 @@ bool LLInventoryModel::loadSkeleton( const LLSD& options, const LLUUID& owner_id) { - lldebugs << "importing inventory skeleton for " << owner_id << llendl; + LL_DEBUGS() << "importing inventory skeleton for " << owner_id << LL_ENDL; typedef std::set, InventoryIDPtrLess> cat_set_t; cat_set_t temp_cats; @@ -1803,7 +1803,7 @@ bool LLInventoryModel::loadSkeleton( } else { - llwarns << "Unable to import near " << name.asString() << llendl; + LL_WARNS() << "Unable to import near " << name.asString() << LL_ENDL; rv = false; } } @@ -1840,7 +1840,7 @@ bool LLInventoryModel::loadSkeleton( } else { - llinfos << "Unable to gunzip " << gzip_filename << llendl; + LL_INFOS() << "Unable to gunzip " << gzip_filename << LL_ENDL; } } bool is_cache_obsolete = false; @@ -1921,10 +1921,10 @@ bool LLInventoryModel::loadSkeleton( if (item->getIsBrokenLink()) { //bad_link_count++; - lldebugs << "Attempted to add cached link item without baseobj present ( name: " + LL_DEBUGS() << "Attempted to add cached link item without baseobj present ( name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() - << " ). Ignoring and invalidating " << cat->getName() << " . " << llendl; + << " ). Ignoring and invalidating " << cat->getName() << " . " << LL_ENDL; possible_broken_links.push_back(item); continue; } @@ -1951,7 +1951,7 @@ bool LLInventoryModel::loadSkeleton( { bad_link_count++; invalid_categories.insert(cit->second); - //llinfos << "link still broken: " << item->getName() << " in folder " << cat->getName() << llendl; + //LL_INFOS() << "link still broken: " << item->getName() << " in folder " << cat->getName() << LL_ENDL; } else { @@ -1963,11 +1963,11 @@ bool LLInventoryModel::loadSkeleton( } } - llinfos << "Attempted to add " << bad_link_count + LL_INFOS() << "Attempted to add " << bad_link_count << " cached link items without baseobj present. " << good_link_count << " link items were successfully added. " << recovered_link_count << " links added in recovery. " - << "The corresponding categories were invalidated." << llendl; + << "The corresponding categories were invalidated." << LL_ENDL; } } @@ -1991,9 +1991,9 @@ bool LLInventoryModel::loadSkeleton( { LLViewerInventoryCategory* cat = (*invalid_cat_it).get(); cat->setVersion(NO_VERSION); - LL_DEBUGS("Inventory") << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << llendl; + LL_DEBUGS("Inventory") << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << LL_ENDL; } - LL_INFOS("Inventory") << "Invalidated " << invalid_categories.size() << " categories due to invalid descendents cache" << llendl; + LL_INFOS("Inventory") << "Invalidated " << invalid_categories.size() << " categories due to invalid descendents cache" << LL_ENDL; // At this point, we need to set the known descendents for each // category which successfully cached so that we do not @@ -2025,15 +2025,15 @@ bool LLInventoryModel::loadSkeleton( if(is_cache_obsolete) { // If out of date, remove the gzipped file too. - llwarns << "Inv cache out of date, removing" << llendl; + LL_WARNS() << "Inv cache out of date, removing" << LL_ENDL; LLFile::remove(gzip_filename); } categories.clear(); // will unref and delete entries } - llinfos << "Successfully loaded " << cached_category_count + LL_INFOS() << "Successfully loaded " << cached_category_count << " categories and " << cached_item_count << " items from cache." - << llendl; + << LL_ENDL; return rv; } @@ -2043,7 +2043,7 @@ bool LLInventoryModel::loadSkeleton( // should be sufficient for our needs. void LLInventoryModel::buildParentChildMap() { - llinfos << "LLInventoryModel::buildParentChildMap()" << llendl; + LL_INFOS() << "LLInventoryModel::buildParentChildMap()" << LL_ENDL; // *NOTE: I am skipping the logic around folder version // synchronization here because it seems if a folder is lost, we @@ -2107,8 +2107,8 @@ void LLInventoryModel::buildParentChildMap() // implement it, we would need a set or map of uuid pairs // which would be (folder_id, new_parent_id) to be sent up // to the server. - llinfos << "Lost categroy: " << cat->getUUID() << " - " - << cat->getName() << llendl; + LL_INFOS() << "Lost categroy: " << cat->getUUID() << " - " + << cat->getName() << LL_ENDL; ++lost; // plop it into the lost & found. LLFolderType::EType pref = cat->getPreferredType(); @@ -2134,13 +2134,13 @@ void LLInventoryModel::buildParentChildMap() } else { - llwarns << "Lost and found Not there!!" << llendl; + LL_WARNS() << "Lost and found Not there!!" << LL_ENDL; } } } if(lost) { - llwarns << "Found " << lost << " lost categories." << llendl; + LL_WARNS() << "Found " << lost << " lost categories." << LL_ENDL; } const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null); @@ -2174,8 +2174,8 @@ void LLInventoryModel::buildParentChildMap() } else { - llinfos << "Lost item: " << item->getUUID() << " - " - << item->getName() << llendl; + LL_INFOS() << "Lost item: " << item->getUUID() << " - " + << item->getName() << LL_ENDL; ++lost; // plop it into the lost & found. // @@ -2191,13 +2191,13 @@ void LLInventoryModel::buildParentChildMap() } else { - llwarns << "Lost and found Not there!!" << llendl; + LL_WARNS() << "Lost and found Not there!!" << LL_ENDL; } } } if(lost) { - llwarns << "Found " << lost << " lost items." << llendl; + LL_WARNS() << "Found " << lost << " lost items." << LL_ENDL; LLMessageSystem* msg = gMessageSystem; BOOL start_new_message = TRUE; const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); @@ -2266,7 +2266,7 @@ void LLInventoryModel::buildParentChildMap() // The inv tree is built. mIsAgentInvUsable = true; - llinfos << "Inventory initialized, notifying observers" << llendl; + LL_INFOS() << "Inventory initialized, notifying observers" << LL_ENDL; addChangedMask(LLInventoryObserver::ALL, LLUUID::null); notifyObservers(); } @@ -2313,14 +2313,14 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, { if(filename.empty()) { - llerrs << "Filename is Null!" << llendl; + LL_ERRS() << "Filename is Null!" << LL_ENDL; return false; } - llinfos << "LLInventoryModel::loadFromFile(" << filename << ")" << llendl; + LL_INFOS() << "LLInventoryModel::loadFromFile(" << filename << ")" << LL_ENDL; LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if(!file) { - llinfos << "unable to load inventory from: " << filename << llendl; + LL_INFOS() << "unable to load inventory from: " << filename << LL_ENDL; return false; } // *NOTE: This buffer size is hard coded into scanf() below. @@ -2359,7 +2359,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, } else { - llwarns << "loadInventoryFromFile(). Ignoring invalid inventory category: " << inv_cat->getName() << llendl; + LL_WARNS() << "loadInventoryFromFile(). Ignoring invalid inventory category: " << inv_cat->getName() << LL_ENDL; //delete inv_cat; // automatic when inv_cat is reassigned or destroyed } } @@ -2377,8 +2377,8 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, if(inv_item->getUUID().isNull()) { //delete inv_item; // automatic when inv_cat is reassigned or destroyed - llwarns << "Ignoring inventory with null item id: " - << inv_item->getName() << llendl; + LL_WARNS() << "Ignoring inventory with null item id: " + << inv_item->getName() << LL_ENDL; } else @@ -2388,14 +2388,14 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, } else { - llwarns << "loadInventoryFromFile(). Ignoring invalid inventory item: " << inv_item->getName() << llendl; + LL_WARNS() << "loadInventoryFromFile(). Ignoring invalid inventory item: " << inv_item->getName() << LL_ENDL; //delete inv_item; // automatic when inv_cat is reassigned or destroyed } } else { - llwarns << "Unknown token in inventory file '" << keyword << "'" - << llendl; + LL_WARNS() << "Unknown token in inventory file '" << keyword << "'" + << LL_ENDL; } } fclose(file); @@ -2411,14 +2411,14 @@ bool LLInventoryModel::saveToFile(const std::string& filename, { if(filename.empty()) { - llerrs << "Filename is Null!" << llendl; + LL_ERRS() << "Filename is Null!" << LL_ENDL; return false; } - llinfos << "LLInventoryModel::saveToFile(" << filename << ")" << llendl; + LL_INFOS() << "LLInventoryModel::saveToFile(" << filename << ")" << LL_ENDL; LLFILE* file = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ if(!file) { - llwarns << "unable to save inventory to: " << filename << llendl; + LL_WARNS() << "unable to save inventory to: " << filename << LL_ENDL; return false; } @@ -2523,8 +2523,8 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a inventory update for the wrong agent: " << agent_id - << llendl; + LL_WARNS() << "Got a inventory update for the wrong agent: " << agent_id + << LL_ENDL; return false; } item_array_t items; @@ -2536,8 +2536,8 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account) { LLPointer titem = new LLViewerInventoryItem; titem->unpackMessage(msg, _PREHASH_InventoryData, i); - lldebugs << "LLInventoryModel::messageUpdateCore() item id:" - << titem->getUUID() << llendl; + LL_DEBUGS() << "LLInventoryModel::messageUpdateCore() item id:" + << titem->getUUID() << LL_ENDL; items.push_back(titem); // examine update for changes. LLViewerInventoryItem* itemp = gInventory.getItem(titem->getUUID()); @@ -2584,17 +2584,17 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg { LLUUID item_id; S32 count = msg->getNumberOfBlocksFast(msg_label); - lldebugs << "Message has " << count << " item blocks" << llendl; + LL_DEBUGS() << "Message has " << count << " item blocks" << LL_ENDL; uuid_vec_t item_ids; update_map_t update; for(S32 i = 0; i < count; ++i) { msg->getUUIDFast(msg_label, _PREHASH_ItemID, item_id, i); - lldebugs << "Checking for item-to-be-removed " << item_id << llendl; + LL_DEBUGS() << "Checking for item-to-be-removed " << item_id << LL_ENDL; LLViewerInventoryItem* itemp = gInventory.getItem(item_id); if(itemp) { - lldebugs << "Item will be removed " << item_id << llendl; + LL_DEBUGS() << "Item will be removed " << item_id << LL_ENDL; // we only bother with the delete and account if we found // the item - this is usually a back-up for permissions, // so frequently the item will already be gone. @@ -2605,7 +2605,7 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg gInventory.accountForUpdate(update); for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it) { - lldebugs << "Calling deleteObject " << *it << llendl; + LL_DEBUGS() << "Calling deleteObject " << *it << LL_ENDL; gInventory.deleteObject(*it); } } @@ -2613,13 +2613,13 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg // static void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**) { - lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl; + LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryItem()" << LL_ENDL; LLUUID agent_id, item_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a RemoveInventoryItem for the wrong agent." - << llendl; + LL_WARNS() << "Got a RemoveInventoryItem for the wrong agent." + << LL_ENDL; return; } LLInventoryModel::removeInventoryItem(agent_id, msg, _PREHASH_InventoryData); @@ -2630,14 +2630,14 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**) void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg, void**) { - lldebugs << "LLInventoryModel::processUpdateInventoryFolder()" << llendl; + LL_DEBUGS() << "LLInventoryModel::processUpdateInventoryFolder()" << LL_ENDL; LLUUID agent_id, folder_id, parent_id; //char name[DB_INV_ITEM_NAME_BUF_SIZE]; msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got an UpdateInventoryFolder for the wrong agent." - << llendl; + LL_WARNS() << "Got an UpdateInventoryFolder for the wrong agent." + << LL_ENDL; return; } LLPointer lastfolder; // hack @@ -2715,14 +2715,14 @@ void LLInventoryModel::removeInventoryFolder(LLUUID agent_id, void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg, void**) { - lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl; + LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryFolder()" << LL_ENDL; LLUUID agent_id, session_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a RemoveInventoryFolder for the wrong agent." - << llendl; + LL_WARNS() << "Got a RemoveInventoryFolder for the wrong agent." + << LL_ENDL; return; } LLInventoryModel::removeInventoryFolder( agent_id, msg ); @@ -2733,14 +2733,14 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg, void LLInventoryModel::processRemoveInventoryObjects(LLMessageSystem* msg, void**) { - lldebugs << "LLInventoryModel::processRemoveInventoryObjects()" << llendl; + LL_DEBUGS() << "LLInventoryModel::processRemoveInventoryObjects()" << LL_ENDL; LLUUID agent_id, session_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a RemoveInventoryObjects for the wrong agent." - << llendl; + LL_WARNS() << "Got a RemoveInventoryObjects for the wrong agent." + << LL_ENDL; return; } LLInventoryModel::removeInventoryFolder( agent_id, msg ); @@ -2756,8 +2756,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg, msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a SaveAssetIntoInventory message for the wrong agent." - << llendl; + LL_WARNS() << "Got a SaveAssetIntoInventory message for the wrong agent." + << LL_ENDL; return; } @@ -2767,8 +2767,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg, // The viewer ignores the asset id because this message is only // used for attachments/objects, so the asset id is not used in // the viewer anyway. - lldebugs << "LLInventoryModel::processSaveAssetIntoInventory itemID=" - << item_id << llendl; + LL_DEBUGS() << "LLInventoryModel::processSaveAssetIntoInventory itemID=" + << item_id << LL_ENDL; LLViewerInventoryItem* item = gInventory.getItem( item_id ); if( item ) { @@ -2779,8 +2779,8 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg, } else { - llinfos << "LLInventoryModel::processSaveAssetIntoInventory item" - " not found: " << item_id << llendl; + LL_INFOS() << "LLInventoryModel::processSaveAssetIntoInventory item" + " not found: " << item_id << LL_ENDL; } if(gViewerWindow) { @@ -2803,13 +2803,13 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a BulkUpdateInventory for the wrong agent." << llendl; + LL_WARNS() << "Got a BulkUpdateInventory for the wrong agent." << LL_ENDL; return; } LLUUID tid; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, tid); #ifndef LL_RELEASE_FOR_DOWNLOAD - llinfos << "Bulk inventory: " << tid << llendl; + LL_INFOS() << "Bulk inventory: " << tid << LL_ENDL; #endif update_map_t update; @@ -2821,9 +2821,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLPointer tfolder = new LLViewerInventoryCategory(gAgent.getID()); tfolder->unpackMessage(msg, _PREHASH_FolderData, i); - llinfos << "unpacked folder '" << tfolder->getName() << "' (" + LL_INFOS() << "unpacked folder '" << tfolder->getName() << "' (" << tfolder->getUUID() << ") in " << tfolder->getParentUUID() - << llendl; + << LL_ENDL; if(tfolder->getUUID().notNull()) { folders.push_back(tfolder); @@ -2863,8 +2863,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLPointer titem = new LLViewerInventoryItem; titem->unpackMessage(msg, _PREHASH_ItemData, i); - llinfos << "unpacked item '" << titem->getName() << "' in " - << titem->getParentUUID() << llendl; + LL_INFOS() << "unpacked item '" << titem->getName() << "' in " + << titem->getParentUUID() << LL_ENDL; U32 callback_id; msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); if(titem->getUUID().notNull() ) // && callback_id.notNull() ) @@ -2970,7 +2970,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a UpdateInventoryItem for the wrong agent." << llendl; + LL_WARNS() << "Got a UpdateInventoryItem for the wrong agent." << LL_ENDL; return; } LLUUID parent_id; @@ -2999,7 +2999,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) // If the item has already been added (e.g. from link prefetch), then it doesn't need to be re-added. if (gInventory.getItem(titem->getUUID())) { - lldebugs << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl; + LL_DEBUGS() << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << LL_ENDL; continue; } gInventory.updateItem(titem); @@ -3021,13 +3021,13 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) // static void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**) { - lldebugs << "LLInventoryModel::processMoveInventoryItem()" << llendl; + LL_DEBUGS() << "LLInventoryModel::processMoveInventoryItem()" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got a MoveInventoryItem message for the wrong agent." - << llendl; + LL_WARNS() << "Got a MoveInventoryItem message for the wrong agent." + << LL_ENDL; return; } @@ -3046,8 +3046,8 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**) msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_FolderID, folder_id, i); msg->getString("InventoryData", "NewName", new_name, i); - lldebugs << "moving item " << item_id << " to folder " - << folder_id << llendl; + LL_DEBUGS() << "moving item " << item_id << " to folder " + << folder_id << LL_ENDL; update_list_t update; LLCategoryUpdate old_folder(item->getParentUUID(), -1); update.push_back(old_folder); @@ -3065,7 +3065,7 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**) } else { - llinfos << "LLInventoryModel::processMoveInventoryItem item not found: " << item_id << llendl; + LL_INFOS() << "LLInventoryModel::processMoveInventoryItem item not found: " << item_id << LL_ENDL; } } if(anything_changed) @@ -3221,7 +3221,7 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2() // Do not call this before parentchild map is built. if (!gInventory.mIsAgentInvUsable) { - llwarns << "Parent Child Map not yet built; guessing as first time in viewer2." << llendl; + LL_WARNS() << "Parent Child Map not yet built; guessing as first time in viewer2." << LL_ENDL; return TRUE; } @@ -3356,37 +3356,37 @@ void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, // *NOTE: DEBUG functionality void LLInventoryModel::dumpInventory() const { - llinfos << "\nBegin Inventory Dump\n**********************:" << llendl; - llinfos << "mCategory[] contains " << mCategoryMap.size() << " items." << llendl; + LL_INFOS() << "\nBegin Inventory Dump\n**********************:" << LL_ENDL; + LL_INFOS() << "mCategory[] contains " << mCategoryMap.size() << " items." << LL_ENDL; for(cat_map_t::const_iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit) { const LLViewerInventoryCategory* cat = cit->second; if(cat) { - llinfos << " " << cat->getUUID() << " '" << cat->getName() << "' " + LL_INFOS() << " " << cat->getUUID() << " '" << cat->getName() << "' " << cat->getVersion() << " " << cat->getDescendentCount() - << llendl; + << LL_ENDL; } else { - llinfos << " NULL!" << llendl; + LL_INFOS() << " NULL!" << LL_ENDL; } } - llinfos << "mItemMap[] contains " << mItemMap.size() << " items." << llendl; + LL_INFOS() << "mItemMap[] contains " << mItemMap.size() << " items." << LL_ENDL; for(item_map_t::const_iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit) { const LLViewerInventoryItem* item = iit->second; if(item) { - llinfos << " " << item->getUUID() << " " - << item->getName() << llendl; + LL_INFOS() << " " << item->getUUID() << " " + << item->getName() << LL_ENDL; } else { - llinfos << " NULL!" << llendl; + LL_INFOS() << " NULL!" << LL_ENDL; } } - llinfos << "\n**********************\nEnd Inventory Dump" << llendl; + LL_INFOS() << "\n**********************\nEnd Inventory Dump" << LL_ENDL; } ///---------------------------------------------------------------------------- diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index d88e0c3192..a8fda4fcf8 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -200,7 +200,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() // No more categories to fetch, stop fetch process. if (mFetchQueue.empty()) { - llinfos << "Inventory fetch completed" << llendl; + LL_INFOS() << "Inventory fetch completed" << LL_ENDL; setAllFoldersFetched(); mBackgroundFetchActive = false; @@ -216,7 +216,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() // Double timeouts on failure. mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); - lldebugs << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + LL_DEBUGS() << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; // fetch is no longer considered "timely" although we will wait for full time-out. mTimelyFetchPending = FALSE; } @@ -289,7 +289,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() // Shrink timeouts based on success. mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + LL_DEBUGS() << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; } mTimelyFetchPending = FALSE; @@ -417,8 +417,8 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) //if(agent_id != gAgent.getID()) //This should never happen. //{ - // llwarns << "Got a UpdateInventoryItem for the wrong agent." - // << llendl; + // LL_WARNS() << "Got a UpdateInventoryItem for the wrong agent." + // << LL_ENDL; // break; //} @@ -512,8 +512,8 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) LLSD folder_sd = *folder_it; // These folders failed on the dataserver. We probably don't want to retry them. - llinfos << "Folder " << folder_sd["folder_id"].asString() - << "Error: " << folder_sd["error"].asString() << llendl; + LL_INFOS() << "Folder " << folder_sd["folder_id"].asString() + << "Error: " << folder_sd["error"].asString() << LL_ENDL; } } @@ -521,7 +521,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) if (fetcher->isBulkFetchProcessingComplete()) { - llinfos << "Inventory fetch completed" << llendl; + LL_INFOS() << "Inventory fetch completed" << LL_ENDL; fetcher->setAllFoldersFetched(); } @@ -533,8 +533,8 @@ void LLInventoryModelFetchDescendentsResponder::errorWithContent(U32 status, con { LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance(); - llinfos << "LLInventoryModelFetchDescendentsResponder::error [status:" - << status << "]: " << content << llendl; + LL_INFOS() << "LLInventoryModelFetchDescendentsResponder::error [status:" + << status << "]: " << content << LL_ENDL; fetcher->incrFetchCount(-1); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 1083a6b37d..8b7b12e844 100755 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -149,10 +149,10 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& i void LLInventoryFetchItemsObserver::changed(U32 mask) { - lldebugs << this << " remaining incomplete " << mIncomplete.size() + LL_DEBUGS() << this << " remaining incomplete " << mIncomplete.size() << " complete " << mComplete.size() << " wait period " << mFetchingPeriod.getRemainingTimeF32() - << llendl; + << LL_ENDL; // scan through the incomplete items and move or erase them as // appropriate. @@ -176,7 +176,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) if (timeout_expired) { // Just concede that this item hasn't arrived in reasonable time and continue on. - llwarns << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL; + LL_WARNS() << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL; it = mIncomplete.erase(it); } else @@ -191,12 +191,12 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) if (mIncomplete.empty()) { - lldebugs << this << " done at remaining incomplete " - << mIncomplete.size() << " complete " << mComplete.size() << llendl; + LL_DEBUGS() << this << " done at remaining incomplete " + << mIncomplete.size() << " complete " << mComplete.size() << LL_ENDL; done(); } - //llinfos << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << llendl; - //llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl; + //LL_INFOS() << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << LL_ENDL; + //LL_INFOS() << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << LL_ENDL; } void fetch_items_from_llsd(const LLSD& items_llsd) @@ -224,12 +224,12 @@ void fetch_items_from_llsd(const LLSD& items_llsd) { if (!gAgent.getRegion()) { - llwarns << "Agent's region is null" << llendl; + LL_WARNS() << "Agent's region is null" << LL_ENDL; break; } if (0 == body[i]["items"].size()) { - lldebugs << "Skipping body with no items to fetch" << llendl; + LL_DEBUGS() << "Skipping body with no items to fetch" << LL_ENDL; continue; } @@ -391,7 +391,7 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven gInventory.getDirectDescendentsOf(cat->getUUID(), cats, items); if (!cats || !items) { - llwarns << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << llendl; + LL_WARNS() << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << LL_ENDL; // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean // that the cat just doesn't have any items or subfolders). // Unrecoverable, so just return done so that this observer can be cleared @@ -411,7 +411,7 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven // count and thus the category thinks it has fewer descendents than it actually has. if (current_num_known_descendents >= expected_num_descendents) { - llwarns << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << llendl; + LL_WARNS() << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << LL_ENDL; const_cast(cat)->setDescendentCount(current_num_known_descendents); return TRUE; } @@ -714,7 +714,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask) gInventory.getDirectDescendentsOf(cat_id, cats, items); if (!cats || !items) { - llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl; + LL_WARNS() << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << LL_ENDL; // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean // that the cat just doesn't have any items or subfolders). // Unrecoverable, so just skip this category. @@ -781,7 +781,7 @@ bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t gInventory.getDirectDescendentsOf(cat_id, cats, items); if (!cats || !items) { - llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl; + LL_WARNS() << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << LL_ENDL; // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean // that the cat just doesn't have any items or subfolders). // Unrecoverable, so just return "false" meaning that the category can't be observed. diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 8190887ba6..7239a7e850 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -590,7 +590,7 @@ LLUUID LLInventoryPanel::getRootFolderID() root_id = gInventory.findCategoryUUIDForType(preferred_type, false); if (root_id.isNull()) { - llwarns << "Could not find folder of type " << preferred_type << llendl; + LL_WARNS() << "Could not find folder of type " << preferred_type << LL_ENDL; root_id.generateNewID(); } } @@ -757,9 +757,9 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) if (objectp->getType() <= LLAssetType::AT_NONE || objectp->getType() >= LLAssetType::AT_COUNT) { - llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " + LL_WARNS() << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID() - << llendl; + << LL_ENDL; return NULL; } @@ -1161,7 +1161,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory"); if (!floater_inventory) { - llwarns << "Could not find My Inventory floater" << llendl; + LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL; return FALSE; } diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 3d1f186bba..d38f90015e 100755 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -121,7 +121,7 @@ void LLJoystick::updateSlop() break; default: - llerrs << "LLJoystick::LLJoystick() - bad switch case" << llendl; + LL_ERRS() << "LLJoystick::LLJoystick() - bad switch case" << LL_ENDL; break; } @@ -132,7 +132,7 @@ bool LLJoystick::pointInCircle(S32 x, S32 y) const { if(this->getLocalRect().getHeight() != this->getLocalRect().getWidth()) { - llwarns << "Joystick shape is not square"<getAgentParcel(); if(!agent_parcel) { - llwarns << "No agent region" << llendl; + LL_WARNS() << "No agent region" << LL_ENDL; return false; } if (agent_parcel->getAllowLandmark() @@ -252,13 +252,13 @@ void LLLandmarkActions::createLandmarkHere( { if(!gAgent.getRegion()) { - llwarns << "No agent region" << llendl; + LL_WARNS() << "No agent region" << LL_ENDL; return; } LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (!agent_parcel) { - llwarns << "No agent parcel" << llendl; + LL_WARNS() << "No agent parcel" << LL_ENDL; return; } if (!canCreateLandmarkHere()) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 2a131eff58..8e0db738fb 100755 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -141,7 +141,7 @@ void LLLandmarkList::processGetAssetReply( } else { - // SJB: No use case for a notification here. Use lldebugs instead + // SJB: No use case for a notification here. Use LL_DEBUGS() instead if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) { LL_WARNS("Landmarks") << "Missing Landmark" << LL_ENDL; @@ -174,7 +174,7 @@ void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id) if (!landmark) { - llwarns << "Got region handle but the landmark not found." << llendl; + LL_WARNS() << "Got region handle but the landmark not found." << LL_ENDL; return; } @@ -183,7 +183,7 @@ void LLLandmarkList::onRegionHandle(const LLUUID& landmark_id) LLVector3d pos; if (!landmark->getGlobalPos(pos)) { - llwarns << "Got region handle but the landmark global position is still unknown." << llendl; + LL_WARNS() << "Got region handle but the landmark global position is still unknown." << LL_ENDL; return; } @@ -196,7 +196,7 @@ void LLLandmarkList::makeCallbacks(const LLUUID& landmark_id) if (!landmark) { - llwarns << "Landmark to make callbacks for not found." << llendl; + LL_WARNS() << "Landmark to make callbacks for not found." << LL_ENDL; } // make all the callbacks here. diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp index 6421ab42bf..a624c9fb87 100755 --- a/indra/newview/lllistcontextmenu.cpp +++ b/indra/newview/lllistcontextmenu.cpp @@ -80,7 +80,7 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 menup = createMenu(); if (!menup) { - llwarns << "Context menu creation failed" << llendl; + LL_WARNS() << "Context menu creation failed" << LL_ENDL; return; } diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 8b088da12e..1948475530 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -111,8 +111,8 @@ LLLocalBitmap::LLLocalBitmap(std::string filename) } else { - llwarns << "File of no valid extension given, local bitmap creation aborted." << "\n" - << "Filename: " << mFilename << llendl; + LL_WARNS() << "File of no valid extension given, local bitmap creation aborted." << "\n" + << "Filename: " << mFilename << LL_ENDL; return; // no valid extension. } @@ -231,10 +231,10 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) } else { - llwarns << "During the update process the following file was found" << "\n" + LL_WARNS() << "During the update process the following file was found" << "\n" << "but could not be opened or decoded for " << LL_LOCAL_UPDATE_RETRIES << " attempts." << "\n" << "Filename: " << mFilename << "\n" - << "Disabling further update attempts for this file." << llendl; + << "Disabling further update attempts for this file." << LL_ENDL; LLSD notif_args; notif_args["FNAME"] = mFilename; @@ -250,9 +250,9 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) else { - llwarns << "During the update process, the following file was not found." << "\n" + LL_WARNS() << "During the update process, the following file was not found." << "\n" << "Filename: " << mFilename << "\n" - << "Disabling further update attempts for this file." << llendl; + << "Disabling further update attempts for this file." << LL_ENDL; LLSD notif_args; notif_args["FNAME"] = mFilename; @@ -318,13 +318,13 @@ bool LLLocalBitmap::decodeBitmap(LLPointer rawimg) default: { - // separating this into -several- llwarns calls because in the extremely unlikely case that this happens + // separating this into -several- LL_WARNS() calls because in the extremely unlikely case that this happens // accessing mFilename and any other object properties might very well crash the viewer. // getting here should be impossible, or there's been a pretty serious bug. - llwarns << "During a decode attempt, the following local bitmap had no properly assigned extension." << llendl; - llwarns << "Filename: " << mFilename << llendl; - llwarns << "Disabling further update attempts for this file." << llendl; + LL_WARNS() << "During a decode attempt, the following local bitmap had no properly assigned extension." << LL_ENDL; + LL_WARNS() << "Filename: " << mFilename << LL_ENDL; + LL_WARNS() << "Disabling further update attempts for this file." << LL_ENDL; mLinkStatus = LS_BROKEN; } } @@ -337,8 +337,8 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id) // checking for misuse. if (old_id == new_id) { - llinfos << "An attempt was made to replace a texture with itself. (matching UUIDs)" << "\n" - << "Texture UUID: " << old_id.asString() << llendl; + LL_INFOS() << "An attempt was made to replace a texture with itself. (matching UUIDs)" << "\n" + << "Texture UUID: " << old_id.asString() << LL_ENDL; return; } @@ -769,11 +769,11 @@ LLAvatarAppearanceDefines::ETextureIndex LLLocalBitmap::getTexIndex( default: { - llwarns << "Unknown wearable type: " << (int)type << "\n" + LL_WARNS() << "Unknown wearable type: " << (int)type << "\n" << "Baked Texture Index: " << (int)baked_texind << "\n" << "Filename: " << mFilename << "\n" << "TrackingID: " << mTrackingID << "\n" - << "InworldID: " << mWorldID << llendl; + << "InworldID: " << mWorldID << LL_ENDL; } } @@ -845,8 +845,8 @@ bool LLLocalBitmapMgr::addUnit() } else { - llwarns << "Attempted to add invalid or unreadable image file, attempt cancelled.\n" - << "Filename: " << filename << llendl; + LL_WARNS() << "Attempted to add invalid or unreadable image file, attempt cancelled.\n" + << "Filename: " << filename << LL_ENDL; LLSD notif_args; notif_args["FNAME"] = filename; diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 5138c5e620..680b35b550 100755 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -107,11 +107,11 @@ bool LLLocationHistory::getMatchingItems(const std::string& substring, location_ void LLLocationHistory::dump() const { - llinfos << "Location history dump:" << llendl; + LL_INFOS() << "Location history dump:" << LL_ENDL; int i = 0; for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it, ++i) { - llinfos << "#" << std::setw(2) << std::setfill('0') << i << ": " << it->getLocation() << llendl; + LL_INFOS() << "#" << std::setw(2) << std::setfill('0') << i << ": " << it->getLocation() << LL_ENDL; } } @@ -122,7 +122,7 @@ void LLLocationHistory::save() const if (resolved_filename.empty()) { - llinfos << "can't get path to location history filename - probably not logged in yet." << llendl; + LL_INFOS() << "can't get path to location history filename - probably not logged in yet." << LL_ENDL; return; } @@ -130,7 +130,7 @@ void LLLocationHistory::save() const llofstream file (resolved_filename); if (!file.is_open()) { - llwarns << "can't open location history file \"" << mFilename << "\" for writing" << llendl; + LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL; return; } @@ -144,7 +144,7 @@ void LLLocationHistory::save() const void LLLocationHistory::load() { - llinfos << "Loading location history." << llendl; + LL_INFOS() << "Loading location history." << LL_ENDL; // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); @@ -152,7 +152,7 @@ void LLLocationHistory::load() if (!file.is_open()) { - llwarns << "can't load location history from file \"" << mFilename << "\"" << llendl; + LL_WARNS() << "can't load location history from file \"" << mFilename << "\"" << LL_ENDL; return; } @@ -166,7 +166,7 @@ void LLLocationHistory::load() std::istringstream iss(line); if (parser->parse(iss, s_item, line.length()) == LLSDParser::PARSE_FAILURE) { - llinfos<< "Parsing saved teleport history failed" << llendl; + LL_INFOS()<< "Parsing saved teleport history failed" << LL_ENDL; break; } diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 5022dba934..a6bd666b08 100755 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -384,7 +384,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!mLocationContextMenu) { - llwarns << "Error loading navigation bar context menu" << llendl; + LL_WARNS() << "Error loading navigation bar context menu" << LL_ENDL; } getTextEntry()->setRightMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked,this,_2,_3,_4)); @@ -777,7 +777,7 @@ void LLLocationInputCtrl::refreshLocation() (mTextEntry && mTextEntry->hasFocus()) || (mAddLandmarkBtn->hasFocus())) { - llwarns << "Location input should not be refreshed when having focus" << llendl; + LL_WARNS() << "Location input should not be refreshed when having focus" << LL_ENDL; return; } diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 60272749ff..e8424d840a 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -300,7 +300,7 @@ void LLLogChat::saveHistory(const std::string& filename, llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app); if (!file.is_open()) { - llwarns << "Couldn't open chat history log! - " + filename << llendl; + LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL; return; } @@ -337,7 +337,7 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list& m { if (file_name.empty()) { - llwarns << "Session name is Empty!" << llendl; + LL_WARNS() << "Session name is Empty!" << LL_ENDL; return ; } diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index f681c12747..df59283bc4 100755 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -202,7 +202,7 @@ MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, void MandatoryUpdateMachine::start(void) { - llinfos << "starting mandatory update machine" << llendl; + LL_INFOS() << "starting mandatory update machine" << LL_ENDL; if(mUpdaterService.isChecking()) { switch(mUpdaterService.getState()) { @@ -268,7 +268,7 @@ MandatoryUpdateMachine::CheckingForUpdate::CheckingForUpdate(MandatoryUpdateMach void MandatoryUpdateMachine::CheckingForUpdate::enter(void) { - llinfos << "entering checking for update" << llendl; + LL_INFOS() << "entering checking for update" << LL_ENDL; mProgressView = gViewerWindow->getProgressView(); mProgressView->setMessage("Looking for update..."); @@ -327,7 +327,7 @@ MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine): void MandatoryUpdateMachine::Error::enter(void) { - llinfos << "entering error" << llendl; + LL_INFOS() << "entering error" << LL_ENDL; LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2)); } @@ -358,7 +358,7 @@ MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & void MandatoryUpdateMachine::ReadyToInstall::enter(void) { - llinfos << "entering ready to install" << llendl; + LL_INFOS() << "entering ready to install" << LL_ENDL; // Open update ready dialog. } @@ -383,7 +383,7 @@ MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(Mandatory void MandatoryUpdateMachine::StartingUpdaterService::enter(void) { - llinfos << "entering start update service" << llendl; + LL_INFOS() << "entering start update service" << LL_ENDL; LLNotificationsUtil::add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2)); } @@ -420,7 +420,7 @@ MandatoryUpdateMachine::WaitingForDownload::WaitingForDownload(MandatoryUpdateMa void MandatoryUpdateMachine::WaitingForDownload::enter(void) { - llinfos << "entering waiting for download" << llendl; + LL_INFOS() << "entering waiting for download" << LL_ENDL; mProgressView = gViewerWindow->getProgressView(); mProgressView->setMessage("Downloading update..."); std::ostringstream stream; @@ -589,7 +589,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE]; if ( ! llHashedUniqueID(hashed_unique_id_string) ) { - llwarns << "Not providing a unique id in request params" << llendl; + LL_WARNS() << "Not providing a unique id in request params" << LL_ENDL; } request_params["start"] = construct_start_string(); request_params["skipoptional"] = mSkipOptionalUpdate; @@ -621,7 +621,7 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event) if(!(event.has("state") && event.has("change") && event.has("progress"))) { - llerrs << "Unknown message from LLLogin: " << event << llendl; + LL_ERRS() << "Unknown message from LLLogin: " << event << LL_ENDL; } mLoginState = event["state"].asString(); @@ -656,7 +656,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) // to reconnect or to end the attempt in failure. if(reason_response == "tos") { - llinfos << "LLLoginInstance::handleLoginFailure ToS" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginFailure ToS" << LL_ENDL; LLSD data(LLSD::emptyMap()); data["message"] = message_response; @@ -671,7 +671,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } else if(reason_response == "critical") { - llinfos << "LLLoginInstance::handleLoginFailure Crit" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginFailure Crit" << LL_ENDL; LLSD data(LLSD::emptyMap()); data["message"] = message_response; @@ -696,27 +696,27 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } else if(reason_response == "update" || gSavedSettings.getBOOL("ForceMandatoryUpdate")) { - llinfos << "LLLoginInstance::handleLoginFailure update" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginFailure update" << LL_ENDL; gSavedSettings.setBOOL("ForceMandatoryUpdate", FALSE); updateApp(true, message_response); } else if(reason_response == "optional") { - llinfos << "LLLoginInstance::handleLoginFailure optional" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginFailure optional" << LL_ENDL; updateApp(false, message_response); } else { - llinfos << "LLLoginInstance::handleLoginFailure attemptComplete" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginFailure attemptComplete" << LL_ENDL; attemptComplete(); } } void LLLoginInstance::handleLoginSuccess(const LLSD& event) { - llinfos << "LLLoginInstance::handleLoginSuccess" << llendl; + LL_INFOS() << "LLLoginInstance::handleLoginSuccess" << LL_ENDL; if(gSavedSettings.getBOOL("ForceMandatoryUpdate")) { @@ -740,7 +740,7 @@ void LLLoginInstance::handleDisconnect(const LLSD& event) { // placeholder - llinfos << "LLLoginInstance::handleDisconnect placeholder " << llendl; + LL_INFOS() << "LLLoginInstance::handleDisconnect placeholder " << LL_ENDL; } void LLLoginInstance::handleIndeterminate(const LLSD& event) @@ -754,7 +754,7 @@ void LLLoginInstance::handleIndeterminate(const LLSD& event) LLSD message = event.get("data").get("message"); if(message.isDefined()) { - llinfos << "LLLoginInstance::handleIndeterminate " << message.asString() << llendl; + LL_INFOS() << "LLLoginInstance::handleIndeterminate " << message.asString() << LL_ENDL; LLSD progress_update; progress_update["desc"] = message; @@ -766,7 +766,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key) { if(accepted) { - llinfos << "LLLoginInstance::handleTOSResponse: accepted" << llendl; + LL_INFOS() << "LLLoginInstance::handleTOSResponse: accepted" << LL_ENDL; // Set the request data to true and retry login. mRequestData["params"][key] = true; @@ -774,7 +774,7 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key) } else { - llinfos << "LLLoginInstance::handleTOSResponse: attemptComplete" << llendl; + LL_INFOS() << "LLLoginInstance::handleTOSResponse: attemptComplete" << LL_ENDL; attemptComplete(); } diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp index 5c020e6d98..db8d2e4ede 100755 --- a/indra/newview/llmainlooprepeater.cpp +++ b/indra/newview/llmainlooprepeater.cpp @@ -81,7 +81,7 @@ bool LLMainLoopRepeater::onMessage(LLSD const & event) try { mQueue->pushFront(event); } catch(LLThreadSafeQueueError & e) { - llwarns << "could not repeat message (" << e.what() << ")" << + LL_WARNS() << "could not repeat message (" << e.what() << ")" << event.asString() << LL_ENDL; } return false; diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index edb2d5e024..bbcdcb126d 100755 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -226,11 +226,11 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask) setMouseCapture( FALSE ); } - LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << LL_ENDL; } else { - LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << LL_ENDL; } gViewerWindow->setCursor(UI_CURSOR_ARROW); return TRUE; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index e2be3331ed..224bfe3a17 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -519,12 +519,12 @@ BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask) drag(x, y); } - LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (active)" << LL_ENDL; } else { highlightManipulators(x, y); - LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (inactive)" << LL_ENDL; } gViewerWindow->setCursor(UI_CURSOR_TOOLROTATE); @@ -1272,9 +1272,9 @@ LLVector3 LLManipRotate::getConstraintAxis() else { #ifndef LL_RELEASE_FOR_DOWNLOAD - llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl; + LL_ERRS() << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << LL_ENDL; #else - llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl; + LL_WARNS() << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << LL_ENDL; #endif axis.mV[0] = 1.f; } diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index b4348f2a0e..a63f6f424c 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -413,7 +413,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask) { drag( x, y ); } - LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL; } else { @@ -524,7 +524,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) { mHighlightedPart = manipulator->mManipID; - //llinfos << "Tried: " << mHighlightedPart << llendl; + //LL_INFOS() << "Tried: " << mHighlightedPart << LL_ENDL; break; } } @@ -543,7 +543,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) } } - LL_DEBUGS("UserInput") << "hover handled by LLManipScale (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipScale (inactive)" << LL_ENDL; } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index cfea8a3330..3cccfaf13a 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -355,7 +355,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) if (!selectNode) { // didn't find the object in our selection...oh well - llwarns << "Trying to translate an unselected object" << llendl; + LL_WARNS() << "Trying to translate an unselected object" << LL_ENDL; return TRUE; } @@ -363,7 +363,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) if (!selected_object) { // somehow we lost the object! - llwarns << "Translate manip lost the object, no selected object" << llendl; + LL_WARNS() << "Translate manip lost the object, no selected object" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -384,7 +384,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(select_center_agent, mouse_pos)) { // mouse_pos may be nonsense - llwarns << "Failed to project object center to screen" << llendl; + LL_WARNS() << "Failed to project object center to screen" << LL_ENDL; } else if (gSavedSettings.getBOOL("SnapToMouseCursor")) { @@ -412,7 +412,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // Bail out if mouse not down. if( !hasMouseCapture() ) { - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (inactive)" << LL_ENDL; // Always show cursor // gViewerWindow->setCursor(UI_CURSOR_ARROW); gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); @@ -448,7 +448,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // rotation above. if( x == mLastHoverMouseX && y == mLastHoverMouseY && !rotated) { - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -461,7 +461,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) { if (abs(mMouseDownX - x) < MOUSE_DRAG_SLOP && abs(mMouseDownY - y) < MOUSE_DRAG_SLOP ) { - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -478,7 +478,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // When we make the copy, we don't want to do any other processing. // If so, the object will also be moved, and the copy will be offset. - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (made copy)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (made copy)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); } } @@ -495,7 +495,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (!selectNode) { // somehow we lost the object! - llwarns << "Translate manip lost the object, no selectNode" << llendl; + LL_WARNS() << "Translate manip lost the object, no selectNode" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -504,7 +504,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (!object) { // somehow we lost the object! - llwarns << "Translate manip lost the object, no object in selectNode" << llendl; + LL_WARNS() << "Translate manip lost the object, no object in selectNode" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -531,7 +531,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance) { - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (too far)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (too far)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_NOLOCKED); return TRUE; } @@ -776,7 +776,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) gAgentCamera.clearFocusObject(); dialog_refresh_all(); // ??? is this necessary? - LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -2250,7 +2250,7 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_ axis.mV[0] = 1.0f; break; default: - llerrs << "renderArrow called with bad arrow " << which_arrow << llendl; + LL_ERRS() << "renderArrow called with bad arrow " << which_arrow << LL_ENDL; break; } diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 0b009b68f7..83946a45cd 100755 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -132,11 +132,11 @@ namespace LLMarketplaceImport if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM POST status: " << status << llendl; - llinfos << " SLM POST reason: " << reason << llendl; - llinfos << " SLM POST content: " << content.asString() << llendl; + LL_INFOS() << " SLM POST status: " << status << LL_ENDL; + LL_INFOS() << " SLM POST reason: " << reason << LL_ENDL; + LL_INFOS() << " SLM POST content: " << content.asString() << LL_ENDL; - llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl; + LL_INFOS() << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << LL_ENDL; } if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) || @@ -145,7 +145,7 @@ namespace LLMarketplaceImport { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << llendl; + LL_INFOS() << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << LL_ENDL; } sMarketplaceCookie.clear(); @@ -179,11 +179,11 @@ namespace LLMarketplaceImport if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM GET status: " << status << llendl; - llinfos << " SLM GET reason: " << reason << llendl; - llinfos << " SLM GET content: " << content.asString() << llendl; + LL_INFOS() << " SLM GET status: " << status << LL_ENDL; + LL_INFOS() << " SLM GET reason: " << reason << LL_ENDL; + LL_INFOS() << " SLM GET content: " << content.asString() << LL_ENDL; - llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl; + LL_INFOS() << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << LL_ENDL; } if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || @@ -191,7 +191,7 @@ namespace LLMarketplaceImport { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << llendl; + LL_INFOS() << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << LL_ENDL; } sMarketplaceCookie.clear(); @@ -256,7 +256,7 @@ namespace LLMarketplaceImport if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM GET: " << url << llendl; + LL_INFOS() << " SLM GET: " << url << LL_ENDL; } slmGetTimer.start(); @@ -287,7 +287,7 @@ namespace LLMarketplaceImport if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM GET: " << url << llendl; + LL_INFOS() << " SLM GET: " << url << LL_ENDL; } slmGetTimer.start(); @@ -321,7 +321,7 @@ namespace LLMarketplaceImport if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM POST: " << url << llendl; + LL_INFOS() << " SLM POST: " << url << LL_ENDL; } slmPostTimer.start(); diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 9298d6952f..323445afa6 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -424,7 +424,7 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) // void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility ) { - llinfos << "visibility changed to " << (new_visibility?"true":"false") << llendl; + LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL; if(mMediaSource) { mMediaSource->setVisible( new_visibility ); @@ -548,7 +548,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) (LLStringUtil::compareInsensitive(url_in.substr(0, protocol2.length()), protocol2) == 0)) { // TODO: Print out/log this attempt? - // llinfos << "Rejecting attempt to load restricted website :" << urlIn << llendl; + // LL_INFOS() << "Rejecting attempt to load restricted website :" << urlIn << LL_ENDL; return; } @@ -569,7 +569,7 @@ void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::str if (expanded_filename.empty()) { - llwarns << "File " << filename << "not found" << llendl; + LL_WARNS() << "File " << filename << "not found" << LL_ENDL; return; } if (ensureMediaSourceExists()) @@ -677,7 +677,7 @@ bool LLMediaCtrl::ensureMediaSourceExists() } else { - llwarns << "media source create failed " << llendl; + LL_WARNS() << "media source create failed " << LL_ENDL; // return; } } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 447b9d286f..84526d53ca 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -219,7 +219,7 @@ public: { if (!mProcessed) { //something went wrong, retry - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -258,7 +258,7 @@ public: { if (!mProcessed) { - llwarns << "Killed without being processed, retrying." << llendl; + LL_WARNS() << "Killed without being processed, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD); } @@ -359,16 +359,16 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s gMeshRepo.uploadError(args); // Log details. - llwarns << "stage: " << stage << " http status: " << status << llendl; + LL_WARNS() << "stage: " << stage << " http status: " << status << LL_ENDL; if (content.has("error")) { const LLSD& err = content["error"]; - llwarns << "err: " << err << llendl; - llwarns << "mesh upload failed, stage '" << stage + LL_WARNS() << "err: " << err << LL_ENDL; + LL_WARNS() << "mesh upload failed, stage '" << stage << "' error '" << err["error"].asString() << "', message '" << err["message"].asString() << "', id '" << err["identifier"].asString() - << "'" << llendl; + << "'" << LL_ENDL; if (err.has("errors")) { S32 error_num = 0; @@ -378,13 +378,13 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s ++it) { const LLSD& err_entry = *it; - llwarns << "error[" << error_num << "]:" << llendl; + LL_WARNS() << "error[" << error_num << "]:" << LL_ENDL; for (LLSD::map_const_iterator map_it = err_entry.beginMap(); map_it != err_entry.endMap(); ++map_it) { - llwarns << "\t" << map_it->first << ": " - << map_it->second << llendl; + LL_WARNS() << "\t" << map_it->first << ": " + << map_it->second << LL_ENDL; } error_num++; } @@ -392,7 +392,7 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s } else { - llwarns << "bad mesh, no error information available" << llendl; + LL_WARNS() << "bad mesh, no error information available" << LL_ENDL; } } @@ -448,7 +448,7 @@ public: } else { - llwarns << "fee request failed" << llendl; + LL_WARNS() << "fee request failed" << LL_ENDL; log_upload_error(status,cc,"fee",mModelData["name"]); mThread->mWholeModelUploadURL = ""; @@ -516,7 +516,7 @@ public: } else { - llwarns << "upload failed" << llendl; + LL_WARNS() << "upload failed" << LL_ENDL; std::string model_name = mModelData["name"].asString(); log_upload_error(status,cc,"upload",model_name); @@ -553,7 +553,7 @@ void LLMeshRepoThread::run() LLCDResult res = LLConvexDecomposition::initThread(); if (res != LLCD_OK) { - llwarns << "convex decomposition unable to be loaded" << llendl; + LL_WARNS() << "convex decomposition unable to be loaded" << LL_ENDL; } while (!LLApp::isQuitting()) @@ -662,7 +662,7 @@ void LLMeshRepoThread::run() res = LLConvexDecomposition::quitThread(); if (res != LLCD_OK) { - llwarns << "convex decomposition unable to be quit" << llendl; + LL_WARNS() << "convex decomposition unable to be quit" << LL_ENDL; } delete mCurlRequest; @@ -742,7 +742,7 @@ std::string LLMeshRepoThread::constructUrl(LLUUID mesh_id) } else { - llwarns << "Current region does not have GetMesh capability! Cannot load " << mesh_id << ".mesh" << llendl; + LL_WARNS() << "Current region does not have GetMesh capability! Cannot load " << mesh_id << ".mesh" << LL_ENDL; } return http_url; @@ -1180,7 +1180,7 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat if (!LLSDSerialize::fromBinary(header, stream, data_size)) { - llwarns << "Mesh header parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL; return false; } @@ -1188,8 +1188,8 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat } else { - llinfos - << "Marking header as non-existent, will not retry." << llendl; + LL_INFOS() + << "Marking header as non-existent, will not retry." << LL_ENDL; header["404"] = 1; } @@ -1256,7 +1256,7 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat if (!unzip_llsd(skin, stream, data_size)) { - llwarns << "Mesh skin info parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh skin info parse error. Not a valid mesh asset!" << LL_ENDL; return false; } } @@ -1265,7 +1265,7 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat LLMeshSkinInfo info(skin); info.mMeshID = mesh_id; - //llinfos<<"info pelvis offset"< 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == 499 || status == 503) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD); } else { llassert(status == 499 || status == 503); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -1978,21 +1978,21 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == 499 || status == 503) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } else { llassert(status == 499 || status == 503); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2041,21 +2041,21 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == 499 || status == 503) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } else { llassert(status == 499 || status == 503); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2105,21 +2105,21 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == 499 || status == 503) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } else { llassert(status == 499 || status == 503); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2167,9 +2167,9 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (status < 200 || status > 400) { - //llwarns + //LL_WARNS() // << "Header responder failed with status: " - // << status << ": " << reason << llendl; + // << status << ": " << reason << LL_ENDL; // 503 (service unavailable) or 499 (timeout) // can be due to server load and can be retried @@ -2182,7 +2182,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (status == 503 || status == 499) { //retry - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -2192,7 +2192,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, } else { - llwarns << "Unhandled status." << llendl; + LL_WARNS() << "Unhandled status." << LL_ENDL; } } @@ -2214,9 +2214,9 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (!success) { - llwarns + LL_WARNS() << "Unable to parse mesh header: " - << status << ": " << reason << llendl; + << status << ": " << reason << LL_ENDL; } else if (data && data_size > 0) { @@ -2310,11 +2310,11 @@ void LLMeshRepository::init() void LLMeshRepository::shutdown() { - llinfos << "Shutting down mesh repository." << llendl; + LL_INFOS() << "Shutting down mesh repository." << LL_ENDL; for (U32 i = 0; i < mUploads.size(); ++i) { - llinfos << "Discard the pending mesh uploads " << llendl; + LL_INFOS() << "Discard the pending mesh uploads " << LL_ENDL; mUploads[i]->discard() ; //discard the uploading requests. } @@ -2329,7 +2329,7 @@ void LLMeshRepository::shutdown() for (U32 i = 0; i < mUploads.size(); ++i) { - llinfos << "Waiting for pending mesh upload " << i << "/" << mUploads.size() << llendl; + LL_INFOS() << "Waiting for pending mesh upload " << i << "/" << mUploads.size() << LL_ENDL; while (!mUploads[i]->isStopped()) { apr_sleep(10); @@ -2342,7 +2342,7 @@ void LLMeshRepository::shutdown() delete mMeshMutex; mMeshMutex = NULL; - llinfos << "Shutting down decomposition system." << llendl; + LL_INFOS() << "Shutting down decomposition system." << LL_ENDL; if (mDecompThread) { @@ -2688,7 +2688,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol //make sure target volume is still valid if (volume->getNumVolumeFaces() <= 0) { - llwarns << "Mesh loading returned empty volume." << llendl; + LL_WARNS() << "Mesh loading returned empty volume." << LL_ENDL; } { //update system volume @@ -2701,7 +2701,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol } else { - llwarns << "Couldn't find system volume for given mesh." << llendl; + LL_WARNS() << "Couldn't find system volume for given mesh." << LL_ENDL; } } @@ -3185,7 +3185,7 @@ void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh, bool vertex_based) if (ret) { - llerrs << "Convex Decomposition thread valid but could not set mesh data" << llendl; + LL_ERRS() << "Convex Decomposition thread valid but could not set mesh data" << LL_ENDL; } } } @@ -3261,7 +3261,7 @@ void LLPhysicsDecomp::doDecomposition() if (ret) { - llwarns << "Convex Decomposition thread valid but could not execute stage " << stage << llendl; + LL_WARNS() << "Convex Decomposition thread valid but could not execute stage " << stage << LL_ENDL; LLMutexLock lock(mMutex); mCurRequest->mHull.clear(); @@ -3392,7 +3392,7 @@ void LLPhysicsDecomp::doDecompositionSingleHull() LLCDResult ret = decomp->buildSingleHull() ; if(ret) { - llwarns << "Could not execute decomposition stage when attempting to create single hull." << llendl; + LL_WARNS() << "Could not execute decomposition stage when attempting to create single hull." << LL_ENDL; make_box(mCurRequest); } else diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp index e689e39b26..790a184068 100755 --- a/indra/newview/llmimetypes.cpp +++ b/indra/newview/llmimetypes.cpp @@ -55,8 +55,8 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename) bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); if ( ! success || root.isNull() || ! root->hasName( "mimetypes" ) ) { - llwarns << "Unable to read MIME type file: " - << xml_filename << llendl; + LL_WARNS() << "Unable to read MIME type file: " + << xml_filename << LL_ENDL; return false; } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index eb6591eb39..5c1292eed1 100755 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -549,7 +549,7 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode) panel->mStopFlyingButton->setVisible(FALSE); break; default: - llerrs << "Unexpected EStandStopFlyingMode is passed: " << mode << llendl; + LL_ERRS() << "Unexpected EStandStopFlyingMode is passed: " << mode << LL_ENDL; } } @@ -614,7 +614,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) LLPanel* parent = dynamic_cast(getParent()); if (!parent) { - llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl; + LL_WARNS() << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << LL_ENDL; return; } @@ -636,7 +636,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) { if (!mOriginalParent.get()) { - llwarns << "Original parent of the stand / stop flying panel not found" << llendl; + LL_WARNS() << "Original parent of the stand / stop flying panel not found" << LL_ENDL; return; } @@ -664,7 +664,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() panel->setVisible(FALSE); //LLUI::getRootView()->addChild(panel); - llinfos << "Build LLPanelStandStopFlying panel" << llendl; + LL_INFOS() << "Build LLPanelStandStopFlying panel" << LL_ENDL; panel->updatePosition(); return panel; diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 54522bb7f6..e7924d96ce 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -234,21 +234,21 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) // Can't mute empty string by name if (mute.mName.empty()) { - llwarns << "Trying to mute empty string by-name" << llendl; + LL_WARNS() << "Trying to mute empty string by-name" << LL_ENDL; return FALSE; } // Null mutes must have uuid null if (mute.mID.notNull()) { - llwarns << "Trying to add by-name mute with non-null id" << llendl; + LL_WARNS() << "Trying to add by-name mute with non-null id" << LL_ENDL; return FALSE; } std::pair result = mLegacyMutes.insert(mute.mName); if (result.second) { - llinfos << "Muting by name " << mute.mName << llendl; + LL_INFOS() << "Muting by name " << mute.mName << LL_ENDL; updateAdd(mute); notifyObservers(); return TRUE; @@ -296,7 +296,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) std::pair result = mMutes.insert(localmute); if (result.second) { - llinfos << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl; + LL_INFOS() << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL; updateAdd(localmute); notifyObservers(); if(!(localmute.mFlags & LLMute::flagParticles)) @@ -385,14 +385,14 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) { // The entry was actually removed. Notify the server. updateRemove(localmute); - llinfos << "Unmuting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl; + LL_INFOS() << "Unmuting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL; } else { // Flags were updated, the mute entry needs to be retransmitted to the server and re-added to the list. mMutes.insert(localmute); updateAdd(localmute); - llinfos << "Updating mute entry " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl; + LL_INFOS() << "Updating mute entry " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL; } // Must be after erase. @@ -527,14 +527,14 @@ BOOL LLMuteList::loadFromFile(const std::string& filename) { if(!filename.size()) { - llwarns << "Mute List Filename is Empty!" << llendl; + LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL; return FALSE; } LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if (!fp) { - llwarns << "Couldn't open mute list " << filename << llendl; + LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL; return FALSE; } @@ -577,14 +577,14 @@ BOOL LLMuteList::saveToFile(const std::string& filename) { if(!filename.size()) { - llwarns << "Mute List Filename is Empty!" << llendl; + LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL; return FALSE; } LLFILE* fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ if (!fp) { - llwarns << "Couldn't open mute list " << filename << llendl; + LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL; return FALSE; } // legacy mutes have null uuid @@ -687,12 +687,12 @@ void LLMuteList::cache(const LLUUID& agent_id) void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**) { - llinfos << "LLMuteList::processMuteListUpdate()" << llendl; + LL_INFOS() << "LLMuteList::processMuteListUpdate()" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_MuteData, _PREHASH_AgentID, agent_id); if(agent_id != gAgent.getID()) { - llwarns << "Got an mute list update for the wrong agent." << llendl; + LL_WARNS() << "Got an mute list update for the wrong agent." << LL_ENDL; return; } std::string unclean_filename; @@ -712,7 +712,7 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**) void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**) { - llinfos << "LLMuteList::processUseCachedMuteList()" << llendl; + LL_INFOS() << "LLMuteList::processUseCachedMuteList()" << LL_ENDL; std::string agent_id_string; gAgent.getID().toString(agent_id_string); @@ -723,7 +723,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**) void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status) { - llinfos << "LLMuteList::processMuteListFile()" << llendl; + LL_INFOS() << "LLMuteList::processMuteListFile()" << LL_ENDL; std::string* local_filename_and_path = (std::string*)user_data; if(local_filename_and_path && !local_filename_and_path->empty() && (error_code == 0)) diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 3417651ddb..80d3b2ee7b 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -72,7 +72,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, BOOL enabled, const std::string& suffix) { - //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; + //LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL; NameItem item; item.value = agent_id; @@ -125,7 +125,7 @@ BOOL LLNameListCtrl::handleDragAndDrop( } handled = TRUE; - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << LL_ENDL; return handled; } @@ -178,7 +178,7 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) } else { - llwarns << "highlighted name list item is NULL" << llendl; + LL_WARNS() << "highlighted name list item is NULL" << LL_ENDL; } } if(target_index != -1) @@ -192,7 +192,7 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) } else { - llwarns << "target name item is NULL" << llendl; + LL_WARNS() << "target name item is NULL" << LL_ENDL; } } } diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 95caa2731a..8c4849d28d 100755 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -600,7 +600,7 @@ void LLNavigationBar::onRegionNameResponse( LLVector3d region_pos = from_region_handle(region_handle); LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; + LL_INFOS() << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << LL_ENDL; gAgent.teleportViaLocation(global_pos); } else if (gSavedSettings.getBOOL("SearchFromAddressBar")) @@ -614,7 +614,7 @@ void LLNavigationBar::showTeleportHistoryMenu(LLUICtrl* btn_ctrl) // Don't show the popup if teleport history is empty. if (LLTeleportHistory::getInstance()->isEmpty()) { - lldebugs << "Teleport history is empty, will not show the menu." << llendl; + LL_DEBUGS() << "Teleport history is empty, will not show the menu." << LL_ENDL; return; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index eb4601a469..aa4a90b4b8 100755 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -130,7 +130,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi if (from_id.isNull()) { // Normal behavior for system generated messages, don't spam. - // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; + // LL_WARNS() << " from_id for notification " << notification->getName() << " is null " << LL_ENDL; return; } @@ -153,9 +153,9 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( LLGroupData groupData; if (!gAgent.getGroupData(payload["group_id"].asUUID(), groupData)) { - llwarns + LL_WARNS() << "Group notice for unknown group: " - << payload["group_id"].asUUID() << llendl; + << payload["group_id"].asUUID() << LL_ENDL; return; } diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c15b6bd0d3..8e5df166cd 100755 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -90,7 +90,7 @@ const outfit_accordion_tab_params& get_accordion_tab_params() } else { - llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl; + LL_WARNS() << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << LL_ENDL; } } @@ -204,7 +204,7 @@ private: LLWearableType::EType type = LLWearableType::typeNameToType(data.asString()); if (type == LLWearableType::WT_NONE) { - llwarns << "Invalid wearable type" << llendl; + LL_WARNS() << "Invalid wearable type" << LL_ENDL; return; } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index b6a9aae213..5d1b582d1f 100755 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -97,7 +97,7 @@ LLDropTarget::~LLDropTarget() void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data) { - llinfos << "LLDropTarget::doDrop()" << llendl; + LL_INFOS() << "LLDropTarget::doDrop()" << LL_ENDL; } BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 115114bb53..27dc1381b2 100755 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -90,7 +90,7 @@ BOOL LLPanelBlockedList::postBuild() mBlockedList->sortByType(); break; default: - llwarns << "Unrecognized sort order for blocked list" << llendl; + LL_WARNS() << "Unrecognized sort order for blocked list" << LL_ENDL; break; } diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 50d0b4256b..62966e3a4e 100755 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -103,8 +103,8 @@ public: const std::string& reason, const LLSD& content) { - llwarns << "Sending click message failed (" << status << "): [" << reason << "]" << llendl; - llwarns << "Content: [" << content << "]" << llendl; + LL_WARNS() << "Sending click message failed (" << status << "): [" << reason << "]" << LL_ENDL; + LL_WARNS() << "Content: [" << content << "]" << LL_ENDL; } }; @@ -220,7 +220,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key) setSnapshotId(key["classified_snapshot_id"]); setFromSearch(key["from_search"]); - llinfos << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << llendl; + LL_INFOS() << "Opening classified [" << getClassifiedName() << "] (" << getClassifiedId() << ")" << LL_ENDL; LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); @@ -231,7 +231,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key) std::string url = gAgent.getRegion()->getCapability("SearchStatRequest"); if (!url.empty()) { - llinfos << "Classified stat request via capability" << llendl; + LL_INFOS() << "Classified stat request via capability" << LL_ENDL; LLSD body; body["classified_id"] = getClassifiedId(); LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(getClassifiedId())); @@ -389,9 +389,9 @@ void LLPanelClassifiedInfo::setClickThrough( S32 profile, bool from_new_table) { - llinfos << "Click-through data for classified " << classified_id << " arrived: [" + LL_INFOS() << "Click-through data for classified " << classified_id << " arrived: [" << teleport << ", " << map << ", " << profile << "] (" - << (from_new_table ? "new" : "old") << ")" << llendl; + << (from_new_table ? "new" : "old") << ")" << LL_ENDL; for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter) { @@ -408,7 +408,7 @@ void LLPanelClassifiedInfo::setClickThrough( continue; } - llinfos << "Updating classified info panel" << llendl; + LL_INFOS() << "Updating classified info panel" << LL_ENDL; // We need to check to see if the data came from the new stat_table // or the old classified table. We also need to cache the data from @@ -437,10 +437,10 @@ void LLPanelClassifiedInfo::setClickThrough( // *HACK: remove this when there is enough room for click stats in the info panel self->getChildView("click_through_text")->setToolTip(ct_str.getString()); - llinfos << "teleport: " << llformat("%d", self->mTeleportClicksNew + self->mTeleportClicksOld) + LL_INFOS() << "teleport: " << llformat("%d", self->mTeleportClicksNew + self->mTeleportClicksOld) << ", map: " << llformat("%d", self->mMapClicksNew + self->mMapClicksOld) << ", profile: " << llformat("%d", self->mProfileClicksNew + self->mProfileClicksOld) - << llendl; + << LL_ENDL; } } @@ -550,8 +550,8 @@ void LLPanelClassifiedInfo::sendClickMessage( body["region_name"] = sim_name; std::string url = gAgent.getRegion()->getCapability("SearchStatTracking"); - llinfos << "Sending click msg via capability (url=" << url << ")" << llendl; - llinfos << "body: [" << body << "]" << llendl; + LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL; + LL_INFOS() << "body: [" << body << "]" << LL_ENDL; LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder()); } diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 5bdd88dd50..568931089e 100755 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -454,7 +454,7 @@ get_pickers_indexes (const LLEditWearableDictionary::Wearable { if (!wearable_entry) { - llwarns << "could not get LLColorSwatchCtrl indexes for null wearable entry." << llendl; + LL_WARNS() << "could not get LLColorSwatchCtrl indexes for null wearable entry." << LL_ENDL; return null_texture_vec; } return wearable_entry->mColorSwatchCtrls; @@ -467,7 +467,7 @@ get_pickers_indexes (const LLEditWearableDictionary::WearableEntr { if (!wearable_entry) { - llwarns << "could not get LLTextureCtrl indexes for null wearable entry." << llendl; + LL_WARNS() << "could not get LLTextureCtrl indexes for null wearable entry." << LL_ENDL; return null_texture_vec; } return wearable_entry->mTextureCtrls; @@ -497,7 +497,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) { - llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL; return NULL; } const texture_vec_t& indexes = get_pickers_indexes(wearable_entry); @@ -511,7 +511,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred) = get_picker_entry(te); if (!entry) { - llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; + LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL; continue; } if (pred(entry)) @@ -528,14 +528,14 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_ { if (!panel) { - llwarns << "the panel wasn't passed for wearable of type: " << type << llendl; + LL_WARNS() << "the panel wasn't passed for wearable of type: " << type << LL_ENDL; return; } const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) { - llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL; return; } const texture_vec_t& indexes = get_pickers_indexes(wearable_entry); @@ -549,7 +549,7 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_ = get_picker_entry(te); if (!entry) { - llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl; + LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL; continue; } fun (panel, entry); @@ -701,12 +701,12 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body } else { - llwarns << "accordion_ctrl is NULL" << llendl; + LL_WARNS() << "accordion_ctrl is NULL" << LL_ENDL; } } else { - llwarns << "bodypart_panel is NULL" << llendl; + LL_WARNS() << "bodypart_panel is NULL" << LL_ENDL; } } @@ -777,7 +777,7 @@ BOOL LLPanelEditWearable::postBuild() const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) { - llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL; continue; } U8 num_subparts = wearable_entry->mSubparts.size(); @@ -790,7 +790,7 @@ BOOL LLPanelEditWearable::postBuild() if (!subpart_entry) { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL; continue; } @@ -800,7 +800,7 @@ BOOL LLPanelEditWearable::postBuild() if (!tab) { - llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; continue; } @@ -960,7 +960,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) const LLTextureCtrl* texture_ctrl = dynamic_cast(ctrl); if (!texture_ctrl) { - llwarns << "got commit signal from not LLTextureCtrl." << llendl; + LL_WARNS() << "got commit signal from not LLTextureCtrl." << LL_ENDL; return; } @@ -988,7 +988,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) } else { - llwarns << "could not get texture picker dictionary entry for wearable of type: " << type << llendl; + LL_WARNS() << "could not get texture picker dictionary entry for wearable of type: " << type << LL_ENDL; } } } @@ -1014,7 +1014,7 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl) } else { - llwarns << "could not get color swatch dictionary entry for wearable of type: " << type << llendl; + LL_WARNS() << "could not get color swatch dictionary entry for wearable of type: " << type << LL_ENDL; } } } @@ -1142,7 +1142,7 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) { - llwarns << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << llendl; + LL_WARNS() << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << LL_ENDL; return; } @@ -1180,7 +1180,7 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO if (!subpart_entry) { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL; continue; } @@ -1192,13 +1192,13 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO if (!panel_list) { - llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; + LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; continue; } if (!tab) { - llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL; continue; } @@ -1272,13 +1272,13 @@ void LLPanelEditWearable::changeCamera(U8 subpart) const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); if (!wearable_entry) { - llinfos << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << llendl; + LL_INFOS() << "could not get wearable dictionary entry for wearable type: " << mWearablePtr->getType() << LL_ENDL; return; } if (subpart >= wearable_entry->mSubparts.size()) { - llinfos << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << llendl; + LL_INFOS() << "accordion tab expanded for invalid subpart. Wearable type: " << mWearablePtr->getType() << " subpart num: " << subpart << LL_ENDL; return; } @@ -1287,7 +1287,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart) if (!subpart_entry) { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL; return; } @@ -1376,7 +1376,7 @@ void LLPanelEditWearable::updateScrollingPanelUI() if (!panel_list) { - llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; + LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL; continue; } @@ -1572,7 +1572,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL if (!checkbox_ctrl) return; if (!getWearable()) return; - llinfos << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << llendl; + LL_INFOS() << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << LL_ENDL; bool new_invis_state = checkbox_ctrl->get(); if (new_invis_state) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index df37a188fa..880cf517ff 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -659,7 +659,7 @@ void LLPanelFace::updateUI() } else { - llwarns << "failed getChild for 'combobox matmedia'" << llendl; + LL_WARNS() << "failed getChild for 'combobox matmedia'" << LL_ENDL; } getChildView("combobox matmedia")->setEnabled(editable); @@ -778,7 +778,7 @@ void LLPanelFace::updateUI() } else { - llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl; + LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL; } getChildView("combobox bumpiness")->setEnabled(editable); @@ -811,7 +811,7 @@ void LLPanelFace::updateUI() case GL_RGB: break; default: { - llwarns << "Unexpected tex format in LLPanelFace...resorting to no alpha" << llendl; + LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL; } break; } @@ -847,7 +847,7 @@ void LLPanelFace::updateUI() } else { - llwarns << "failed childGetSelectionInterface for 'combobox alphamode'" << llendl; + LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL; } updateAlphaControls(); @@ -1165,7 +1165,7 @@ void LLPanelFace::updateUI() } else { - llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl; + LL_WARNS() << "failed childGetSelectionInterface for 'combobox texgen'" << LL_ENDL; } getChildView("combobox texgen")->setEnabled(editable); @@ -1284,7 +1284,7 @@ void LLPanelFace::updateUI() } else { - llwarns << "failed childGetSelectionInterface for 'combobox alphamode'" << llendl; + LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL; } getChild("maskcutoff")->setValue(material->getAlphaMaskCutoff()); updateAlphaControls(); @@ -1804,7 +1804,7 @@ void LLPanelFace::onSelectTexture(const LLSD& data) case GL_RGB: break; default: { - llwarns << "Unexpected tex format in LLPanelFace...resorting to no alpha" << llendl; + LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL; } break; } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index ae217958f0..c9a066864c 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -291,7 +291,7 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data) void LLPanelGroup::onBtnJoin() { - lldebugs << "joining group: " << mID << llendl; + LL_DEBUGS() << "joining group: " << mID << LL_ENDL; LLGroupActions::join(mID); } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 0cd93b330a..1f30a497a9 100755 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -284,7 +284,7 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata) if ( !self ) return; - lldebugs << "open group info: " << self->mGroupID << llendl; + LL_DEBUGS() << "open group info: " << self->mGroupID << LL_ENDL; LLGroupActions::show(self->mGroupID); @@ -356,7 +356,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) if (has_power_in_group || mGroupID.isNull()) { - llinfos << "LLPanelGroupGeneral::apply" << llendl; + LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL; // Check to make sure mature has been set if(mComboMature && @@ -743,7 +743,7 @@ void LLPanelGroupGeneral::updateMembers() if (mMemberProgress == gdatap->mMembers.end()) { - lldebugs << " member list completed." << llendl; + LL_DEBUGS() << " member list completed." << LL_ENDL; mListVisibleMembers->setEnabled(TRUE); } else diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 133b269c11..04f4454adf 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -485,7 +485,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) } else { - llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl; + LL_WARNS() << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << LL_ENDL; names.push_back("(Unknown)"); } } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 524305e3fe..4d8ca6773e 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -324,7 +324,7 @@ bool LLPanelGroupLandMoney::impl::applyContribution() if(!gAgent.setGroupContribution(mPanel.mGroupID, new_contribution)) { // should never happen... - llwarns << "Unable to set contribution." << llendl; + LL_WARNS() << "Unable to set contribution." << LL_ENDL; return false; } } @@ -476,7 +476,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 ) { msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i); - llinfos << "Land sku: " << land_sku << llendl; + LL_INFOS() << "Land sku: " << land_sku << LL_ENDL; land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); } else @@ -824,8 +824,8 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**) group_id_map_t::iterator found_it = sGroupIDs.find(group_id); if(found_it == sGroupIDs.end()) { - llinfos << "Group Panel Land L$ " << group_id << " no longer in existence." - << llendl; + LL_INFOS() << "Group Panel Land L$ " << group_id << " no longer in existence." + << LL_ENDL; return; } @@ -1045,7 +1045,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id ); if (mImplementationp->getGroupID() != group_id) { - llwarns << "Group Account details not for this group!" << llendl; + LL_WARNS() << "Group Account details not for this group!" << LL_ENDL; return; } @@ -1068,8 +1068,8 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, if ( interval_days != mImplementationp->mIntervalLength || current_interval != mImplementationp->mCurrentInterval ) { - llinfos << "Out of date details packet " << interval_days << " " - << current_interval << llendl; + LL_INFOS() << "Out of date details packet " << interval_days << " " + << current_interval << LL_ENDL; return; } @@ -1116,7 +1116,7 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1125,7 +1125,7 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg LLGroupMoneyTabEventHandler* selfp = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id); if (!selfp) { - llwarns << "GroupAccountDetails received for non-existent group panel." << llendl; + LL_WARNS() << "GroupAccountDetails received for non-existent group panel." << LL_ENDL; return; } @@ -1186,7 +1186,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id ); if (mImplementationp->getGroupID() != group_id) { - llwarns << "Group Account Transactions not for this group!" << llendl; + LL_WARNS() << "Group Account Transactions not for this group!" << LL_ENDL; return; } @@ -1203,8 +1203,8 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, if (interval_days != mImplementationp->mIntervalLength || current_interval != mImplementationp->mCurrentInterval) { - llinfos << "Out of date details packet " << interval_days << " " - << current_interval << llendl; + LL_INFOS() << "Out of date details packet " << interval_days << " " + << current_interval << LL_ENDL; return; } @@ -1293,7 +1293,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1305,7 +1305,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id); if (!self) { - llwarns << "GroupAccountTransactions recieved for non-existent group panel." << llendl; + LL_WARNS() << "GroupAccountTransactions recieved for non-existent group panel." << LL_ENDL; return; } @@ -1364,7 +1364,7 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id ); if (mImplementationp->getGroupID() != group_id) { - llwarns << "Group Account Summary received not for this group!" << llendl; + LL_WARNS() << "Group Account Summary received not for this group!" << LL_ENDL; return; } @@ -1415,8 +1415,8 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, if (interval_days != mImplementationp->mIntervalLength || current_interval != mImplementationp->mCurrentInterval) { - llinfos << "Out of date summary packet " << interval_days << " " - << current_interval << llendl; + LL_INFOS() << "Out of date summary packet " << interval_days << " " + << current_interval << LL_ENDL; return; } @@ -1473,7 +1473,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + LL_WARNS() << "Got group L$ history reply for another agent!" << LL_ENDL; return; } @@ -1485,7 +1485,7 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg self = get_ptr_in_map(LLGroupMoneyTabEventHandler::sInstanceIDs, request_id); if (!self) { - llwarns << "GroupAccountSummary recieved for non-existent group L$ planning tab." << llendl; + LL_WARNS() << "GroupAccountSummary recieved for non-existent group L$ planning tab." << LL_ENDL; return; } diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 522ba5afae..30c3908f4d 100755 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -117,7 +117,7 @@ LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p) void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data) { - llinfos << "LLGroupDropTarget::doDrop()" << llendl; + LL_INFOS() << "LLGroupDropTarget::doDrop()" << LL_ENDL; } BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, @@ -439,7 +439,7 @@ void LLPanelGroupNotices::refreshNotices() { onClickRefreshNotices(this); /* - lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl; + LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL; mNoticesList->deleteAllItems(); @@ -457,7 +457,7 @@ void LLPanelGroupNotices::refreshNotices() void LLPanelGroupNotices::onClickRefreshNotices(void* data) { - lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl; + LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL; LLPanelGroupNotices* self = (LLPanelGroupNotices*)data; self->mNoticesList->deleteAllItems(); @@ -484,16 +484,16 @@ void LLPanelGroupNotices::processGroupNoticesListReply(LLMessageSystem* msg, voi std::map::iterator it = sInstances.find(group_id); if (it == sInstances.end()) { - llinfos << "Group Panel Notices " << group_id << " no longer in existence." - << llendl; + LL_INFOS() << "Group Panel Notices " << group_id << " no longer in existence." + << LL_ENDL; return; } LLPanelGroupNotices* selfp = it->second; if(!selfp) { - llinfos << "Group Panel Notices " << group_id << " no longer in existence." - << llendl; + LL_INFOS() << "Group Panel Notices " << group_id << " no longer in existence." + << LL_ENDL; return; } @@ -595,7 +595,7 @@ void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data) msg->addUUID("GroupNoticeID",item->getUUID()); gAgent.sendReliableMessage(); - lldebugs << "Item " << item->getUUID() << " selected." << llendl; + LL_DEBUGS() << "Item " << item->getUUID() << " selected." << LL_ENDL; } void LLPanelGroupNotices::showNotice(const std::string& subject, diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index cfdac11d26..2d9b3118e1 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -72,8 +72,8 @@ bool agentCanAddToRole(const LLUUID& group_id, LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!gdatap) { - llwarns << "agentCanAddToRole " - << "-- No group data!" << llendl; + LL_WARNS() << "agentCanAddToRole " + << "-- No group data!" << LL_ENDL; return false; } @@ -126,7 +126,7 @@ LLPanelGroupRoles::~LLPanelGroupRoles() BOOL LLPanelGroupRoles::postBuild() { - lldebugs << "LLPanelGroupRoles::postBuild()" << llendl; + LL_DEBUGS() << "LLPanelGroupRoles::postBuild()" << LL_ENDL; mSubTabContainer = getChild("roles_tab_container"); @@ -139,7 +139,7 @@ BOOL LLPanelGroupRoles::postBuild() LLPanelGroupSubTab* subtabp = dynamic_cast(panel); if (!subtabp) { - llwarns << "Invalid subtab panel: " << panel->getName() << llendl; + LL_WARNS() << "Invalid subtab panel: " << panel->getName() << LL_ENDL; return FALSE; } @@ -342,7 +342,7 @@ void LLPanelGroupRoles::update(LLGroupChange gc) } else { - llwarns << "LLPanelGroupRoles::update() -- No subtab to update!" << llendl; + LL_WARNS() << "LLPanelGroupRoles::update() -- No subtab to update!" << LL_ENDL; } } @@ -538,7 +538,7 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl, { if (LLGroupMgr::getInstance()->mRoleActionSets.empty()) { - llwarns << "Can't build action list - no actions found." << llendl; + LL_WARNS() << "Can't build action list - no actions found." << LL_ENDL; return; } @@ -567,7 +567,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, BOOL filter, BOOL is_owner_role) { - lldebugs << "Building role list for: " << action_set->mActionSetData->mName << llendl; + LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL; // See if the allow mask matches anything in this category. if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit)) { @@ -860,7 +860,7 @@ void LLPanelGroupMembersSubTab::onMemberSelect(LLUICtrl* ctrl, void* user_data) void LLPanelGroupMembersSubTab::handleMemberSelect() { - lldebugs << "LLPanelGroupMembersSubTab::handleMemberSelect" << llendl; + LL_DEBUGS() << "LLPanelGroupMembersSubTab::handleMemberSelect" << LL_ENDL; mAssignedRolesList->deleteAllItems(); mAllowedActionsList->deleteAllItems(); @@ -868,8 +868,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupMembersSubTab::handleMemberSelect() " - << "-- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::handleMemberSelect() " + << "-- No group data!" << LL_ENDL; return; } @@ -1041,7 +1041,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() else { // This could happen if changes are not synced right on sub-panel change. - llwarns << "No group role data for " << iter->second << llendl; + LL_WARNS() << "No group role data for " << iter->second << LL_ENDL; } } mAssignedRolesList->setEnabled(TRUE); @@ -1301,7 +1301,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "Unable to get group data for group " << mGroupID << llendl; + LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL; mesg.assign("Unable to save member data. Try again later."); return false; @@ -1327,7 +1327,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) } else { - llwarns << "Unable to get role information for the owner role in group " << mGroupID << llendl; + LL_WARNS() << "Unable to get role information for the owner role in group " << mGroupID << LL_ENDL; mesg.assign("Unable to retried specific group information. Try again later"); return false; @@ -1363,7 +1363,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "Unable to get group data for group " << mGroupID << llendl; + LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL; return; } @@ -1427,21 +1427,21 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No group data!" << LL_ENDL; return GP_NO_POWERS; } LLGroupMgrGroupData::member_list_t::iterator iter = gdatap->mMembers.find(agent_id); if ( iter == gdatap->mMembers.end() ) { - llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << LL_ENDL; return GP_NO_POWERS; } LLGroupMemberData* member_data = (*iter).second; if (!member_data) { - llwarns << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- Null member data for member with UUID " << agent_id << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- Null member data for member with UUID " << agent_id << LL_ENDL; return GP_NO_POWERS; } @@ -1547,7 +1547,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupMembersSubTab::update() -- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::update() -- No group data!" << LL_ENDL; return; } @@ -1640,7 +1640,7 @@ void LLPanelGroupMembersSubTab::updateMembers() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupMembersSubTab::updateMembers() -- No group data!" << LL_ENDL; return; } @@ -1766,7 +1766,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList || !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck) { - llwarns << "ARG! element not found." << llendl; + LL_WARNS() << "ARG! element not found." << LL_ENDL; return FALSE; } @@ -1830,14 +1830,14 @@ void LLPanelGroupRolesSubTab::activate() void LLPanelGroupRolesSubTab::deactivate() { - lldebugs << "LLPanelGroupRolesSubTab::deactivate()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL; LLPanelGroupSubTab::deactivate(); } bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) { - lldebugs << "LLPanelGroupRolesSubTab::needsApply()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::needsApply()" << LL_ENDL; LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); @@ -1847,7 +1847,7 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) bool LLPanelGroupRolesSubTab::apply(std::string& mesg) { - lldebugs << "LLPanelGroupRolesSubTab::apply()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL; saveRoleChanges(true); @@ -1910,7 +1910,7 @@ bool LLPanelGroupRolesSubTab::matchesSearchFilter(std::string rolename, std::str void LLPanelGroupRolesSubTab::update(LLGroupChange gc) { - lldebugs << "LLPanelGroupRolesSubTab::update()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::update()" << LL_ENDL; if (mGroupID.isNull()) return; @@ -1955,7 +1955,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) } else { - llwarns << "LLPanelGroupRolesSubTab::update() No role data for role " << (*rit).first << llendl; + LL_WARNS() << "LLPanelGroupRolesSubTab::update() No role data for role " << (*rit).first << LL_ENDL; } } @@ -2016,7 +2016,7 @@ void LLPanelGroupRolesSubTab::onRoleSelect(LLUICtrl* ctrl, void* user_data) void LLPanelGroupRolesSubTab::handleRoleSelect() { BOOL can_delete = TRUE; - lldebugs << "LLPanelGroupRolesSubTab::handleRoleSelect()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleRoleSelect()" << LL_ENDL; mAssignedMembersList->deleteAllItems(); mAllowedActionsList->deleteAllItems(); @@ -2024,8 +2024,8 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() " - << "-- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() " + << "-- No group data!" << LL_ENDL; return; } @@ -2113,8 +2113,8 @@ void LLPanelGroupRolesSubTab::buildMembersList() LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() " - << "-- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() " + << "-- No group data!" << LL_ENDL; return; } @@ -2163,13 +2163,13 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) if (!check) return; - lldebugs << "LLPanelGroupRolesSubTab::handleActionSelect()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleActionSelect()" << LL_ENDL; LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() " - << "-- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() " + << "-- No group data!" << LL_ENDL; return; } @@ -2215,8 +2215,8 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) } else { - llwarns << "Unable to look up role information for role id: " - << role_id << llendl; + LL_WARNS() << "Unable to look up role information for role id: " + << role_id << LL_ENDL; } } else @@ -2289,13 +2289,13 @@ void LLPanelGroupRolesSubTab::onMemberVisibilityChange(LLUICtrl* ctrl, void* use void LLPanelGroupRolesSubTab::handleMemberVisibilityChange(bool value) { - lldebugs << "LLPanelGroupRolesSubTab::handleMemberVisibilityChange()" << llendl; + LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleMemberVisibilityChange()" << LL_ENDL; LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) { - llwarns << "LLPanelGroupRolesSubTab::handleRoleSelect() " - << "-- No group data!" << llendl; + LL_WARNS() << "LLPanelGroupRolesSubTab::handleRoleSelect() " + << "-- No group data!" << LL_ENDL; return; } @@ -2482,27 +2482,27 @@ void LLPanelGroupActionsSubTab::activate() void LLPanelGroupActionsSubTab::deactivate() { - lldebugs << "LLPanelGroupActionsSubTab::deactivate()" << llendl; + LL_DEBUGS() << "LLPanelGroupActionsSubTab::deactivate()" << LL_ENDL; LLPanelGroupSubTab::deactivate(); } bool LLPanelGroupActionsSubTab::needsApply(std::string& mesg) { - lldebugs << "LLPanelGroupActionsSubTab::needsApply()" << llendl; + LL_DEBUGS() << "LLPanelGroupActionsSubTab::needsApply()" << LL_ENDL; return false; } bool LLPanelGroupActionsSubTab::apply(std::string& mesg) { - lldebugs << "LLPanelGroupActionsSubTab::apply()" << llendl; + LL_DEBUGS() << "LLPanelGroupActionsSubTab::apply()" << LL_ENDL; return true; } void LLPanelGroupActionsSubTab::update(LLGroupChange gc) { - lldebugs << "LLPanelGroupActionsSubTab::update()" << llendl; + LL_DEBUGS() << "LLPanelGroupActionsSubTab::update()" << LL_ENDL; if (mGroupID.isNull()) return; diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index 5321ebc777..9b21fbf6b7 100755 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -187,7 +187,7 @@ void LLPanelLandInfo::refresh() } else { - lldebugs << "Invalid selection for joining land" << llendl; + LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL; getChildView("button join land")->setEnabled(FALSE); } diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 79815e7be5..6ef9172516 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -435,7 +435,7 @@ void LLPanelLandmarkInfo::populateFoldersList() const LLViewerInventoryCategory* lmcat = gInventory.getCategory(landmarks_id); if (!lmcat) { - llwarns << "Cannot find the landmarks folder" << llendl; + LL_WARNS() << "Cannot find the landmarks folder" << LL_ENDL; } else { @@ -483,7 +483,7 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats) LLViewerInventoryCategory* favorites_cat = gInventory.getCategory(favorites_id); if (!favorites_cat) { - llwarns << "Cannot find the favorites folder" << llendl; + LL_WARNS() << "Cannot find the favorites folder" << LL_ENDL; } else { diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 88400e4ef2..b941ee1f1b 100755 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -264,7 +264,7 @@ void LLLandmarksPanel::onShowOnMap() { if (NULL == mCurrentSelectedList) { - llwarns << "There are no selected list. No actions are performed." << llendl; + LL_WARNS() << "There are no selected list. No actions are performed." << LL_ENDL; return; } @@ -421,7 +421,7 @@ bool LLLandmarksPanel::isReceivedFolderSelected() const // *TODO: it should be filled with logic when EXT-976 is done. - llwarns << "Not implemented yet until EXT-976 is done." << llendl; + LL_WARNS() << "Not implemented yet until EXT-976 is done." << LL_ENDL; return false; } @@ -529,7 +529,7 @@ void LLLandmarksPanel::setParcelID(const LLUUID& parcel_id) // virtual void LLLandmarksPanel::setErrorStatus(U32 status, const std::string& reason) { - llwarns << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<getName() - << " does not support RemoteParcelRequest" << llendl; + << " does not support RemoteParcelRequest" << LL_ENDL; } } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index c96173f550..efcfd045ba 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -281,12 +281,12 @@ void LLPanelLogin::addFavoritesToStartLocation() S32 res = LLStringUtil::compareInsensitive(canonical_user_name, iter->first); if (res != 0) { - lldebugs << "Skipping favorites for " << iter->first << llendl; + LL_DEBUGS() << "Skipping favorites for " << iter->first << LL_ENDL; continue; } combo->addSeparator(); - lldebugs << "Loading favorites for " << iter->first << llendl; + LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL; LLSD user_llsd = iter->second; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); iter1 != user_llsd.endArray(); ++iter1) @@ -465,7 +465,7 @@ void LLPanelLogin::setFields(LLPointer credential, { if (!sInstance) { - llwarns << "Attempted fillFields with no login view shown" << llendl; + LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL; return; } LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL; @@ -523,7 +523,7 @@ void LLPanelLogin::getFields(LLPointer& credential, { if (!sInstance) { - llwarns << "Attempted getFields with no login view shown" << llendl; + LL_WARNS() << "Attempted getFields with no login view shown" << LL_ENDL; return; } @@ -613,7 +613,7 @@ BOOL LLPanelLogin::areCredentialFieldsDirty() { if (!sInstance) { - llwarns << "Attempted getServer with no login view shown" << llendl; + LL_WARNS() << "Attempted getServer with no login view shown" << LL_ENDL; } else { diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d6535c88e9..7bf5e28822 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -156,7 +156,7 @@ BOOL LLPanelMainInventory::postBuild() // Now load the stored settings from disk, if available. std::ostringstream filterSaveName; filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME); - llinfos << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << llendl; + LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << LL_ENDL; llifstream file(filterSaveName.str()); LLSD savedFilterState; if (file.is_open()) @@ -242,7 +242,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) llofstream filtersFile(filterSaveName.str()); if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) { - llwarns << "Could not write to filters save file " << filterSaveName << llendl; + LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL; } else filtersFile.close(); @@ -598,7 +598,7 @@ void LLPanelMainInventory::onFocusReceived() LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); if (!sidepanel_inventory) { - llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl; + LL_WARNS() << "Could not find Inventory Panel in My Inventory floater" << LL_ENDL; return; } diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index adfb2dee86..43321188e7 100755 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -164,7 +164,7 @@ void LLInboxFolderViewFolder::computeFreshness() #if DEBUGGING_FRESHNESS if (mFresh) { - llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl; + LL_INFOS() << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << LL_ENDL; } #endif } @@ -242,7 +242,7 @@ void LLInboxFolderViewItem::computeFreshness() #if DEBUGGING_FRESHNESS if (mFresh) { - llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl; + LL_INFOS() << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << LL_ENDL; } #endif } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 25ef9a3d6a..9123252f4c 100755 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -625,7 +625,7 @@ void LLPanelObject::getState( ) } else { - llinfos << "Unknown path " << (S32) path << " profile " << (S32) profile << " in getState" << llendl; + LL_INFOS() << "Unknown path " << (S32) path << " profile " << (S32) profile << " in getState" << LL_ENDL; selected_item = MI_BOX; } @@ -1175,11 +1175,11 @@ void LLPanelObject::sendIsPhysical() LLSelectMgr::getInstance()->selectionUpdatePhysics(value); mIsPhysical = value; - llinfos << "update physics sent" << llendl; + LL_INFOS() << "update physics sent" << LL_ENDL; } else { - llinfos << "update physics not changed" << llendl; + LL_INFOS() << "update physics not changed" << LL_ENDL; } } @@ -1191,11 +1191,11 @@ void LLPanelObject::sendIsTemporary() LLSelectMgr::getInstance()->selectionUpdateTemporary(value); mIsTemporary = value; - llinfos << "update temporary sent" << llendl; + LL_INFOS() << "update temporary sent" << LL_ENDL; } else { - llinfos << "update temporary not changed" << llendl; + LL_INFOS() << "update temporary not changed" << LL_ENDL; } } @@ -1208,11 +1208,11 @@ void LLPanelObject::sendIsPhantom() LLSelectMgr::getInstance()->selectionUpdatePhantom(value); mIsPhantom = value; - llinfos << "update phantom sent" << llendl; + LL_INFOS() << "update phantom sent" << LL_ENDL; } else { - llinfos << "update phantom not changed" << llendl; + LL_INFOS() << "update phantom not changed" << LL_ENDL; } } @@ -1322,8 +1322,8 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) break; default: - llwarns << "Unknown base type " << selected_type - << " in getVolumeParams()" << llendl; + LL_WARNS() << "Unknown base type " << selected_type + << " in getVolumeParams()" << LL_ENDL; // assume a box selected_type = MI_BOX; profile = LL_PCODE_PROFILE_SQUARE; @@ -1640,11 +1640,11 @@ void LLPanelObject::sendScale(BOOL btn_down) } LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, !dont_stretch_textures); -// llinfos << "scale sent" << llendl; +// LL_INFOS() << "scale sent" << LL_ENDL; } else { -// llinfos << "scale not changed" << llendl; +// LL_INFOS() << "scale not changed" << LL_ENDL; } } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 94cb90b993..77bfcec4e0 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -210,7 +210,7 @@ struct LLBuyInvItemData void LLTaskInvFVBridge::buyItem() { - llinfos << "LLTaskInvFVBridge::buyItem()" << llendl; + LL_INFOS() << "LLTaskInvFVBridge::buyItem()" << LL_ENDL; LLInventoryItem* item = findItem(); if(!item || !item->getSaleInfo().isForSale()) return; LLBuyInvItemData* inv = new LLBuyInvItemData(mPanel->getTaskUUID(), @@ -225,7 +225,7 @@ void LLTaskInvFVBridge::buyItem() if( ( obj = gObjectList.findObject( mPanel->getTaskUUID() ) ) && obj->isAttachment() ) { LLNotificationsUtil::add("Cannot_Purchase_an_Attachment"); - llinfos << "Attempt to purchase an attachment" << llendl; + LL_INFOS() << "Attempt to purchase an attachment" << LL_ENDL; delete inv; } else @@ -372,7 +372,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const void LLTaskInvFVBridge::openItem() { // no-op. - lldebugs << "LLTaskInvFVBridge::openItem()" << llendl; + LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL; } BOOL LLTaskInvFVBridge::isItemRenameable() const @@ -562,7 +562,7 @@ void LLTaskInvFVBridge::pasteLinkFromClipboard() BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { - //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl; + //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel) { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -603,7 +603,7 @@ BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop, void* cargo_data, std::string& tooltip_msg) { - //llinfos << "LLTaskInvFVBridge::dragOrDrop()" << llendl; + //LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL; return FALSE; } @@ -616,7 +616,7 @@ void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string actio S32 price = getPrice(); if (-1 == price) { - llwarns << "label_buy_task_bridged_item: Invalid price" << llendl; + LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL; } else { @@ -665,7 +665,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) S32 price = getPrice(); if (-1 == price) { - llwarns << "label_buy_task_bridged_item: Invalid price" << llendl; + LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL; } else { @@ -799,7 +799,7 @@ void LLTaskCategoryBridge::openItem() BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { - //llinfos << "LLTaskInvFVBridge::startDrag()" << llendl; + //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel && mUUID.notNull()) { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); @@ -822,7 +822,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, void* cargo_data, std::string& tooltip_msg) { - //llinfos << "LLTaskCategoryBridge::dragOrDrop()" << llendl; + //LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL; BOOL accept = FALSE; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) @@ -901,7 +901,7 @@ public: void LLTaskTextureBridge::openItem() { - llinfos << "LLTaskTextureBridge::openItem()" << llendl; + LL_INFOS() << "LLTaskTextureBridge::openItem()" << LL_ENDL; LLPreviewTexture* preview = LLFloaterReg::showTypedInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); if(preview) { @@ -978,7 +978,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) S32 price = getPrice(); if (-1 == price) { - llwarns << "label_buy_task_bridged_item: Invalid price" << llendl; + LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL; } else { @@ -1095,7 +1095,7 @@ public: void LLTaskLSLBridge::openItem() { - llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl; + LL_INFOS() << "LLTaskLSLBridge::openItem() " << mUUID << LL_ENDL; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(!object || object->isInventoryPending()) { @@ -1336,7 +1336,7 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) S32 price = getPrice(); if (-1 == price) { - llwarns << "label_buy_task_bridged_item: Invalid price" << llendl; + LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL; } else { @@ -1417,7 +1417,7 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* break; case LLAssetType::AT_SCRIPT: // OLD SCRIPTS DEPRECATED - JC - llwarns << "Old script" << llendl; + LL_WARNS() << "Old script" << LL_ENDL; //new_bridge = new LLTaskOldScriptBridge(panel, // object_id, // object_name); @@ -1466,8 +1466,8 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* object_name); break; default: - llinfos << "Unhandled inventory type (llassetstorage.h): " - << (S32)type << llendl; + LL_INFOS() << "Unhandled inventory type (llassetstorage.h): " + << (S32)type << LL_ENDL; break; } return new_bridge; @@ -1508,7 +1508,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory() { if (!gIdleCallbacks.deleteFunction(idle, this)) { - llwarns << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << llendl; + LL_WARNS() << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << LL_ENDL; } } @@ -1603,9 +1603,9 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, { if(!object) return; - //llinfos << "invetnory arrived: \n" + //LL_INFOS() << "invetnory arrived: \n" // << " panel UUID: " << panel->mTaskUUID << "\n" - // << " task UUID: " << object->mID << llendl; + // << " task UUID: " << object->mID << LL_ENDL; if(mTaskUUID == object->mID) { mInventoryNeedsUpdate = TRUE; @@ -1629,9 +1629,9 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, void LLPanelObjectInventory::updateInventory() { - //llinfos << "inventory arrived: \n" + //LL_INFOS() << "inventory arrived: \n" // << " panel UUID: " << panel->mTaskUUID << "\n" - // << " task UUID: " << object->mID << llendl; + // << " task UUID: " << object->mID << LL_ENDL; // We're still interested in this task's inventory. std::vector selected_item_ids; std::set selected_items; @@ -1812,7 +1812,7 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li void LLPanelObjectInventory::refresh() { - //llinfos << "LLPanelObjectInventory::refresh()" << llendl; + //LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL; BOOL has_inventory = FALSE; const BOOL non_root_ok = TRUE; LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok); @@ -1866,7 +1866,7 @@ void LLPanelObjectInventory::refresh() clearContents(); } mInventoryViewModel.setTaskID(mTaskUUID); - //llinfos << "LLPanelObjectInventory::refresh() " << mTaskUUID << llendl; + //LL_INFOS() << "LLPanelObjectInventory::refresh() " << mTaskUUID << LL_ENDL; } void LLPanelObjectInventory::removeSelectedItem() diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 7648e12f96..f91d92e646 100755 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -176,7 +176,7 @@ private: LLWearableType::EType type = LLWearableType::typeNameToType(param.asString()); if (type == LLWearableType::WT_NONE) { - llwarns << "Invalid wearable type" << llendl; + LL_WARNS() << "Invalid wearable type" << LL_ENDL; return; } @@ -263,7 +263,7 @@ private: } else { - llwarns << "Unrecognized sort order action" << llendl; + LL_WARNS() << "Unrecognized sort order action" << LL_ENDL; return; } @@ -306,7 +306,7 @@ private: // If inventory panel is not sorted by date then it is sorted by name. return LLWearableItemsList::E_SORT_BY_MOST_RECENT & ~sort_order; } - llwarns << "Unrecognized inventory panel sort order" << llendl; + LL_WARNS() << "Unrecognized inventory panel sort order" << LL_ENDL; } else { @@ -324,7 +324,7 @@ private: { return LLWearableItemsList::E_SORT_BY_TYPE_NAME == sort_order; } - llwarns << "Unrecognized wearable list sort order" << llendl; + LL_WARNS() << "Unrecognized wearable list sort order" << LL_ENDL; } return false; } @@ -842,7 +842,7 @@ void LLPanelOutfitEdit::onShopButtonClicked() } else { - llwarns << "Agent avatar is invalid" << llendl; + LL_WARNS() << "Agent avatar is invalid" << LL_ENDL; // the second argument is not important in this case: generic market place will be opened url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE); @@ -1154,7 +1154,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { if (cargo_data == NULL) { - llwarns << "cargo_data is NULL" << llendl; + LL_WARNS() << "cargo_data is NULL" << LL_ENDL; return TRUE; } @@ -1260,7 +1260,7 @@ void LLPanelOutfitEdit::resetAccordionState() } else { - llwarns << "mCOFWearables is NULL" << llendl; + LL_WARNS() << "mCOFWearables is NULL" << LL_ENDL; } } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 4138558bad..c9688e743e 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -382,7 +382,7 @@ private: } /*virtual*/ void changed(U32 mask) { - lldebugs << "Inventory changed: " << mask << llendl; + LL_DEBUGS() << "Inventory changed: " << mask << LL_ENDL; static bool synchronize_friends_folders = true; if (synchronize_friends_folders) @@ -398,9 +398,9 @@ private: // That means LLInventoryObserver::STRUCTURE is present in MASK instead of LLInventoryObserver::REMOVE if ((CALLINGCARD_ADDED & mask) == CALLINGCARD_ADDED) { - lldebugs << "Calling card added: count: " << gInventory.getChangedIDs().size() + LL_DEBUGS() << "Calling card added: count: " << gInventory.getChangedIDs().size() << ", first Inventory ID: "<< (*gInventory.getChangedIDs().begin()) - << llendl; + << LL_ENDL; bool friendFound = false; std::set changedIDs = gInventory.getChangedIDs(); @@ -415,7 +415,7 @@ private: if (friendFound) { - lldebugs << "friend found, panel should be updated" << llendl; + LL_DEBUGS() << "friend found, panel should be updated" << LL_ENDL; mUpdater->changed(LLFriendObserver::ADD); } } @@ -543,7 +543,7 @@ void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LL { if(!avatar_list) { - llerrs << "Bad parameter" << llendl; + LL_ERRS() << "Bad parameter" << LL_ENDL; return; } @@ -650,7 +650,7 @@ BOOL LLPanelPeople::postBuild() } else { - llwarns << "People->Groups list menu not found" << llendl; + LL_WARNS() << "People->Groups list menu not found" << LL_ENDL; } LLAccordionCtrlTab* accordion_tab = getChild("tab_all"); @@ -735,12 +735,12 @@ void LLPanelPeople::updateFriendList() if (buddies_uuids.size() > 0) { - lldebugs << "Friends added to the list: " << buddies_uuids.size() << llendl; + LL_DEBUGS() << "Friends added to the list: " << buddies_uuids.size() << LL_ENDL; all_friendsp = buddies_uuids; } else { - lldebugs << "No friends found" << llendl; + LL_DEBUGS() << "No friends found" << LL_ENDL; } LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); @@ -941,7 +941,7 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save list->sort(); break; default: - llwarns << "Unrecognized people sort order for " << list->getName() << llendl; + LL_WARNS() << "Unrecognized people sort order for " << list->getName() << LL_ENDL; return; } @@ -1337,7 +1337,7 @@ bool LLPanelPeople::notifyChildren(const LLSD& info) LLSideTrayPanelContainer* container = dynamic_cast(getParent()); if (!container) { - llwarns << "Cannot find People panel container" << llendl; + LL_WARNS() << "Cannot find People panel container" << LL_ENDL; return true; } @@ -1359,7 +1359,7 @@ void LLPanelPeople::showAccordion(const std::string name, bool show) { if(name.empty()) { - llwarns << "No name provided" << llendl; + LL_WARNS() << "No name provided" << LL_ENDL; return; } @@ -1411,7 +1411,7 @@ void LLPanelPeople::setAccordionCollapsedByUser(LLUICtrl* acc_tab, bool collapse { if(!acc_tab) { - llwarns << "Invalid parameter" << llendl; + LL_WARNS() << "Invalid parameter" << LL_ENDL; return; } @@ -1429,7 +1429,7 @@ bool LLPanelPeople::isAccordionCollapsedByUser(LLUICtrl* acc_tab) { if(!acc_tab) { - llwarns << "Invalid parameter" << llendl; + LL_WARNS() << "Invalid parameter" << LL_ENDL; return false; } diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 79bcf15c1d..58055d98c6 100755 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -963,28 +963,28 @@ void LLPanelPermissions::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data) // static void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data) { - //llinfos << "LLPanelPermissions::onCommitNextOwnerModify" << llendl; + //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerModify" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY); } // static void LLPanelPermissions::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data) { - //llinfos << "LLPanelPermissions::onCommitNextOwnerCopy" << llendl; + //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerCopy" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY); } // static void LLPanelPermissions::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data) { - //llinfos << "LLPanelPermissions::onCommitNextOwnerTransfer" << llendl; + //LL_INFOS() << "LLPanelPermissions::onCommitNextOwnerTransfer" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER); } // static void LLPanelPermissions::onCommitName(LLUICtrl*, void* data) { - //llinfos << "LLPanelPermissions::onCommitName()" << llendl; + //LL_INFOS() << "LLPanelPermissions::onCommitName()" << LL_ENDL; LLPanelPermissions* self = (LLPanelPermissions*)data; LLLineEditor* tb = self->getChild("Object Name"); if(tb) @@ -998,7 +998,7 @@ void LLPanelPermissions::onCommitName(LLUICtrl*, void* data) // static void LLPanelPermissions::onCommitDesc(LLUICtrl*, void* data) { - //llinfos << "LLPanelPermissions::onCommitDesc()" << llendl; + //LL_INFOS() << "LLPanelPermissions::onCommitDesc()" << LL_ENDL; LLPanelPermissions* self = (LLPanelPermissions*)data; LLLineEditor* le = self->getChild("Object Description"); if(le) @@ -1023,7 +1023,7 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data) void LLPanelPermissions::setAllSaleInfo() { - llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl; + LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL; LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; LLCheckBoxCtrl *checkPurchase = getChild("checkbox for sale"); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index f2ef2ec003..7fbb2a078b 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -122,7 +122,7 @@ public: } else { - llwarns << "unknown verb " << verb << llendl; + LL_WARNS() << "unknown verb " << verb << LL_ENDL; return false; } } @@ -173,7 +173,7 @@ public: } else { - llwarns << "Can't edit a pick you did not create" << llendl; + LL_WARNS() << "Can't edit a pick you did not create" << LL_ENDL; } // remove our observer now that we're done @@ -280,7 +280,7 @@ public: { if (c_info->creator_id == gAgent.getID()) { - llwarns << "edit in progress" << llendl; + LL_WARNS() << "edit in progress" << LL_ENDL; // open the new classified panel on the Me > Picks sidetray LLSD params; params["id"] = gAgent.getID(); @@ -291,7 +291,7 @@ public: } else { - llwarns << "Can't edit a classified you did not create" << llendl; + LL_WARNS() << "Can't edit a classified you did not create" << LL_ENDL; } } } @@ -676,7 +676,7 @@ void LLPanelPicks::onListCommit(const LLFlatListView* f_list) } else { - llwarns << "Unknown list" << llendl; + LL_WARNS() << "Unknown list" << LL_ENDL; } updateButtons(); @@ -936,7 +936,7 @@ void LLPanelPicks::openClassifiedInfo(const LLSD ¶ms) void LLPanelPicks::openClassifiedEdit(const LLSD& params) { LLUUID classified_id = params["classified_id"].asUUID();; - llinfos << "opening classified " << classified_id << " for edit" << llendl; + LL_INFOS() << "opening classified " << classified_id << " for edit" << LL_ENDL; editClassified(classified_id); } @@ -1168,7 +1168,7 @@ void LLPanelPicks::editClassified(const LLUUID& classified_id) LLClassifiedItem* c_item = findClassifiedById(classified_id); if (!c_item) { - llwarns << "item not found for classified_id " << classified_id << llendl; + LL_WARNS() << "item not found for classified_id " << classified_id << LL_ENDL; return; } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index dc18cc6081..14623eb75a 100755 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -219,8 +219,8 @@ public: } /*virtual*/ void setErrorStatus(U32 status, const std::string& reason) { - llerrs << "Can't complete remote parcel request. Http Status: " - << status << ". Reason : " << reason << llendl; + LL_ERRS() << "Can't complete remote parcel request. Http Status: " + << status << ". Reason : " << reason << LL_ENDL; } private: @@ -308,13 +308,13 @@ BOOL LLPanelPlaces::postBuild() mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!mPlaceMenu) { - llwarns << "Error loading Place menu" << llendl; + LL_WARNS() << "Error loading Place menu" << LL_ENDL; } mLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!mLandmarkMenu) { - llwarns << "Error loading Landmark menu" << llendl; + LL_WARNS() << "Error loading Landmark menu" << LL_ENDL; } mTabContainer = getChild("Places Tabs"); @@ -614,7 +614,7 @@ void LLPanelPlaces::onTeleportButtonClicked() { if (mItem.isNull()) { - llwarns << "NULL landmark item" << llendl; + LL_WARNS() << "NULL landmark item" << LL_ENDL; llassert(mItem.notNull()); return; } @@ -902,7 +902,7 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) favorites_id, std::string(), LLPointer(NULL)); - llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl; + LL_INFOS() << "Copied inventory item #" << mItem->getUUID() << " to favorites." << LL_ENDL; } } } diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 76d38f067d..9845b58b9b 100755 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -828,7 +828,7 @@ bool LLPanelPrimMediaControls::isMouseOver() if(hit_child && hit_child->getVisible()) { // This was useful for debugging both coordinate translation and view hieararchy problems... - // llinfos << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << llendl; + // LL_INFOS() << "mouse coords: " << x << ", " << y << " hit child " << hit_child->getName() << LL_ENDL; // This will be a direct child of the LLLayoutStack, which should be a layout_panel. // These may not shown/hidden by the logic in updateShape(), so we need to do another hit test on the children of the layout panel, @@ -839,7 +839,7 @@ bool LLPanelPrimMediaControls::isMouseOver() if(hit_child_2 && hit_child_2->getVisible()) { // This was useful for debugging both coordinate translation and view hieararchy problems... - // llinfos << " mouse coords: " << x << ", " << y << " hit child 2 " << hit_child_2->getName() << llendl; + // LL_INFOS() << " mouse coords: " << x << ", " << y << " hit child 2 " << hit_child_2->getName() << LL_ENDL; result = true; } } diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 435797bf80..0e7a8b9d00 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -70,7 +70,7 @@ public: { if (params.size() < 1) return false; std::string agent_name = params[0]; - llinfos << "Profile, agent_name " << agent_name << llendl; + LL_INFOS() << "Profile, agent_name " << agent_name << LL_ENDL; std::string url = getProfileURL(agent_name); LLWeb::loadURLInternal(url); @@ -212,7 +212,7 @@ bool LLPanelProfile::ChildStack::pop() { if (mStack.size() == 0) { - llwarns << "Empty stack" << llendl; + LL_WARNS() << "Empty stack" << LL_ENDL; llassert(mStack.size() == 0); return false; } @@ -251,7 +251,7 @@ void LLPanelProfile::ChildStack::postParentReshape() for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it) { LLView* viewp = *list_it; - lldebugs << "removing " << viewp->getName() << llendl; + LL_DEBUGS() << "removing " << viewp->getName() << LL_ENDL; mParent->removeChild(viewp); } } @@ -260,7 +260,7 @@ void LLPanelProfile::ChildStack::postParentReshape() void LLPanelProfile::ChildStack::dump() { unsigned lvl = 0; - lldebugs << "child stack dump:" << llendl; + LL_DEBUGS() << "child stack dump:" << LL_ENDL; for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl) { std::ostringstream dbg_line; @@ -270,7 +270,7 @@ void LLPanelProfile::ChildStack::dump() { dbg_line << " " << (*list_it)->getName(); } - lldebugs << dbg_line.str() << llendl; + LL_DEBUGS() << dbg_line.str() << LL_ENDL; } } @@ -415,7 +415,7 @@ void LLPanelProfile::closePanel(LLPanel* panel) } else { - llwarns << "No underlying panel to focus." << llendl; + LL_WARNS() << "No underlying panel to focus." << LL_ENDL; } } } diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index 2f29e758c6..5924448671 100755 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -114,7 +114,7 @@ LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer() LLSideTrayPanelContainer* parent = dynamic_cast(getParent()); if (!parent) { - llwarns << "Cannot find panel container" << llendl; + LL_WARNS() << "Cannot find panel container" << LL_ENDL; return NULL; } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 554fabe5b3..5fb6eb5df5 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -90,7 +90,7 @@ void LLPanelSnapshotOptions::openPanel(const std::string& panel_name) LLSideTrayPanelContainer* parent = dynamic_cast(getParent()); if (!parent) { - llwarns << "Cannot find panel container" << llendl; + LL_WARNS() << "Cannot find panel container" << LL_ENDL; return; } diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index f2bb8f530b..6a74f6211e 100755 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -236,7 +236,7 @@ void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx) other_btn->toggleState(); //other_btn->setEnabled(TRUE); - lldebugs << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << llendl; + LL_DEBUGS() << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << LL_ENDL; } void LLPanelSnapshotPostcard::onSend() diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 018efbbc5c..25390adbf8 100755 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -717,7 +717,7 @@ void LLTeleportHistoryPanel::refresh() mCurrentItem, filter_string); if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) ) - llerrs << "Couldn't add flat item to teleport history." << llendl; + LL_ERRS() << "Couldn't add flat item to teleport history." << LL_ENDL; if (mLastSelectedItemIndex == mCurrentItem) curr_flat_view->selectItem(item, true); } diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 02d363d795..b28e593397 100755 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -620,7 +620,7 @@ void LLPanelVolume::sendIsLight() BOOL value = getChild("Light Checkbox Ctrl")->getValue(); volobjp->setIsLight(value); - llinfos << "update light sent" << llendl; + LL_INFOS() << "update light sent" << LL_ENDL; } void LLPanelVolume::sendIsFlexible() @@ -652,7 +652,7 @@ void LLPanelVolume::sendIsFlexible() LLSelectMgr::getInstance()->selectionUpdatePhantom(volobjp->flagPhantom()); } - llinfos << "update flexible sent" << llendl; + LL_INFOS() << "update flexible sent" << LL_ENDL; } void LLPanelVolume::sendPhysicsShapeType(LLUICtrl* ctrl, void* userdata) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index aa3ed22bee..33e44816ba 100755 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -118,7 +118,7 @@ protected: if (!item) { - llwarns << "Invalid item" << llendl; + LL_WARNS() << "Invalid item" << LL_ENDL; continue; } diff --git a/indra/newview/llpatchvertexarray.cpp b/indra/newview/llpatchvertexarray.cpp index dece2928c0..6e3e375488 100755 --- a/indra/newview/llpatchvertexarray.cpp +++ b/indra/newview/llpatchvertexarray.cpp @@ -128,7 +128,7 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p { // init() and some other things all want to deref these // pointers, so this is serious. - llerrs << "mRenderLevelp or mRenderStridep was NULL; we'd crash soon." << llendl; + LL_ERRS() << "mRenderLevelp or mRenderStridep was NULL; we'd crash soon." << LL_ENDL; return; } diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index c277359133..ae5b3b4e76 100755 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -736,8 +736,8 @@ std::string LLPathfindingManager::getCapabilityURLForRegion(LLViewerRegion *pReg if (capabilityURL.empty()) { - llwarns << "cannot find capability '" << pCapabilityName << "' for current region '" - << ((pRegion != NULL) ? pRegion->getName() : "") << "'" << llendl; + LL_WARNS() << "cannot find capability '" << pCapabilityName << "' for current region '" + << ((pRegion != NULL) ? pRegion->getName() : "") << "'" << LL_ENDL; } return capabilityURL; @@ -804,7 +804,7 @@ void NavMeshStatusResponder::result(const LLSD &pContent) void NavMeshStatusResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent) { - llwarns << "NavMeshStatusResponder error [status:" << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "NavMeshStatusResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL; LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID); LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly); } @@ -859,7 +859,7 @@ void AgentStateResponder::result(const LLSD &pContent) void AgentStateResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent) { - llwarns << "AgentStateResponder error [status:" << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "AgentStateResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL; LLPathfindingManager::getInstance()->handleAgentState(FALSE); } @@ -885,7 +885,7 @@ void NavMeshRebakeResponder::result(const LLSD &pContent) void NavMeshRebakeResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent) { - llwarns << "NavMeshRebakeResponder error [status:" << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "NavMeshRebakeResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL; mRebakeNavMeshCallback(false); } @@ -921,8 +921,8 @@ void LinksetsResponder::handleObjectLinksetsResult(const LLSD &pContent) void LinksetsResponder::handleObjectLinksetsError(U32 pStatus, const std::string &pReason, const LLSD& pContent, const std::string &pURL) { - llwarns << "LinksetsResponder object linksets error with request to URL '" << pURL << "' [status:" - << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "LinksetsResponder object linksets error with request to URL '" << pURL << "' [status:" + << pStatus << "]: " << pContent << LL_ENDL; mObjectMessagingState = kReceivedError; if (mTerrainMessagingState != kWaiting) { @@ -944,8 +944,8 @@ void LinksetsResponder::handleTerrainLinksetsResult(const LLSD &pContent) void LinksetsResponder::handleTerrainLinksetsError(U32 pStatus, const std::string &pReason, const LLSD& pContent, const std::string &pURL) { - llwarns << "LinksetsResponder terrain linksets error with request to URL '" << pURL << "' [status:" - << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "LinksetsResponder terrain linksets error with request to URL '" << pURL << "' [status:" + << pStatus << "]: " << pContent << LL_ENDL; mTerrainMessagingState = kReceivedError; if (mObjectMessagingState != kWaiting) { @@ -1049,7 +1049,7 @@ void CharactersResponder::result(const LLSD &pContent) void CharactersResponder::errorWithContent(U32 pStatus, const std::string &pReason, const LLSD& pContent) { - llwarns << "CharactersResponder error [status:" << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "CharactersResponder error [status:" << pStatus << "]: " << pContent << LL_ENDL; LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList()); mCharactersCallback(mRequestId, LLPathfindingManager::kRequestError, characterListPtr); diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp index 0c23e5ac92..40f5d8c23e 100755 --- a/indra/newview/llpathfindingnavmesh.cpp +++ b/indra/newview/llpathfindingnavmesh.cpp @@ -129,7 +129,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes llassert(embeddedNavMeshVersion == pNavMeshVersion); // stinson 03/13/2012 : does this ever occur? if (embeddedNavMeshVersion != pNavMeshVersion) { - llwarns << "Mismatch between expected and embedded navmesh versions occurred" << llendl; + LL_WARNS() << "Mismatch between expected and embedded navmesh versions occurred" << LL_ENDL; pNavMeshVersion = embeddedNavMeshVersion; } } @@ -148,7 +148,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes U8* pUncompressedNavMeshContainer = unzip_llsdNavMesh( valid, decompBinSize, streamdecomp, binSize ) ; if ( !valid ) { - llwarns << "Unable to decompress the navmesh llsd." << llendl; + LL_WARNS() << "Unable to decompress the navmesh llsd." << LL_ENDL; status = kNavMeshRequestError; } else @@ -165,7 +165,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes } else { - llwarns << "No mesh data received" << llendl; + LL_WARNS() << "No mesh data received" << LL_ENDL; status = kNavMeshRequestError; } setRequestStatus(status); @@ -186,8 +186,8 @@ void LLPathfindingNavMesh::handleNavMeshError() void LLPathfindingNavMesh::handleNavMeshError(U32 pStatus, const std::string &pReason, const LLSD& pContent, const std::string &pURL, U32 pNavMeshVersion) { - llwarns << "LLPathfindingNavMesh error with request to URL '" << pURL << "' [status:" - << pStatus << "]: " << pContent << llendl; + LL_WARNS() << "LLPathfindingNavMesh error with request to URL '" << pURL << "' [status:" + << pStatus << "]: " << pContent << LL_ENDL; if (mNavMeshStatus.getVersion() == pNavMeshVersion) { handleNavMeshError(); diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 18b85cc9c3..05ef436bd9 100755 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -224,7 +224,7 @@ BOOL LLPhysicsMotion::initialize() mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); if (mParamDriver == NULL) { - llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl; + LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL; return FALSE; } diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp index 3caa93ae71..9e1b75b7e9 100755 --- a/indra/newview/llplacesfolderview.cpp +++ b/indra/newview/llplacesfolderview.cpp @@ -59,7 +59,7 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) } else { - llwarns << "Requested menu handle for non-setup inventory type: " << inventory_type << llendl; + LL_WARNS() << "Requested menu handle for non-setup inventory type: " << inventory_type << LL_ENDL; } } diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index ebd9604c5b..a498d27d2b 100755 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -162,7 +162,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; } new_listener = new LLPlacesLandmarkBridge(inv_type, inventory, root, uuid, flags); break; diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp index aebe636f59..649bb2fb2c 100755 --- a/indra/newview/llpostcard.cpp +++ b/indra/newview/llpostcard.cpp @@ -48,7 +48,7 @@ static void postcard_upload_callback(const LLUUID& asset_id, void *user_data, S3 if (result) { // TODO: display the error messages in UI - llwarns << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << llendl; + LL_WARNS() << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << LL_ENDL; LLPostCard::reportPostResult(false); } else @@ -97,14 +97,14 @@ public: /*virtual*/ void uploadComplete(const LLSD& content) { - llinfos << "Postcard sent" << llendl; - LL_DEBUGS("Snapshots") << "content: " << content << llendl; + LL_INFOS() << "Postcard sent" << LL_ENDL; + LL_DEBUGS("Snapshots") << "content: " << content << LL_ENDL; LLPostCard::reportPostResult(true); } /*virtual*/ void uploadFailure(const LLSD& content) { - llwarns << "Sending postcard failed: " << content << llendl; + LL_WARNS() << "Sending postcard failed: " << content << LL_ENDL; LLPostCard::reportPostResult(false); } }; @@ -128,17 +128,17 @@ void LLPostCard::send(LLPointer image, const LLSD& postcard_da std::string url = gAgent.getRegion()->getCapability("SendPostcard"); if (!url.empty()) { - llinfos << "Sending postcard via capability" << llendl; + LL_INFOS() << "Sending postcard via capability" << LL_ENDL; // the capability already encodes: agent ID, region ID - LL_DEBUGS("Snapshots") << "url: " << url << llendl; - LL_DEBUGS("Snapshots") << "body: " << postcard_data << llendl; - LL_DEBUGS("Snapshots") << "data size: " << image->getDataSize() << llendl; + LL_DEBUGS("Snapshots") << "url: " << url << LL_ENDL; + LL_DEBUGS("Snapshots") << "body: " << postcard_data << LL_ENDL; + LL_DEBUGS("Snapshots") << "data size: " << image->getDataSize() << LL_ENDL; LLHTTPClient::post(url, postcard_data, new LLPostcardSendResponder(postcard_data, asset_id, LLAssetType::AT_IMAGE_JPEG)); } else { - llinfos << "Sending postcard" << llendl; + LL_INFOS() << "Sending postcard" << LL_ENDL; LLSD* data = new LLSD(postcard_data); (*data)["asset-id"] = asset_id; gAssetStorage->storeAssetData(transaction_id, LLAssetType::AT_IMAGE_JPEG, diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 3675d8694d..b379ef7bdb 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -134,10 +134,10 @@ void LLPreview::onCommit() if (!item->isFinished()) { // We are attempting to save an item that was never loaded - llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE" + LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == FALSE" << " Type: " << item->getType() << " ID: " << item->getUUID() - << llendl; + << LL_ENDL; return; } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 36877696f5..c378738b05 100755 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -873,7 +873,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, } else { - llwarns << "Unable to load gesture" << llendl; + LL_WARNS() << "Unable to load gesture" << LL_ENDL; } delete gesture; @@ -893,7 +893,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, LLDelayedGestureError::gestureFailedToLoad( *item_idp ); } - llwarns << "Problem loading gesture: " << status << llendl; + LL_WARNS() << "Problem loading gesture: " << status << LL_ENDL; self->mAssetStatus = PREVIEW_ASSET_ERROR; } } @@ -1019,7 +1019,7 @@ void LLPreviewGesture::saveIfNeeded() { if (!gAssetStorage) { - llwarns << "Can't save gesture, no asset storage system." << llendl; + LL_WARNS() << "Can't save gesture, no asset storage system." << LL_ENDL; return; } @@ -1166,8 +1166,8 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, } else { - llwarns << "Inventory item for gesture " << info->mItemUUID - << " is no longer in agent inventory." << llendl; + LL_WARNS() << "Inventory item for gesture " << info->mItemUUID + << " is no longer in agent inventory." << LL_ENDL; } } else @@ -1202,7 +1202,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, } else { - llwarns << "Problem saving gesture: " << status << llendl; + LL_WARNS() << "Problem saving gesture: " << status << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("GestureSaveFailedReason", args); @@ -1533,7 +1533,7 @@ void LLPreviewGesture::onClickAdd(void* data) if( library_item_index >= STEP_EOF ) { - llerrs << "Unknown step type: " << library_text << llendl; + LL_ERRS() << "Unknown step type: " << library_text << LL_ENDL; return; } @@ -1563,7 +1563,7 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type ) step = new LLGestureStepWait(); break; default: - llerrs << "Unknown step type: " << (S32)step_type << llendl; + LL_ERRS() << "Unknown step type: " << (S32)step_type << LL_ENDL; return NULL; } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 97c9de4b72..c4858e241e 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -185,7 +185,7 @@ void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id) mItemUUID = new_item_id; setKey(LLSD(new_item_id)); } - lldebugs << "LLPreviewNotecard::refreshFromInventory()" << llendl; + LL_DEBUGS() << "LLPreviewNotecard::refreshFromInventory()" << LL_ENDL; loadAsset(); } @@ -240,7 +240,7 @@ void LLPreviewNotecard::loadAsset() else { // The object that we're trying to look at disappeared, bail. - llwarns << "Can't find object " << mObjectUUID << " associated with notecard." << llendl; + LL_WARNS() << "Can't find object " << mObjectUUID << " associated with notecard." << LL_ENDL; mAssetID.setNull(); editor->setText(getString("no_object")); editor->makePristine(); @@ -295,7 +295,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl; + LL_INFOS() << "LLPreviewNotecard::onLoadComplete()" << LL_ENDL; LLUUID* item_id = (LLUUID*)user_data; LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance("preview_notecard", LLSD(*item_id)); @@ -320,7 +320,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, { if( !previewEditor->importBuffer( &buffer[0], file_length+1 ) ) { - llwarns << "Problem importing notecard" << llendl; + LL_WARNS() << "Problem importing notecard" << LL_ENDL; } } else @@ -353,7 +353,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, LLNotificationsUtil::add("UnableToLoadNotecard"); } - llwarns << "Problem loading notecard: " << status << llendl; + LL_WARNS() << "Problem loading notecard: " << status << LL_ENDL; preview->mAssetStatus = PREVIEW_ASSET_ERROR; } } @@ -363,7 +363,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, // static void LLPreviewNotecard::onClickSave(void* user_data) { - //llinfos << "LLPreviewNotecard::onBtnSave()" << llendl; + //LL_INFOS() << "LLPreviewNotecard::onBtnSave()" << LL_ENDL; LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data; if(preview) { @@ -402,7 +402,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) if(!editor) { - llwarns << "Cannot get handle to the notecard editor." << llendl; + LL_WARNS() << "Cannot get handle to the notecard editor." << LL_ENDL; return false; } @@ -435,7 +435,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) const LLViewerRegion* region = gAgent.getRegion(); if (!region) { - llwarns << "Not connected to a region, cannot save notecard." << llendl; + LL_WARNS() << "Not connected to a region, cannot save notecard." << LL_ENDL; return false; } std::string agent_url = region->getCapability("UpdateNotecardAgentInventory"); @@ -448,8 +448,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) setEnabled(FALSE); LLSD body; body["item_id"] = mItemUUID; - llinfos << "Saving notecard " << mItemUUID - << " into agent inventory via " << agent_url << llendl; + LL_INFOS() << "Saving notecard " << mItemUUID + << " into agent inventory via " << agent_url << LL_ENDL; LLHTTPClient::post(agent_url, body, new LLUpdateAgentInventoryResponder(body, asset_id, LLAssetType::AT_NOTECARD)); } @@ -461,8 +461,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) LLSD body; body["task_id"] = mObjectUUID; body["item_id"] = mItemUUID; - llinfos << "Saving notecard " << mItemUUID << " into task " - << mObjectUUID << " via " << task_url << llendl; + LL_INFOS() << "Saving notecard " << mItemUUID << " into task " + << mObjectUUID << " via " << task_url << LL_ENDL; LLHTTPClient::post(task_url, body, new LLUpdateTaskInventoryResponder(body, asset_id, LLAssetType::AT_NOTECARD)); } @@ -477,7 +477,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) } else // !gAssetStorage { - llwarns << "Not connected to an asset storage system." << llendl; + LL_WARNS() << "Not connected to an asset storage system." << LL_ENDL; return false; } } @@ -518,8 +518,8 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data } else { - llwarns << "Inventory item for script " << info->mItemUUID - << " is no longer in agent inventory." << llendl; + LL_WARNS() << "Inventory item for script " << info->mItemUUID + << " is no longer in agent inventory." << LL_ENDL; } } else @@ -562,7 +562,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data } else { - llwarns << "Problem saving notecard: " << status << llendl; + LL_WARNS() << "Problem saving notecard: " << status << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("SaveNotecardFailReason", args); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index bfc779c057..70a280ca09 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -531,14 +531,14 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename) { if (filename.empty()) { - llwarns << "Empty file name" << llendl; + LL_WARNS() << "Empty file name" << LL_ENDL; return false; } LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if (!file) { - llwarns << "Error opening " << filename << llendl; + LL_WARNS() << "Error opening " << filename << LL_ENDL; return false; } @@ -550,7 +550,7 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename) size_t nread = fread(buffer, 1, file_length, file); if (nread < file_length) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } buffer[nread] = '\0'; fclose(file); @@ -566,7 +566,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename) LLFILE* fp = LLFile::fopen(filename, "wb"); if (!fp) { - llwarns << "Unable to write to " << filename << llendl; + LL_WARNS() << "Unable to write to " << filename << LL_ENDL; LLSD row; row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; @@ -1021,8 +1021,8 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data) LLStringUtil::replaceChar(line, ',',' '); LLStringUtil::replaceChar(line, ')',' '); sscanf(line.c_str(), "%d %d", &row, &column); - //llinfos << "LLScriptEdCore::onErrorList() - " << row << ", " - //<< column << llendl; + //LL_INFOS() << "LLScriptEdCore::onErrorList() - " << row << ", " + //<< column << LL_ENDL; self->mEditor->setCursor(row, column); self->mEditor->setFocus(TRUE); } @@ -1289,7 +1289,7 @@ BOOL LLPreviewLSL::postBuild() // virtual void LLPreviewLSL::callbackLSLCompileSucceeded() { - llinfos << "LSL Bytecode saved" << llendl; + LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); closeIfNeeded(); @@ -1298,7 +1298,7 @@ void LLPreviewLSL::callbackLSLCompileSucceeded() // virtual void LLPreviewLSL::callbackLSLCompileFailed(const LLSD& compile_errors) { - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; for(LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); @@ -1413,7 +1413,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save) // fails, go ahead and save the text anyway. void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/) { - // llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl; + // LL_INFOS() << "LLPreviewLSL::saveIfNeeded()" << LL_ENDL; if(!mScriptEd->hasChanged()) { return; @@ -1459,7 +1459,7 @@ void LLPreviewLSL::uploadAssetViaCaps(const std::string& url, const std::string& filename, const LLUUID& item_id) { - llinfos << "Update Agent Inventory via capability" << llendl; + LL_INFOS() << "Update Agent Inventory via capability" << LL_ENDL; LLSD body; body["item_id"] = item_id; body["target"] = "lsl2"; @@ -1492,7 +1492,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, asset_id.asString().c_str(), gAgent.isGodlike())) { - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; //char command[256]; //sprintf(command, "type %s\n", err_filename.c_str()); //system(command); @@ -1530,7 +1530,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, } else { - llinfos << "Compile worked!" << llendl; + LL_INFOS() << "Compile worked!" << LL_ENDL; if(gAssetStorage) { getWindow()->incBusyCount(); @@ -1572,8 +1572,8 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 } else { - llwarns << "Inventory item for script " << info->mItemUUID - << " is no longer in agent inventory." << llendl; + LL_WARNS() << "Inventory item for script " << info->mItemUUID + << " is no longer in agent inventory." << LL_ENDL; } // Find our window and close it if requested. @@ -1592,7 +1592,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 } else { - llwarns << "Problem saving script: " << status << llendl; + LL_WARNS() << "Problem saving script: " << status << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("SaveScriptFailReason", args); @@ -1630,7 +1630,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d } else { - llwarns << "Problem saving LSL Bytecode (Preview)" << llendl; + LL_WARNS() << "Problem saving LSL Bytecode (Preview)" << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("SaveBytecodeFailReason", args); @@ -1642,8 +1642,8 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid - << llendl; + LL_DEBUGS() << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid + << LL_ENDL; LLUUID* item_uuid = (LLUUID*)user_data; LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", *item_uuid); if( preview ) @@ -1688,7 +1688,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset } preview->mAssetStatus = PREVIEW_ASSET_ERROR; - llwarns << "Problem loading script: " << status << llendl; + LL_WARNS() << "Problem loading script: " << status << LL_ENDL; } } delete item_uuid; @@ -1755,7 +1755,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, const LLUUID& item_id, bool is_script_running) { - lldebugs << "LSL Bytecode saved" << llendl; + LL_DEBUGS() << "LSL Bytecode saved" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); closeIfNeeded(); @@ -1764,7 +1764,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, // virtual void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) { - lldebugs << "Compile failed!" << llendl; + LL_DEBUGS() << "Compile failed!" << LL_ENDL; for(LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); line++) @@ -1783,7 +1783,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) void LLLiveLSLEditor::loadAsset() { - //llinfos << "LLLiveLSLEditor::loadAsset()" << llendl; + //LL_INFOS() << "LLLiveLSLEditor::loadAsset()" << LL_ENDL; if(!mIsNew) { LLViewerObject* object = gObjectList.findObject(mObjectUUID); @@ -1795,7 +1795,7 @@ void LLLiveLSLEditor::loadAsset() || gAgent.isGodlike())) { mItem = new LLViewerInventoryItem(item); - //llinfos << "asset id " << mItem->getAssetUUID() << llendl; + //LL_INFOS() << "asset id " << mItem->getAssetUUID() << LL_ENDL; } if(!gAgent.isGodlike() @@ -1887,8 +1887,8 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { - lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id - << llendl; + LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id + << LL_ENDL; LLUUID* xored_id = (LLUUID*)user_data; LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", *xored_id); @@ -1933,7 +1933,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType if (file.getLastBytesRead() != file_length || file_length <= 0) { - llwarns << "Error reading " << uuid << ":" << type << llendl; + LL_WARNS() << "Error reading " << uuid << ":" << type << LL_ENDL; } buffer[file_length] = '\0'; @@ -2156,7 +2156,7 @@ void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url, const LLUUID& item_id, BOOL is_running) { - llinfos << "Update Task Inventory via capability " << url << llendl; + LL_INFOS() << "Update Task Inventory via capability " << url << LL_ENDL; LLSD body; body["task_id"] = task_id; body["item_id"] = item_id; @@ -2195,7 +2195,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, gAgent.isGodlike())) { // load the error file into the error scrolllist - llinfos << "Compile failed!" << llendl; + LL_INFOS() << "Compile failed!" << LL_ENDL; if(NULL != (fp = LLFile::fopen(err_filename, "r"))) { char buffer[MAX_STRING]; /*Flawfinder: ignore*/ @@ -2233,12 +2233,12 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, } else { - llinfos << "Compile worked!" << llendl; + LL_INFOS() << "Compile worked!" << LL_ENDL; mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessfulSaving")); if(gAssetStorage) { - llinfos << "LLLiveLSLEditor::saveAsset " - << mItem->getAssetUUID() << llendl; + LL_INFOS() << "LLLiveLSLEditor::saveAsset " + << mItem->getAssetUUID() << LL_ENDL; getWindow()->incBusyCount(); mPendingUploads++; LLLiveLSLSaveData* data = NULL; @@ -2271,7 +2271,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da if (status) { - llwarns << "Unable to save text for a script." << llendl; + LL_WARNS() << "Unable to save text for a script." << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); LLNotificationsUtil::add("CompileQueueSaveText", args); @@ -2302,7 +2302,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use return; if(0 ==status) { - llinfos << "LSL Bytecode saved" << llendl; + LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID if (self) { @@ -2328,8 +2328,8 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use } else { - llinfos << "Problem saving LSL Bytecode (Live Editor)" << llendl; - llwarns << "Unable to save a compiled script." << llendl; + LL_INFOS() << "Problem saving LSL Bytecode (Live Editor)" << LL_ENDL; + LL_WARNS() << "Unable to save a compiled script." << LL_ENDL; LLSD args; args["REASON"] = std::string(LLAssetStorage::getErrorString(status)); diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp index 1390000fc5..e85194d173 100755 --- a/indra/newview/llproductinforequest.cpp +++ b/indra/newview/llproductinforequest.cpp @@ -45,8 +45,8 @@ public: //If we get back an error (not found, etc...), handle it here virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "LLProductInfoRequest error [status:" - << status << ":] " << content << llendl; + LL_WARNS() << "LLProductInfoRequest error [status:" + << status << ":] " << content << LL_ENDL; } }; @@ -76,7 +76,7 @@ std::string LLProductInfoRequestManager::getDescriptionForSku(const std::string& it != mSkuDescriptions.endArray(); ++it) { - // llwarns << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << llendl; + // LL_WARNS() << (*it)["sku"].asString() << " = " << (*it)["description"].asString() << LL_ENDL; if ((*it)["sku"].asString() == sku) { return (*it)["description"].asString(); diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 590e246482..25c576468b 100755 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -192,11 +192,11 @@ void LLRegionInfoModel::sendEstateOwnerMessage( if (!cur_region) { - llwarns << "Agent region not set" << llendl; + LL_WARNS() << "Agent region not set" << LL_ENDL; return; } - llinfos << "Sending estate request '" << request << "'" << llendl; + LL_INFOS() << "Sending estate request '" << request << "'" << LL_ENDL; msg->newMessage("EstateOwnerMessage"); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -217,7 +217,7 @@ void LLRegionInfoModel::sendEstateOwnerMessage( std::vector::const_iterator end = strings.end(); for (unsigned i = 0; it != end; ++it, ++i) { - lldebugs << "- [" << i << "] " << (*it) << llendl; + LL_DEBUGS() << "- [" << i << "] " << (*it) << LL_ENDL; msg->nextBlock("ParamList"); msg->addString("Parameter", *it); } diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index 500dec7ee5..13120fdf45 100755 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -64,8 +64,8 @@ void LLRemoteParcelRequestResponder::result(const LLSD& content) //virtual void LLRemoteParcelRequestResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "LLRemoteParcelRequest error [status:" - << status << "]: " << content << llendl; + LL_WARNS() << "LLRemoteParcelRequest error [status:" + << status << "]: " << content << LL_ENDL; // Panel inspecting the information may be closed and destroyed // before this response is received. diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 168a941ec3..0ed6a840e0 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -599,7 +599,7 @@ void LLScreenChannel::showToastsBottom() LLToast* toast = (it-1)->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -610,7 +610,7 @@ void LLScreenChannel::showToastsBottom() LLToast* toast = it->getToast(); if(!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -698,7 +698,7 @@ void LLScreenChannel::showToastsCentre() LLToast* toast = mToastList[0].getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -711,7 +711,7 @@ void LLScreenChannel::showToastsCentre() LLToast* toast = it->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -747,7 +747,7 @@ void LLScreenChannel::showToastsTop() LLToast* toast = (it-1)->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -758,7 +758,7 @@ void LLScreenChannel::showToastsTop() LLToast* toast = it->getToast(); if (!toast) { - llwarns << "Attempt to display a deleted toast." << llendl; + LL_WARNS() << "Attempt to display a deleted toast." << LL_ENDL; return; } @@ -954,7 +954,7 @@ void LLScreenChannel::hideToastsFromScreen() } else { - llwarns << "Attempt to hide a deleted toast." << llendl; + LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL; } } } @@ -972,7 +972,7 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id) } else { - llwarns << "Attempt to hide a deleted toast." << llendl; + LL_WARNS() << "Attempt to hide a deleted toast." << LL_ENDL; } } } diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index b5edeb4a0e..590a1c2647 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -306,7 +306,7 @@ void LLScriptFloater::dockToChiclet(bool dock) LLChiclet * chicletp = chiclet_panelp->findChiclet(getNotificationId()); if (NULL == chicletp) { - llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl; + LL_WARNS() << "Dock chiclet for LLScriptFloater doesn't exist" << LL_ENDL; return; } @@ -350,7 +350,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) { if(notification_id.isNull()) { - llwarns << "Invalid notification ID" << llendl; + LL_WARNS() << "Invalid notification ID" << LL_ENDL; return; } @@ -434,7 +434,7 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) { if(notification_id.isNull()) { - llwarns << "Invalid notification ID" << llendl; + LL_WARNS() << "Invalid notification ID" << LL_ENDL; return; } @@ -505,7 +505,7 @@ LLScriptFloaterManager::EObjectType LLScriptFloaterManager::getObjectType(const { if(notification_id.isNull()) { - llwarns << "Invalid notification ID" << llendl; + LL_WARNS() << "Invalid notification ID" << LL_ENDL; return OBJ_UNKNOWN; } @@ -518,7 +518,7 @@ LLScriptFloaterManager::EObjectType LLScriptFloaterManager::getObjectType(const return it->second; } - llwarns << "Unknown object type" << llendl; + LL_WARNS() << "Unknown object type" << LL_ENDL; return OBJ_UNKNOWN; } @@ -529,7 +529,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id) LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id); if(!notification) { - llwarns << "Invalid notification" << llendl; + LL_WARNS() << "Invalid notification" << LL_ENDL; return LLStringUtil::null; } @@ -586,7 +586,7 @@ void LLScriptFloaterManager::saveFloaterPosition(const LLUUID& object_id, const } else { - llwarns << "Invalid object id" << llendl; + LL_WARNS() << "Invalid object id" << LL_ENDL; } } diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 928d26646b..4345c33e48 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1210,7 +1210,7 @@ void LLSecAPIBasicHandler::init() // grab the application CA.pem file that contains the well-known certs shipped // with the product std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); - llinfos << "app path " << ca_file_path << llendl; + LL_INFOS() << "app path " << ca_file_path << LL_ENDL; LLPointer app_ca_store = new LLBasicCertificateStore(ca_file_path); // push the applicate CA files into the store, therefore adding any new CA certs that @@ -1362,7 +1362,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() // Decided throwing an exception here was overkill until we figure out why this happens //throw LLProtectedDataException("Error writing Protected Data Store"); - llinfos << "LLProtectedDataException(Error writing Protected Data Store)" << llendl; + LL_INFOS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL; } // move the temporary file to the specified file location. @@ -1375,7 +1375,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() // Decided throwing an exception here was overkill until we figure out why this happens //throw LLProtectedDataException("Could not overwrite protected data store"); - llinfos << "LLProtectedDataException(Could not overwrite protected data store)" << llendl; + LL_INFOS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL; } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 06ad834f35..06ae95ee23 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -326,7 +326,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3 return NULL; } - // llinfos << "Adding object to selected object list" << llendl; + // LL_INFOS() << "Adding object to selected object list" << LL_ENDL; // Place it in the list and tag it. // This will refresh dialogs. @@ -892,7 +892,7 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab } else { - llerrs << "LLSelectMgr::add face " << face << " out-of-range" << llendl; + LL_ERRS() << "LLSelectMgr::add face " << face << " out-of-range" << LL_ENDL; return; } @@ -1336,7 +1336,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) } else { - llerrs << "LLSelectMgr::remove - tried to remove TE " << te << " that wasn't selected" << llendl; + LL_ERRS() << "LLSelectMgr::remove - tried to remove TE " << te << " that wasn't selected" << LL_ENDL; return; } @@ -1359,7 +1359,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) else { // ...out of range face - llerrs << "LLSelectMgr::remove - TE " << te << " out of range" << llendl; + LL_ERRS() << "LLSelectMgr::remove - TE " << te << " out of range" << LL_ENDL; } updateSelectionCenter(); @@ -1458,26 +1458,26 @@ void LLSelectMgr::demoteSelectionToIndividuals() //----------------------------------------------------------------------------- void LLSelectMgr::dump() { - llinfos << "Selection Manager: " << mSelectedObjects->getNumNodes() << " items" << llendl; + LL_INFOS() << "Selection Manager: " << mSelectedObjects->getNumNodes() << " items" << LL_ENDL; - llinfos << "TE mode " << mTEMode << llendl; + LL_INFOS() << "TE mode " << mTEMode << LL_ENDL; S32 count = 0; for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) { LLViewerObject* objectp = (*iter)->getObject(); - llinfos << "Object " << count << " type " << LLPrimitive::pCodeToString(objectp->getPCode()) << llendl; - llinfos << " hasLSL " << objectp->flagScripted() << llendl; - llinfos << " hasTouch " << objectp->flagHandleTouch() << llendl; - llinfos << " hasMoney " << objectp->flagTakesMoney() << llendl; - llinfos << " getposition " << objectp->getPosition() << llendl; - llinfos << " getpositionAgent " << objectp->getPositionAgent() << llendl; - llinfos << " getpositionRegion " << objectp->getPositionRegion() << llendl; - llinfos << " getpositionGlobal " << objectp->getPositionGlobal() << llendl; + LL_INFOS() << "Object " << count << " type " << LLPrimitive::pCodeToString(objectp->getPCode()) << LL_ENDL; + LL_INFOS() << " hasLSL " << objectp->flagScripted() << LL_ENDL; + LL_INFOS() << " hasTouch " << objectp->flagHandleTouch() << LL_ENDL; + LL_INFOS() << " hasMoney " << objectp->flagTakesMoney() << LL_ENDL; + LL_INFOS() << " getposition " << objectp->getPosition() << LL_ENDL; + LL_INFOS() << " getpositionAgent " << objectp->getPositionAgent() << LL_ENDL; + LL_INFOS() << " getpositionRegion " << objectp->getPositionRegion() << LL_ENDL; + LL_INFOS() << " getpositionGlobal " << objectp->getPositionGlobal() << LL_ENDL; LLDrawable* drawablep = objectp->mDrawable; - llinfos << " " << (drawablep&& drawablep->isVisible() ? "visible" : "invisible") << llendl; - llinfos << " " << (drawablep&& drawablep->isState(LLDrawable::FORCE_INVISIBLE) ? "force_invisible" : "") << llendl; + LL_INFOS() << " " << (drawablep&& drawablep->isVisible() ? "visible" : "invisible") << LL_ENDL; + LL_INFOS() << " " << (drawablep&& drawablep->isState(LLDrawable::FORCE_INVISIBLE) ? "force_invisible" : "") << LL_ENDL; count++; } @@ -1493,14 +1493,14 @@ void LLSelectMgr::dump() { if (node->isTESelected(te)) { - llinfos << "Object " << objectp << " te " << te << llendl; + LL_INFOS() << "Object " << objectp << " te " << te << LL_ENDL; } } } - llinfos << mHighlightedObjects->getNumNodes() << " objects currently highlighted." << llendl; + LL_INFOS() << mHighlightedObjects->getNumNodes() << " objects currently highlighted." << LL_ENDL; - llinfos << "Center global " << mSelectionCenterGlobal << llendl; + LL_INFOS() << "Center global " << mSelectionCenterGlobal << LL_ENDL; } //----------------------------------------------------------------------------- @@ -1583,8 +1583,8 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid) && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) && (mSelectedObjects->getNumNodes() > 1) ) { - llwarns << "Attempted to apply no-copy texture to multiple objects" - << llendl; + LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" + << LL_ENDL; return; } @@ -3513,7 +3513,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, S32 option = LLNotification::getSelectedOption(notification, response); if (!handle->getObjectCount()) { - llwarns << "Nothing to delete!" << llendl; + LL_WARNS() << "Nothing to delete!" << LL_ENDL; return false; } @@ -3951,7 +3951,7 @@ void LLSelectMgr::packMultipleUpdate(LLSelectNode* node, void *user_data) } if (type & UPD_SCALE) { - //llinfos << "Sending object scale " << object->getScale() << llendl; + //LL_INFOS() << "Sending object scale " << object->getScale() << LL_ENDL; htonmemcpy(&data[offset], &(object->getScale().mV), MVT_LLVector3, 12); offset += 12; } @@ -4089,7 +4089,7 @@ void LLSelectMgr::packPermissionsHead(void* user_data) /* void LLSelectMgr::sendSelect() { - llerrs << "Not implemented" << llendl; + LL_ERRS() << "Not implemented" << LL_ENDL; } */ @@ -4203,9 +4203,9 @@ void LLSelectMgr::deselectAllIfTooFar() { if (mDebugSelectMgr) { - llinfos << "Selection manager: auto-deselecting, select_dist = " << (F32) sqrt(select_dist_sq) << llendl; - llinfos << "agent pos global = " << gAgent.getPositionGlobal() << llendl; - llinfos << "selection pos global = " << selectionCenter << llendl; + LL_INFOS() << "Selection manager: auto-deselecting, select_dist = " << (F32) sqrt(select_dist_sq) << LL_ENDL; + LL_INFOS() << "agent pos global = " << gAgent.getPositionGlobal() << LL_ENDL; + LL_INFOS() << "selection pos global = " << selectionCenter << LL_ENDL; } deselectAll(); @@ -4917,7 +4917,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, break; default: - llerrs << "Bad send type " << send_type << " passed to SendListToRegions()" << llendl; + LL_ERRS() << "Bad send type " << send_type << " passed to SendListToRegions()" << LL_ENDL; } // bail if nothing selected @@ -4991,7 +4991,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, gMessageSystem->clearMessage(); } - // llinfos << "sendListToRegions " << message_name << " obj " << objects_sent << " pkt " << packets_sent << llendl; + // LL_INFOS() << "sendListToRegions " << message_name << " obj " << objects_sent << " pkt " << packets_sent << LL_ENDL; } @@ -5108,7 +5108,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data if (!node) { - llwarns << "Couldn't find object " << id << " selected." << llendl; + LL_WARNS() << "Couldn't find object " << id << " selected." << LL_ENDL; } else { @@ -6369,7 +6369,7 @@ S32 get_family_count(LLViewerObject *parent) { if (!parent) { - llwarns << "Trying to get_family_count on null parent!" << llendl; + LL_WARNS() << "Trying to get_family_count on null parent!" << LL_ENDL; } S32 count = 1; // for this object LLViewerObject::const_child_list_t& child_list = parent->getChildren(); @@ -6380,11 +6380,11 @@ S32 get_family_count(LLViewerObject *parent) if (!child) { - llwarns << "Family object has NULL child! Show Doug." << llendl; + LL_WARNS() << "Family object has NULL child! Show Doug." << LL_ENDL; } else if (child->isDead()) { - llwarns << "Family object has dead child object. Show Doug." << llendl; + LL_WARNS() << "Family object has dead child object. Show Doug." << LL_ENDL; } else { diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index a405129a25..a8283b9208 100755 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -201,7 +201,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility) const LLViewerWearable *wearable_ptr = mEditWearable->getWearable(); if (!wearable_ptr) { - llwarns << "Visibility change to invalid wearable" << llendl; + LL_WARNS() << "Visibility change to invalid wearable" << LL_ENDL; return; } // Disable camera switch is currently just for WT_PHYSICS type since we don't want to freeze the avatar diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 8915bb2fef..d20f89456b 100755 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -310,7 +310,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID) if (inboxID.isNull()) { - llwarns << "Attempting to track modifications to non-existent inbox" << llendl; + LL_WARNS() << "Attempting to track modifications to non-existent inbox" << LL_ENDL; return; } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 92c2863ffd..d1e14632ff 100755 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -678,7 +678,7 @@ void LLSidepanelItemInfo::startObjectInventoryObserver() if (mObjectID.isNull()) { - llwarns << "Empty object id passed to inventory observer" << llendl; + LL_WARNS() << "Empty object id passed to inventory observer" << LL_ENDL; return; } @@ -721,7 +721,7 @@ void LLSidepanelItemInfo::onClickOwner() // static void LLSidepanelItemInfo::onCommitName() { - //llinfos << "LLSidepanelItemInfo::onCommitName()" << llendl; + //LL_INFOS() << "LLSidepanelItemInfo::onCommitName()" << LL_ENDL; LLViewerInventoryItem* item = findItem(); if(!item) { @@ -757,7 +757,7 @@ void LLSidepanelItemInfo::onCommitName() void LLSidepanelItemInfo::onCommitDescription() { - //llinfos << "LLSidepanelItemInfo::onCommitDescription()" << llendl; + //LL_INFOS() << "LLSidepanelItemInfo::onCommitDescription()" << LL_ENDL; LLViewerInventoryItem* item = findItem(); if(!item) return; @@ -795,7 +795,7 @@ void LLSidepanelItemInfo::onCommitDescription() // static void LLSidepanelItemInfo::onCommitPermissions() { - //llinfos << "LLSidepanelItemInfo::onCommitPermissions()" << llendl; + //LL_INFOS() << "LLSidepanelItemInfo::onCommitPermissions()" << LL_ENDL; LLViewerInventoryItem* item = findItem(); if(!item) return; LLPermissions perm(item->getPermissions()); @@ -892,14 +892,14 @@ void LLSidepanelItemInfo::onCommitPermissions() // static void LLSidepanelItemInfo::onCommitSaleInfo() { - //llinfos << "LLSidepanelItemInfo::onCommitSaleInfo()" << llendl; + //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleInfo()" << LL_ENDL; updateSaleInfo(); } // static void LLSidepanelItemInfo::onCommitSaleType() { - //llinfos << "LLSidepanelItemInfo::onCommitSaleType()" << llendl; + //LL_INFOS() << "LLSidepanelItemInfo::onCommitSaleType()" << LL_ENDL; updateSaleInfo(); } diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 090ee64801..56f82b851a 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -995,28 +995,28 @@ void LLSidepanelTaskInfo::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data) // static void LLSidepanelTaskInfo::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data) { - //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << llendl; + //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY); } // static void LLSidepanelTaskInfo::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data) { - //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << llendl; + //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY); } // static void LLSidepanelTaskInfo::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data) { - //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << llendl; + //LL_INFOS() << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << LL_ENDL; onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER); } // static void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data) { - //llinfos << "LLSidepanelTaskInfo::onCommitName()" << llendl; + //LL_INFOS() << "LLSidepanelTaskInfo::onCommitName()" << LL_ENDL; LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; LLLineEditor* tb = self->getChild("Object Name"); if(tb) @@ -1030,7 +1030,7 @@ void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data) // static void LLSidepanelTaskInfo::onCommitDesc(LLUICtrl*, void* data) { - //llinfos << "LLSidepanelTaskInfo::onCommitDesc()" << llendl; + //LL_INFOS() << "LLSidepanelTaskInfo::onCommitDesc()" << LL_ENDL; LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; LLLineEditor* le = self->getChild("Object Description"); if(le) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index ad659baa9e..f3b0108359 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -76,7 +76,7 @@ void sg_assert(BOOL expr) #if LL_OCTREE_PARANOIA_CHECK if (!expr) { - llerrs << "Octree invalid!" << llendl; + LL_ERRS() << "Octree invalid!" << LL_ENDL; } #endif } @@ -114,7 +114,7 @@ LLSpatialGroup::~LLSpatialGroup() { /*if (sNoDelete) { - llerrs << "Illegal deletion of LLSpatialGroup!" << llendl; + LL_ERRS() << "Illegal deletion of LLSpatialGroup!" << LL_ENDL; }*/ if (gDebugGL) @@ -300,7 +300,7 @@ void LLSpatialGroup::validate() LLSpatialPartition* part = drawable->asPartition(); if (!part) { - llerrs << "Drawable reports it is a spatial bridge but not a partition." << llendl; + LL_ERRS() << "Drawable reports it is a spatial bridge but not a partition." << LL_ENDL; } LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0); group->validate(); @@ -685,7 +685,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera) { if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD) { - llwarns << "Attempted to update distance for camera other than world camera!" << llendl; + LL_WARNS() << "Attempted to update distance for camera other than world camera!" << LL_ENDL; return; } @@ -697,7 +697,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera) #if !LL_RELEASE_FOR_DOWNLOAD if (hasState(LLSpatialGroup::OBJECT_DIRTY)) { - llerrs << "Spatial group dirty on distance update." << llendl; + LL_ERRS() << "Spatial group dirty on distance update." << LL_ENDL; } #endif if (!isEmpty()) @@ -859,7 +859,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) } else { - llerrs << "No Drawable found in the entry." << llendl; + LL_ERRS() << "No Drawable found in the entry." << LL_ENDL; } } else @@ -894,7 +894,7 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c } else { - OCT_ERRS << "LLSpatialGroup redundancy detected." << llendl; + OCT_ERRS << "LLSpatialGroup redundancy detected." << LL_ENDL; } unbound(); @@ -991,7 +991,7 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) { if (!curp->removeObject(drawablep)) { - OCT_ERRS << "Failed to remove drawable from octree!" << llendl; + OCT_ERRS << "Failed to remove drawable from octree!" << LL_ENDL; } else { @@ -1009,7 +1009,7 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL // who was seeing crashing here. (See VWR-424 reported by Bunny Mayne) if (!drawablep) { - OCT_ERRS << "LLSpatialPartition::move was passed a bad drawable." << llendl; + OCT_ERRS << "LLSpatialPartition::move was passed a bad drawable." << LL_ENDL; return; } @@ -1026,7 +1026,7 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL } else { - OCT_ERRS << "Drawable lost between spatial partitions on outbound transition." << llendl; + OCT_ERRS << "Drawable lost between spatial partitions on outbound transition." << LL_ENDL; } } @@ -1041,7 +1041,7 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL LLPointer ptr = drawablep; if (curp && !remove(drawablep, curp)) { - OCT_ERRS << "Move couldn't find existing spatial group!" << llendl; + OCT_ERRS << "Move couldn't find existing spatial group!" << LL_ENDL; } put(drawablep, was_visible); @@ -1973,7 +1973,7 @@ void renderUpdateType(LLDrawable* drawablep) gGL.diffuseColor4f(0,0,1,0.5f); break; default: - llwarns << "Unknown update_type " << vobj->getLastUpdateType() << llendl; + LL_WARNS() << "Unknown update_type " << vobj->getLastUpdateType() << LL_ENDL; break; }; S32 num_faces = drawablep->getNumFaces(); @@ -2620,7 +2620,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) } else { - llerrs << "Unhandled type" << llendl; + LL_ERRS() << "Unhandled type" << LL_ENDL; } gGL.popMatrix(); @@ -3368,11 +3368,11 @@ public: { if (facep->mDrawInfo->mTextureList.size() <= index) { - llerrs << "Face texture index out of bounds." << llendl; + LL_ERRS() << "Face texture index out of bounds." << LL_ENDL; } else if (facep->mDrawInfo->mTextureList[index] != facep->getTexture()) { - llerrs << "Face texture index incorrect." << llendl; + LL_ERRS() << "Face texture index incorrect." << LL_ENDL; } } } @@ -3581,7 +3581,7 @@ public: { if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i])) { - llerrs << "Spatial group failed inherited mask test." << llendl; + LL_ERRS() << "Spatial group failed inherited mask test." << LL_ENDL; } } @@ -3598,7 +3598,7 @@ public: { if (!parent->hasState(state)) { - llerrs << "Spatial group failed parent state check." << llendl; + LL_ERRS() << "Spatial group failed parent state check." << LL_ENDL; } parent = parent->getParent(); } @@ -3927,7 +3927,7 @@ LLDrawInfo::~LLDrawInfo() { /*if (LLSpatialGroup::sNoDelete) { - llerrs << "LLDrawInfo deleted illegally!" << llendl; + LL_ERRS() << "LLDrawInfo deleted illegally!" << LL_ENDL; }*/ if (mFace) @@ -4205,7 +4205,7 @@ void LLCullResult::assertDrawMapsEmpty() { if (mRenderMapSize[i] != 0) { - llerrs << "Stale LLDrawInfo's in LLCullResult!" << llendl; + LL_ERRS() << "Stale LLDrawInfo's in LLCullResult!" << LL_ENDL; } } } diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 05ed70ab59..8d755e74b1 100755 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -79,7 +79,7 @@ public: const LLDrawInfo& operator=(const LLDrawInfo& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } @@ -221,7 +221,7 @@ public: const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) { - llerrs << "Illegal operation!" << llendl; + LL_ERRS() << "Illegal operation!" << LL_ENDL; return *this; } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 75e6b4f1a5..f25076d47e 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -278,7 +278,7 @@ public: virtual void error(U32 status, const std::string& reason) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; if ( gIMMgr ) { @@ -341,7 +341,7 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin speakerp->mStatus = status; mSpeakers.insert(std::make_pair(speakerp->mID, speakerp)); mSpeakersSorted.push_back(speakerp); - LL_DEBUGS("Speakers") << "Added speaker " << id << llendl; + LL_DEBUGS("Speakers") << "Added speaker " << id << LL_ENDL; fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add"); } else @@ -362,7 +362,7 @@ LLPointer LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin } else { - LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl; + LL_WARNS("Speakers") << "Speaker " << id << " not found" << LL_ENDL; } } @@ -426,7 +426,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; - LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< llendl; + LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< LL_ENDL; speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); } @@ -623,7 +623,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id) } } - LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << llendl; + LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << LL_ENDL; fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove"); update(TRUE); @@ -741,7 +741,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers) // Fire event only if moderator changed if ( is_moderator != speakerp->mIsModerator ) { - LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl; + LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << LL_ENDL; fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator"); } } @@ -796,7 +796,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } else { - llwarns << "bad membership list update " << ll_print_sd(agent_data["transition"]) << llendl; + LL_WARNS() << "bad membership list update " << ll_print_sd(agent_data["transition"]) << LL_ENDL; } } @@ -814,7 +814,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) // Fire event only if moderator changed if ( is_moderator != speakerp->mIsModerator ) { - LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl; + LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << LL_ENDL; fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator"); } } @@ -849,15 +849,15 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } else { - llwarns << "bad membership list update " - << agent_transition << llendl; + LL_WARNS() << "bad membership list update " + << agent_transition << LL_ENDL; } } } } /*prep# virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content) - llwarns << "ModerationResponder error [status:" << status << "]: " << content << llendl; + LL_WARNS() << "ModerationResponder error [status:" << status << "]: " << content << LL_ENDL; */ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) { @@ -974,7 +974,7 @@ void LLActiveSpeakerMgr::updateSpeakerList() // always populate from active voice channel if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false { - LL_DEBUGS("Speakers") << "Removed all speakers" << llendl; + LL_DEBUGS("Speakers") << "Removed all speakers" << LL_ENDL; fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear"); mSpeakers.clear(); mSpeakersSorted.clear(); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 07e9371124..78fe7863c8 100755 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -279,7 +279,7 @@ void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* c // So, using stored deleted pointer leads to crash. See EXT-4782. if (it != mSpeakingIndicators.end()) { - llwarns << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << llendl; + LL_WARNS() << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << LL_ENDL; llassert(it == mSpeakingIndicators.end()); mSpeakingIndicators.erase(it); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 933cc74064..3335ff6631 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1675,7 +1675,7 @@ bool idle_startup() LLSD inv_basic = response["inventory-basic"]; if(inv_basic.isDefined()) { - llinfos << "Basic inventory root folder id is " << inv_basic["folder_id"] << llendl; + LL_INFOS() << "Basic inventory root folder id is " << inv_basic["folder_id"] << LL_ENDL; } LLSD buddy_list = response["buddy-list"]; @@ -1770,30 +1770,30 @@ bool idle_startup() gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true); // set up callbacks - llinfos << "Registering Callbacks" << llendl; + LL_INFOS() << "Registering Callbacks" << LL_ENDL; LLMessageSystem* msg = gMessageSystem; - llinfos << " Inventory" << llendl; + LL_INFOS() << " Inventory" << LL_ENDL; LLInventoryModel::registerCallbacks(msg); - llinfos << " AvatarTracker" << llendl; + LL_INFOS() << " AvatarTracker" << LL_ENDL; LLAvatarTracker::instance().registerCallbacks(msg); - llinfos << " Landmark" << llendl; + LL_INFOS() << " Landmark" << LL_ENDL; LLLandmark::registerCallbacks(msg); display_startup(); // request mute list - llinfos << "Requesting Mute List" << llendl; + LL_INFOS() << "Requesting Mute List" << LL_ENDL; LLMuteList::getInstance()->requestFromServer(gAgent.getID()); display_startup(); // Get L$ and ownership credit information - llinfos << "Requesting Money Balance" << llendl; + LL_INFOS() << "Requesting Money Balance" << LL_ENDL; LLStatusBar::sendMoneyBalanceRequest(); display_startup(); // request all group information - llinfos << "Requesting Agent Data" << llendl; + LL_INFOS() << "Requesting Agent Data" << LL_ENDL; gAgent.sendAgentDataUpdateRequest(); display_startup(); // Create the inventory views - llinfos << "Creating Inventory Views" << llendl; + LL_INFOS() << "Creating Inventory Views" << LL_ENDL; LLFloaterReg::getInstance("inventory"); display_startup(); LLStartUp::setStartupState( STATE_MISC ); @@ -1948,7 +1948,7 @@ bool idle_startup() // thus, do not show this alert. if (!gAgent.isFirstLogin()) { - llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl; + LL_INFOS() << "gAgentStartLocation : " << gAgentStartLocation << LL_ENDL; LLSLURL start_slurl = LLStartUp::getStartSLURL(); LL_DEBUGS("AppInit") << "start slurl "<isFullyLoaded()) { // wait for avatar to be completely loaded - //llinfos << "avatar fully loaded" << llendl; + //LL_INFOS() << "avatar fully loaded" << LL_ENDL; LLStartUp::setStartupState( STATE_CLEANUP ); } // OK to just get the wearables else if (!gAgent.isFirstLogin() && gAgentWearables.areWearablesLoaded() ) { // We have our clothing, proceed. - //llinfos << "wearables loaded" << llendl; + //LL_INFOS() << "wearables loaded" << LL_ENDL; LLStartUp::setStartupState( STATE_CLEANUP ); } else @@ -2162,7 +2162,7 @@ bool idle_startup() // Unmute audio if desired and setup volumes. // This is a not-uncommon crash site, so surround it with - // llinfos output to aid diagnosis. + // LL_INFOS() output to aid diagnosis. LL_INFOS("AppInit") << "Doing first audio_update_volume..." << LL_ENDL; audio_update_volume(); LL_INFOS("AppInit") << "Done first audio_update_volume." << LL_ENDL; @@ -2530,7 +2530,7 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { - lldebugs << "starting" << llendl; + LL_DEBUGS() << "starting" << LL_ENDL; // Not going through the processAgentInitialWearables path, so need to set this here. LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); @@ -2540,18 +2540,18 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, ESex gender; if (gender_name == "male") { - lldebugs << "male" << llendl; + LL_DEBUGS() << "male" << LL_ENDL; gender = SEX_MALE; } else { - lldebugs << "female" << llendl; + LL_DEBUGS() << "female" << LL_ENDL; gender = SEX_FEMALE; } if (!isAgentAvatarValid()) { - llwarns << "Trying to load an initial outfit for an invalid agent avatar" << llendl; + LL_WARNS() << "Trying to load an initial outfit for an invalid agent avatar" << LL_ENDL; return; } @@ -2564,7 +2564,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, outfit_folder_name); if (cat_id.isNull()) { - lldebugs << "standard wearables" << llendl; + LL_DEBUGS() << "standard wearables" << LL_ENDL; gAgentWearables.createStandardWearables(); } else @@ -2580,7 +2580,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, // Need to fetch cof contents before we can wear. callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(), boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append)); - lldebugs << "initial outfit category id: " << cat_id << llendl; + LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL; } // This is really misnamed -- it means we have started loading @@ -2592,16 +2592,16 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, void LLStartUp::saveInitialOutfit() { if (sInitialOutfit.empty()) { - lldebugs << "sInitialOutfit is empty" << llendl; + LL_DEBUGS() << "sInitialOutfit is empty" << LL_ENDL; return; } if (sWearablesLoadedCon.connected()) { - lldebugs << "sWearablesLoadedCon is connected, disconnecting" << llendl; + LL_DEBUGS() << "sWearablesLoadedCon is connected, disconnecting" << LL_ENDL; sWearablesLoadedCon.disconnect(); } - lldebugs << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << llendl; + LL_DEBUGS() << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << LL_ENDL; LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false); } @@ -3140,7 +3140,7 @@ void apply_udp_blacklist(const std::string& csv) } std::string item(csv, start, comma-start); - lldebugs << "udp_blacklist " << item << llendl; + LL_DEBUGS() << "udp_blacklist " << item << LL_ENDL; gMessageSystem->banUdpMessage(item); start = comma + 1; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index c1d15947de..047538a32a 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -391,7 +391,7 @@ void LLStatusBar::sendMoneyBalanceRequest() void LLStatusBar::setHealth(S32 health) { - //llinfos << "Setting health to: " << buffer << llendl; + //LL_INFOS() << "Setting health to: " << buffer << LL_ENDL; if( mHealth > health ) { if (mHealth > (health + gSavedSettings.getF32("UISndHealthReductionThreshold"))) diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 88eec48703..e75af8db53 100755 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -123,7 +123,7 @@ LLSurface::~LLSurface() LLDrawPoolTerrain *poolp = (LLDrawPoolTerrain*) gPipeline.findPool(LLDrawPool::POOL_TERRAIN, mSTexturep); if (!poolp) { - llwarns << "No pool for terrain on destruction!" << llendl; + LL_WARNS() << "No pool for terrain on destruction!" << LL_ENDL; } else if (poolp->mReferences.empty()) { @@ -140,7 +140,7 @@ LLSurface::~LLSurface() } else { - llerrs << "Terrain pool not empty!" << llendl; + LL_ERRS() << "Terrain pool not empty!" << LL_ENDL; } } @@ -709,7 +709,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge)) { - llwarns << "Received invalid terrain packet - patch header patch ID incorrect!" + LL_WARNS() << "Received invalid terrain packet - patch header patch ID incorrect!" << " patches per edge " << mPatchesPerEdge << " i " << i << " j " << j @@ -717,7 +717,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL << " range " << (S32)ph.range << " quant_wbits " << (S32)ph.quant_wbits << " patchids " << (S32)ph.patchids - << llendl; + << LL_ENDL; LLAppViewer::instance()->badNetworkHandler(); return; } @@ -955,13 +955,13 @@ LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const { if(0 == mNumberOfPatches) { - llwarns << "No patches for current region!" << llendl; + LL_WARNS() << "No patches for current region!" << LL_ENDL; return NULL; } S32 old_index = index; index = llclamp(old_index, 0, (mNumberOfPatches - 1)); - llwarns << "Clamping out of range patch index " << old_index - << " to " << index << llendl; + LL_WARNS() << "Clamping out of range patch index " << old_index + << " to " << index << LL_ENDL; } return &(mPatchList[index]); } @@ -1150,12 +1150,12 @@ LLSurfacePatch *LLSurface::getPatch(const S32 x, const S32 y) const { if ((x < 0) || (x >= mPatchesPerEdge)) { - llerrs << "Asking for patch out of bounds" << llendl; + LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL; return NULL; } if ((y < 0) || (y >= mPatchesPerEdge)) { - llerrs << "Asking for patch out of bounds" << llendl; + LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL; return NULL; } @@ -1194,7 +1194,7 @@ void LLSurface::setWaterHeight(F32 height) } else { - llwarns << "LLSurface::setWaterHeight with no water object!" << llendl; + LL_WARNS() << "LLSurface::setWaterHeight with no water object!" << LL_ENDL; } } diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index af51f9c7de..55afc3e454 100755 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -99,7 +99,7 @@ void LLSurfacePatch::dirty() } else { - llwarns << "No viewer object for this surface patch!" << llendl; + LL_WARNS() << "No viewer object for this surface patch!" << LL_ENDL; } mDirtyZStats = TRUE; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index e92bd766ca..5612d09f7f 100755 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -107,8 +107,8 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) } else { - llwarns << "Unable to remove notification from the list, ID: " << id - << llendl; + LL_WARNS() << "Unable to remove notification from the list, ID: " << id + << LL_ENDL; } // hide chiclet window if there are no items left @@ -127,7 +127,7 @@ void LLSysWellWindow::initChannel() mChannel = dynamic_cast(channel); if(NULL == mChannel) { - llwarns << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << llendl; + LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL; } } @@ -355,9 +355,9 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) } else { - llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id + LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id << ", title: " << p.title - << llendl; + << LL_ENDL; new_item->die(); } @@ -495,7 +495,7 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); if (!mMessageList->addItem(item, notification_id)) { - llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl; + LL_WARNS() << "Unable to add Object Row into the list, notificationID: " << notification_id << LL_ENDL; item->die(); } reshapeWindow(); @@ -506,7 +506,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (!mMessageList->removeItemByValue(notification_id)) { - llwarns << "Unable to remove Object Row from the list, notificationID: " << notification_id << llendl; + LL_WARNS() << "Unable to remove Object Row from the list, notificationID: " << notification_id << LL_ENDL; } reshapeWindow(); diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 50a088b799..a20d69dd41 100755 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -77,14 +77,14 @@ void LLTeleportHistory::goToItem(int idx) // Validate specified index. if (idx < 0 || idx >= (int)mItems.size()) { - llwarns << "Invalid teleport history index (" << idx << ") specified" << llendl; + LL_WARNS() << "Invalid teleport history index (" << idx << ") specified" << LL_ENDL; dump(); return; } if (idx == mCurrentItem) { - llwarns << "Will not teleport to the same location." << llendl; + LL_WARNS() << "Will not teleport to the same location." << LL_ENDL; dump(); return; } @@ -156,7 +156,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos) // Update current history item. if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check { - llwarns << "Invalid current item. (this should not happen)" << llendl; + LL_WARNS() << "Invalid current item. (this should not happen)" << LL_ENDL; llassert(!"Invalid current teleport history item"); return; } @@ -222,7 +222,7 @@ std::string LLTeleportHistory::getCurrentLocationTitle(bool full, const LLVector void LLTeleportHistory::dump() const { - llinfos << "Teleport history dump (" << mItems.size() << " items):" << llendl; + LL_INFOS() << "Teleport history dump (" << mItems.size() << " items):" << LL_ENDL; for (size_t i=0; iparse(iss, s_item, line.length()) == LLSDParser::PARSE_FAILURE) { - llinfos << "Parsing saved teleport history failed" << llendl; + LL_INFOS() << "Parsing saved teleport history failed" << LL_ENDL; break; } @@ -221,7 +221,7 @@ void LLTeleportHistoryStorage::load() void LLTeleportHistoryStorage::dump() const { - llinfos << "Teleport history storage dump (" << mItems.size() << " items):" << llendl; + LL_INFOS() << "Teleport history storage dump (" << mItems.size() << " items):" << LL_ENDL; for (size_t i=0; i= (S32)mItems.size()) { - llwarns << "Invalid teleport history index (" << idx << ") specified" << llendl; + LL_WARNS() << "Invalid teleport history index (" << idx << ") specified" << LL_ENDL; dump(); return; } diff --git a/indra/newview/lltextureatlas.cpp b/indra/newview/lltextureatlas.cpp index dbbe331954..1c8e4f796e 100755 --- a/indra/newview/lltextureatlas.cpp +++ b/indra/newview/lltextureatlas.cpp @@ -63,7 +63,7 @@ LLTextureAtlas::~LLTextureAtlas() { if(mSpatialGroupList.size() > 0) { - llerrs << "Not clean up the spatial groups!" << llendl ; + LL_ERRS() << "Not clean up the spatial groups!" << LL_ENDL ; } releaseUsageBits() ; } @@ -105,7 +105,7 @@ LLGLuint LLTextureAtlas::insertSubTexture(LLImageGL* source_gl_tex, S32 discard_ BOOL res = gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, getTexName()); if (!res) { - llerrs << "bindTexture failed" << llendl; + LL_ERRS() << "bindTexture failed" << LL_ENDL; } GLint xoffset = sSlotSize * slot_col ; @@ -342,7 +342,7 @@ BOOL LLTextureAtlas::areUsageBitsMarked(S8 bits_len, U8 mask, S16 col, S16 row) if(ret != ret2) { - llerrs << "bits map corrupted." << llendl ; + LL_ERRS() << "bits map corrupted." << LL_ENDL ; } #endif return ret ;//FALSE ; diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index ee3b605cb0..79cc66fda5 100755 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -191,7 +191,7 @@ bool LLTextureCacheLocalFileWorker::doRead() if (mImageFormat == IMG_CODEC_INVALID) { -// llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl; +// LL_WARNS() << "Unrecognized file extension " << extension << " for local texture " << mFileName << LL_ENDL; mDataSize = 0; // no data return true; } @@ -232,9 +232,9 @@ bool LLTextureCacheLocalFileWorker::doRead() { if (mBytesRead != mBytesToRead) { -// llwarns << "Error reading file from local cache: " << local_filename +// LL_WARNS() << "Error reading file from local cache: " << local_filename // << " Bytes: " << mDataSize << " Offset: " << mOffset -// << " / " << mDataSize << llendl; +// << " / " << mDataSize << LL_ENDL; mDataSize = 0; // failed FREE_MEM(LLImageBase::getPrivatePool(), mReadData); mReadData = NULL; @@ -257,9 +257,9 @@ bool LLTextureCacheLocalFileWorker::doRead() if (bytes_read != mDataSize) { -// llwarns << "Error reading file from local cache: " << mFileName +// LL_WARNS() << "Error reading file from local cache: " << mFileName // << " Bytes: " << mDataSize << " Offset: " << mOffset -// << " / " << mDataSize << llendl; +// << " / " << mDataSize << LL_ENDL; mDataSize = 0; FREE_MEM(LLImageBase::getPrivatePool(), mReadData); mReadData = NULL; @@ -390,16 +390,16 @@ bool LLTextureCacheRemoteWorker::doRead() mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool()); if (bytes_read != mDataSize) { - llwarns << "Error reading file from local cache: " << local_filename + LL_WARNS() << "Error reading file from local cache: " << local_filename << " Bytes: " << mDataSize << " Offset: " << mOffset - << " / " << mDataSize << llendl; + << " / " << mDataSize << LL_ENDL; mDataSize = 0; FREE_MEM(LLImageBase::getPrivatePool(), mReadData); mReadData = NULL; } else { - //llinfos << "texture " << mID.asString() << " found in local_assets" << llendl; + //LL_INFOS() << "texture " << mID.asString() << " found in local_assets" << LL_ENDL; mImageSize = local_size; mImageLocal = TRUE; } @@ -442,9 +442,9 @@ bool LLTextureCacheRemoteWorker::doRead() mReadData, offset, size, mCache->getLocalAPRFilePool()); if (bytes_read != size) { - llwarns << "LLTextureCacheWorker: " << mID + LL_WARNS() << "LLTextureCacheWorker: " << mID << " incorrect number of bytes read from header: " << bytes_read - << " / " << size << llendl; + << " / " << size << LL_ENDL; FREE_MEM(LLImageBase::getPrivatePool(), mReadData); mReadData = NULL; mDataSize = -1; // failed @@ -511,9 +511,9 @@ bool LLTextureCacheRemoteWorker::doRead() mCache->getLocalAPRFilePool()); if (bytes_read != file_size) { - llwarns << "LLTextureCacheWorker: " << mID + LL_WARNS() << "LLTextureCacheWorker: " << mID << " incorrect number of bytes read from body: " << bytes_read - << " / " << file_size << llendl; + << " / " << file_size << LL_ENDL; FREE_MEM(LLImageBase::getPrivatePool(), mReadData); mReadData = NULL; mDataSize = -1; // failed @@ -524,7 +524,7 @@ bool LLTextureCacheRemoteWorker::doRead() { // No body, we're done. mDataSize = llmax(TEXTURE_CACHE_ENTRY_SIZE - mOffset, 0); - lldebugs << "No body file for: " << filename << llendl; + LL_DEBUGS() << "No body file for: " << filename << LL_ENDL; } // Nothing else to do at that point... done = true; @@ -582,8 +582,8 @@ bool LLTextureCacheRemoteWorker::doWrite() if (idx < 0) { - llwarns << "LLTextureCacheWorker: " << mID - << " Unable to create header entry for writing!" << llendl; + LL_WARNS() << "LLTextureCacheWorker: " << mID + << " Unable to create header entry for writing!" << LL_ENDL; mDataSize = -1; // failed done = true; } @@ -628,8 +628,8 @@ bool LLTextureCacheRemoteWorker::doWrite() if (bytes_written <= 0) { - llwarns << "LLTextureCacheWorker: " << mID - << " Unable to write header entry!" << llendl; + LL_WARNS() << "LLTextureCacheWorker: " << mID + << " Unable to write header entry!" << LL_ENDL; mDataSize = -1; // failed done = true; } @@ -655,16 +655,16 @@ bool LLTextureCacheRemoteWorker::doWrite() { // build the cache file name from the UUID std::string filename = mCache->getTextureFileName(mID); -// llinfos << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << llendl; +// LL_INFOS() << "Writing Body: " << filename << " Bytes: " << file_offset+file_size << LL_ENDL; S32 bytes_written = LLAPRFile::writeEx( filename, mWriteData + TEXTURE_CACHE_ENTRY_SIZE, 0, file_size, mCache->getLocalAPRFilePool()); if (bytes_written <= 0) { - llwarns << "LLTextureCacheWorker: " << mID + LL_WARNS() << "LLTextureCacheWorker: " << mID << " incorrect number of bytes written to body: " << bytes_written - << " / " << file_size << llendl; + << " / " << file_size << LL_ENDL; mDataSize = -1; // failed done = true; } @@ -1135,7 +1135,7 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create } if(entry.mImageSize <= entry.mBodySize)//it happens on 64-bit systems, do not know why { - llwarns << "corrupted entry: " << id << " entry image size: " << entry.mImageSize << " entry body size: " << entry.mBodySize << llendl ; + LL_WARNS() << "corrupted entry: " << id << " entry image size: " << entry.mImageSize << " entry body size: " << entry.mBodySize << LL_ENDL ; //erase this entry and the cached texture from the cache. std::string tex_filename = getTextureFileName(id); @@ -1303,13 +1303,13 @@ U32 LLTextureCache::openAndReadEntries(std::vector& entries) S32 bytes_read = aprfile->read((void*)(&entry), (S32)sizeof(Entry)); if (bytes_read < sizeof(Entry)) { - llwarns << "Corrupted header entries, failed at " << idx << " / " << num_entries << llendl; + LL_WARNS() << "Corrupted header entries, failed at " << idx << " / " << num_entries << LL_ENDL; closeHeaderEntriesFile(); purgeAllTextures(false); return 0; } entries.push_back(entry); -// llinfos << "ENTRY: " << entry.mTime << " TEX: " << entry.mID << " IDX: " << idx << " Size: " << entry.mImageSize << llendl; +// LL_INFOS() << "ENTRY: " << entry.mTime << " TEX: " << entry.mID << " IDX: " << idx << " Size: " << entry.mImageSize << LL_ENDL; if(entry.mImageSize > entry.mBodySize) { mHeaderIDMap[entry.mID] = idx; @@ -1439,7 +1439,7 @@ void LLTextureCache::readHeaderCache() if (entry.mBodySize > entry.mImageSize) { // Shouldn't happen, failsafe only - llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl; + LL_WARNS() << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << LL_ENDL; purge_list.insert(i); } } @@ -1450,7 +1450,7 @@ void LLTextureCache::readHeaderCache() // Special case: cache size was reduced, need to remove entries // Note: After we prune entries, we will call this again and create the LRU U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries; - llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; + LL_INFOS() << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << LL_ENDL; // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have: // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge // So, it's certain that iter will never reach lru.end() first. @@ -1467,7 +1467,7 @@ void LLTextureCache::readHeaderCache() for (std::set::iterator iter = lru.begin(); iter != lru.end(); ++iter) { mLRU.insert(entries[iter->second].mID); -// llinfos << "LRU: " << iter->first << " : " << iter->second << llendl; +// LL_INFOS() << "LRU: " << iter->first << " : " << iter->second << LL_ENDL; if (--lru_entries <= 0) break; } @@ -1513,7 +1513,7 @@ void LLTextureCache::readHeaderCache() //the header mutex is locked before calling this. void LLTextureCache::clearCorruptedCache() { - llwarns << "the texture cache is corrupted, need to be cleared." << llendl ; + LL_WARNS() << "the texture cache is corrupted, need to be cleared." << LL_ENDL ; closeHeaderEntriesFile();//close possible file handler purgeAllTextures(false) ; //clear the cache. @@ -1543,7 +1543,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) for (S32 i=0; i<16; i++) { std::string dirname = mTexturesDirName + delem + subdirs[i]; - llinfos << "Deleting files in directory: " << dirname << llendl; + LL_INFOS() << "Deleting files in directory: " << dirname << LL_ENDL; gDirUtilp->deleteFilesInDir(dirname, mask); if (purge_directories) { @@ -1568,7 +1568,7 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) mHeaderEntriesInfo.mEntries = 0; writeEntriesHeader(); - llinfos << "The entire texture cache is cleared." << llendl ; + LL_INFOS() << "The entire texture cache is cleared." << LL_ENDL ; } void LLTextureCache::purgeTextures(bool validate) @@ -1586,7 +1586,7 @@ void LLTextureCache::purgeTextures(bool validate) LLMutexLock lock(&mHeaderMutex); - llinfos << "TEXTURE CACHE: Purging." << llendl; + LL_INFOS() << "TEXTURE CACHE: Purging." << LL_ENDL; // Read the entries list std::vector entries; @@ -1609,11 +1609,11 @@ void LLTextureCache::purgeTextures(bool validate) { S32 idx = iter2->second; time_idx_set.insert(std::make_pair(entries[idx].mTime, idx)); -// llinfos << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << llendl; +// LL_INFOS() << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << LL_ENDL; } else { - llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ; + LL_ERRS() << "mTexturesSizeMap / mHeaderIDMap corrupted." << LL_ENDL ; } } } @@ -1682,7 +1682,7 @@ void LLTextureCache::purgeTextures(bool validate) << " PURGED: " << purge_count << " ENTRIES: " << num_entries << " CACHE SIZE: " << mTexturesSizeTotal / (1024 * 1024) << " MB" - << llendl; + << LL_ENDL; } ////////////////////////////////////////////////////////////////////////////// @@ -1900,7 +1900,7 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer raw, S32 dis //rescale image if needed if (raw.isNull() || !raw->getData()) { - llerrs << "Attempted to write NULL raw image to fastcache" << llendl; + LL_ERRS() << "Attempted to write NULL raw image to fastcache" << LL_ENDL; return false; } @@ -2091,7 +2091,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename) bool LLTextureCache::removeFromCache(const LLUUID& id) { - //llwarns << "Removing texture from cache: " << id << llendl; + //LL_WARNS() << "Removing texture from cache: " << id << LL_ENDL; bool ret = false ; if (!mReadOnly) { diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c09fe180f1..23ac67c313 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -354,7 +354,7 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( } handled = TRUE; - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << LL_ENDL; return handled; } @@ -1333,9 +1333,9 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLUUID id) else { mImageItemID = floaterp->findItemID(floaterp->getAssetID(), FALSE); - lldebugs << "mImageItemID: " << mImageItemID << llendl; + LL_DEBUGS() << "mImageItemID: " << mImageItemID << LL_ENDL; mImageAssetID = floaterp->getAssetID(); - lldebugs << "mImageAssetID: " << mImageAssetID << llendl; + LL_DEBUGS() << "mImageAssetID: " << mImageAssetID << LL_ENDL; } if (op == TEXTURE_SELECT && mOnSelectCallback) @@ -1436,7 +1436,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, } handled = TRUE; - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL; return handled; } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index d85247c4ec..17703fcc21 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -900,7 +900,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, calcWorkPriority(); mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL; -// llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl; +// LL_INFOS() << "Create: " << mID << " mHost:" << host << " Discard=" << discard << LL_ENDL; if (!mFetcher->mDebugPause) { U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH; @@ -911,10 +911,10 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, LLTextureFetchWorker::~LLTextureFetchWorker() { -// llinfos << "Destroy: " << mID +// LL_INFOS() << "Destroy: " << mID // << " Decoded=" << mDecodedDiscard // << " Requested=" << mRequestedDiscard -// << " Desired=" << mDesiredDiscard << llendl; +// << " Desired=" << mDesiredDiscard << LL_ENDL; llassert_always(!haveWork()); lockWorkMutex(); // +Mw (should be useless) @@ -975,7 +975,7 @@ void LLTextureFetchWorker::setupPacketData() mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1; if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size) { - llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl; + LL_WARNS() << "Bad CACHED TEXTURE size: " << data_size << " removing." << LL_ENDL; removeFromCache(); resetFormattedData(); clearPackets(); @@ -1098,14 +1098,14 @@ bool LLTextureFetchWorker::doWork(S32 param) { if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR) { - LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << llendl; + LL_DEBUGS("Texture") << mID << " abort: mImagePriority < F_ALMOST_ZERO" << LL_ENDL; return true; // abort } } if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP) { //nowhere to get data, abort. - LL_WARNS("Texture") << mID << " abort, nowhere to get data" << llendl; + LL_WARNS("Texture") << mID << " abort, nowhere to get data" << LL_ENDL; return true ; } @@ -1221,7 +1221,7 @@ bool LLTextureFetchWorker::doWork(S32 param) // //This should never happen // - LL_DEBUGS("Texture") << mID << " this should never happen" << llendl; + LL_DEBUGS("Texture") << mID << " this should never happen" << LL_ENDL; return false; } } @@ -1243,7 +1243,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mLoadedDiscard < 0) { LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard - << ", should be >=0" << llendl; + << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); mInCache = TRUE; @@ -1302,7 +1302,7 @@ bool LLTextureFetchWorker::doWork(S32 param) else { // This will happen if not logged in or if a region deoes not have HTTP Texture enabled - //llwarns << "Region not found for host: " << mHost << llendl; + //LL_WARNS() << "Region not found for host: " << mHost << LL_ENDL; mCanUseHTTP = false; } } @@ -1345,7 +1345,7 @@ bool LLTextureFetchWorker::doWork(S32 param) //recordTextureStart(false); //setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - LL_DEBUGS("Texture") << mID << " does this happen?" << llendl; + LL_DEBUGS("Texture") << mID << " does this happen?" << LL_ENDL; return false; } } @@ -1363,15 +1363,15 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mFormattedImage.isNull() || !mFormattedImage->getDataSize()) { // processSimulatorPackets() failed -// llwarns << "processSimulatorPackets() failed to load buffer" << llendl; - LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << llendl; +// LL_WARNS() << "processSimulatorPackets() failed to load buffer" << LL_ENDL; + LL_WARNS("Texture") << mID << " processSimulatorPackets() failed to load buffer" << LL_ENDL; return true; // failed } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); if (mLoadedDiscard < 0) { LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard - << ", should be >=0" << llendl; + << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); mWriteToCacheState = SHOULD_WRITE; @@ -1421,7 +1421,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (! mCanUseHTTP) { releaseHttpSemaphore(); - LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << llendl; + LL_WARNS("Texture") << mID << " abort: SEND_HTTP_REQ but !mCanUseHTTP" << LL_ENDL; return true; // abort } @@ -1441,7 +1441,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mLoadedDiscard < 0) { LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard - << ", should be >=0" << llendl; + << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); releaseHttpSemaphore(); @@ -1450,7 +1450,7 @@ bool LLTextureFetchWorker::doWork(S32 param) else { releaseHttpSemaphore(); - LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << llendl; + LL_WARNS("Texture") << mID << " SEND_HTTP_REQ abort: cur_size " << cur_size << " <=0" << LL_ENDL; return true; // abort. } } @@ -1498,7 +1498,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } if (LLCORE_HTTP_HANDLE_INVALID == mHttpHandle) { - llwarns << "HTTP GET request failed for " << mID << llendl; + LL_WARNS() << "HTTP GET request failed for " << mID << LL_ENDL; resetFormattedData(); releaseHttpSemaphore(); return true; // failed @@ -1528,11 +1528,11 @@ bool LLTextureFetchWorker::doWork(S32 param) { setState(DONE); releaseHttpSemaphore(); - LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << llendl; + LL_DEBUGS("Texture") << mID << " abort: WAIT_HTTP_REQ not found" << LL_ENDL; return true; // failed, means no map tile on the empty region. } - llwarns << "Texture missing from server (404): " << mUrl << llendl; + LL_WARNS() << "Texture missing from server (404): " << mUrl << LL_ENDL; // roll back to try UDP if (mCanUseNET) @@ -1556,10 +1556,10 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { - llinfos << "HTTP GET failed for: " << mUrl + LL_INFOS() << "HTTP GET failed for: " << mUrl << " Status: " << mGetStatus.toHex() << " Reason: '" << mGetReason << "'" - << llendl; + << LL_ENDL; } mUrl.clear(); @@ -1571,7 +1571,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mLoadedDiscard < 0) { LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard - << ", should be >=0" << llendl; + << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); releaseHttpSemaphore(); @@ -1582,7 +1582,7 @@ bool LLTextureFetchWorker::doWork(S32 param) resetFormattedData(); setState(DONE); releaseHttpSemaphore(); - LL_WARNS("Texture") << mID << " abort: fail harder" << llendl; + LL_WARNS("Texture") << mID << " abort: fail harder" << LL_ENDL; return true; // failed } @@ -1606,7 +1606,7 @@ bool LLTextureFetchWorker::doWork(S32 param) // abort. setState(DONE); - LL_WARNS("Texture") << mID << " abort: no data received" << llendl; + LL_WARNS("Texture") << mID << " abort: no data received" << LL_ENDL; releaseHttpSemaphore(); return true; } @@ -1675,7 +1675,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mLoadedDiscard < 0) { LL_WARNS("Texture") << mID << " mLoadedDiscard is " << mLoadedDiscard - << ", should be >=0" << llendl; + << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); if (mWriteToCacheState != NOT_WRITE) @@ -1716,26 +1716,26 @@ bool LLTextureFetchWorker::doWork(S32 param) { // We aborted, don't decode setState(DONE); - LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << llendl; + LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << LL_ENDL; return true; } if (mFormattedImage->getDataSize() <= 0) { - llwarns << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl; + LL_WARNS() << "Decode entered with invalid mFormattedImage. ID = " << mID << LL_ENDL; //abort, don't decode setState(DONE); - LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << llendl; + LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << LL_ENDL; return true; } if (mLoadedDiscard < 0) { - llwarns << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl; + LL_WARNS() << "Decode entered with invalid mLoadedDiscard. ID = " << mID << LL_ENDL; //abort, don't decode setState(DONE); - LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << llendl; + LL_DEBUGS("Texture") << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << LL_ENDL; return true; } @@ -1768,7 +1768,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0) { // Cache file should be deleted, try again -// llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl; +// LL_WARNS() << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; ++mRetryAttempt; @@ -1778,7 +1778,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { -// llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl; +// LL_WARNS() << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << LL_ENDL; setState(DONE); // failed } } @@ -1860,7 +1860,7 @@ bool LLTextureFetchWorker::doWork(S32 param) setState(INIT); LL_DEBUGS("Texture") << mID << " more data requested, returning to INIT: " << " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard - << "<" << " mDecodedDiscard " << mDecodedDiscard << llendl; + << "<" << " mDecodedDiscard " << mDecodedDiscard << LL_ENDL; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); return false; } @@ -1903,22 +1903,22 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe LL_DEBUGS("Texture") << "HTTP COMPLETE: " << mID << " status: " << status.toHex() << " '" << status.toString() << "'" - << llendl; + << LL_ENDL; // unsigned int offset(0), length(0), full_length(0); // response->getRange(&offset, &length, &full_length); -// llwarns << "HTTP COMPLETE: " << mID << " handle: " << handle +// LL_WARNS() << "HTTP COMPLETE: " << mID << " handle: " << handle // << " status: " << status.toULong() << " '" << status.toString() << "'" // << " req offset: " << mRequestedOffset << " req length: " << mRequestedSize // << " offset: " << offset << " length: " << length -// << llendl; +// << LL_ENDL; if (! status) { success = false; std::string reason(status.toString()); setGetStatus(status, reason); - llwarns << "CURL GET FAILED, status: " << status.toHex() - << " reason: " << reason << llendl; + LL_WARNS() << "CURL GET FAILED, status: " << status.toHex() + << " reason: " << reason << LL_ENDL; } else { @@ -2128,13 +2128,13 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, if (mState != WAIT_HTTP_REQ) { - llwarns << "callbackHttpGet for unrequested fetch worker: " << mID - << " req=" << mSentRequest << " state= " << mState << llendl; + LL_WARNS() << "callbackHttpGet for unrequested fetch worker: " << mID + << " req=" << mSentRequest << " state= " << mState << LL_ENDL; return data_size; } if (mLoaded) { - llwarns << "Duplicate callback for " << mID.asString() << llendl; + LL_WARNS() << "Duplicate callback for " << mID.asString() << LL_ENDL; return data_size ; // ignore duplicate callback } if (success) @@ -2199,7 +2199,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, else if (data_size > mRequestedSize) { // *TODO: This shouldn't be happening any more (REALLY don't expect this anymore) - llwarns << "data_size = " << data_size << " > requested: " << mRequestedSize << llendl; + LL_WARNS() << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL; mHaveAllData = TRUE; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had @@ -2234,7 +2234,7 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima LLMutexLock lock(&mWorkMutex); // +Mw if (mState != LOAD_FROM_TEXTURE_CACHE) { -// llwarns << "Read callback for " << mID << " with state = " << mState << llendl; +// LL_WARNS() << "Read callback for " << mID << " with state = " << mState << LL_ENDL; return; } if (success) @@ -2259,7 +2259,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) LLMutexLock lock(&mWorkMutex); // +Mw if (mState != WAIT_ON_WRITE) { -// llwarns << "Write callback for " << mID << " with state = " << mState << llendl; +// LL_WARNS() << "Write callback for " << mID << " with state = " << mState << LL_ENDL; return; } mWritten = TRUE; @@ -2278,7 +2278,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag } if (mState != DECODE_IMAGE_UPDATE) { -// llwarns << "Decode callback for " << mID << " with state = " << mState << llendl; +// LL_WARNS() << "Decode callback for " << mID << " with state = " << mState << LL_ENDL; mDecodeHandle = 0; return; } @@ -2296,12 +2296,12 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag } else { - llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl; + LL_WARNS() << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << LL_ENDL; removeFromCache(); mDecodedDiscard = -1; // Redundant, here for clarity and paranoia } mDecoded = TRUE; -// llinfos << mID << " : DECODE COMPLETE " << llendl; +// LL_INFOS() << mID << " : DECODE COMPLETE " << LL_ENDL; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mCacheReadTime = mCacheReadTimer.getElapsedTimeF32(); } // -Mw @@ -2479,8 +2479,8 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const { if (worker->mHost != host) { - llwarns << "LLTextureFetch::createRequest " << id << " called with multiple hosts: " - << host << " != " << worker->mHost << llendl; + LL_WARNS() << "LLTextureFetch::createRequest " << id << " called with multiple hosts: " + << host << " != " << worker->mHost << LL_ENDL; removeRequest(worker, true); worker = NULL; return false; @@ -2491,7 +2491,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const std::string exten = gDirUtilp->getExtension(url); if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C)) { - LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << llendl; + LL_DEBUGS("Texture") << "full request for " << id << " exten is not J2C: " << exten << LL_ENDL; // Only do partial requests for J2C at the moment desired_size = MAX_IMAGE_DATA_SIZE; desired_discard = 0; @@ -2558,7 +2558,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const worker->unlockWorkMutex(); // -Mw } - LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << llendl; + LL_DEBUGS("Texture") << "REQUESTED: " << id << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL; return true; } @@ -2752,7 +2752,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, // Should only happen if we set mDebugPause... if (!mDebugPause) { -// llwarns << "Adding work for inactive worker: " << id << llendl; +// LL_WARNS() << "Adding work for inactive worker: " << id << LL_ENDL; worker->addWork(0, LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority); } } @@ -2988,7 +2988,7 @@ void LLTextureFetch::threadedUpdate() S32 q = mCurlGetRequest->getQueued(); if (q > 0) { - llinfos << "Queued gets: " << q << llendl; + LL_INFOS() << "Queued gets: " << q << LL_ENDL; info_timer.reset(); } } @@ -3037,7 +3037,7 @@ void LLTextureFetch::sendRequestListToSimulators() (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; + LL_WARNS() << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << LL_ENDL; mNetworkQueue.erase(curiter); continue; } @@ -3105,8 +3105,8 @@ void LLTextureFetch::sendRequestListToSimulators() gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, req->mImagePriority); gMessageSystem->addU32Fast(_PREHASH_Packet, packet); gMessageSystem->addU8Fast(_PREHASH_Type, req->mType); -// llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard -// << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl; +// LL_INFOS() << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard +// << " Packet: " << packet << " Priority: " << req->mImagePriority << LL_ENDL; static LLCachedControl log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog"); static LLCachedControl log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator"); @@ -3127,7 +3127,7 @@ void LLTextureFetch::sendRequestListToSimulators() sim_request_count++; if (sim_request_count >= IMAGES_PER_REQUEST) { -// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; +// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL; gMessageSystem->sendSemiReliable(host, NULL, NULL); sim_request_count = 0; @@ -3136,7 +3136,7 @@ void LLTextureFetch::sendRequestListToSimulators() } if (gMessageSystem && sim_request_count > 0 && sim_request_count < IMAGES_PER_REQUEST) { -// llinfos << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << llendl; +// LL_INFOS() << "REQUESTING " << sim_request_count << " IMAGES FROM HOST: " << host.getIPString() << LL_ENDL; gMessageSystem->sendSemiReliable(host, NULL, NULL); sim_request_count = 0; } @@ -3172,7 +3172,7 @@ void LLTextureFetch::sendRequestListToSimulators() gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0); gMessageSystem->addU32Fast(_PREHASH_Packet, 0); gMessageSystem->addU8Fast(_PREHASH_Type, 0); -// llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl; +// LL_INFOS() << "CANCELING IMAGE REQUEST: " << (*iter2) << LL_ENDL; request_count++; if (request_count >= IMAGES_PER_REQUEST) @@ -3200,12 +3200,12 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size) mRequestedTimer.reset(); if (index >= mTotalPackets) { -// llwarns << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << llendl; +// LL_WARNS() << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << LL_ENDL; return false; } if (index > 0 && index < mTotalPackets-1 && size != MAX_IMG_PACKET_SIZE) { -// llwarns << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << llendl; +// LL_WARNS() << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << LL_ENDL; return false; } @@ -3215,7 +3215,7 @@ bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size) } else if (mPackets[index] != NULL) { -// llwarns << "Received duplicate packet: " << index << " for image: " << mID << llendl; +// LL_WARNS() << "Received duplicate packet: " << index << " for image: " << mID << LL_ENDL; return false; } @@ -3247,7 +3247,7 @@ void LLTextureFetchWorker::setState(e_state new_state) "WAIT_ON_WRITE", "DONE" }; - LL_DEBUGS("Texture") << "id: " << mID << " FTType: " << mFTType << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << llendl; + LL_DEBUGS("Texture") << "id: " << mID << " FTType: " << mFTType << " disc: " << mDesiredDiscard << " sz: " << mDesiredSize << " state: " << e_state_name[mState] << " => " << e_state_name[new_state] << LL_ENDL; mState = new_state; } @@ -3262,26 +3262,26 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 if (!worker) { -// llwarns << "Received header for non active worker: " << id << llendl; +// LL_WARNS() << "Received header for non active worker: " << id << LL_ENDL; res = false; } else if (worker->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK || worker->mSentRequest != LLTextureFetchWorker::SENT_SIM) { -// llwarns << "receiveImageHeader for worker: " << id +// LL_WARNS() << "receiveImageHeader for worker: " << id // << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] -// << " sent: " << worker->mSentRequest << llendl; +// << " sent: " << worker->mSentRequest << LL_ENDL; res = false; } else if (worker->mLastPacket != -1) { // check to see if we've gotten this packet before -// llwarns << "Received duplicate header for: " << id << llendl; +// LL_WARNS() << "Received duplicate header for: " << id << LL_ENDL; res = false; } else if (!data_size) { -// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; +// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL; res = false; } if (!res) @@ -3323,17 +3323,17 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 if (!worker) { -// llwarns << "Received packet " << packet_num << " for non active worker: " << id << llendl; +// LL_WARNS() << "Received packet " << packet_num << " for non active worker: " << id << LL_ENDL; res = false; } else if (worker->mLastPacket == -1) { -// llwarns << "Received packet " << packet_num << " before header for: " << id << llendl; +// LL_WARNS() << "Received packet " << packet_num << " before header for: " << id << LL_ENDL; res = false; } else if (!data_size) { -// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; +// LL_WARNS() << "Img: " << id << ":" << " Empty Image Header" << LL_ENDL; res = false; } if (!res) @@ -3361,8 +3361,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 } else { -// llwarns << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id -// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << llendl; +// LL_WARNS() << "receiveImagePacket " << packet_num << "/" << worker->mLastPacket << " for worker: " << id +// << " in state: " << LLTextureFetchWorker::sStateDescs[worker->mState] << LL_ENDL; removeFromNetworkQueue(worker, true); // failsafe } @@ -3454,33 +3454,33 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r void LLTextureFetch::dump() { - llinfos << "LLTextureFetch REQUESTS:" << llendl; + LL_INFOS() << "LLTextureFetch REQUESTS:" << LL_ENDL; for (request_queue_t::iterator iter = mRequestQueue.begin(); iter != mRequestQueue.end(); ++iter) { LLQueuedThread::QueuedRequest* qreq = *iter; LLWorkerThread::WorkRequest* wreq = (LLWorkerThread::WorkRequest*)qreq; LLTextureFetchWorker* worker = (LLTextureFetchWorker*)wreq->getWorkerClass(); - llinfos << " ID: " << worker->mID + LL_INFOS() << " ID: " << worker->mID << " PRI: " << llformat("0x%08x",wreq->getPriority()) << " STATE: " << worker->sStateDescs[worker->mState] - << llendl; + << LL_ENDL; } - llinfos << "LLTextureFetch ACTIVE_HTTP:" << llendl; + LL_INFOS() << "LLTextureFetch ACTIVE_HTTP:" << LL_ENDL; for (queue_t::const_iterator iter(mHTTPTextureQueue.begin()); mHTTPTextureQueue.end() != iter; ++iter) { - llinfos << " ID: " << (*iter) << llendl; + LL_INFOS() << " ID: " << (*iter) << LL_ENDL; } - llinfos << "LLTextureFetch WAIT_HTTP_RESOURCE:" << llendl; + LL_INFOS() << "LLTextureFetch WAIT_HTTP_RESOURCE:" << LL_ENDL; for (wait_http_res_queue_t::const_iterator iter(mHttpWaitResource.begin()); mHttpWaitResource.end() != iter; ++iter) { - llinfos << " ID: " << (*iter) << llendl; + LL_INFOS() << " ID: " << (*iter) << LL_ENDL; } } @@ -4393,14 +4393,14 @@ void LLTextureFetchDebugger::debugHTTP() LLViewerRegion* region = gAgent.getRegion(); if (!region) { - llinfos << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << llendl; + LL_INFOS() << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << LL_ENDL; return; } mHTTPUrl = region->getHttpUrl(); if (mHTTPUrl.empty()) { - llinfos << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << llendl; + LL_INFOS() << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << LL_ENDL; return; } @@ -4479,7 +4479,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue() mFetchingHistory[i].mCurlState = FetchEntry::CURL_DONE; } } - //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; + //LL_INFOS() << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << LL_ENDL; return mNbCurlRequests; } @@ -4781,7 +4781,7 @@ void LLTextureFetchDebugger::onCompleted(LLCore::HttpHandle handle, LLCore::Http handle_fetch_map_t::iterator iter(mHandleToFetchIndex.find(handle)); if (mHandleToFetchIndex.end() == iter) { - llinfos << "Fetch Debugger : Couldn't find handle " << handle << " in fetch list." << llendl; + LL_INFOS() << "Fetch Debugger : Couldn't find handle " << handle << " in fetch list." << LL_ENDL; return; } @@ -4789,7 +4789,7 @@ void LLTextureFetchDebugger::onCompleted(LLCore::HttpHandle handle, LLCore::Http mHandleToFetchIndex.erase(iter); if (fetch_ind >= mFetchingHistory.size() || mFetchingHistory[fetch_ind].mHttpHandle != handle) { - llinfos << "Fetch Debugger : Handle and fetch object in disagreement. Punting." << llendl; + LL_INFOS() << "Fetch Debugger : Handle and fetch object in disagreement. Punting." << LL_ENDL; } else { @@ -4839,7 +4839,7 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon S32 data_size = ba ? ba->size() : 0; fetch.mCurlReceivedSize += data_size; - //llinfos << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << llendl; + //LL_INFOS() << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << LL_ENDL; if ((fetch.mCurlReceivedSize >= fetch.mRequestedSize) || !partial || (fetch.mRequestedSize == 600)) { U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); @@ -4865,9 +4865,9 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon } else //failed { - llinfos << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID + LL_INFOS() << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID << ", status: " << status.toHex() - << " reason: " << status.toString() << llendl; + << " reason: " << status.toString() << LL_ENDL; } } diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index d467fd4d97..cd6e7ff464 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -155,14 +155,14 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, LLUnitgetCapability("TextureStats"); - llinfos << "uploading texture stats data to simulator" << llendl; + LL_INFOS() << "uploading texture stats data to simulator" << LL_ENDL; LLTextureStatsUploader::uploadStatsToSimulator(texture_cap_url, texture_stats); } diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp index 92ec63a113..c4809bc8e7 100755 --- a/indra/newview/lltexturestatsuploader.cpp +++ b/indra/newview/lltexturestatsuploader.cpp @@ -40,10 +40,10 @@ void LLTextureStatsUploader::uploadStatsToSimulator(const std::string texture_ca } else { - llinfos << "Not sending texture stats: " + LL_INFOS() << "Not sending texture stats: " << texture_stats << " as there is no cap url." - << llendl; + << LL_ENDL; } } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c1b5309f82..501914a52f 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -776,7 +776,7 @@ void LLTextureView::draw() if (mPrintList) { - llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl; + LL_INFOS() << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << LL_ENDL; } for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin(); @@ -794,14 +794,14 @@ void LLTextureView::draw() if (mPrintList) { S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ; - llinfos << imagep->getID() + LL_INFOS() << imagep->getID() << "\t" << tex_mem << "\t" << imagep->getBoostLevel() << "\t" << imagep->getDecodePriority() << "\t" << imagep->getWidth() << "\t" << imagep->getHeight() << "\t" << cur_discard - << llendl; + << LL_ENDL; } if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID) diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 85232f4a0b..3c916345ec 100755 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -174,7 +174,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal // Message: create text box using raw string, as text has been structure deliberately // Use size of created text box to generate dialog box size std::string msg = mNotification->getMessage(); - llwarns << "Alert: " << msg << llendl; + LL_WARNS() << "Alert: " << msg << LL_ENDL; LLTextBox::Params params; params.name("Alert message"); params.font(font); @@ -508,7 +508,7 @@ void LLToastAlertPanel::setEditTextArgs(const LLSD& edit_args) } else { - llwarns << "LLToastAlertPanel::setEditTextArgs called on dialog with no line editor" << llendl; + LL_WARNS() << "LLToastAlertPanel::setEditTextArgs called on dialog with no line editor" << LL_ENDL; } } diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index beb45e8179..e00b18dedb 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -61,7 +61,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi LLGroupData groupData; if (!gAgent.getGroupData(payload["group_id"].asUUID(),groupData)) { - llwarns << "Group notice for unknown group: " << payload["group_id"].asUUID() << llendl; + LL_WARNS() << "Group notice for unknown group: " << payload["group_id"].asUUID() << LL_ENDL; } //group icon diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 75e6e3d13a..81dfd95f16 100755 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -167,7 +167,7 @@ void LLToastIMPanel::spawnGroupIconToolTip() LLGroupData g_data; if(!gAgent.getGroupData(mSessionID, g_data)) { - llwarns << "Error getting group data" << llendl; + LL_WARNS() << "Error getting group data" << LL_ENDL; } LLInspector::Params params; @@ -200,7 +200,7 @@ void LLToastIMPanel::initIcon() LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID); if(!im_session) { - llwarns << "Invalid IM session" << llendl; + LL_WARNS() << "Invalid IM session" << LL_ENDL; return; } @@ -220,7 +220,7 @@ void LLToastIMPanel::initIcon() mAdhocIcon->setToolTip(im_session->mName); break; default: - llwarns << "Unknown IM session type" << llendl; + LL_WARNS() << "Unknown IM session type" << LL_ENDL; break; } } diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 45fbabad59..78d9e92b5c 100755 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -109,7 +109,7 @@ void LLToastScriptTextbox::onClickSubmit() } mNotification->respond(response); close(); - llwarns << response << llendl; + LL_WARNS() << response << LL_ENDL; } } diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index f4499f2da8..4aad650b68 100755 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -55,7 +55,7 @@ LLTool::~LLTool() { if( hasMouseCapture() ) { - llwarns << "Tool deleted holding mouse capture. Mouse capture removed." << llendl; + LL_WARNS() << "Tool deleted holding mouse capture. Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } } @@ -80,10 +80,10 @@ BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLTool left mouse down" << llendl; + LL_INFOS() << "LLTool left mouse down" << LL_ENDL; } // by default, didn't handle it - // llinfos << "LLTool::handleMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleMouseDown" << LL_ENDL; gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN); return TRUE; } @@ -92,10 +92,10 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLTool left mouse up" << llendl; + LL_INFOS() << "LLTool left mouse up" << LL_ENDL; } // by default, didn't handle it - // llinfos << "LLTool::handleMouseUp" << llendl; + // LL_INFOS() << "LLTool::handleMouseUp" << LL_ENDL; gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP); return TRUE; } @@ -103,7 +103,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLTool::handleHover(S32 x, S32 y, MASK mask) { gViewerWindow->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by a tool" << llendl; + LL_DEBUGS("UserInput") << "hover handled by a tool" << LL_ENDL; // by default, do nothing, say we handled it return TRUE; } @@ -111,13 +111,13 @@ BOOL LLTool::handleHover(S32 x, S32 y, MASK mask) BOOL LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks) { // by default, didn't handle it - // llinfos << "LLTool::handleScrollWheel" << llendl; + // LL_INFOS() << "LLTool::handleScrollWheel" << LL_ENDL; return FALSE; } BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask) { - // llinfos << "LLTool::handleDoubleClick" << llendl; + // LL_INFOS() << "LLTool::handleDoubleClick" << LL_ENDL; // by default, pretend it's a left click return FALSE; } @@ -125,35 +125,35 @@ BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask) BOOL LLTool::handleRightMouseDown(S32 x,S32 y,MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleRightMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleRightMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleRightMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleMiddleMouseDown" << llendl; + // LL_INFOS() << "LLTool::handleMiddleMouseDown" << LL_ENDL; return FALSE; } BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleMiddleMouseUp" << llendl; + // LL_INFOS() << "LLTool::handleMiddleMouseUp" << LL_ENDL; return FALSE; } BOOL LLTool::handleToolTip(S32 x, S32 y, MASK mask) { // by default, didn't handle it - // llinfos << "LLTool::handleToolTip" << llendl; + // LL_INFOS() << "LLTool::handleToolTip" << LL_ENDL; return FALSE; } diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index ed0f22f16a..98eac008b3 100755 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -201,7 +201,7 @@ bool LLToolBarView::addCommandInternal(const LLCommandId& command, LLToolBar* to } else { - llwarns << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << llendl; + LL_WARNS() << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << LL_ENDL; return false; } return true; @@ -220,20 +220,20 @@ bool LLToolBarView::loadToolbars(bool force_default) } else if (!gDirUtilp->fileExists(toolbar_file)) { - llwarns << "User toolbars def not found -> use default" << llendl; + LL_WARNS() << "User toolbars def not found -> use default" << LL_ENDL; toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml"); } LLXMLNodePtr root; if(!LLXMLNode::parseFile(toolbar_file, root, NULL)) { - llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl; + LL_WARNS() << "Unable to load toolbars from file: " << toolbar_file << LL_ENDL; err = true; } if (!err && !root->hasName("toolbars")) { - llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl; + LL_WARNS() << toolbar_file << " is not a valid toolbars definition file" << LL_ENDL; err = true; } @@ -246,7 +246,7 @@ bool LLToolBarView::loadToolbars(bool force_default) if (!err && !toolbar_set.validateBlock()) { - llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl; + LL_WARNS() << "Unable to validate toolbars from file: " << toolbar_file << LL_ENDL; err = true; } @@ -254,7 +254,7 @@ bool LLToolBarView::loadToolbars(bool force_default) { if (force_default) { - llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl; + LL_ERRS() << "Unable to load toolbars from default file : " << toolbar_file << LL_ENDL; return false; } @@ -283,7 +283,7 @@ bool LLToolBarView::loadToolbars(bool force_default) { if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_LEFT])) { - llwarns << "Error adding command '" << command_params.name() << "' to left toolbar." << llendl; + LL_WARNS() << "Error adding command '" << command_params.name() << "' to left toolbar." << LL_ENDL; } } } @@ -298,7 +298,7 @@ bool LLToolBarView::loadToolbars(bool force_default) { if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_RIGHT])) { - llwarns << "Error adding command '" << command_params.name() << "' to right toolbar." << llendl; + LL_WARNS() << "Error adding command '" << command_params.name() << "' to right toolbar." << LL_ENDL; } } } @@ -313,7 +313,7 @@ bool LLToolBarView::loadToolbars(bool force_default) { if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_BOTTOM])) { - llwarns << "Error adding command '" << command_params.name() << "' to bottom toolbar." << llendl; + LL_WARNS() << "Error adding command '" << command_params.name() << "' to bottom toolbar." << LL_ENDL; } } } @@ -651,7 +651,7 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t } else { - llwarns << "Command couldn't be found in command manager" << llendl; + LL_WARNS() << "Command couldn't be found in command manager" << LL_ENDL; } } diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 96b742aebc..56f0f8be25 100755 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -403,7 +403,7 @@ BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask ) { LL_DEBUGS("UserInput") << "hover handled by LLToolBrushLand (" << (hasMouseCapture() ? "active":"inactive") - << ")" << llendl; + << ")" << LL_ENDL; mMouseX = x; mMouseY = y; mGotHover = TRUE; @@ -456,7 +456,7 @@ void LLToolBrushLand::render() { if(mGotHover) { - //llinfos << "LLToolBrushLand::render()" << llendl; + //LL_INFOS() << "LLToolBrushLand::render()" << LL_ENDL; LLVector3d spot; if(gViewerWindow->mousePointOnLandGlobal(mMouseX, mMouseY, &spot)) { diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index ca28397d52..44303c838c 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -174,7 +174,7 @@ public: virtual void done() { /* no-op: it's fire n forget right? */ - lldebugs << "LLCategoryFireAndForget::done()" << llendl; + LL_DEBUGS() << "LLCategoryFireAndForget::done()" << LL_ENDL; } }; @@ -370,7 +370,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, { if (type == DAD_NONE) { - llwarns << "Attempted to start drag without a cargo type" << llendl; + LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL; return; } mCargoTypes.clear(); @@ -442,7 +442,7 @@ void LLToolDragAndDrop::beginMultiDrag( { if (DAD_NONE == *types_it) { - llwarns << "Attempted to start drag without a cargo type" << llendl; + LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL; return; } } @@ -597,7 +597,7 @@ BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) ECursorType cursor = acceptanceToCursor(acceptance); gViewerWindow->getWindow()->setCursor( cursor ); - LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << LL_ENDL; return TRUE; } @@ -1034,7 +1034,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return FALSE; } } @@ -1084,7 +1084,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, { if (!item) { - llwarns << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << llendl; + LL_WARNS() << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1114,7 +1114,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, { if (!item) { - llwarns << "no inventory item." << llendl; + LL_WARNS() << "no inventory item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1151,7 +1151,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, if (hit_face == -1) return; if (!item) { - llwarns << "LLToolDragAndDrop::dropTextureOneFace no texture item." << llendl; + LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1182,8 +1182,8 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { - llwarns << "Call to LLToolDragAndDrop::dropScript() from world" - << " or notecard." << llendl; + LL_WARNS() << "Call to LLToolDragAndDrop::dropScript() from world" + << " or notecard." << LL_ENDL; return; } if (hit_obj && item) @@ -1210,7 +1210,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return; } } @@ -1235,11 +1235,11 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos); if (!regionp) { - llwarns << "Couldn't find region to rez object" << llendl; + LL_WARNS() << "Couldn't find region to rez object" << LL_ENDL; return; } - //llinfos << "Rezzing object" << llendl; + //LL_INFOS() << "Rezzing object" << LL_ENDL; make_ui_sound("UISndObjectRezIn"); LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; @@ -1399,8 +1399,8 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { - llwarns << "Call to LLToolDragAndDrop::dropInventory() from world" - << " or notecard." << llendl; + LL_WARNS() << "Call to LLToolDragAndDrop::dropInventory() from world" + << " or notecard." << LL_ENDL; return; } @@ -1430,7 +1430,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return; } } @@ -1697,14 +1697,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ EAcceptance LLToolDragAndDrop::dad3dNULL( LLViewerObject*, S32, MASK, BOOL) { - lldebugs << "LLToolDragAndDrop::dad3dNULL()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL; return ACCEPT_NO; } EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL; // must be in the user's inventory if(mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY) { @@ -1767,7 +1767,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( return dad3dRezFromObjectOnLand(obj, face, mask, drop); } - lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -1830,7 +1830,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( return dad3dRezFromObjectOnObject(obj, face, mask, drop); } - lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -1902,7 +1902,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( EAcceptance LLToolDragAndDrop::dad3dRezScript( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezScript()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -1940,7 +1940,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( EAcceptance LLToolDragAndDrop::dad3dApplyToObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type) { - lldebugs << "LLToolDragAndDrop::dad3dApplyToObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -1991,7 +1991,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( } else { - llwarns << "unsupported asset type" << llendl; + LL_WARNS() << "unsupported asset type" << LL_ENDL; } // VEFFECT: SetTexture @@ -2024,7 +2024,7 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject( EAcceptance LLToolDragAndDrop::dad3dTextureSelf( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dTextureAvatar()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL; if(drop) { if( !(mask & MASK_SHIFT) ) @@ -2039,7 +2039,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf( EAcceptance LLToolDragAndDrop::dad3dWearItem( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dWearItem()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2072,7 +2072,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( EAcceptance LLToolDragAndDrop::dad3dActivateGesture( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dActivateGesture()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2121,7 +2121,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( EAcceptance LLToolDragAndDrop::dad3dWearCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dWearCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* category; locateInventory(item, category); @@ -2172,7 +2172,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dadUpdateInventory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -2212,10 +2212,10 @@ BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop) EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL; if (obj == NULL) { - llwarns << "obj is NULL; aborting func with ACCEPT_NO" << llendl; + LL_WARNS() << "obj is NULL; aborting func with ACCEPT_NO" << LL_ENDL; return ACCEPT_NO; } @@ -2248,7 +2248,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( cats.push_back(cat); if (droppable.countNoCopy() > 0) { - llwarns << "*** Need to confirm this step" << llendl; + LL_WARNS() << "*** Need to confirm this step" << LL_ENDL; } LLViewerObject* root_object = obj; if (obj->getParent()) @@ -2271,7 +2271,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( rv = gInventory.isCategoryComplete(cat->getUUID()) ? ACCEPT_YES_MULTI : ACCEPT_NO; if(rv < ACCEPT_YES_SINGLE) { - lldebugs << "Category " << cat->getUUID() << "is not complete." << llendl; + LL_DEBUGS() << "Category " << cat->getUUID() << "is not complete." << LL_ENDL; break; } } @@ -2293,7 +2293,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( rv = willObjectAcceptInventory(root_object, item); if (rv < ACCEPT_YES_COPY_SINGLE) { - lldebugs << "Object will not accept " << item->getUUID() << llendl; + LL_DEBUGS() << "Object will not accept " << item->getUUID() << LL_ENDL; break; } } @@ -2334,7 +2334,7 @@ BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL; // item has to be in agent inventory. if(mSource != SOURCE_AGENT) return ACCEPT_NO; @@ -2372,7 +2372,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( EAcceptance LLToolDragAndDrop::dad3dGiveInventory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL; // item has to be in agent inventory. if(mSource != SOURCE_AGENT) return ACCEPT_NO; LLViewerInventoryItem* item; @@ -2395,7 +2395,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL; if(drop && obj) { LLViewerInventoryItem* item; @@ -2413,7 +2413,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item = NULL; LLViewerInventoryCategory* cat = NULL; locateInventory(item, cat); @@ -2434,7 +2434,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2471,7 +2471,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( { return ACCEPT_NO; /* - lldebugs << "LLToolDragAndDrop::dad3dCategoryOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dCategoryOnLand()" << LL_ENDL; LLInventoryItem* item; LLInventoryCategory* cat; locateInventory(item, cat); @@ -2509,7 +2509,7 @@ EAcceptance LLToolDragAndDrop::dad3dAssetOnLand( { return ACCEPT_NO; /* - lldebugs << "LLToolDragAndDrop::dad3dAssetOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dAssetOnLand()" << LL_ENDL; LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLViewerInventoryItem::item_array_t copyable_items; @@ -2660,7 +2660,7 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC // void LLToolDragAndDrop::createContainer(LLViewerInventoryItem::item_array_t &items, const char* preferred_name ) // { -// llwarns << "LLToolDragAndDrop::createContainer()" << llendl; +// LL_WARNS() << "LLToolDragAndDrop::createContainer()" << LL_ENDL; // return; // } diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index a320d37084..ee4ec112f8 100755 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -334,7 +334,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) { if (!mValidClickPoint) { - LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_NO); gViewerWindow->showCursor(); return TRUE; @@ -361,7 +361,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->moveCursorToCenter(); } - LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [active]" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [active]" << LL_ENDL; } else if ( gCameraBtnPan || mask == MASK_PAN || @@ -389,7 +389,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->moveCursorToCenter(); } - LL_DEBUGS("UserInput") << "hover handled by LLToolPan" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPan" << LL_ENDL; } else if (gCameraBtnZoom) { @@ -421,7 +421,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->moveCursorToCenter(); } - LL_DEBUGS("UserInput") << "hover handled by LLToolZoom" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolZoom" << LL_ENDL; } } diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index a9216568c2..493c970141 100755 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -115,7 +115,7 @@ BOOL LLToolGrab::handleDoubleClick(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLToolGrab handleDoubleClick (becoming mouseDown)" << llendl; + LL_INFOS() << "LLToolGrab handleDoubleClick (becoming mouseDown)" << LL_ENDL; } return FALSE; @@ -125,7 +125,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLToolGrab handleMouseDown" << llendl; + LL_INFOS() << "LLToolGrab handleMouseDown" << LL_ENDL; } // call the base class to propogate info to sim @@ -176,12 +176,12 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) if (gDebugClicks) { - llinfos << "LLToolGrab handleObjectHit " << info.mMousePt.mX << "," << info.mMousePt.mY << llendl; + LL_INFOS() << "LLToolGrab handleObjectHit " << info.mMousePt.mX << "," << info.mMousePt.mY << LL_ENDL; } if (NULL == objectp) // unexpected { - llwarns << "objectp was NULL; returning FALSE" << llendl; + LL_WARNS() << "objectp was NULL; returning FALSE" << LL_ENDL; return FALSE; } @@ -707,7 +707,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden. gViewerWindow->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (active) [cursor hidden]" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (active) [cursor hidden]" << LL_ENDL; } @@ -871,7 +871,7 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask) void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) { // JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin - LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); } @@ -881,7 +881,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask) if( GRAB_NOOBJECT == mMode ) { gViewerWindow->setCursor(UI_CURSOR_NO); - LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (not on object)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (not on object)" << LL_ENDL; } else { @@ -894,13 +894,13 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask) { case GRAB_LOCKED: gViewerWindow->setCursor(UI_CURSOR_GRABLOCKED); - LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, no move permission)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, no move permission)" << LL_ENDL; break; // Non physical now handled by handleHoverActive - CRO // case GRAB_NONPHYSICAL: // gViewerWindow->setCursor(UI_CURSOR_ARROW); -// LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, nonphysical)" << llendl; +// LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, nonphysical)" << LL_ENDL; // break; default: llassert(0); @@ -909,7 +909,7 @@ void LLToolGrab::handleHoverFailed(S32 x, S32 y, MASK mask) else { gViewerWindow->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed but within slop)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed but within slop)" << LL_ENDL; } } } @@ -1108,16 +1108,16 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co msg->sendMessage( object->getRegion()->getHost()); /* Diagnostic code - llinfos << "mUVCoords: " << pick.mUVCoords + LL_INFOS() << "mUVCoords: " << pick.mUVCoords << ", mSTCoords: " << pick.mSTCoords << ", mObjectFace: " << pick.mObjectFace << ", mIntersection: " << pick.mIntersection << ", mNormal: " << pick.mNormal << ", mBinormal: " << pick.mBinormal - << llendl; + << LL_ENDL; - llinfos << "Avatar pos: " << gAgent.getPositionAgent() << llendl; - llinfos << "Object pos: " << object->getPosition() << llendl; + LL_INFOS() << "Avatar pos: " << gAgent.getPositionAgent() << LL_ENDL; + LL_INFOS() << "Object pos: " << object->getPosition() << LL_ENDL; */ } diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 17795af65d..6c9155be85 100755 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -116,11 +116,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); } - LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << LL_ENDL; } else { - LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << LL_ENDL; } // HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden. diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index a135ba70f5..aa55caf7ec 100755 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -357,7 +357,7 @@ void LLToolMgr::clearTransientTool() mTransientTool = NULL; if (!mBaseTool) { - llwarns << "mBaseTool is NULL" << llendl; + LL_WARNS() << "mBaseTool is NULL" << LL_ENDL; } } updateToolStatus(); diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp index b65c4c1ec8..0d9fe9e577 100755 --- a/indra/newview/lltoolobjpicker.cpp +++ b/indra/newview/lltoolobjpicker.cpp @@ -76,7 +76,7 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask) } else { - llwarns << "PickerTool doesn't have mouse capture on mouseDown" << llendl; + LL_WARNS() << "PickerTool doesn't have mouse capture on mouseDown" << LL_ENDL; } } @@ -109,7 +109,7 @@ BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask) } else { - llwarns << "PickerTool doesn't have mouse capture on mouseUp" << llendl; + LL_WARNS() << "PickerTool doesn't have mouse capture on mouseUp" << LL_ENDL; } return handled; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index fe520b26df..28d0abc9d2 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -558,7 +558,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) // could disable it here. show_highlight = true; // cursor set by media object - LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL; } else if (!mMouseOutsideSlop && mMouseButtonDown @@ -595,7 +595,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) show_highlight = true; ECursorType cursor = cursorFromObject(click_action_object); gViewerWindow->setCursor(cursor); - LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL; } else if ((object && !object->isAvatar() && object->flagUsePhysics()) @@ -603,19 +603,19 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { show_highlight = true; gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); - LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL; } else if ( (object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch())) { show_highlight = true; gViewerWindow->setCursor(UI_CURSOR_HAND); - LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL; } else { gViewerWindow->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL; } } @@ -707,7 +707,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) { if (gDebugClicks) { - llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; + LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL; } if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 3b1b40a7f0..ceb57d0172 100755 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -127,7 +127,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(surface_pos_global); if (!regionp) { - llwarns << "Trying to add object outside of all known regions!" << llendl; + LL_WARNS() << "Trying to add object outside of all known regions!" << LL_ENDL; return FALSE; } @@ -178,7 +178,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) if (NULL == regionp) { - llwarns << "regionp was NULL; aborting function." << llendl; + LL_WARNS() << "regionp was NULL; aborting function." << LL_ENDL; return FALSE; } @@ -518,7 +518,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask) { - LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE); return TRUE; } diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp index d44ac53db0..44c0cb3124 100755 --- a/indra/newview/lltoolselectland.cpp +++ b/indra/newview/lltoolselectland.cpp @@ -168,13 +168,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask) roundXY(mWestSouthBottom); roundXY(mEastNorthTop); - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, land)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, land)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_ARROW); } else { mDragEndValid = FALSE; - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_NO); } @@ -183,13 +183,13 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask) } else { - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, in slop)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, in slop)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_ARROW); } } else { - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (inactive)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_ARROW); } diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 271a417fb9..c5616fb208 100755 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -144,11 +144,11 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask) return LLToolSelect::handleHover(x, y, mask); } - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (active)" << LL_ENDL; } else { - LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (inactive)" << LL_ENDL; } gViewerWindow->setCursor(UI_CURSOR_ARROW); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 34cbd25fd8..91a5777a74 100755 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -782,7 +782,7 @@ void LLTracker::cacheLandmarkPosition() } else { - llwarns << "LLTracker couldn't find home pos" << llendl; + LL_WARNS() << "LLTracker couldn't find home pos" << LL_ENDL; mTrackedLandmarkAssetID.setNull(); mTrackedLandmarkItemID.setNull(); } diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index f3d8de1904..7e80d72dec 100755 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -284,7 +284,7 @@ void LLTranslate::TranslationReceiver::completedRaw( err_msg = LLTrans::getString("TranslationResponseParseError"); } - llwarns << "Translation request failed: " << err_msg << llendl; + LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL; handleFailure(status, err_msg); } } diff --git a/indra/newview/lluploadfloaterobservers.cpp b/indra/newview/lluploadfloaterobservers.cpp index 1d777b3f7f..248f1bf1d5 100755 --- a/indra/newview/lluploadfloaterobservers.cpp +++ b/indra/newview/lluploadfloaterobservers.cpp @@ -35,8 +35,8 @@ LLUploadModelPremissionsResponder::LLUploadModelPremissionsResponder(const LLHan void LLUploadModelPremissionsResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "LLUploadModelPremissionsResponder error [status:" - << status << "]: " << content << llendl; + LL_WARNS() << "LLUploadModelPremissionsResponder error [status:" + << status << "]: " << content << LL_ENDL; LLUploadPermissionsObserver* observer = mObserverHandle.get(); diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index aa90d16c67..01a81c5f83 100755 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -126,13 +126,13 @@ void LLURL::init(const char * url) strncpy(mPath,leftover_url, LL_MAX_PATH -1); /* Flawfinder: ignore */ mPath[LL_MAX_PATH -1] = '\0'; -// llinfos << url << " decomposed into: " << llendl; -// llinfos << " URI : <" << mURI << ">" << llendl; -// llinfos << " Auth: <" << mAuthority << ">" << llendl; -// llinfos << " Path: <" << mPath << ">" << llendl; -// llinfos << " File: <" << mFilename << ">" << llendl; -// llinfos << " Ext : <" << mExtension << ">" << llendl; -// llinfos << " Tag : <" << mTag << ">" << llendl; +// LL_INFOS() << url << " decomposed into: " << LL_ENDL; +// LL_INFOS() << " URI : <" << mURI << ">" << LL_ENDL; +// LL_INFOS() << " Auth: <" << mAuthority << ">" << LL_ENDL; +// LL_INFOS() << " Path: <" << mPath << ">" << LL_ENDL; +// LL_INFOS() << " File: <" << mFilename << ">" << LL_ENDL; +// LL_INFOS() << " Ext : <" << mExtension << ">" << LL_ENDL; +// LL_INFOS() << " Tag : <" << mTag << ">" << LL_ENDL; } void LLURL::cleanup() diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 00b15a5f26..9634098038 100755 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -150,7 +150,7 @@ bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser) { - llinfos << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << llendl; + LL_INFOS() << "cmd: " << slurl.getAppCmd() << " path: " << slurl.getAppPath() << " query: " << slurl.getAppQuery() << LL_ENDL; const LLSD& query_map = LLURI::queryMap(slurl.getAppQuery()); bool handled = LLCommandDispatcher::dispatch( slurl.getAppCmd(), slurl.getAppPath(), query_map, web, nav_type, trusted_browser); diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index dd17068be5..e0da1e7fe8 100755 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -48,15 +48,15 @@ bool LLURLHistory::loadFile(const std::string& filename) if (file.is_open()) { - llinfos << "Loading history.xml file at " << filename << llendl; + LL_INFOS() << "Loading history.xml file at " << filename << LL_ENDL; LLSDSerialize::fromXML(data, file); } if (data.isUndefined()) { - llinfos << "file missing, ill-formed, " + LL_INFOS() << "file missing, ill-formed, " "or simply undefined; not changing the" - " file" << llendl; + " file" << LL_ENDL; sHistorySD = LLSD(); return false; } @@ -71,7 +71,7 @@ bool LLURLHistory::saveFile(const std::string& filename) std::string temp_str = gDirUtilp->getLindenUserDir(); if( temp_str.empty() ) { - llinfos << "Can't save URL history - no user directory set yet." << llendl; + LL_INFOS() << "Can't save URL history - no user directory set yet." << LL_ENDL; return false; } @@ -79,7 +79,7 @@ bool LLURLHistory::saveFile(const std::string& filename) llofstream out(temp_str); if (!out.good()) { - llwarns << "Unable to open " << filename << " for output." << llendl; + LL_WARNS() << "Unable to open " << filename << " for output." << LL_ENDL; return false; } diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index 72029203d9..8211ce12f6 100755 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -117,7 +117,7 @@ bool LLUrlWhiteList::save () if (resolvedFilename.empty()) { - llinfos << "No per-user dir for saving URL whitelist - presumably not logged in yet. Skipping." << llendl; + LL_INFOS() << "No per-user dir for saving URL whitelist - presumably not logged in yet. Skipping." << LL_ENDL; return false; } diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 5c2dd20ec3..df65a637b7 100755 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -117,7 +117,7 @@ void LLViewerAssetStorage::storeAssetData( { LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type) - << " ASSET_ID: " << asset_id << llendl; + << " ASSET_ID: " << asset_id << LL_ENDL; if (mUpstreamHost.isOk()) { @@ -137,7 +137,7 @@ void LLViewerAssetStorage::storeAssetData( if (asset_size < 1) { // This can happen if there's a bug in our code or if the VFS has been corrupted. - llwarns << "LLViewerAssetStorage::storeAssetData() Data _should_ already be in the VFS, but it's not! " << asset_id << llendl; + LL_WARNS() << "LLViewerAssetStorage::storeAssetData() Data _should_ already be in the VFS, but it's not! " << asset_id << LL_ENDL; // LLAssetStorage metric: Zero size VFS reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file didn't exist or was zero length (VFS - can't tell which)" ); @@ -174,11 +174,11 @@ void LLViewerAssetStorage::storeAssetData( if( bytes_read == asset_size ) { req->mDataSentInFirstPacket = TRUE; - //llinfos << "LLViewerAssetStorage::createAsset sending data in first packet" << llendl; + //LL_INFOS() << "LLViewerAssetStorage::createAsset sending data in first packet" << LL_ENDL; } else { - llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl; + LL_WARNS() << "Probable corruption in VFS file, aborting store asset data" << LL_ENDL; // LLAssetStorage metric: VFS corrupt - bogus size reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, asset_size, MR_VFS_CORRUPTION, __FILE__, __LINE__, "VFS corruption" ); @@ -207,7 +207,7 @@ void LLViewerAssetStorage::storeAssetData( } else { - llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; + LL_WARNS() << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL; // LLAssetStorage metric: Zero size VFS reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file didn't exist or was zero length (VFS - can't tell which)" ); if (callback) @@ -218,7 +218,7 @@ void LLViewerAssetStorage::storeAssetData( } else { - llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl; + LL_WARNS() << "Attempt to move asset store request upstream w/o valid upstream provider" << LL_ENDL; // LLAssetStorage metric: Upstream provider dead reportMetric( asset_id, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_NO_UPSTREAM, __FILE__, __LINE__, "No upstream provider" ); if (callback) @@ -243,14 +243,14 @@ void LLViewerAssetStorage::storeAssetData( { // LLAssetStorage metric: no filename reportMetric( LLUUID::null, asset_type, LLStringUtil::null, LLUUID::null, 0, MR_VFS_CORRUPTION, __FILE__, __LINE__, "Filename missing" ); - llerrs << "No filename specified" << llendl; + LL_ERRS() << "No filename specified" << LL_ENDL; return; } LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; + LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL; - LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << llendl; + LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << LL_ENDL; S32 size = 0; LLFILE* fp = LLFile::fopen(filename, "rb"); @@ -369,7 +369,7 @@ void LLViewerAssetStorage::_queueDataRequest( tpvf.setAsset(uuid, atype); tpvf.setCallback(downloadCompleteCallback, req); - LL_DEBUGS("AssetStorage") << "Starting transfer for " << uuid << llendl; + LL_DEBUGS("AssetStorage") << "Starting transfer for " << uuid << LL_ENDL; LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET); ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f)); @@ -379,7 +379,7 @@ void LLViewerAssetStorage::_queueDataRequest( else { // uh-oh, we shouldn't have gotten here - llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl; + LL_WARNS() << "Attempt to move asset data request upstream w/o valid upstream provider" << LL_ENDL; if (callback) { callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM); diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index c1518833bd..885e7d7e92 100755 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -126,7 +126,7 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI) break; default: - llwarns << "Unknown fading state: " << mFadeState << llendl; + LL_WARNS() << "Unknown fading state: " << mFadeState << LL_ENDL; break; } } @@ -292,7 +292,7 @@ void LLViewerAudio::onTeleportFailed() if (parcel) { mNextStreamURI = parcel->getMusicURL(); - llinfos << "Teleport failed -- setting music stream to " << mNextStreamURI << llendl; + LL_INFOS() << "Teleport failed -- setting music stream to " << mNextStreamURI << LL_ENDL; } } mWasPlaying = false; @@ -310,7 +310,7 @@ void LLViewerAudio::onTeleportFinished(const LLVector3d& pos, const bool& local) if (parcel) { mNextStreamURI = parcel->getMusicURL(); - llinfos << "Intraparcel teleport -- setting music stream to " << mNextStreamURI << llendl; + LL_INFOS() << "Intraparcel teleport -- setting music stream to " << mNextStreamURI << LL_ENDL; } } mWasPlaying = false; @@ -320,7 +320,7 @@ void init_audio() { if (!gAudiop) { - llwarns << "Failed to create an appropriate Audio Engine" << llendl; + LL_WARNS() << "Failed to create an appropriate Audio Engine" << LL_ENDL; return; } LLVector3d lpos_global = gAgentCamera.getCameraPositionGlobal(); diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 93687dbd5f..1c3c547bc1 100755 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -241,7 +241,7 @@ std::string LLViewerChat::getSenderSLURL(const LLChat& chat, const LLSD& args) return getObjectImSLURL(chat, args); default: - llwarns << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << llendl; + LL_WARNS() << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << LL_ENDL; } return LLStringUtil::null; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index afbb59e723..5523b541a9 100755 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -262,7 +262,7 @@ static bool handleGammaChanged(const LLSD& newvalue) // Only save it if it's changed if (!gViewerWindow->getWindow()->setGamma(gamma)) { - llwarns << "setGamma failed!" << llendl; + LL_WARNS() << "setGamma failed!" << LL_ENDL; } } @@ -497,7 +497,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue) msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); gAgent.sendReliableMessage(); - llinfos << "Velocity Interpolation On" << llendl; + LL_INFOS() << "Velocity Interpolation On" << LL_ENDL; } else { @@ -506,7 +506,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue) msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); gAgent.sendReliableMessage(); - llinfos << "Velocity Interpolation Off" << llendl; + LL_INFOS() << "Velocity Interpolation Off" << LL_ENDL; } return true; } @@ -783,13 +783,13 @@ static LLCachedControl test_BrowserHomePage("BrowserHomePage", "hah void test_cached_control() { -#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) llerrs << "Fail "#T << llendl; } while(0) +#define do { TEST_LLCC(T, V) if((T)mySetting_##T != V) LL_ERRS() << "Fail "#T << LL_ENDL; } while(0) TEST_LLCC(U32, 666); TEST_LLCC(S32, (S32)-666); TEST_LLCC(F32, (F32)-666.666); TEST_LLCC(bool, true); TEST_LLCC(BOOL, FALSE); - if((std::string)mySetting_string != "Default String Value") llerrs << "Fail string" << llendl; + if((std::string)mySetting_string != "Default String Value") LL_ERRS() << "Fail string" << LL_ENDL; TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f)); TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f)); TEST_LLCC(LLRect, LLRect(0, 0, 100, 500)); @@ -798,7 +798,7 @@ void test_cached_control() TEST_LLCC(LLColor4U, LLColor4U(255, 200, 100, 255)); //There's no LLSD comparsion for LLCC yet. TEST_LLCC(LLSD, test_llsd); - if((std::string)test_BrowserHomePage != "http://www.secondlife.com") llerrs << "Fail BrowserHomePage" << llendl; + if((std::string)test_BrowserHomePage != "http://www.secondlife.com") LL_ERRS() << "Fail BrowserHomePage" << LL_ENDL; } #endif // TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 557403b914..965c6ffbc6 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -206,14 +206,14 @@ void display_update_camera() LLWorld::getInstance()->setLandFarClip(final_far); } -// Write some stats to llinfos +// Write some stats to LL_INFOS() void display_stats() { F32 fps_log_freq = gSavedSettings.getF32("FPSLogFrequency"); if (fps_log_freq > 0.f && gRecentFPSTime.getElapsedTimeF32() >= fps_log_freq) { F32 fps = gRecentFrameCount / fps_log_freq; - llinfos << llformat("FPS: %.02f", fps) << llendl; + LL_INFOS() << llformat("FPS: %.02f", fps) << LL_ENDL; gRecentFrameCount = 0; gRecentFPSTime.reset(); } @@ -222,7 +222,7 @@ void display_stats() { gMemoryAllocated = LLMemory::getCurrentRSS(); U32 memory = (U32)(gMemoryAllocated / (1024*1024)); - llinfos << llformat("MEMORY: %d MB", memory) << llendl; + LL_INFOS() << llformat("MEMORY: %d MB", memory) << LL_ENDL; LLMemory::logMemoryInfo(TRUE) ; gRecentMemoryTime.reset(); } @@ -1574,7 +1574,7 @@ void render_disconnected_background() gGL.color4f(1,1,1,1); if (!gDisconnectedImagep && gDisconnected) { - llinfos << "Loading last bitmap..." << llendl; + LL_INFOS() << "Loading last bitmap..." << LL_ENDL; std::string temp_str; temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + SCREEN_LAST_FILENAME; @@ -1582,14 +1582,14 @@ void render_disconnected_background() LLPointer image_bmp = new LLImageBMP; if( !image_bmp->load(temp_str) ) { - //llinfos << "Bitmap load failed" << llendl; + //LL_INFOS() << "Bitmap load failed" << LL_ENDL; return; } LLPointer raw = new LLImageRaw; if (!image_bmp->decode(raw, 0.0f)) { - llinfos << "Bitmap decode failed" << llendl; + LL_INFOS() << "Bitmap decode failed" << LL_ENDL; gDisconnectedImagep = NULL; return; } diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index f81206ffec..3d794f0d91 100755 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -62,8 +62,8 @@ public: // only care about errors /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "LLSetDisplayNameResponder error [status:" - << status << "]: " << content << llendl; + LL_WARNS() << "LLSetDisplayNameResponder error [status:" + << status << "]: " << content << LL_ENDL; LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD()); LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots(); } @@ -103,7 +103,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl change_array.append(av_name.getDisplayName()); change_array.append(display_name); - llinfos << "Set name POST to " << cap_url << llendl; + LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL; // Record our caller for when the server sends back a reply sSetDisplayNameSignal.connect(slot); @@ -132,7 +132,7 @@ public: std::string reason = body["reason"].asString(); LLSD content = body["content"]; - llinfos << "status " << status << " reason " << reason << llendl; + LL_INFOS() << "status " << status << " reason " << reason << LL_ENDL; // If viewer's concept of display name is out-of-date, the set request // will fail with 409 Conflict. If that happens, fetch up-to-date @@ -173,9 +173,9 @@ class LLDisplayNameUpdate : public LLHTTPNode LLAvatarName av_name; av_name.fromLLSD( name_data ); - llinfos << "name-update now " << LLDate::now() + LL_INFOS() << "name-update now " << LLDate::now() << " next_update " << LLDate(av_name.mNextUpdate) - << llendl; + << LL_ENDL; // Name expiration time may be provided in headers, or we may use a // default value diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index a179b61cff..8a96f22027 100755 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -155,7 +155,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() LLXmlTree folder_def; if (!folder_def.parseFile(xml_filename)) { - llerrs << "Failed to parse folders file " << xml_filename << llendl; + LL_ERRS() << "Failed to parse folders file " << xml_filename << LL_ENDL; return false; } @@ -166,7 +166,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() { if (!ensemble->hasName("ensemble")) { - llwarns << "Invalid ensemble definition node " << ensemble->getName() << llendl; + LL_WARNS() << "Invalid ensemble definition node " << ensemble->getName() << LL_ENDL; continue; } @@ -174,14 +174,14 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() static LLStdStringHandle ensemble_num_string = LLXmlTree::addAttributeString("foldertype_num"); if (!ensemble->getFastAttributeS32(ensemble_num_string, ensemble_type)) { - llwarns << "No ensemble type defined" << llendl; + LL_WARNS() << "No ensemble type defined" << LL_ENDL; continue; } if (ensemble_type < S32(LLFolderType::FT_ENSEMBLE_START) || ensemble_type > S32(LLFolderType::FT_ENSEMBLE_END)) { - llwarns << "Exceeded maximum ensemble index" << LLFolderType::FT_ENSEMBLE_END << llendl; + LL_WARNS() << "Exceeded maximum ensemble index" << LLFolderType::FT_ENSEMBLE_END << LL_ENDL; break; } @@ -189,7 +189,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() static LLStdStringHandle xui_name_string = LLXmlTree::addAttributeString("xui_name"); if (!ensemble->getFastAttributeString(xui_name_string, xui_name)) { - llwarns << "No xui name defined" << llendl; + LL_WARNS() << "No xui name defined" << LL_ENDL; continue; } @@ -197,7 +197,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() static LLStdStringHandle icon_name_string = LLXmlTree::addAttributeString("icon_name"); if (!ensemble->getFastAttributeString(icon_name_string, icon_name)) { - llwarns << "No ensemble icon name defined" << llendl; + LL_WARNS() << "No ensemble icon name defined" << LL_ENDL; continue; } diff --git a/indra/newview/llviewergenericmessage.cpp b/indra/newview/llviewergenericmessage.cpp index f8a2be14d4..3df53a4a30 100755 --- a/indra/newview/llviewergenericmessage.cpp +++ b/indra/newview/llviewergenericmessage.cpp @@ -78,7 +78,7 @@ void process_generic_message(LLMessageSystem* msg, void**) msg->getUUID("AgentData", "AgentID", agent_id); if (agent_id != gAgent.getID()) { - llwarns << "GenericMessage for wrong agent" << llendl; + LL_WARNS() << "GenericMessage for wrong agent" << LL_ENDL; return; } @@ -89,7 +89,7 @@ void process_generic_message(LLMessageSystem* msg, void**) if(!gGenericDispatcher.dispatch(request, invoice, strings)) { - llwarns << "GenericMessage " << request << " failed to dispatch" - << llendl; + LL_WARNS() << "GenericMessage " << request << " failed to dispatch" + << LL_ENDL; } } diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp index 3f35a5001d..f30279d1e9 100755 --- a/indra/newview/llviewergesture.cpp +++ b/indra/newview/llviewergesture.cpp @@ -194,13 +194,13 @@ void LLViewerGestureList::xferCallback(void *data, S32 size, void** /*user_data* if (end - buffer > size) { - llerrs << "Read off of end of array, error in serialization" << llendl; + LL_ERRS() << "Read off of end of array, error in serialization" << LL_ENDL; } gGestureList.mIsLoaded = TRUE; } else { - llwarns << "Unable to load gesture list!" << llendl; + LL_WARNS() << "Unable to load gesture list!" << LL_ENDL; } } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index fff9821e86..a4773646ef 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -303,8 +303,8 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other) copyViewerItem(other); if (!mIsComplete) { - llwarns << "LLViewerInventoryItem copy constructor for incomplete item" - << mUUID << llendl; + LL_WARNS() << "LLViewerInventoryItem copy constructor for incomplete item" + << mUUID << LL_ENDL; } } @@ -347,8 +347,8 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer& ne void LLViewerInventoryItem::removeFromServer() { - lldebugs << "Removing inventory item " << mUUID << " from server." - << llendl; + LL_DEBUGS() << "Removing inventory item " << mUUID << " from server." + << LL_ENDL; LLInventoryModel::LLCategoryUpdate up(mParentUUID, -1); gInventory.accountForUpdate(up); @@ -369,15 +369,15 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const { // *FIX: deal with this better. // If we're crashing here then the UI is incorrectly enabled. - llerrs << "LLViewerInventoryItem::updateServer() - for incomplete item" - << llendl; + LL_ERRS() << "LLViewerInventoryItem::updateServer() - for incomplete item" + << LL_ENDL; return; } if(gAgent.getID() != mPermissions.getOwner()) { // *FIX: deal with this better. - llwarns << "LLViewerInventoryItem::updateServer() - for unowned item" - << llendl; + LL_WARNS() << "LLViewerInventoryItem::updateServer() - for unowned item" + << LL_ENDL; return; } LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0); @@ -416,7 +416,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const } else { - llwarns << "Agent Region is absent" << llendl; + LL_WARNS() << "Agent Region is absent" << LL_ENDL; } if (!url.empty()) @@ -639,8 +639,8 @@ void LLViewerInventoryCategory::updateServer(BOOL is_new) const void LLViewerInventoryCategory::removeFromServer( void ) { - llinfos << "Removing inventory category " << mUUID << " from server." - << llendl; + LL_INFOS() << "Removing inventory category " << mUUID << " from server." + << LL_ENDL; // communicate that change with the server. if(LLFolderType::lookupIsProtectedType(mPreferredType)) { @@ -701,7 +701,7 @@ bool LLViewerInventoryCategory::fetch() } else { - llwarns << "agent region is null" << llendl; + LL_WARNS() << "agent region is null" << LL_ENDL; } if (!url.empty()) //Capability found. Build up LLSD and use it. { @@ -709,7 +709,7 @@ bool LLViewerInventoryCategory::fetch() } else { //Deprecated, but if we don't have a capability, use the old system. - llinfos << "FetchInventoryDescendents2 capability not found. Using deprecated UDP message." << llendl; + LL_INFOS() << "FetchInventoryDescendents2 capability not found. Using deprecated UDP message." << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessage("FetchInventoryDescendents"); msg->nextBlock("AgentData"); @@ -791,8 +791,8 @@ bool LLViewerInventoryCategory::importFileLocal(LLFILE* fp) } else { - llwarns << "unknown keyword '" << keyword - << "' in inventory import category " << mUUID << llendl; + LL_WARNS() << "unknown keyword '" << keyword + << "' in inventory import category " << mUUID << LL_ENDL; } } return true; @@ -905,7 +905,7 @@ LLInventoryCallbackManager::LLInventoryCallbackManager() : { if( sInstance != NULL ) { - llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl; + LL_WARNS() << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << LL_ENDL; return; } sInstance = this; @@ -915,7 +915,7 @@ LLInventoryCallbackManager::~LLInventoryCallbackManager() { if( sInstance != this ) { - llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl; + LL_WARNS() << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << LL_ENDL; return; } sInstance = NULL; @@ -1099,12 +1099,12 @@ void link_inventory_item( const LLInventoryObject *baseobj = gInventory.getObject(item_id); if (!baseobj) { - llwarns << "attempt to link to unknown item, linked-to-item's itemID " << item_id << llendl; + LL_WARNS() << "attempt to link to unknown item, linked-to-item's itemID " << item_id << LL_ENDL; return; } if (baseobj && baseobj->getIsLinkType()) { - llwarns << "attempt to create a link to a link, linked-to-item's itemID " << item_id << llendl; + LL_WARNS() << "attempt to create a link to a link, linked-to-item's itemID " << item_id << LL_ENDL; return; } @@ -1113,7 +1113,7 @@ void link_inventory_item( // Fail if item can be found but is of a type that can't be linked. // Arguably should fail if the item can't be found too, but that could // be a larger behavioral change. - llwarns << "attempt to link an unlinkable item, type = " << baseobj->getActualType() << llendl; + LL_WARNS() << "attempt to link an unlinkable item, type = " << baseobj->getActualType() << LL_ENDL; return; } @@ -1134,7 +1134,7 @@ void link_inventory_item( #if 1 // debugging stuff LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id); - lldebugs << "cat: " << cat << llendl; + LL_DEBUGS() << "cat: " << cat << LL_ENDL; #endif LLMessageSystem* msg = gMessageSystem; @@ -1347,7 +1347,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, } else { - llwarns << "Can't create unrecognized type " << type_name << llendl; + LL_WARNS() << "Can't create unrecognized type " << type_name << LL_ENDL; } } panel->getRootFolder()->setNeedsAutoRename(TRUE); @@ -1582,7 +1582,7 @@ LLViewerInventoryItem *LLViewerInventoryItem::getLinkedItem() const LLViewerInventoryItem *linked_item = gInventory.getItem(mAssetUUID); if (linked_item && linked_item->getIsLinkType()) { - llwarns << "Warning: Accessing link to link" << llendl; + LL_WARNS() << "Warning: Accessing link to link" << LL_ENDL; return NULL; } return linked_item; diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 0e99e161c4..888decd3be 100755 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -171,7 +171,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // Same object reattached if (isObjectAttached(object)) { - llinfos << "(same object re-attached)" << llendl; + LL_INFOS() << "(same object re-attached)" << LL_ENDL; removeObject(object); // Pass through anyway to let setupDrawable() // re-connect object to the joint correctly @@ -181,7 +181,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // Request detach, and kill the object in the meantime. if (getAttachedObject(object->getAttachmentItemID())) { - llinfos << "(same object re-attached)" << llendl; + LL_INFOS() << "(same object re-attached)" << LL_ENDL; object->markDead(); // If this happens to be attached to self, then detach. @@ -233,7 +233,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) } if (iter == mAttachedObjects.end()) { - llwarns << "Could not find object to detach" << llendl; + LL_WARNS() << "Could not find object to detach" << LL_ENDL; return; } diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 6cf39d319b..76fb58b87b 100755 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -551,7 +551,7 @@ void LLViewerJointMesh::dump() { if (mValid) { - llinfos << "Usable LOD " << mName << llendl; + LL_INFOS() << "Usable LOD " << mName << LL_ENDL; } } diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index f4155df4d1..ac968cfc67 100755 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -107,7 +107,7 @@ NDOF_HotPlugResult LLViewerJoystick::HotPlugAddCallback(NDOF_Device *dev) LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); if (joystick->mDriverState == JDS_UNINITIALIZED) { - llinfos << "HotPlugAddCallback: will use device:" << llendl; + LL_INFOS() << "HotPlugAddCallback: will use device:" << LL_ENDL; ndof_dump(dev); joystick->mNdofDev = dev; joystick->mDriverState = JDS_INITIALIZED; @@ -125,8 +125,8 @@ void LLViewerJoystick::HotPlugRemovalCallback(NDOF_Device *dev) LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); if (joystick->mNdofDev == dev) { - llinfos << "HotPlugRemovalCallback: joystick->mNdofDev=" - << joystick->mNdofDev << "; removed device:" << llendl; + LL_INFOS() << "HotPlugRemovalCallback: joystick->mNdofDev=" + << joystick->mNdofDev << "; removed device:" << LL_ENDL; ndof_dump(dev); joystick->mDriverState = JDS_UNINITIALIZED; } @@ -215,7 +215,7 @@ void LLViewerJoystick::init(bool autoenable) if (ndof_init_first(mNdofDev, NULL)) { mDriverState = JDS_UNINITIALIZED; - llwarns << "ndof_init_first FAILED" << llendl; + LL_WARNS() << "ndof_init_first FAILED" << LL_ENDL; } else { @@ -259,8 +259,8 @@ void LLViewerJoystick::init(bool autoenable) // No device connected, don't change any settings } - llinfos << "ndof: mDriverState=" << mDriverState << "; mNdofDev=" - << mNdofDev << "; libinit=" << libinit << llendl; + LL_INFOS() << "ndof: mDriverState=" << mDriverState << "; mNdofDev=" + << mNdofDev << "; libinit=" << libinit << LL_ENDL; #endif } @@ -270,7 +270,7 @@ void LLViewerJoystick::terminate() #if LIB_NDOF ndof_libcleanup(); - llinfos << "Terminated connection with NDOF device." << llendl; + LL_INFOS() << "Terminated connection with NDOF device." << LL_ENDL; mDriverState = JDS_UNINITIALIZED; #endif } @@ -1101,7 +1101,7 @@ void LLViewerJoystick::setSNDefaults() #endif //gViewerWindow->alertXml("CacheWillClear"); - llinfos << "restoring SpaceNavigator defaults..." << llendl; + LL_INFOS() << "restoring SpaceNavigator defaults..." << LL_ENDL; gSavedSettings.setS32("JoystickAxis0", 1); // z (at) gSavedSettings.setS32("JoystickAxis1", 0); // x (slide) diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index e05df2389e..dc004af923 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -274,7 +274,7 @@ F32 get_orbit_rate() if( time < NUDGE_TIME ) { F32 rate = ORBIT_NUDGE_RATE + time * (1 - ORBIT_NUDGE_RATE)/ NUDGE_TIME; - //llinfos << rate << llendl; + //LL_INFOS() << rate << LL_ENDL; return rate; } else @@ -676,7 +676,7 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL return FALSE; } - LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << llendl; + LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << LL_ENDL; // skip skipped keys if(mKeysSkippedByUI.find(translated_key) != mKeysSkippedByUI.end()) { @@ -837,7 +837,7 @@ S32 LLViewerKeyboard::loadBindings(const std::string& filename) if(filename.empty()) { - llerrs << " No filename specified" << llendl; + LL_ERRS() << " No filename specified" << LL_ENDL; return 0; } @@ -869,35 +869,35 @@ S32 LLViewerKeyboard::loadBindings(const std::string& filename) if (tokens_read == EOF) { - llinfos << "Unexpected end-of-file at line " << line_count << " of key binding file " << filename << llendl; + LL_INFOS() << "Unexpected end-of-file at line " << line_count << " of key binding file " << filename << LL_ENDL; fclose(fp); return 0; } else if (tokens_read < 4) { - llinfos << "Can't read line " << line_count << " of key binding file " << filename << llendl; + LL_INFOS() << "Can't read line " << line_count << " of key binding file " << filename << LL_ENDL; continue; } // convert mode if (!modeFromString(mode_string, &mode)) { - llinfos << "Unknown mode on line " << line_count << " of key binding file " << filename << llendl; - llinfos << "Mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR" << llendl; + LL_INFOS() << "Unknown mode on line " << line_count << " of key binding file " << filename << LL_ENDL; + LL_INFOS() << "Mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR" << LL_ENDL; continue; } // convert key if (!LLKeyboard::keyFromString(key_string, &key)) { - llinfos << "Can't interpret key on line " << line_count << " of key binding file " << filename << llendl; + LL_INFOS() << "Can't interpret key on line " << line_count << " of key binding file " << filename << LL_ENDL; continue; } // convert mask if (!LLKeyboard::maskFromString(mask_string, &mask)) { - llinfos << "Can't interpret mask on line " << line_count << " of key binding file " << filename << llendl; + LL_INFOS() << "Can't interpret mask on line " << line_count << " of key binding file " << filename << LL_ENDL; continue; } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 2df028de69..ba7fb4f985 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -166,7 +166,7 @@ public: { if(mMediaImpl->mMimeTypeProbe != NULL) { - llerrs << "impl already has an outstanding responder" << llendl; + LL_ERRS() << "impl already has an outstanding responder" << LL_ENDL; } mMediaImpl->mMimeTypeProbe = this; @@ -183,7 +183,7 @@ public: std::string::size_type idx1 = media_type.find_first_of(";"); std::string mime_type = media_type.substr(0, idx1); - lldebugs << "status is " << status << ", media type \"" << media_type << "\"" << llendl; + LL_DEBUGS() << "status is " << status << ", media type \"" << media_type << "\"" << LL_ENDL; // 2xx status codes indicate success. // Most 4xx status codes are successful enough for our purposes. @@ -214,7 +214,7 @@ public: } else { - llwarns << "responder failed with status " << status << ", reason " << reason << llendl; + LL_WARNS() << "responder failed with status " << status << ", reason " << reason << LL_ENDL; if(mMediaImpl) { @@ -253,7 +253,7 @@ private: { if(mMediaImpl->mMimeTypeProbe != this) { - llerrs << "internal error: mMediaImpl->mMimeTypeProbe != this" << llendl; + LL_ERRS() << "internal error: mMediaImpl->mMimeTypeProbe != this" << LL_ENDL; } mMediaImpl->mMimeTypeProbe = NULL; @@ -429,10 +429,10 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // Try to find media with the same media ID viewer_media_t media_impl = getMediaImplFromTextureID(media_entry->getMediaID()); - lldebugs << "called, current URL is \"" << media_entry->getCurrentURL() + LL_DEBUGS() << "called, current URL is \"" << media_entry->getCurrentURL() << "\", previous URL is \"" << previous_url << "\", update_from_self is " << (update_from_self?"true":"false") - << llendl; + << LL_ENDL; bool was_loaded = false; bool needs_navigate = false; @@ -464,7 +464,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // The current media URL is now empty. Unload the media source. media_impl->unload(); - lldebugs << "Unloading media instance (new current URL is empty)." << llendl; + LL_DEBUGS() << "Unloading media instance (new current URL is empty)." << LL_ENDL; } } else @@ -478,9 +478,9 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s needs_navigate = url_changed; } - lldebugs << "was_loaded is " << (was_loaded?"true":"false") + LL_DEBUGS() << "was_loaded is " << (was_loaded?"true":"false") << ", auto_play is " << (auto_play?"true":"false") - << ", needs_navigate is " << (needs_navigate?"true":"false") << llendl; + << ", needs_navigate is " << (needs_navigate?"true":"false") << LL_ENDL; } } else @@ -506,7 +506,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s if(needs_navigate) { media_impl->navigateTo(media_impl->mMediaEntryURL, "", true, true); - lldebugs << "navigating to URL " << media_impl->mMediaEntryURL << llendl; + LL_DEBUGS() << "navigating to URL " << media_impl->mMediaEntryURL << LL_ENDL; } else if(!media_impl->mMediaURL.empty() && (media_impl->mMediaURL != media_impl->mMediaEntryURL)) { @@ -516,7 +516,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // If this causes a navigate at some point (such as after a reload), it should be considered server-driven so it isn't broadcast. media_impl->mNavigateServerRequest = true; - lldebugs << "updating URL in the media impl to " << media_impl->mMediaEntryURL << llendl; + LL_DEBUGS() << "updating URL in the media impl to " << media_impl->mMediaEntryURL << LL_ENDL; } } @@ -561,7 +561,7 @@ std::string LLViewerMedia::getCurrentUserAgent() codec << "SecondLife/"; codec << LLVersionInfo::getVersion(); codec << " (" << channel << "; " << skin_name << " skin)"; - llinfos << codec.str() << llendl; + LL_INFOS() << codec.str() << LL_ENDL; return codec.str(); } @@ -678,7 +678,7 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj } else { - lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; + LL_DEBUGS() << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << LL_ENDL; if(object_interest >= sLowestLoadableImplInterest) result = true; } @@ -800,8 +800,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) sUpdatedCookies = getCookieStore()->getChangedCookies(); if(!sUpdatedCookies.empty()) { - lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl; - lldebugs << sUpdatedCookies << llendl; + LL_DEBUGS() << "updated cookies will be sent to all loaded plugins: " << LL_ENDL; + LL_DEBUGS() << sUpdatedCookies << LL_ENDL; } impl_list::iterator iter = sViewerMediaImplList.begin(); @@ -1036,7 +1036,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) proximity_order[i]->mProximity = i; } - LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl; + LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << LL_ENDL; } @@ -1171,14 +1171,14 @@ void LLViewerMedia::clearAllCookies() std::string target; std::string filename; - lldebugs << "base dir = " << base_dir << llendl; + LL_DEBUGS() << "base dir = " << base_dir << LL_ENDL; // The non-logged-in version is easy target = base_dir; target += "browser_profile"; target += gDirUtilp->getDirDelimiter(); target += "cookies"; - lldebugs << "target = " << target << llendl; + LL_DEBUGS() << "target = " << target << LL_ENDL; if(LLFile::isfile(target)) { LLFile::remove(target); @@ -1191,7 +1191,7 @@ void LLViewerMedia::clearAllCookies() target = gDirUtilp->add(base_dir, filename); gDirUtilp->append(target, "browser_profile"); gDirUtilp->append(target, "cookies"); - lldebugs << "target = " << target << llendl; + LL_DEBUGS() << "target = " << target << LL_ENDL; if(LLFile::isfile(target)) { LLFile::remove(target); @@ -1200,7 +1200,7 @@ void LLViewerMedia::clearAllCookies() // Other accounts may have new-style cookie files too -- delete them as well target = gDirUtilp->add(base_dir, filename); gDirUtilp->append(target, PLUGIN_COOKIE_FILE_NAME); - lldebugs << "target = " << target << llendl; + LL_DEBUGS() << "target = " << target << LL_ENDL; if(LLFile::isfile(target)) { LLFile::remove(target); @@ -1282,7 +1282,7 @@ void LLViewerMedia::loadCookieFile() if (resolved_filename.empty()) { - llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + LL_INFOS() << "can't get path to plugin cookie file - probably not logged in yet." << LL_ENDL; return; } @@ -1290,7 +1290,7 @@ void LLViewerMedia::loadCookieFile() llifstream file(resolved_filename); if (!file.is_open()) { - llwarns << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << llendl; + LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL; return; } @@ -1324,7 +1324,7 @@ void LLViewerMedia::saveCookieFile() if (resolved_filename.empty()) { - llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + LL_INFOS() << "can't get path to plugin cookie file - probably not logged in yet." << LL_ENDL; return; } @@ -1332,7 +1332,7 @@ void LLViewerMedia::saveCookieFile() llofstream file (resolved_filename); if (!file.is_open()) { - llwarns << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << llendl; + LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL; return; } @@ -1438,8 +1438,8 @@ void LLViewerMedia::setOpenIDCookie() std::string profile_url = getProfileURL(""); LLURL raw_profile_url( profile_url.c_str() ); - LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << llendl; - LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << llendl; + LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << LL_ENDL; + LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << LL_ENDL; LLHTTPClient::get(profile_url, new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()), headers); @@ -1958,7 +1958,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) // Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message, // which could cause odd race conditions. std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies(); - lldebugs << "setting cookies: " << all_cookies << llendl; + LL_DEBUGS() << "setting cookies: " << all_cookies << LL_ENDL; if(!all_cookies.empty()) { media_source->set_cookies(all_cookies); @@ -2000,7 +2000,7 @@ void LLViewerMediaImpl::loadURI() "<>#%" ";/?:@&=", false); - llinfos << "Asking media source to load URI: " << uri << llendl; + LL_INFOS() << "Asking media source to load URI: " << uri << LL_ENDL; mMediaSource->loadURI( uri ); @@ -2272,7 +2272,7 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) scaleMouse(&x, &y); mLastMouseX = x; mLastMouseY = y; -// llinfos << "mouse down (" << x << ", " << y << ")" << llendl; +// LL_INFOS() << "mouse down (" << x << ", " << y << ")" << LL_ENDL; if (mMediaSource) { mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask); @@ -2285,7 +2285,7 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button) scaleMouse(&x, &y); mLastMouseX = x; mLastMouseY = y; -// llinfos << "mouse up (" << x << ", " << y << ")" << llendl; +// LL_INFOS() << "mouse up (" << x << ", " << y << ")" << LL_ENDL; if (mMediaSource) { mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask); @@ -2298,7 +2298,7 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask) scaleMouse(&x, &y); mLastMouseX = x; mLastMouseY = y; -// llinfos << "mouse move (" << x << ", " << y << ")" << llendl; +// LL_INFOS() << "mouse move (" << x << ", " << y << ")" << LL_ENDL; if (mMediaSource) { mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask); @@ -2567,7 +2567,7 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "NOT LOADING media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + LL_INFOS() << "NOT LOADING media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << LL_ENDL; // This impl should not be loaded at this time. LL_DEBUGS("PluginPriority") << this << "Not loading (PRIORITY_UNLOADED)" << LL_ENDL; @@ -2582,18 +2582,18 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi void LLViewerMediaImpl::navigateInternal() { // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + LL_INFOS() << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << LL_ENDL; if(mNavigateSuspended) { - llwarns << "Deferring navigate." << llendl; + LL_WARNS() << "Deferring navigate." << LL_ENDL; mNavigateSuspendedDeferred = true; return; } if(mMimeTypeProbe != NULL) { - llwarns << "MIME type probe already in progress -- bailing out." << llendl; + LL_WARNS() << "MIME type probe already in progress -- bailing out." << LL_ENDL; return; } @@ -3313,7 +3313,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { std::string uuid = plugin->getClickUUID(); - llinfos << "MEDIA_EVENT_CLOSE_REQUEST for uuid " << uuid << llendl; + LL_INFOS() << "MEDIA_EVENT_CLOSE_REQUEST for uuid " << uuid << LL_ENDL; if(uuid.empty()) { @@ -3332,7 +3332,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { std::string uuid = plugin->getClickUUID(); - llinfos << "MEDIA_EVENT_GEOMETRY_CHANGE for uuid " << uuid << llendl; + LL_INFOS() << "MEDIA_EVENT_GEOMETRY_CHANGE for uuid " << uuid << LL_ENDL; if(uuid.empty()) { @@ -3622,16 +3622,16 @@ void LLViewerMediaImpl::setNavState(EMediaNavState state) switch (state) { - case MEDIANAVSTATE_NONE: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_NONE" << llendl; break; - case MEDIANAVSTATE_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_BEGUN" << llendl; break; - case MEDIANAVSTATE_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED" << llendl; break; - case MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS" << llendl; break; - case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED" << llendl; break; - case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS" << llendl; break; - case MEDIANAVSTATE_SERVER_SENT: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_SENT" << llendl; break; - case MEDIANAVSTATE_SERVER_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_BEGUN" << llendl; break; - case MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED" << llendl; break; - case MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED" << llendl; break; + case MEDIANAVSTATE_NONE: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_NONE" << LL_ENDL; break; + case MEDIANAVSTATE_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_BEGUN" << LL_ENDL; break; + case MEDIANAVSTATE_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED" << LL_ENDL; break; + case MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS" << LL_ENDL; break; + case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED" << LL_ENDL; break; + case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS" << LL_ENDL; break; + case MEDIANAVSTATE_SERVER_SENT: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_SENT" << LL_ENDL; break; + case MEDIANAVSTATE_SERVER_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_BEGUN" << LL_ENDL; break; + case MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED" << LL_ENDL; break; + case MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED" << LL_ENDL; break; } } @@ -3663,7 +3663,7 @@ void LLViewerMediaImpl::cancelMimeTypeProbe() // The above should already have set mMimeTypeProbe to NULL. if(mMimeTypeProbe != NULL) { - llerrs << "internal error: mMimeTypeProbe is not NULL after cancelling request." << llendl; + LL_ERRS() << "internal error: mMimeTypeProbe is not NULL after cancelling request." << LL_ENDL; } } } @@ -3745,10 +3745,10 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const bool attached_to_another_avatar = isAttachedToAnotherAvatar(); bool inside_parcel = isInAgentParcel(); - // llinfos << " hasFocus = " << hasFocus() << + // LL_INFOS() << " hasFocus = " << hasFocus() << // " others = " << (attached_to_another_avatar && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING)) << // " within = " << (inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING)) << - // " outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << llendl; + // " outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << LL_ENDL; // If it has focus, we should show it // This is incorrect, and causes EXT-6750 (disabled attachment media still plays) diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp index e2a74e8e3c..c107e8472c 100755 --- a/indra/newview/llviewermedia_streamingaudio.cpp +++ b/indra/newview/llviewermedia_streamingaudio.cpp @@ -56,20 +56,20 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url) if (!mMediaPlugin) // lazy-init the underlying media plugin { mMediaPlugin = initializeMedia("audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. - llinfos << "streaming audio mMediaPlugin is now " << mMediaPlugin << llendl; + LL_INFOS() << "streaming audio mMediaPlugin is now " << mMediaPlugin << LL_ENDL; } if(!mMediaPlugin) return; if (!url.empty()) { - llinfos << "Starting internet stream: " << url << llendl; + LL_INFOS() << "Starting internet stream: " << url << LL_ENDL; mURL = url; mMediaPlugin->loadURI ( url ); mMediaPlugin->start(); - llinfos << "Playing stream..." << llendl; + LL_INFOS() << "Playing stream..." << LL_ENDL; } else { - llinfos << "setting stream to NULL"<< llendl; + LL_INFOS() << "setting stream to NULL"<< LL_ENDL; mURL.clear(); mMediaPlugin->stop(); } @@ -77,7 +77,7 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url) void LLStreamingAudio_MediaPlugins::stop() { - llinfos << "Stopping internet stream." << llendl; + LL_INFOS() << "Stopping internet stream." << LL_ENDL; if(mMediaPlugin) { mMediaPlugin->stop(); @@ -93,12 +93,12 @@ void LLStreamingAudio_MediaPlugins::pause(int pause) if(pause) { - llinfos << "Pausing internet stream." << llendl; + LL_INFOS() << "Pausing internet stream." << LL_ENDL; mMediaPlugin->pause(); } else { - llinfos << "Unpausing internet stream." << llendl; + LL_INFOS() << "Unpausing internet stream." << LL_ENDL; mMediaPlugin->start(); } } diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 297906803b..aa019dfdd8 100755 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -108,7 +108,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac else { // This should never happen. - llwarns << "Can't find media entry for focused face" << llendl; + LL_WARNS() << "Can't find media entry for focused face" << LL_ENDL; } media_impl->focus(true); @@ -223,7 +223,7 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, F32 aspect_ratio = getBBoxAspectRatio(bbox, normal, &height, &width, &depth); F32 camera_aspect = LLViewerCamera::getInstance()->getAspect(); - lldebugs << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << llendl; + LL_DEBUGS() << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << LL_ENDL; // We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for // a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is @@ -241,14 +241,14 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect()); distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); - lldebugs << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; + LL_DEBUGS() << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL; } else { angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView()); distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f ); - lldebugs << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl; + LL_DEBUGS() << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL; } distance += depth * 0.5; @@ -452,7 +452,7 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& F32 dot1 = 0.f; F32 dot2 = 0.f; - lldebugs << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << llendl; + LL_DEBUGS() << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << LL_ENDL; // The largest component of the localized normal vector is the depth component // meaning that the other two are the legs of the rectangle. @@ -465,21 +465,21 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& if(XgtY && XgtZ) { - lldebugs << "x component of normal is longest, using y and z" << llendl; + LL_DEBUGS() << "x component of normal is longest, using y and z" << LL_ENDL; comp1.mV[VY] = bbox_max.mV[VY]; comp2.mV[VZ] = bbox_max.mV[VZ]; *depth = bbox_max.mV[VX]; } else if(!XgtY && YgtZ) { - lldebugs << "y component of normal is longest, using x and z" << llendl; + LL_DEBUGS() << "y component of normal is longest, using x and z" << LL_ENDL; comp1.mV[VX] = bbox_max.mV[VX]; comp2.mV[VZ] = bbox_max.mV[VZ]; *depth = bbox_max.mV[VY]; } else { - lldebugs << "z component of normal is longest, using x and y" << llendl; + LL_DEBUGS() << "z component of normal is longest, using x and y" << LL_ENDL; comp1.mV[VX] = bbox_max.mV[VX]; comp2.mV[VY] = bbox_max.mV[VY]; *depth = bbox_max.mV[VZ]; @@ -493,19 +493,19 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& *height = comp1.length(); *width = comp2.length(); - lldebugs << "comp1 = " << comp1 << ", height = " << *height << llendl; - lldebugs << "comp2 = " << comp2 << ", width = " << *width << llendl; + LL_DEBUGS() << "comp1 = " << comp1 << ", height = " << *height << LL_ENDL; + LL_DEBUGS() << "comp2 = " << comp2 << ", width = " << *width << LL_ENDL; } else { *height = comp2.length(); *width = comp1.length(); - lldebugs << "comp2 = " << comp2 << ", height = " << *height << llendl; - lldebugs << "comp1 = " << comp1 << ", width = " << *width << llendl; + LL_DEBUGS() << "comp2 = " << comp2 << ", height = " << *height << LL_ENDL; + LL_DEBUGS() << "comp1 = " << comp1 << ", width = " << *width << LL_ENDL; } - lldebugs << "returning " << (*width / *height) << llendl; + LL_DEBUGS() << "returning " << (*width / *height) << LL_ENDL; // Return the aspect ratio. return *width / *height; @@ -560,7 +560,7 @@ void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id) if(normal.isNull()) { // If that didn't work, use the inverse of the camera "look at" axis, which should keep the camera pointed in the same direction. -// llinfos << "approximate face normal invalid, using camera direction." << llendl; +// LL_INFOS() << "approximate face normal invalid, using camera direction." << LL_ENDL; normal = LLViewerCamera::getInstance()->getAtAxis(); normal *= (F32)-1.0f; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 427fd89afb..41ed2faaa5 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1638,7 +1638,7 @@ class LLAdvancedAnimTenFaster : public view_listener_t { bool handleEvent(const LLSD& userdata) { - //llinfos << "LLAdvancedAnimTenFaster" << llendl; + //LL_INFOS() << "LLAdvancedAnimTenFaster" << LL_ENDL; F32 time_factor = LLMotionController::getCurrentTimeFactor(); time_factor = llmin(time_factor + 0.1f, 2.f); // Upper limit is 200% speed set_all_animation_time_factors(time_factor); @@ -1650,7 +1650,7 @@ class LLAdvancedAnimTenSlower : public view_listener_t { bool handleEvent(const LLSD& userdata) { - //llinfos << "LLAdvancedAnimTenSlower" << llendl; + //LL_INFOS() << "LLAdvancedAnimTenSlower" << LL_ENDL; F32 time_factor = LLMotionController::getCurrentTimeFactor(); time_factor = llmax(time_factor - 0.1f, 0.1f); // Lower limit is at 10% of normal speed set_all_animation_time_factors(time_factor); @@ -3104,7 +3104,7 @@ class LLAvatarDebug : public view_listener_t { ((LLVOAvatarSelf *)avatar)->dumpLocalTextures(); } - llinfos << "Dumping temporary asset data to simulator logs for avatar " << avatar->getID() << llendl; + LL_INFOS() << "Dumping temporary asset data to simulator logs for avatar " << avatar->getID() << LL_ENDL; std::vector strings; strings.push_back(avatar->getID().asString()); LLUUID invoice; @@ -3378,7 +3378,7 @@ void handle_buy_contents(LLSaleInfo sale_info) void handle_region_dump_temp_asset_data(void*) { - llinfos << "Dumping temporary asset data to simulator logs" << llendl; + LL_INFOS() << "Dumping temporary asset data to simulator logs" << LL_ENDL; std::vector strings; LLUUID invoice; send_generic_message("dumptempassetdata", strings, invoice); @@ -3386,7 +3386,7 @@ void handle_region_dump_temp_asset_data(void*) void handle_region_clear_temp_asset_data(void*) { - llinfos << "Clearing temporary asset data" << llendl; + LL_INFOS() << "Clearing temporary asset data" << LL_ENDL; std::vector strings; LLUUID invoice; send_generic_message("cleartempassetdata", strings, invoice); @@ -3397,14 +3397,14 @@ void handle_region_dump_settings(void*) LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) { - llinfos << "Damage: " << (regionp->getAllowDamage() ? "on" : "off") << llendl; - llinfos << "Landmark: " << (regionp->getAllowLandmark() ? "on" : "off") << llendl; - llinfos << "SetHome: " << (regionp->getAllowSetHome() ? "on" : "off") << llendl; - llinfos << "ResetHome: " << (regionp->getResetHomeOnTeleport() ? "on" : "off") << llendl; - llinfos << "SunFixed: " << (regionp->getSunFixed() ? "on" : "off") << llendl; - llinfos << "BlockFly: " << (regionp->getBlockFly() ? "on" : "off") << llendl; - llinfos << "AllowP2P: " << (regionp->getAllowDirectTeleport() ? "on" : "off") << llendl; - llinfos << "Water: " << (regionp->getWaterHeight()) << llendl; + LL_INFOS() << "Damage: " << (regionp->getAllowDamage() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "Landmark: " << (regionp->getAllowLandmark() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "SetHome: " << (regionp->getAllowSetHome() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "ResetHome: " << (regionp->getResetHomeOnTeleport() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "SunFixed: " << (regionp->getSunFixed() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "BlockFly: " << (regionp->getBlockFly() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "AllowP2P: " << (regionp->getAllowDirectTeleport() ? "on" : "off") << LL_ENDL; + LL_INFOS() << "Water: " << (regionp->getWaterHeight()) << LL_ENDL; } } @@ -3435,7 +3435,7 @@ void handle_dump_focus() { LLUICtrl *ctrl = dynamic_cast(gFocusMgr.getKeyboardFocus()); - llinfos << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << llendl; + LL_INFOS() << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << LL_ENDL; } class LLSelfStandUp : public view_listener_t @@ -3647,7 +3647,7 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**) } else { - llwarns << "Grant godlike for wrong agent " << agent_id << llendl; + LL_WARNS() << "Grant godlike for wrong agent " << agent_id << LL_ENDL; } } @@ -3989,7 +3989,7 @@ class LLEditEnableDuplicate : public view_listener_t void handle_duplicate_in_place(void*) { - llinfos << "handle_duplicate_in_place" << llendl; + LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL; LLVector3 offset(0.f, 0.f, 0.f); LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE); @@ -4206,7 +4206,7 @@ static bool get_derezzable_objects( && dest != DRD_RETURN_TO_OWNER) { // this object is an asset container, derez its contents, not it - llwarns << "Attempt to derez deprecated AssetContainer object type not supported." << llendl; + LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL; /* object->requestInventory(container_inventory_arrived, (void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); @@ -4277,7 +4277,7 @@ static void derez_objects( // get them from selection if (!get_derezzable_objects(dest, error, first_region, &derez_objects, false)) { - llwarns << "No objects to derez" << llendl; + LL_WARNS() << "No objects to derez" << LL_ENDL; return; } @@ -4765,7 +4765,7 @@ bool callback_show_buy_currency(const LLSD& notification, const LLSD& response) S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == option) { - llinfos << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << llendl; + LL_INFOS() << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << LL_ENDL; LLWeb::loadURL(LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL")); } return false; @@ -5452,7 +5452,7 @@ void print_agent_nvpairs(void*) { LLViewerObject *objectp; - llinfos << "Agent Name Value Pairs" << llendl; + LL_INFOS() << "Agent Name Value Pairs" << LL_ENDL; objectp = gObjectList.findObject(gAgentID); if (objectp) @@ -5461,10 +5461,10 @@ void print_agent_nvpairs(void*) } else { - llinfos << "Can't find agent object" << llendl; + LL_INFOS() << "Can't find agent object" << LL_ENDL; } - llinfos << "Camera at " << gAgentCamera.getCameraPositionGlobal() << llendl; + LL_INFOS() << "Camera at " << gAgentCamera.getCameraPositionGlobal() << LL_ENDL; } void show_debug_menus() @@ -5517,7 +5517,7 @@ void toggle_debug_menus(void*) // { // return; // } -// llinfos << "Exporting selected objects:" << llendl; +// LL_INFOS() << "Exporting selected objects:" << LL_ENDL; // gExporterRequestID.generate(); // gExportDirectory = ""; @@ -5536,7 +5536,7 @@ void toggle_debug_menus(void*) // LLViewerObject* object = node->getObject(); // msg->nextBlockFast(_PREHASH_ObjectData); // msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); -// llinfos << "Object: " << object->getID() << llendl; +// LL_INFOS() << "Object: " << object->getID() << LL_ENDL; // } // msg->sendReliable(gAgent.getRegion()->getHost()); @@ -6072,7 +6072,7 @@ class LLPromptShowURL : public view_listener_t } else { - llinfos << "PromptShowURL invalid parameters! Expecting \"ALERT,URL\"." << llendl; + LL_INFOS() << "PromptShowURL invalid parameters! Expecting \"ALERT,URL\"." << LL_ENDL; } return true; } @@ -6105,7 +6105,7 @@ class LLPromptShowFile : public view_listener_t } else { - llinfos << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << llendl; + LL_INFOS() << "PromptShowFile invalid parameters! Expecting \"ALERT,FILE\"." << LL_ENDL; } return true; } @@ -6361,7 +6361,7 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { - llwarns << "handle_drop_attachment() - no object to drop" << llendl; + LL_WARNS() << "handle_drop_attachment() - no object to drop" << LL_ENDL; return; } @@ -6378,13 +6378,13 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response) if (!object) { - llwarns << "handle_detach() - no object to detach" << llendl; + LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL; return; } if (object->isAvatar()) { - llwarns << "Trying to detach avatar from avatar." << llendl; + LL_WARNS() << "Trying to detach avatar from avatar." << LL_ENDL; return; } @@ -6409,7 +6409,7 @@ class LLAttachmentDrop : public view_listener_t } else { - llwarns << "Drop object not found" << llendl; + LL_WARNS() << "Drop object not found" << LL_ENDL; return true; } @@ -6483,7 +6483,7 @@ class LLAttachmentDetach : public view_listener_t LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) { - llwarns << "handle_detach() - no object to detach" << llendl; + LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL; return true; } @@ -6500,13 +6500,13 @@ class LLAttachmentDetach : public view_listener_t if (!object) { - llwarns << "handle_detach() - no object to detach" << llendl; + LL_WARNS() << "handle_detach() - no object to detach" << LL_ENDL; return true; } if (object->isAvatar()) { - llwarns << "Trying to detach avatar from avatar." << llendl; + LL_WARNS() << "Trying to detach avatar from avatar." << LL_ENDL; return true; } @@ -6770,14 +6770,14 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) } else { - llerrs << "Bad logic." << llendl; + LL_ERRS() << "Bad logic." << LL_ENDL; } } else { if (!q->start()) { - llwarns << "Unexpected script compile failure." << llendl; + LL_WARNS() << "Unexpected script compile failure." << LL_ENDL; } } } @@ -6832,7 +6832,7 @@ class LLToolsSelectedScriptAction : public view_listener_t } else { - llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl; + LL_WARNS() << "Failed to generate LLFloaterScriptQueue with action: " << action << LL_ENDL; } return true; } @@ -6964,12 +6964,12 @@ void handle_dump_attachments(void*) !attached_object->mDrawable->isRenderType(0)); LLVector3 pos; if (visible) pos = attached_object->mDrawable->getPosition(); - llinfos << "ATTACHMENT " << key << ": item_id=" << attached_object->getAttachmentItemID() + LL_INFOS() << "ATTACHMENT " << key << ": item_id=" << attached_object->getAttachmentItemID() << (attached_object ? " present " : " absent ") << (visible ? "visible " : "invisible ") << " at " << pos << " and " << (visible ? attached_object->getPosition() : LLVector3::zero) - << llendl; + << LL_ENDL; } } } @@ -7409,7 +7409,7 @@ void handle_grab_baked_texture(void* data) if (!isAgentAvatarValid()) return; const LLUUID& asset_id = gAgentAvatarp->grabBakedTexture(baked_tex_index); - LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; + LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << LL_ENDL; LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); @@ -7465,7 +7465,7 @@ void handle_grab_baked_texture(void* data) } else { - llwarns << "Can't find a folder to put it in" << llendl; + LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL; } } @@ -7663,7 +7663,7 @@ void handle_buy_currency_test(void*) replace["[LANGUAGE]"] = LLUI::getLanguage(); LLStringUtil::format(url, replace); - llinfos << "buy currency url " << url << llendl; + LL_INFOS() << "buy currency url " << url << LL_ENDL; LLFloaterReg::showInstance("buy_currency_html", LLSD(url)); } @@ -8098,7 +8098,7 @@ class LLWorldEnvPreset : public view_listener_t } else { - llwarns << "Unknown item selected" << llendl; + LL_WARNS() << "Unknown item selected" << LL_ENDL; } return true; @@ -8131,7 +8131,7 @@ class LLWorldEnableEnvPreset : public view_listener_t } else { - llwarns << "Unknown item" << llendl; + LL_WARNS() << "Unknown item" << LL_ENDL; } return false; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index b7282a8493..2930c130df 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -253,7 +253,7 @@ const std::string upload_pick(void* data) LLFilePicker& picker = LLFilePicker::instance(); if (!picker.getOpenFile(type)) { - llinfos << "Couldn't import objects from file" << llendl; + LL_INFOS() << "Couldn't import objects from file" << LL_ENDL; return std::string(); } @@ -327,7 +327,7 @@ const std::string upload_pick(void* data) std::string error_msg; if (check_for_invalid_wav_formats(filename,error_msg)) { - llinfos << error_msg << ": " << filename << llendl; + LL_INFOS() << error_msg << ": " << filename << LL_ENDL; LLSD args; args["FILE"] = filename; LLNotificationsUtil::add( error_msg, args ); @@ -455,7 +455,7 @@ class LLFileUploadBulk : public view_listener_t } else { - llinfos << "Couldn't import objects from file" << llendl; + LL_INFOS() << "Couldn't import objects from file" << LL_ENDL; } return true; } @@ -463,11 +463,11 @@ class LLFileUploadBulk : public view_listener_t void upload_error(const std::string& error_message, const std::string& label, const std::string& filename, const LLSD& args) { - llwarns << error_message << llendl; + LL_WARNS() << error_message << LL_ENDL; LLNotificationsUtil::add(label, args); if(LLFile::remove(filename) == -1) { - lldebugs << "unable to remove temp file" << llendl; + LL_DEBUGS() << "unable to remove temp file" << LL_ENDL; } LLFilePicker::instance().reset(); } @@ -542,7 +542,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); break; default: - llwarns << "Unknown local snapshot format: " << fmt << llendl; + LL_WARNS() << "Unknown local snapshot format: " << fmt << LL_ENDL; case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: formatted = new LLImagePNG; break; @@ -579,8 +579,8 @@ void handle_compress_image(void*) { std::string outfile = infile + ".j2c"; - llinfos << "Input: " << infile << llendl; - llinfos << "Output: " << outfile << llendl; + LL_INFOS() << "Input: " << infile << LL_ENDL; + LL_INFOS() << "Output: " << outfile << LL_ENDL; BOOL success; @@ -588,11 +588,11 @@ void handle_compress_image(void*) if (success) { - llinfos << "Compression complete" << llendl; + LL_INFOS() << "Compression complete" << LL_ENDL; } else { - llinfos << "Compression failed: " << LLImage::getLastError() << llendl; + LL_INFOS() << "Compression failed: " << LLImage::getLastError() << LL_ENDL; } infile = picker.getNextFile(); @@ -660,7 +660,7 @@ LLUUID upload_new_resource( asset_type = LLAssetType::AT_SOUND; // tag it as audio S32 encode_result = 0; - llinfos << "Attempting to encode wav as an ogg file" << llendl; + LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL; encode_result = encode_vorbis_file(src_filename, filename); @@ -711,8 +711,8 @@ LLUUID upload_new_resource( "%254s %254s\n", label, value); - llinfos << "got: " << label << " = " << value - << llendl; + LL_INFOS() << "got: " << label << " = " << value + << LL_ENDL; if (EOF == tokens_read) { @@ -765,7 +765,7 @@ LLUUID upload_new_resource( // read in and throw out most of the header except for the type if (fread(buf, header_size, 1, in) != 1) { - llwarns << "Short read" << llendl; + LL_WARNS() << "Short read" << LL_ENDL; } memcpy(&type_num, buf + 16, sizeof(S16)); /* Flawfinder: ignore */ asset_type = (LLAssetType::EType)type_num; @@ -779,7 +779,7 @@ LLUUID upload_new_resource( { if (fwrite(buf, 1, readbytes, out) != readbytes) { - llwarns << "Short write" << llendl; + LL_WARNS() << "Short write" << LL_ENDL; } } fclose(out); @@ -797,7 +797,7 @@ LLUUID upload_new_resource( } else { - llinfos << "Couldn't open .lin file " << src_filename << llendl; + LL_INFOS() << "Couldn't open .lin file " << src_filename << LL_ENDL; } } else if (exten == "bvh") @@ -873,13 +873,13 @@ LLUUID upload_new_resource( } else { - llwarns << error_message << llendl; + LL_WARNS() << error_message << LL_ENDL; LLSD args; args["ERROR_MESSAGE"] = error_message; LLNotificationsUtil::add("ErrorMessage", args); if(LLFile::remove(filename) == -1) { - lldebugs << "unable to remove temp file" << llendl; + LL_DEBUGS() << "unable to remove temp file" << LL_ENDL; } LLFilePicker::instance().reset(); } @@ -947,7 +947,7 @@ void upload_done_callback( if(is_balance_sufficient) { // Actually add the upload to inventory - llinfos << "Adding " << uuid << " to inventory." << llendl; + LL_INFOS() << "Adding " << uuid << " to inventory." << LL_ENDL; const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); if(folder_id.notNull()) { @@ -964,7 +964,7 @@ void upload_done_callback( } else { - llwarns << "Can't find a folder to put it in" << llendl; + LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL; } } } @@ -1129,21 +1129,21 @@ void upload_new_resource( upload_message.append(display_name); LLUploadDialog::modalUploadDialog(upload_message); - llinfos << "*** Uploading: " << llendl; - llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl; - llinfos << "UUID: " << uuid << llendl; - llinfos << "Name: " << name << llendl; - llinfos << "Desc: " << desc << llendl; - llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl; - lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl; - lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; + LL_INFOS() << "*** Uploading: " << LL_ENDL; + LL_INFOS() << "Type: " << LLAssetType::lookup(asset_type) << LL_ENDL; + LL_INFOS() << "UUID: " << uuid << LL_ENDL; + LL_INFOS() << "Name: " << name << LL_ENDL; + LL_INFOS() << "Desc: " << desc << LL_ENDL; + LL_INFOS() << "Expected Upload Cost: " << expected_upload_cost << LL_ENDL; + LL_DEBUGS() << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << LL_ENDL; + LL_DEBUGS() << "Asset Type: " << LLAssetType::lookup(asset_type) << LL_ENDL; std::string url = gAgent.getRegion()->getCapability( "NewFileAgentInventory"); if ( !url.empty() ) { - llinfos << "New Agent Inventory via capability" << llendl; + LL_INFOS() << "New Agent Inventory via capability" << LL_ENDL; LLSD body; body = generate_new_resource_upload_capability_body( @@ -1166,7 +1166,7 @@ void upload_new_resource( } else { - llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl; + LL_INFOS() << "NewAgentInventory capability not found, new agent inventory via asset system." << LL_ENDL; // check for adequate funds // TODO: do this check on the sim if (LLAssetType::AT_SOUND == asset_type || diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 864418ad95..f12df23a36 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -375,7 +375,7 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) if(!regionp) { - llwarns << "Invalid region for layer data." << llendl; + LL_WARNS() << "Invalid region for layer data." << LL_ENDL; return; } S32 size; @@ -1215,7 +1215,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam const LLInventoryObject *obj = gInventory.getObject(obj_id); if (!obj) { - llwarns << "Cannot find object [ itemID:" << obj_id << " ] to open." << llendl; + LL_WARNS() << "Cannot find object [ itemID:" << obj_id << " ] to open." << LL_ENDL; continue; } @@ -1491,7 +1491,7 @@ void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response) const std::string name = notification["name"].asString(); if(mRespondFunctions.find(name) == mRespondFunctions.end()) { - llwarns << "Unexpected notification name : " << name << llendl; + LL_WARNS() << "Unexpected notification name : " << name << LL_ENDL; llassert(!"Unexpected notification name"); return; } @@ -3431,7 +3431,7 @@ protected: void handleFailure(int status, const std::string& err_msg) { - llwarns << "Translation failed for mesg " << m_origMesg << " toLang " << mToLang << " fromLang " << mFromLang << llendl; + LL_WARNS() << "Translation failed for mesg " << m_origMesg << " toLang " << mToLang << " fromLang " << mFromLang << LL_ENDL; std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg)); LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages @@ -4414,7 +4414,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) update_sec = cur_sec; //msg_number = 0; max_update_count = llmax(max_update_count, update_count); - llinfos << "Sent " << update_count << " AgentUpdate messages per second, max is " << max_update_count << llendl; + LL_INFOS() << "Sent " << update_count << " AgentUpdate messages per second, max is " << max_update_count << LL_ENDL; } update_sec = cur_sec; update_count = 0; @@ -4845,7 +4845,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) } else { - llwarns << "Unknown sim stat identifier: " << stat_id << llendl; + LL_WARNS() << "Unknown sim stat identifier: " << stat_id << LL_ENDL; } } @@ -5412,8 +5412,8 @@ static std::string reason_from_transaction_type(S32 transaction_type, return std::string(); default: - llwarns << "Unknown transaction type " - << transaction_type << llendl; + LL_WARNS() << "Unknown transaction type " + << transaction_type << LL_ENDL; return std::string(); } } @@ -5790,7 +5790,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) std::istringstream llsdData(llsdRaw); if (!LLSDSerialize::deserialize(llsdBlock, llsdData, llsdRaw.length())) { - llwarns << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << llendl; + LL_WARNS() << "attempt_standard_notification: Attempted to read notification parameter data into LLSD but failed:" << llsdRaw << LL_ENDL; } } @@ -6572,7 +6572,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**) std::istringstream llsd_data(llsd_raw); if (!LLSDSerialize::deserialize(llsd_block, llsd_data, llsd_raw.length())) { - llwarns << "process_teleport_failed: Attempted to read alert parameter data into LLSD but failed:" << llsd_raw << llendl; + LL_WARNS() << "process_teleport_failed: Attempted to read alert parameter data into LLSD but failed:" << llsd_raw << LL_ENDL; } else { @@ -7029,7 +7029,7 @@ void process_script_dialog(LLMessageSystem* msg, void**) S32 button_count = msg->getNumberOfBlocks("Buttons"); if (button_count > SCRIPT_DIALOG_MAX_BUTTONS) { - llwarns << "Too many script dialog buttons - omitting some" << llendl; + LL_WARNS() << "Too many script dialog buttons - omitting some" << LL_ENDL; button_count = SCRIPT_DIALOG_MAX_BUTTONS; } @@ -7189,7 +7189,7 @@ void process_initiate_download(LLMessageSystem* msg, void**) if (!gXferManager->validateFileForRequest(viewer_filename)) { - llwarns << "SECURITY: Unauthorized download to local file " << viewer_filename << llendl; + LL_WARNS() << "SECURITY: Unauthorized download to local file " << viewer_filename << LL_ENDL; return; } gXferManager->requestFile(viewer_filename, diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 51328dc802..3d75f86154 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -174,13 +174,13 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco case LL_PCODE_LEGACY_GRASS: res = new LLVOGrass(id, pcode, regionp); break; case LL_PCODE_LEGACY_PART_SYS: -// llwarns << "Creating old part sys!" << llendl; +// LL_WARNS() << "Creating old part sys!" << LL_ENDL; // res = new LLVOPart(id, pcode, regionp); break; res = NULL; break; case LL_PCODE_LEGACY_TREE: res = new LLVOTree(id, pcode, regionp); break; case LL_PCODE_TREE_NEW: -// llwarns << "Creating new tree!" << llendl; +// LL_WARNS() << "Creating new tree!" << LL_ENDL; // res = new LLVOTree(id, pcode, regionp); break; res = NULL; break; case LL_VO_SURFACE_PATCH: @@ -200,7 +200,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco case LL_VO_WL_SKY: res = new LLVOWLSky(id, pcode, regionp); break; default: - llwarns << "Unknown object pcode " << (S32)pcode << llendl; + LL_WARNS() << "Unknown object pcode " << (S32)pcode << LL_ENDL; res = NULL; break; } return res; @@ -354,7 +354,7 @@ void LLViewerObject::markDead() { if (!mDead) { - //llinfos << "Marking self " << mLocalID << " as dead." << llendl; + //LL_INFOS() << "Marking self " << mLocalID << " as dead." << LL_ENDL; // Root object of this hierarchy unlinks itself. if (getParent()) @@ -376,7 +376,7 @@ void LLViewerObject::markDead() childp = mChildList.back(); if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR) { - //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl; + //LL_INFOS() << "Marking child " << childp->getLocalID() << " as dead." << LL_ENDL; childp->setParent(NULL); // LLViewerObject::markDead 1 childp->markDead(); } @@ -446,17 +446,17 @@ void LLViewerObject::markDead() void LLViewerObject::dump() const { - llinfos << "Type: " << pCodeToString(mPrimitiveCode) << llendl; - llinfos << "Drawable: " << (LLDrawable *)mDrawable << llendl; - llinfos << "Update Age: " << LLFrameTimer::getElapsedSeconds() - mLastMessageUpdateSecs << llendl; - - llinfos << "Parent: " << getParent() << llendl; - llinfos << "ID: " << mID << llendl; - llinfos << "LocalID: " << mLocalID << llendl; - llinfos << "PositionRegion: " << getPositionRegion() << llendl; - llinfos << "PositionAgent: " << getPositionAgent() << llendl; - llinfos << "PositionGlobal: " << getPositionGlobal() << llendl; - llinfos << "Velocity: " << getVelocity() << llendl; + LL_INFOS() << "Type: " << pCodeToString(mPrimitiveCode) << LL_ENDL; + LL_INFOS() << "Drawable: " << (LLDrawable *)mDrawable << LL_ENDL; + LL_INFOS() << "Update Age: " << LLFrameTimer::getElapsedSeconds() - mLastMessageUpdateSecs << LL_ENDL; + + LL_INFOS() << "Parent: " << getParent() << LL_ENDL; + LL_INFOS() << "ID: " << mID << LL_ENDL; + LL_INFOS() << "LocalID: " << mLocalID << LL_ENDL; + LL_INFOS() << "PositionRegion: " << getPositionRegion() << LL_ENDL; + LL_INFOS() << "PositionAgent: " << getPositionAgent() << LL_ENDL; + LL_INFOS() << "PositionGlobal: " << getPositionGlobal() << LL_ENDL; + LL_INFOS() << "Velocity: " << getVelocity() << LL_ENDL; if (mDrawable.notNull() && mDrawable->getNumFaces() && mDrawable->getFace(0)) @@ -464,31 +464,31 @@ void LLViewerObject::dump() const LLFacePool *poolp = mDrawable->getFace(0)->getPool(); if (poolp) { - llinfos << "Pool: " << poolp << llendl; - llinfos << "Pool reference count: " << poolp->mReferences.size() << llendl; + LL_INFOS() << "Pool: " << poolp << LL_ENDL; + LL_INFOS() << "Pool reference count: " << poolp->mReferences.size() << LL_ENDL; } } - //llinfos << "BoxTree Min: " << mDrawable->getBox()->getMin() << llendl; - //llinfos << "BoxTree Max: " << mDrawable->getBox()->getMin() << llendl; + //LL_INFOS() << "BoxTree Min: " << mDrawable->getBox()->getMin() << LL_ENDL; + //LL_INFOS() << "BoxTree Max: " << mDrawable->getBox()->getMin() << LL_ENDL; /* - llinfos << "Velocity: " << getVelocity() << llendl; - llinfos << "AnyOwner: " << permAnyOwner() << " YouOwner: " << permYouOwner() << " Edit: " << mPermEdit << llendl; - llinfos << "UsePhysics: " << flagUsePhysics() << " CanSelect " << mbCanSelect << " UserSelected " << mUserSelected << llendl; - llinfos << "AppAngle: " << mAppAngle << llendl; - llinfos << "PixelArea: " << mPixelArea << llendl; + LL_INFOS() << "Velocity: " << getVelocity() << LL_ENDL; + LL_INFOS() << "AnyOwner: " << permAnyOwner() << " YouOwner: " << permYouOwner() << " Edit: " << mPermEdit << LL_ENDL; + LL_INFOS() << "UsePhysics: " << flagUsePhysics() << " CanSelect " << mbCanSelect << " UserSelected " << mUserSelected << LL_ENDL; + LL_INFOS() << "AppAngle: " << mAppAngle << LL_ENDL; + LL_INFOS() << "PixelArea: " << mPixelArea << LL_ENDL; char buffer[1000]; char *key; for (key = mNameValuePairs.getFirstKey(); key; key = mNameValuePairs.getNextKey() ) { mNameValuePairs[key]->printNameValue(buffer); - llinfos << buffer << llendl; + LL_INFOS() << buffer << LL_ENDL; } for (child_list_t::iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) { LLViewerObject* child = *iter; - llinfos << " child " << child->getID() << llendl; + LL_INFOS() << " child " << child->getID() << LL_ENDL; } */ } @@ -499,7 +499,7 @@ void LLViewerObject::printNameValuePairs() const iter != mNameValuePairs.end(); iter++) { LLNameValue* nv = iter->second; - llinfos << nv->printNameValue() << llendl; + LL_INFOS() << nv->printNameValue() << LL_ENDL; } } @@ -508,7 +508,7 @@ void LLViewerObject::initVOClasses() // Initialized shared class stuff first. LLVOAvatar::initClass(); LLVOTree::initClass(); - llinfos << "Viewer Object size: " << sizeof(LLViewerObject) << llendl; + LL_INFOS() << "Viewer Object size: " << sizeof(LLViewerObject) << LL_ENDL; LLVOGrass::initClass(); LLVOWater::initClass(); LLVOVolume::initClass(); @@ -745,7 +745,7 @@ void LLViewerObject::buildReturnablesForChildrenVO( std::vectorgetSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ObjectData); mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num); @@ -1663,7 +1663,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, case OUT_TERSE_IMPROVED: { #ifdef DEBUG_UPDATE_TYPE - llinfos << "CompTI:" << getID() << llendl; + LL_INFOS() << "CompTI:" << getID() << LL_ENDL; #endif U8 value; dp->unpackU8(value, "agent"); @@ -1709,7 +1709,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, case OUT_FULL_CACHED: { #ifdef DEBUG_UPDATE_TYPE - llinfos << "CompFull:" << getID() << llendl; + LL_INFOS() << "CompFull:" << getID() << LL_ENDL; #endif mCostStale = true; @@ -1845,7 +1845,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, S32 param_size; dp->unpackU16(param_type, "param_type"); dp->unpackBinaryData(param_block, param_size, "param_data"); - //llinfos << "Param type: " << param_type << ", Size: " << param_size << llendl; + //LL_INFOS() << "Param type: " << param_type << ", Size: " << param_size << LL_ENDL; LLDataPackerBinaryBuffer dp2(param_block, param_size); unpackParameterEntry(param_type, &dp2); } @@ -1940,7 +1940,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (sent_parentp && sent_parentp->getParent() == this) { // Try to recover if we attempt to attach a parent to its child - llwarns << "Attempt to attach a parent to it's child: " << this->getID() << " to " << sent_parentp->getID() << llendl; + LL_WARNS() << "Attempt to attach a parent to it's child: " << this->getID() << " to " << sent_parentp->getID() << LL_ENDL; this->removeChild(sent_parentp); sent_parentp->setDrawableParent(NULL); } @@ -1959,7 +1959,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { if (mDrawable->isDead() || !mDrawable->getVObj()) { - llwarns << "Drawable is dead or no VObj!" << llendl; + LL_WARNS() << "Drawable is dead or no VObj!" << LL_ENDL; sent_parentp->addChild(this); } else @@ -1969,9 +1969,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Bad, we got a cycle somehow. // Kill both the parent and the child, and // set cache misses for both of them. - llwarns << "Attempting to recover from parenting cycle!" << llendl; - llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl; - llwarns << "Adding to cache miss list" << llendl; + LL_WARNS() << "Attempting to recover from parenting cycle!" << LL_ENDL; + LL_WARNS() << "Killing " << sent_parentp->getID() << " and " << getID() << LL_ENDL; + LL_WARNS() << "Adding to cache miss list" << LL_ENDL; setParent(NULL); sent_parentp->setParent(NULL); getRegion()->addCacheMissFull(getLocalID()); @@ -2038,7 +2038,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, //LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() ); //if (parent_uuid != cur_parentp->getID() ) //{ - // llerrs << "Local ID match but UUID mismatch of viewer object" << llendl; + // LL_ERRS() << "Local ID match but UUID mismatch of viewer object" << LL_ENDL; //} } else @@ -2120,9 +2120,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Bad, we got a cycle somehow. // Kill both the parent and the child, and // set cache misses for both of them. - llwarns << "Attempting to recover from parenting cycle!" << llendl; - llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl; - llwarns << "Adding to cache miss list" << llendl; + LL_WARNS() << "Attempting to recover from parenting cycle!" << LL_ENDL; + LL_WARNS() << "Killing " << sent_parentp->getID() << " and " << getID() << LL_ENDL; + LL_WARNS() << "Adding to cache miss list" << LL_ENDL; setParent(NULL); sent_parentp->setParent(NULL); getRegion()->addCacheMissFull(getLocalID()); @@ -2154,7 +2154,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // This is probably an object flying across a region boundary, the // object probably ISN'T being reparented, but just got an object // update out of order (child update before parent). - //llinfos << "Don't reparent object handoffs!" << llendl; + //LL_INFOS() << "Don't reparent object handoffs!" << LL_ENDL; remove_parent = false; } } @@ -2196,7 +2196,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } else { - llwarns << "findCircuit() returned NULL; skipping interpolation" << llendl; + LL_WARNS() << "findCircuit() returned NULL; skipping interpolation" << LL_ENDL; } } @@ -2250,7 +2250,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } else { - llwarns << "Can not move the object/avatar to an infinite location!" << llendl ; + LL_WARNS() << "Can not move the object/avatar to an infinite location!" << LL_ENDL ; retval |= INVALID_UPDATE ; } @@ -2367,7 +2367,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Don't clear invisibility flag on update if still orphaned! if (mDrawable->isState(LLDrawable::FORCE_INVISIBLE) && !mOrphaned) { -// lldebugs << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << llendl; +// LL_DEBUGS() << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << LL_ENDL; mDrawable->clearState(LLDrawable::FORCE_INVISIBLE); gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL, TRUE ); } @@ -2503,7 +2503,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) if (time_since_last_update > sMaxUpdateInterpolationTime) { // Past the time limit, so stop the object phase_out = 0.0; - //llinfos << "Motion phase out to zero" << llendl; + //LL_INFOS() << "Motion phase out to zero" << LL_ENDL; // Kill angular motion as well. Note - not adding this due to paranoia // about stopping rotation for llTargetOmega objects and not having it restart @@ -2513,13 +2513,13 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) { // Last update was already phased out a bit phase_out = (sMaxUpdateInterpolationTime - time_since_last_update) / (sMaxUpdateInterpolationTime - time_since_last_interpolation); - //llinfos << "Continuing motion phase out of " << (F32) phase_out << llendl; + //LL_INFOS() << "Continuing motion phase out of " << (F32) phase_out << LL_ENDL; } else { // Phase out from full value phase_out = (sMaxUpdateInterpolationTime - time_since_last_update) / (sMaxUpdateInterpolationTime - sPhaseOutUpdateInterpolationTime); - //llinfos << "Starting motion phase out of " << (F32) phase_out << llendl; + //LL_INFOS() << "Starting motion phase out of " << (F32) phase_out << LL_ENDL; } phase_out = llclamp(phase_out, 0.0, 1.0); @@ -2564,8 +2564,8 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) if (clip_pos_global != new_pos_global) { // Was clipped, so this means we hit a edge where there is no region to enter - //llinfos << "Hit empty region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global) - // << " from " << new_pos << llendl; + //LL_INFOS() << "Hit empty region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global) + // << " from " << new_pos << LL_ENDL; new_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global); // Stop motion and get server update for bouncing on the edge @@ -2574,7 +2574,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) } else { // Let predicted movement cross into another region - //llinfos << "Predicting region crossing to " << new_pos << llendl; + //LL_INFOS() << "Predicting region crossing to " << new_pos << LL_ENDL; } } @@ -2722,7 +2722,7 @@ void LLViewerObject::saveScript( * XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the * interaction with doUpdateInventory() called below. */ - lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl; + LL_DEBUGS() << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << LL_ENDL; LLPointer task_item = new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(), item->getAssetUUID(), item->getType(), @@ -2753,7 +2753,7 @@ void LLViewerObject::saveScript( void LLViewerObject::moveInventory(const LLUUID& folder_id, const LLUUID& item_id) { - lldebugs << "LLViewerObject::moveInventory " << item_id << llendl; + LL_DEBUGS() << "LLViewerObject::moveInventory " << item_id << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveTaskInventory); msg->nextBlockFast(_PREHASH_AgentData); @@ -2870,12 +2870,12 @@ struct LLFilenameAndTask LLFilenameAndTask() { ++sCount; - lldebugs << "Constructing LLFilenameAndTask: " << sCount << llendl; + LL_DEBUGS() << "Constructing LLFilenameAndTask: " << sCount << LL_ENDL; } ~LLFilenameAndTask() { --sCount; - lldebugs << "Destroying LLFilenameAndTask: " << sCount << llendl; + LL_DEBUGS() << "Destroying LLFilenameAndTask: " << sCount << LL_ENDL; } private: LLFilenameAndTask(const LLFilenameAndTask& rhs); @@ -2895,8 +2895,8 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) LLViewerObject* object = gObjectList.findObject(task_id); if(!object) { - llwarns << "LLViewerObject::processTaskInv object " - << task_id << " does not exist." << llendl; + LL_WARNS() << "LLViewerObject::processTaskInv object " + << task_id << " does not exist." << LL_ENDL; return; } @@ -2910,7 +2910,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) if(ft->mFilename.empty()) { - lldebugs << "Task has no inventory" << llendl; + LL_DEBUGS() << "Task has no inventory" << LL_ENDL; // mock up some inventory to make a drop target. if(object->mInventory) { @@ -2970,15 +2970,15 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS // MAINT-2597 - crash when trying to edit a no-mod object // Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?) // Stated repro was specific to no-mod objects so failing without user interaction should be safe. - llwarns << "Trying to load invalid task inventory file. Ignoring file contents." << llendl; + LL_WARNS() << "Trying to load invalid task inventory file. Ignoring file contents." << LL_ENDL; } } else { // This Occurs When to requests were made, and the first one // has already handled it. - lldebugs << "Problem loading task inventory. Return code: " - << error_code << llendl; + LL_DEBUGS() << "Problem loading task inventory. Return code: " + << error_code << LL_ENDL; } delete ft; } @@ -3019,8 +3019,8 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) } else { - llwarns << "Unknown token in inventory file '" - << keyword << "'" << llendl; + LL_WARNS() << "Unknown token in inventory file '" + << keyword << "'" << LL_ENDL; } } ifs.close(); @@ -3028,8 +3028,8 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) } else { - llwarns << "unable to load task inventory: " << filename_and_local_path - << llendl; + LL_WARNS() << "unable to load task inventory: " << filename_and_local_path + << LL_ENDL; return FALSE; } doInventoryCallback(); @@ -3053,7 +3053,7 @@ void LLViewerObject::doInventoryCallback() } else { - llinfos << "LLViewerObject::doInventoryCallback() deleting bad listener entry." << llendl; + LL_INFOS() << "LLViewerObject::doInventoryCallback() deleting bad listener entry." << LL_ENDL; delete info; mInventoryCallbacks.erase(curiter); } @@ -3201,7 +3201,7 @@ LLInventoryObject* LLViewerObject::getInventoryRoot() LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id) { if (mInventoryDirty) - llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl; + LL_WARNS() << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << LL_ENDL; LLViewerInventoryItem* rv = NULL; if(mInventory) @@ -3606,7 +3606,7 @@ void LLViewerObject::addNVPair(const std::string& data) // char splat[MAX_STRING]; // temp->printNameValue(splat); -// llinfos << "addNVPair " << splat << llendl; +// LL_INFOS() << "addNVPair " << splat << LL_ENDL; name_value_map_t::iterator iter = mNameValuePairs.find(nv->mName); if (iter != mNameValuePairs.end()) @@ -3620,7 +3620,7 @@ void LLViewerObject::addNVPair(const std::string& data) else { delete nv; -// llinfos << "Trying to write to Read Only NVPair " << temp->mName << " in addNVPair()" << llendl; +// LL_INFOS() << "Trying to write to Read Only NVPair " << temp->mName << " in addNVPair()" << LL_ENDL; return; } } @@ -3631,7 +3631,7 @@ BOOL LLViewerObject::removeNVPair(const std::string& name) { char* canonical_name = gNVNameTable.addString(name); - lldebugs << "LLViewerObject::removeNVPair(): " << name << llendl; + LL_DEBUGS() << "LLViewerObject::removeNVPair(): " << name << LL_ENDL; name_value_map_t::iterator iter = mNameValuePairs.find(canonical_name); if (iter != mNameValuePairs.end()) @@ -3657,7 +3657,7 @@ BOOL LLViewerObject::removeNVPair(const std::string& name) } else { - lldebugs << "removeNVPair - No region for object" << llendl; + LL_DEBUGS() << "removeNVPair - No region for object" << LL_ENDL; } } return FALSE; @@ -4437,7 +4437,7 @@ S32 LLViewerObject::setTEColor(const U8 te, const LLColor4& color) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (color != tep->getColor()) { @@ -4457,7 +4457,7 @@ S32 LLViewerObject::setTEBumpmap(const U8 te, const U8 bump) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (bump != tep->getBumpmap()) { @@ -4478,7 +4478,7 @@ S32 LLViewerObject::setTETexGen(const U8 te, const U8 texgen) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (texgen != tep->getTexGen()) { @@ -4494,7 +4494,7 @@ S32 LLViewerObject::setTEMediaTexGen(const U8 te, const U8 media) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (media != tep->getMediaTexGen()) { @@ -4510,7 +4510,7 @@ S32 LLViewerObject::setTEShiny(const U8 te, const U8 shiny) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (shiny != tep->getShiny()) { @@ -4526,7 +4526,7 @@ S32 LLViewerObject::setTEFullbright(const U8 te, const U8 fullbright) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (fullbright != tep->getFullbright()) { @@ -4548,7 +4548,7 @@ S32 LLViewerObject::setTEMediaFlags(const U8 te, const U8 media_flags) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (media_flags != tep->getMediaFlags()) { @@ -4571,7 +4571,7 @@ S32 LLViewerObject::setTEGlow(const U8 te, const F32 glow) const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; } else if (glow != tep->getGlow()) { @@ -4614,7 +4614,7 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri const LLTextureEntry *tep = getTE(te); if (!tep) { - llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + LL_WARNS() << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL; return 0; } @@ -4735,7 +4735,7 @@ LLViewerTexture *LLViewerObject::getTEImage(const U8 face) const } } - llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl; + LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL; return NULL; } @@ -4758,7 +4758,7 @@ LLViewerTexture *LLViewerObject::getTENormalMap(const U8 face) const } } - llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl; + LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL; return NULL; } @@ -4780,14 +4780,14 @@ LLViewerTexture *LLViewerObject::getTESpecularMap(const U8 face) const } } - llerrs << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << llendl; + LL_ERRS() << llformat("Requested Image from invalid face: %d/%d",face,getNumTEs()) << LL_ENDL; return NULL; } void LLViewerObject::fitFaceTexture(const U8 face) { - llinfos << "fitFaceTexture not implemented" << llendl; + LL_INFOS() << "fitFaceTexture not implemented" << LL_ENDL; } @@ -5036,7 +5036,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) { -// llinfos << "Making particle system with owner " << owner_id << llendl; +// LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL; pss->setOwnerUUID(owner_id); mPartSourcep = pss; LLViewerPartSim::getInstance()->addPartSource(pss); @@ -5083,7 +5083,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_ // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) { -// llinfos << "Making particle system with owner " << owner_id << llendl; +// LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL; pss->setOwnerUUID(owner_id); mPartSourcep = pss; LLViewerPartSim::getInstance()->addPartSource(pss); @@ -5167,7 +5167,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow // At least, this appears to be how the scripts work. // The attached sound ID is set to NULL to avoid it playing back when the // object rezzes in on non-looping sounds. - //llinfos << "Clearing attached sound " << mAudioSourcep->getCurrentData()->getID() << llendl; + //LL_INFOS() << "Clearing attached sound " << mAudioSourcep->getCurrentData()->getID() << LL_ENDL; gAudiop->cleanupAudioSource(mAudioSourcep); mAudioSourcep = NULL; } @@ -5182,7 +5182,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow && mAudioSourcep && mAudioSourcep->isLoop() && mAudioSourcep->getCurrentData() && mAudioSourcep->getCurrentData()->getID() == audio_uuid) { - //llinfos << "Already playing this sound on a loop, ignoring" << llendl; + //LL_INFOS() << "Already playing this sound on a loop, ignoring" << LL_ENDL; return; } @@ -5196,7 +5196,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow if (mAudioSourcep && mAudioSourcep->isMuted() && mAudioSourcep->getCurrentData() && mAudioSourcep->getCurrentData()->getID() == audio_uuid) { - //llinfos << "Already having this sound as muted sound, ignoring" << llendl; + //LL_INFOS() << "Already having this sound as muted sound, ignoring" << LL_ENDL; return; } @@ -5219,7 +5219,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow // Play this sound if region maturity permits if( gAgent.canAccessMaturityAtGlobal(this->getPositionGlobal()) ) { - //llinfos << "Playing attached sound " << audio_uuid << llendl; + //LL_INFOS() << "Playing attached sound " << audio_uuid << LL_ENDL; mAudioSourcep->play(audio_uuid); } } @@ -5302,7 +5302,7 @@ LLViewerObject::ExtraParameter* LLViewerObject::createNewParameterEntry(U16 para } default: { - llinfos << "Unknown param type." << llendl; + LL_INFOS() << "Unknown param type." << LL_ENDL; break; } }; @@ -5440,7 +5440,7 @@ void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL } else { - llwarns << "Failed to send object extra parameters: " << param_type << llendl; + LL_WARNS() << "Failed to send object extra parameters: " << param_type << LL_ENDL; } } } @@ -5705,7 +5705,7 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp) { if (!regionp) { - llwarns << "viewer object set region to NULL" << llendl; + LL_WARNS() << "viewer object set region to NULL" << LL_ENDL; } if(regionp != mRegionp) { @@ -5738,10 +5738,10 @@ void LLViewerObject::updateRegion(LLViewerRegion *regionp) // if (regionp) // { // F64 now = LLFrameTimer::getElapsedSeconds(); -// llinfos << "Updating to region " << regionp->getName() +// LL_INFOS() << "Updating to region " << regionp->getName() // << ", ms since last update message: " << (F32)((now - mLastMessageUpdateSecs) * 1000.0) // << ", ms since last interpolation: " << (F32)((now - mLastInterpUpdateSecs) * 1000.0) -// << llendl; +// << LL_ENDL; // } } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index d61b6ba18a..e8f68527e9 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -170,7 +170,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) U64 ipport = (((U64)ip) << 32) | (U64)port; U32 index = sIPAndPortToIndex[ipport]; - // llinfos << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << llendl; + // LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; U64 indexid = (((U64)index) << 32) | (U64)local_id; @@ -187,8 +187,8 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) return TRUE; } // UUIDs did not match - this would zap a valid entry, so don't erase it - //llinfos << "Tried to erase entry where id in table (" - // << iter->second << ") did not match object " << object.getID() << llendl; + //LL_INFOS() << "Tried to erase entry where id in table (" + // << iter->second << ") did not match object " << object.getID() << LL_ENDL; } return FALSE ; @@ -213,8 +213,8 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, sIndexAndLocalIDToUUID[indexid] = id; - //llinfos << "Adding object to table, full ID " << id - // << ", local ID " << local_id << ", ip " << ip << ":" << port << llendl; + //LL_INFOS() << "Adding object to table, full ID " << id + // << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; } S32 gFullObjectUpdates = 0; @@ -277,8 +277,8 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, { if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() ) { - // llinfos << "DEBUG selecting " << objectp->mID << " " - // << objectp->mLocalID << llendl; + // LL_INFOS() << "DEBUG selecting " << objectp->mID << " " + // << objectp->mLocalID << LL_ENDL; LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); dialog_refresh_all(); } @@ -350,7 +350,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* if (!objectp) { - llinfos << "createObject failure for object: " << fullid << llendl; + LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL; recorder.objectUpdateFailure(entry->getLocalID(), OUT_FULL_CACHED, 0); return NULL; } @@ -360,7 +360,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* if (objectp->isDead()) { - llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL; } processUpdateCore(objectp, NULL, 0, OUT_FULL_CACHED, cached_dpp, justCreated, true); @@ -395,7 +395,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, // I don't think this case is ever hit. TODO* Test this. if (!compressed && update_type != OUT_FULL) { - //llinfos << "TEST: !cached && !compressed && update_type != OUT_FULL" << llendl; + //LL_INFOS() << "TEST: !cached && !compressed && update_type != OUT_FULL" << LL_ENDL; gTerseObjectUpdates += num_objects; /* S32 size; @@ -407,7 +407,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { size = mesgsys->getReceiveSize(); } - llinfos << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + LL_INFOS() << "Received terse " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL; */ } else @@ -423,7 +423,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, size = mesgsys->getReceiveSize(); } - llinfos << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << llendl; + LL_INFOS() << "Received " << num_objects << " in " << size << " byte (" << size/num_objects << ")" << LL_ENDL; */ gFullObjectUpdates += num_objects; } @@ -435,7 +435,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (!regionp) { - llwarns << "Object update from unknown region! " << region_handle << llendl; + LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL; return; } @@ -487,7 +487,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, gMessageSystem->getSenderPort()); if (fullid.isNull()) { - // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << llendl; + // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL; mNumUnknownUpdates++; } } @@ -503,7 +503,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, gMessageSystem->getSenderPort()); if (fullid.isNull()) { - // llwarns << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << llendl; + // LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << LL_ENDL; mNumUnknownUpdates++; } } @@ -514,7 +514,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, 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; + // LL_INFOS() << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << LL_ENDL; } objectp = findObject(fullid); @@ -532,13 +532,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { //if (objectp->getRegion()) //{ - // llinfos << "Local ID change: Removing object from table, local ID " << objectp->mLocalID + // LL_INFOS() << "Local ID change: Removing object from table, local ID " << objectp->mLocalID // << ", id from message " << local_id << ", from " // << LLHost(objectp->getRegion()->getHost().getAddress(), objectp->getRegion()->getHost().getPort()) // << ", full id " << fullid // << ", objects id " << objectp->getID() // << ", regionp " << (U32) regionp << ", object region " << (U32) objectp->getRegion() - // << llendl; + // << LL_ENDL; //} removeFromLocalIDTable(objectp); setUUIDAndLocal(fullid, @@ -563,7 +563,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type == OUT_TERSE_IMPROVED) { - // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; + // LL_INFOS() << "terse update for an unknown object (compressed):" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -572,7 +572,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { if (update_type != OUT_FULL) { - //llinfos << "terse update for an unknown object:" << fullid << llendl; + //LL_INFOS() << "terse update for an unknown object:" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -585,7 +585,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; - //llinfos << "update for a dead object:" << fullid << llendl; + //LL_INFOS() << "update for a dead object:" << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -594,7 +594,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender()); if (!objectp) { - llinfos << "createObject failure for object: " << fullid << llendl; + LL_INFOS() << "createObject failure for object: " << fullid << LL_ENDL; recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } @@ -605,7 +605,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (objectp->isDead()) { - llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl; + LL_WARNS() << "Dead object " << objectp->mID << " in UUID map 1!" << LL_ENDL; } bool bCached = false; @@ -671,7 +671,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); if (!regionp) { - llwarns << "Object update from unknown region! " << region_handle << llendl; + LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL; return; } @@ -810,10 +810,10 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns + LL_WARNS() << "Transport error requesting object cost " << "[status: " << statusNum << "]: " - << content << llendl; + << content << LL_ENDL; // TODO*: Error message to user // For now just clear the request from the pending list @@ -826,11 +826,11 @@ public: { // Improper response or the request had an error, // show an error to the user? - llwarns + LL_WARNS() << "Application level error when fetching object " << "cost. Message: " << content["error"]["message"].asString() << ", identifier: " << content["error"]["identifier"].asString() - << llendl; + << LL_ENDL; // TODO*: Adaptively adjust request size if the // service says we've requested too many and retry @@ -899,10 +899,10 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns + LL_WARNS() << "Transport error requesting object physics flags " << "[status: " << statusNum << "]: " - << content << llendl; + << content << LL_ENDL; // TODO*: Error message to user // For now just clear the request from the pending list @@ -915,11 +915,11 @@ public: { // Improper response or the request had an error, // show an error to the user? - llwarns + LL_WARNS() << "Application level error when fetching object " << "physics flags. Message: " << content["error"]["message"].asString() << ", identifier: " << content["error"]["identifier"].asString() - << llendl; + << LL_ENDL; // TODO*: Adaptively adjust request size if the // service says we've requested too many and retry @@ -984,7 +984,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) phase_out_time < 0.0 || phase_out_time > interp_time) { - llwarns << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << llendl; + LL_WARNS() << "Invalid values for InterpolationTime or InterpolationPhaseOut, resetting to defaults" << LL_ENDL; interp_time = 3.0f; phase_out_time = 1.0f; } @@ -1044,7 +1044,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) else { // There shouldn't be any NULL pointers in the list, but they have caused // crashes before. This may be idleUpdate() messing with the list. - llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; + LL_WARNS() << "LLViewerObjectList::update has a NULL objectp" << LL_ENDL; } } } @@ -1280,7 +1280,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { - llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; + LL_INFOS() << "Object " << objectp->mID << " already on dead list!" << LL_ENDL; } else { @@ -1294,16 +1294,16 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) //if (objectp->getRegion()) //{ - // llinfos << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip " + // LL_INFOS() << "cleanupReferences removing object from table, local ID " << objectp->mLocalID << ", ip " // << objectp->getRegion()->getHost().getAddress() << ":" - // << objectp->getRegion()->getHost().getPort() << llendl; + // << objectp->getRegion()->getHost().getPort() << LL_ENDL; //} removeFromLocalIDTable(objectp); if (objectp->onActiveList()) { - //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << llendl; + //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << LL_ENDL; objectp->setOnActiveList(FALSE); removeFromActiveList(objectp); } @@ -1403,19 +1403,19 @@ void LLViewerObjectList::killAllObjects() if(!mObjects.empty()) { - llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << llendl; + LL_WARNS() << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << LL_ENDL; mObjects.clear(); } if (!mActiveObjects.empty()) { - llwarns << "Some objects still on active object list!" << llendl; + LL_WARNS() << "Some objects still on active object list!" << LL_ENDL; mActiveObjects.clear(); } if (!mMapObjects.empty()) { - llwarns << "Some objects still on map object list!" << llendl; + LL_WARNS() << "Some objects still on map object list!" << LL_ENDL; mMapObjects.clear(); } } @@ -1506,7 +1506,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) { if (active) { - //llinfos << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << llendl; + //LL_INFOS() << "Adding " << objectp->mID << " " << objectp->getPCodeString() << " to active list." << LL_ENDL; S32 idx = objectp->getListIndex(); if (idx <= -1) { @@ -1522,13 +1522,13 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) if (idx >= mActiveObjects.size() || mActiveObjects[idx] != objectp) { - llwarns << "Invalid object list index detected!" << llendl; + LL_WARNS() << "Invalid object list index detected!" << LL_ENDL; } } } else { - //llinfos << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << llendl; + //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << LL_ENDL; removeFromActiveList(objectp); objectp->setOnActiveList(FALSE); } @@ -1566,7 +1566,7 @@ void LLViewerObjectList::updateObjectCost(const LLUUID& object_id, F32 object_co void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id) { - //llwarns << "Failed to fetch object cost for object: " << object_id << llendl; + //LL_WARNS() << "Failed to fetch object cost for object: " << object_id << LL_ENDL; mPendingObjectCost.erase(object_id); } @@ -1605,7 +1605,7 @@ void LLViewerObjectList::updatePhysicsProperties(const LLUUID& object_id, void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) { - //llwarns << "Failed to fetch physics flags for object: " << object_id << llendl; + //LL_WARNS() << "Failed to fetch physics flags for object: " << object_id << LL_ENDL; mPendingPhysicsFlags.erase(object_id); } @@ -1708,7 +1708,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) if(dead_object_list.size() > 0) { - llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ; + LL_WARNS() << "There are " << dead_object_list.size() << " dead objects on the map!" << LL_ENDL ; for(std::set::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter) { @@ -1717,7 +1717,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) } if(region_object_list.size() > 0) { - llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ; + LL_WARNS() << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << LL_ENDL ; for(std::set::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter) { @@ -1983,7 +1983,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << LL_ENDL; return NULL; } @@ -2003,7 +2003,7 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL; return NULL; } @@ -2037,7 +2037,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp); if (!objectp) { -// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl; +// LL_WARNS() << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << LL_ENDL; return NULL; } if(regionp) @@ -2106,7 +2106,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip // object probably ISN'T being reparented, but just got an object // update out of order (child update before parent). make_invisible = false; - //llinfos << "Don't make object handoffs invisible!" << llendl; + //LL_INFOS() << "Don't make object handoffs invisible!" << LL_ENDL; } } @@ -2138,8 +2138,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) { if (objectp->isDead()) { - llwarns << "Trying to find orphans for dead obj " << objectp->mID - << ":" << objectp->getPCodeString() << llendl; + LL_WARNS() << "Trying to find orphans for dead obj " << objectp->mID + << ":" << objectp->getPCodeString() << LL_ENDL; return; } @@ -2179,8 +2179,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) { if (childp == objectp) { - llwarns << objectp->mID << " has self as parent, skipping!" - << llendl; + LL_WARNS() << objectp->mID << " has self as parent, skipping!" + << LL_ENDL; continue; } @@ -2213,7 +2213,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) } else { - llinfos << "Missing orphan child, removing from list" << llendl; + LL_INFOS() << "Missing orphan child, removing from list" << LL_ENDL; iter = mOrphanChildren.erase(iter); } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 2fabd50e97..20ed7d5562 100755 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -272,7 +272,7 @@ inline LLViewerObject *LLViewerObjectList::getObject(const S32 index) objectp = mObjects[index]; if (objectp->isDead()) { - //llwarns << "Dead object " << objectp->mID << " in getObject" << llendl; + //LL_WARNS() << "Dead object " << objectp->mID << " in getObject" << LL_ENDL; return NULL; } return objectp; diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index bba3d26e09..443468235a 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -470,7 +470,7 @@ bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry) { if (!mOctreeNode->remove(entry)) //this could cause *this* pointer to be destroyed, so no more function calls after this. { - OCT_ERRS << "Could not remove LLVOCacheEntry from LLVOCacheOctreeGroup" << llendl; + OCT_ERRS << "Could not remove LLVOCacheEntry from LLVOCacheOctreeGroup" << LL_ENDL; return false; } } @@ -622,7 +622,7 @@ void LLviewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNo } else { - OCT_ERRS << "LLviewerOctreeGroup redundancy detected." << llendl; + OCT_ERRS << "LLviewerOctreeGroup redundancy detected." << LL_ENDL; } unbound(); @@ -667,7 +667,7 @@ bool LLviewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4 { //don't do anything if there are no objects if (empty && mOctreeNode->getParent()) { //only root is allowed to be empty - OCT_ERRS << "Empty leaf found in octree." << llendl; + OCT_ERRS << "Empty leaf found in octree." << LL_ENDL; } return false; } @@ -862,7 +862,7 @@ void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, Octr } else { - OCT_ERRS << "LLOcclusionCullingGroup redundancy detected." << llendl; + OCT_ERRS << "LLOcclusionCullingGroup redundancy detected." << LL_ENDL; } unbound(); @@ -1437,10 +1437,10 @@ void LLViewerOctreeCull::visit(const OctreeNode* branch) void LLViewerOctreeDebug::visit(const OctreeNode* branch) { #if 0 - llinfos << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << llendl; + LL_INFOS() << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << LL_ENDL; for (U32 i = 0; i < branch->getChildCount(); i++) { - llinfos << "Child " << i << " : " << (U32)branch->getChild(i) << llendl; + LL_INFOS() << "Child " << i << " : " << (U32)branch->getChild(i) << LL_ENDL; } #endif LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0); @@ -1455,22 +1455,22 @@ void LLViewerOctreeDebug::processGroup(LLviewerOctreeGroup* group) LLVector3 vec[2]; vec[0].set(vec4[0].getF32ptr()); vec[1].set(vec4[1].getF32ptr()); - llinfos << "Bounds: " << vec[0] << " : " << vec[1] << llendl; + LL_INFOS() << "Bounds: " << vec[0] << " : " << vec[1] << LL_ENDL; vec4 = group->getExtents(); vec[0].set(vec4[0].getF32ptr()); vec[1].set(vec4[1].getF32ptr()); - llinfos << "Extents: " << vec[0] << " : " << vec[1] << llendl; + LL_INFOS() << "Extents: " << vec[0] << " : " << vec[1] << LL_ENDL; vec4 = group->getObjectBounds(); vec[0].set(vec4[0].getF32ptr()); vec[1].set(vec4[1].getF32ptr()); - llinfos << "ObjectBounds: " << vec[0] << " : " << vec[1] << llendl; + LL_INFOS() << "ObjectBounds: " << vec[0] << " : " << vec[1] << LL_ENDL; vec4 = group->getObjectExtents(); vec[0].set(vec4[0].getF32ptr()); vec[1].set(vec4[1].getF32ptr()); - llinfos << "ObjectExtents: " << vec[0] << " : " << vec[1] << llendl; + LL_INFOS() << "ObjectExtents: " << vec[0] << " : " << vec[1] << LL_ENDL; #endif } //-------------------------------------------------------------- diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 386b2fd400..b55154f889 100755 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -159,7 +159,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel) // static void LLViewerParcelMedia::play(LLParcel* parcel) { - lldebugs << "LLViewerParcelMedia::play" << llendl; + LL_DEBUGS() << "LLViewerParcelMedia::play" << LL_ENDL; if (!parcel) return; @@ -471,7 +471,7 @@ void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url) } else { - llwarns << "can't get ParcelNavigateMedia capability" << llendl; + LL_WARNS() << "can't get ParcelNavigateMedia capability" << LL_ENDL; } } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index b25d042d28..10a3cd517c 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -197,22 +197,22 @@ LLViewerParcelMgr::~LLViewerParcelMgr() void LLViewerParcelMgr::dump() { - llinfos << "Parcel Manager Dump" << llendl; - llinfos << "mSelected " << S32(mSelected) << llendl; - llinfos << "Selected parcel: " << llendl; - llinfos << mWestSouth << " to " << mEastNorth << llendl; + LL_INFOS() << "Parcel Manager Dump" << LL_ENDL; + LL_INFOS() << "mSelected " << S32(mSelected) << LL_ENDL; + LL_INFOS() << "Selected parcel: " << LL_ENDL; + LL_INFOS() << mWestSouth << " to " << mEastNorth << LL_ENDL; mCurrentParcel->dump(); - llinfos << "banning " << mCurrentParcel->mBanList.size() << llendl; + LL_INFOS() << "banning " << mCurrentParcel->mBanList.size() << LL_ENDL; access_map_const_iterator cit = mCurrentParcel->mBanList.begin(); access_map_const_iterator end = mCurrentParcel->mBanList.end(); for ( ; cit != end; ++cit) { - llinfos << "ban id " << (*cit).first << llendl; + LL_INFOS() << "ban id " << (*cit).first << LL_ENDL; } - llinfos << "Hover parcel:" << llendl; + LL_INFOS() << "Hover parcel:" << LL_ENDL; mHoverParcel->dump(); - llinfos << "Agent parcel:" << llendl; + LL_INFOS() << "Agent parcel:" << LL_ENDL; mAgentParcel->dump(); } @@ -947,7 +947,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) return; } - llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl; + LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL; // BUG: Only works for the region containing mWestSouthBottom LLVector3d east_north_region_check( mEastNorth ); @@ -970,7 +970,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) return; } - llinfos << "Region " << region->getOriginGlobal() << llendl; + LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL; LLSD payload; payload["owner_id"] = owner_id; @@ -1110,8 +1110,8 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy( if (is_claim) { - llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl; - llinfos << "Region " << region->getOriginGlobal() << llendl; + LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL; + LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL; // BUG: Only works for the region containing mWestSouthBottom LLVector3d east_north_region_check( mEastNorth ); @@ -1281,7 +1281,7 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth ); if (!region) return; - //llinfos << "found region: " << region->getName() << llendl; + //LL_INFOS() << "found region: " << region->getName() << LL_ENDL; LLSD body; std::string url = region->getCapability("ParcelPropertiesUpdate"); @@ -1291,8 +1291,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag U32 message_flags = 0x01; body["flags"] = ll_sd_from_U32(message_flags); parcel->packMessage(body); - llinfos << "Sending parcel properties update via capability to: " - << url << llendl; + LL_INFOS() << "Sending parcel properties update via capability to: " + << url << LL_ENDL; LLHTTPClient::post(url, body, new LLHTTPClient::Responder()); } else @@ -1386,7 +1386,7 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user) if (packed_overlay_size <= 0) { - llwarns << "Overlay size " << packed_overlay_size << llendl; + LL_WARNS() << "Overlay size " << packed_overlay_size << LL_ENDL; return; } @@ -1394,8 +1394,8 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user) S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS; if (packed_overlay_size != expected_size) { - llwarns << "Got parcel overlay size " << packed_overlay_size - << " expecting " << expected_size << llendl; + LL_WARNS() << "Got parcel overlay size " << packed_overlay_size + << " expecting " << expected_size << LL_ENDL; return; } @@ -1461,7 +1461,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use if (request_result == PARCEL_RESULT_NO_DATA) { // no valid parcel data - llinfos << "no valid parcel data" << llendl; + LL_INFOS() << "no valid parcel data" << LL_ENDL; return; } @@ -1493,9 +1493,9 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } else { - llinfos << "out of order agent parcel sequence id " << sequence_id + LL_INFOS() << "out of order agent parcel sequence id " << sequence_id << " last good " << parcel_mgr.mAgentParcelSequenceID - << llendl; + << LL_ENDL; return; } @@ -1743,7 +1743,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } else { - llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl; + LL_INFOS() << "Stopping parcel music (invalid audio stream URL)" << LL_ENDL; // clears the URL // null value causes fade out LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); @@ -1751,7 +1751,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } else if (!gAudiop->getInternetStreamURL().empty()) { - llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl; + LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL; // null value causes fade out LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null); } @@ -1779,7 +1779,7 @@ void LLViewerParcelMgr::optionally_start_music(const std::string& music_url) gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && gSavedSettings.getBOOL("MediaTentativeAutoPlay"))) { - llinfos << "Starting parcel music " << music_url << llendl; + LL_INFOS() << "Starting parcel music " << music_url << LL_ENDL; LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url); } else @@ -1808,7 +1808,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void if (parcel_id != parcel->getLocalID()) { LL_WARNS_ONCE("") << "processParcelAccessListReply for parcel " << parcel_id - << " which isn't the selected parcel " << parcel->getLocalID()<< llendl; + << " which isn't the selected parcel " << parcel->getLocalID()<< LL_ENDL; return; } diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index e29eef2dda..4fd423b6f4 100755 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -709,7 +709,7 @@ void LLViewerParcelOverlay::addPropertyLine( break; default: - llerrs << "Invalid edge in addPropertyLine" << llendl; + LL_ERRS() << "Invalid edge in addPropertyLine" << LL_ENDL; return; } diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index a23a15da32..978c307c60 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -125,7 +125,7 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo if (!mRegionp) { - //llwarns << "No region at position, using agent region!" << llendl; + //LL_WARNS() << "No region at position, using agent region!" << LL_ENDL; mRegionp = gAgent.getRegion(); } mCenterAgent = center_agent; @@ -451,12 +451,12 @@ void LLViewerPartSim::checkParticleCount(U32 size) { if(LLViewerPartSim::sParticleCount2 != LLViewerPartSim::sParticleCount) { - llerrs << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << llendl ; + LL_ERRS() << "sParticleCount: " << LLViewerPartSim::sParticleCount << " ; sParticleCount2: " << LLViewerPartSim::sParticleCount2 << LL_ENDL ; } if(size > (U32)LLViewerPartSim::sParticleCount2) { - llerrs << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << llendl ; + LL_ERRS() << "curren particle size: " << LLViewerPartSim::sParticleCount2 << " array size: " << size << LL_ENDL ; } } @@ -544,8 +544,8 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite()) { #if 0 && !LL_RELEASE_FOR_DOWNLOAD - llwarns << "LLViewerPartSim::put Part out of range!" << llendl; - llwarns << part->mPosAgent << llendl; + LL_WARNS() << "LLViewerPartSim::put Part out of range!" << LL_ENDL; + LL_WARNS() << part->mPosAgent << LL_ENDL; #endif } else @@ -574,9 +574,9 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) !(part->mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)); if (!groupp->addPart(part)) { - llwarns << "LLViewerPartSim::put - Particle didn't go into its box!" << llendl; - llinfos << groupp->getCenterAgent() << llendl; - llinfos << part->mPosAgent << llendl; + LL_WARNS() << "LLViewerPartSim::put - Particle didn't go into its box!" << LL_ENDL; + LL_INFOS() << groupp->getCenterAgent() << LL_ENDL; + LL_INFOS() << part->mPosAgent << LL_ENDL; mViewerPartGroups.pop_back() ; delete groupp; groupp = NULL ; @@ -758,7 +758,7 @@ void LLViewerPartSim::updateSimulation() updatePartBurstRate() ; - //llinfos << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << llendl; + //LL_INFOS() << "Particles: " << sParticleCount << " Adaptive Rate: " << sParticleAdaptiveRate << LL_ENDL; } void LLViewerPartSim::updatePartBurstRate() @@ -796,7 +796,7 @@ void LLViewerPartSim::addPartSource(LLPointer sourcep) { if (!sourcep) { - llwarns << "Null part source!" << llendl; + LL_WARNS() << "Null part source!" << LL_ENDL; return; } sourcep->setStart() ; diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index b311f659fb..e8ce82e087 100755 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -67,7 +67,7 @@ void LLViewerPartSource::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSource::update(const F32 dt) { - llerrs << "Creating default part source!" << llendl; + LL_ERRS() << "Creating default part source!" << LL_ENDL; } LLUUID LLViewerPartSource::getImageUUID() const @@ -371,7 +371,7 @@ void LLViewerPartSourceScript::update(const F32 dt) { part->mPosAgent = mPosAgent; part->mVelocity.setVec(0.f, 0.f, 0.f); - //llwarns << "Unknown source pattern " << (S32)mPartSysData.mPattern << llendl; + //LL_WARNS() << "Unknown source pattern " << (S32)mPartSysData.mPattern << LL_ENDL; } if (part->mFlags & LLPartData::LL_PART_FOLLOW_SRC_MASK || // SVC-193, VWR-717 diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 34a9767fdf..3ad1c6ab0a 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -299,8 +299,8 @@ public: void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) { - llwarns << "BaseCapabilitiesCompleteTracker error [status:" - << statusNum << "]: " << content << llendl; + LL_WARNS() << "BaseCapabilitiesCompleteTracker error [status:" + << statusNum << "]: " << content << LL_ENDL; } void result(const LLSD& content) @@ -314,17 +314,17 @@ public: for(iter = content.beginMap(); iter != content.endMap(); ++iter) { regionp->setCapabilityDebug(iter->first, iter->second); - //llinfos<<"BaseCapabilitiesCompleteTracker New Caps "<first<<" "<< iter->second<first<<" "<< iter->second<getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() ) { - llinfos<<"BaseCapabilitiesCompleteTracker "<<"Sim sent duplicate seed caps that differs in size - most likely content."<getRegionImpl()->mCapabilities.begin(); while (iter!=regionp->getRegionImpl()->mCapabilities.end() ) { - llinfos<<"BaseCapabilitiesCompleteTracker Original "<first<<" "<< iter->second<first<<" "<< iter->second<getEntry()->hasDrawable()); } return obj; @@ -1537,7 +1537,7 @@ U32 LLViewerRegion::getPacketsLost() const LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mImpl->mHost); if (!cdp) { - llinfos << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mImpl->mHost << llendl; + LL_INFOS() << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mImpl->mHost << LL_ENDL; return 0; } else @@ -1655,9 +1655,9 @@ public: avatar_locs->clear(); avatar_ids->clear(); - //llinfos << "coarse locations agent[0] " << input["body"]["AgentData"][0]["AgentID"].asUUID() << llendl; - //llinfos << "my agent id = " << gAgent.getID() << llendl; - //llinfos << ll_pretty_print_sd(input) << llendl; + //LL_INFOS() << "coarse locations agent[0] " << input["body"]["AgentData"][0]["AgentID"].asUUID() << LL_ENDL; + //LL_INFOS() << "my agent id = " << gAgent.getID() << LL_ENDL; + //LL_INFOS() << ll_pretty_print_sd(input) << LL_ENDL; LLSD locs = input["body"]["Location"], @@ -1694,11 +1694,11 @@ public: pos <<= 8; pos |= z; avatar_locs->push_back(pos); - //llinfos << "next pos: " << x << "," << y << "," << z << ": " << pos << llendl; + //LL_INFOS() << "next pos: " << x << "," << y << "," << z << ": " << pos << LL_ENDL; if(has_agent_data) // for backwards compatibility with old message format { LLUUID agent_id(agents_it->get("AgentID").asUUID()); - //llinfos << "next agent: " << agent_id.asString() << llendl; + //LL_INFOS() << "next agent: " << agent_id.asString() << LL_ENDL; avatar_ids->push_back(agent_id); } } @@ -1719,7 +1719,7 @@ LLHTTPRegistration // the deprecated coarse location handler void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg) { - //llinfos << "CoarseLocationUpdate" << llendl; + //LL_INFOS() << "CoarseLocationUpdate" << LL_ENDL; mMapAvatars.clear(); mMapAvatarIDs.clear(); // only matters in a rare case but it's good to be safe. @@ -1747,9 +1747,9 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg) msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id, i); } - //llinfos << " object X: " << (S32)x_pos << " Y: " << (S32)y_pos + //LL_INFOS() << " object X: " << (S32)x_pos << " Y: " << (S32)y_pos // << " Z: " << (S32)(z_pos * 4) - // << llendl; + // << LL_ENDL; // treat the target specially for the map if(i == target_index) @@ -1800,7 +1800,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) std::stringstream str; LLSDSerialize::toPrettyXML(sim_features, str); - llinfos << str.str() << llendl; + LL_INFOS() << str.str() << LL_ENDL; mSimulatorFeatures = sim_features; } @@ -2120,14 +2120,14 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss } else { - // llinfos << "CRC miss for " << local_id << llendl; + // LL_INFOS() << "CRC miss for " << local_id << LL_ENDL; addCacheMiss(local_id, CACHE_MISS_TYPE_CRC); } } else { - // llinfos << "Cache miss for " << local_id << llendl; + // LL_INFOS() << "Cache miss for " << local_id << LL_ENDL; addCacheMiss(local_id, CACHE_MISS_TYPE_FULL); } @@ -2182,7 +2182,7 @@ void LLViewerRegion::requestCacheMisses() } mCacheDirty = TRUE ; - // llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl; + // LL_INFOS() << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << LL_ENDL; LLViewerStatsRecorder::instance().requestCacheMissesEvent(mCacheMissList.size()); LLViewerStatsRecorder::instance().log(0.2f); @@ -2217,14 +2217,14 @@ void LLViewerRegion::dumpCache() change_bin[changes]++; } - llinfos << "Count " << mImpl->mCacheMap.size() << llendl; + LL_INFOS() << "Count " << mImpl->mCacheMap.size() << LL_ENDL; for (i = 0; i < BINS; i++) { - llinfos << "Hits " << i << " " << hit_bin[i] << llendl; + LL_INFOS() << "Hits " << i << " " << hit_bin[i] << LL_ENDL; } for (i = 0; i < BINS; i++) { - llinfos << "Changes " << i << " " << change_bin[i] << llendl; + LL_INFOS() << "Changes " << i << " " << change_bin[i] << LL_ENDL; } } @@ -2464,7 +2464,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) { - //llwarns << "Ignoring duplicate seed capability" << llendl; + //LL_WARNS() << "Ignoring duplicate seed capability" << LL_ENDL; //Instead of just returning we build up a second set of seed caps and compare them //to the "original" seed cap received and determine why there is problem! LLSD capabilityNames = LLSD::emptyArray(); @@ -2483,7 +2483,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames(capabilityNames); - llinfos << "posting to seed " << url << llendl; + LL_INFOS() << "posting to seed " << url << LL_ENDL; S32 id = ++mImpl->mHttpResponderID; LLHTTPClient::post(url, capabilityNames, @@ -2518,8 +2518,8 @@ void LLViewerRegion::failedSeedCapability() LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames(capabilityNames); - llinfos << "posting to seed " << url << " (retry " - << mImpl->mSeedCapAttempts << ")" << llendl; + LL_INFOS() << "posting to seed " << url << " (retry " + << mImpl->mSeedCapAttempts << ")" << LL_ENDL; S32 id = ++mImpl->mHttpResponderID; LLHTTPClient::post(url, capabilityNames, @@ -2620,7 +2620,7 @@ std::string LLViewerRegion::getCapability(const std::string& name) const { if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia"))) { - llwarns << "getCapability called before caps received" << llendl; + LL_WARNS() << "getCapability called before caps received" << LL_ENDL; } CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name); @@ -2665,10 +2665,10 @@ void LLViewerRegion::logActiveCapabilities() const { if (!iter->second.empty()) { - llinfos << iter->first << " URL is " << iter->second << llendl; + LL_INFOS() << iter->first << " URL is " << iter->second << LL_ENDL; } } - llinfos << "Dumped " << count << " entries." << llendl; + LL_INFOS() << "Dumped " << count << " entries." << LL_ENDL; } LLSpatialPartition* LLViewerRegion::getSpatialPartition(U32 type) diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 7d3c432fb3..745ca2c13d 100755 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -462,7 +462,7 @@ void LLViewerShaderMgr::setShaders() // Shaders LL_INFOS("ShaderLoading") << "\n~~~~~~~~~~~~~~~~~~\n Loading Shaders:\n~~~~~~~~~~~~~~~~~~" << LL_ENDL; - LL_INFOS("ShaderLoading") << llformat("Using GLSL %d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor) << llendl; + LL_INFOS("ShaderLoading") << llformat("Using GLSL %d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor) << LL_ENDL; for (S32 i = 0; i < SHADER_COUNT; i++) { diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index bb023ce422..8cb519b098 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -281,8 +281,8 @@ void LLViewerStats::addToMessage(LLSD &body) misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO); 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; + LL_INFOS() << "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) << LL_ENDL; } // *NOTE:Mani The following methods used to exist in viewer.cpp @@ -417,13 +417,13 @@ public: void error(U32 statusNum, const std::string& reason) { - llinfos << "ViewerStatsResponder::error " << statusNum << " " - << reason << llendl; + LL_INFOS() << "ViewerStatsResponder::error " << statusNum << " " + << reason << LL_ENDL; } void result(const LLSD& content) { - llinfos << "ViewerStatsResponder::result" << llendl; + LL_INFOS() << "ViewerStatsResponder::result" << LL_ENDL; } }; @@ -453,7 +453,7 @@ void send_stats() std::string url = gAgent.getRegion()->getCapability("ViewerStats"); if (url.empty()) { - llwarns << "Could not get ViewerStats capability" << llendl; + LL_WARNS() << "Could not get ViewerStats capability" << LL_ENDL; return; } @@ -606,8 +606,8 @@ void send_stats() F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds; misc["int_2"] = LLSD::Integer(grey_time); // Steve: 1.22 - llinfos << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << llendl; - llinfos << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << llendl; + LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL; + LL_INFOS() << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << LL_ENDL; body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames"); body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames"); @@ -633,7 +633,7 @@ LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_na void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name) { LLFrameTimer& timer = getPhaseTimer(phase_name); - lldebugs << "startPhase " << phase_name << llendl; + LL_DEBUGS() << "startPhase " << phase_name << LL_ENDL; timer.unpause(); } @@ -648,14 +648,14 @@ void LLViewerStats::PhaseMap::stopAllPhases() // Going from started to paused state - record stats. recordPhaseStat(phase_name,iter->second.getElapsedTimeF32()); } - lldebugs << "stopPhase (all) " << phase_name << llendl; + LL_DEBUGS() << "stopPhase (all) " << phase_name << LL_ENDL; iter->second.pause(); } } void LLViewerStats::PhaseMap::clearPhases() { - lldebugs << "clearPhases" << llendl; + LL_DEBUGS() << "clearPhases" << LL_ENDL; mPhaseMap.clear(); } diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 0e78bdc04c..b5ccf4ffa0 100755 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -49,7 +49,7 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() : { if (NULL != sInstance) { - llerrs << "Attempted to create multiple instances of LLViewerStatsRecorder!" << llendl; + LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL; } sInstance = this; clearStats(); @@ -132,7 +132,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU mObjectCacheHitSize += msg_size; break; default: - llwarns << "Unknown update_type" << llendl; + LL_WARNS() << "Unknown update_type" << LL_ENDL; break; }; } @@ -154,7 +154,7 @@ void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpd mObjectCacheUpdateReplacements++; break; default: - llwarns << "Unknown update_result type" << llendl; + LL_WARNS() << "Unknown update_result type" << LL_ENDL; break; }; } @@ -173,7 +173,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) if ( delta_time < interval || total_objects == 0) return; mLastSnapshotTime = LLTimer::getTotalSeconds(); - lldebugs << "ILX: " + LL_DEBUGS() << "ILX: " << mObjectCacheHitCount << " hits, " << mObjectCacheMissFullCount << " full misses, " << mObjectCacheMissCrcCount << " crc misses, " @@ -186,7 +186,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << mObjectCacheUpdateAdds << " cache update adds, " << mObjectCacheUpdateReplacements << " cache update replacements, " << mObjectUpdateFailures << " update failures" - << llendl; + << LL_ENDL; if (mObjectCacheFile == NULL) { @@ -220,12 +220,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) data_size = data_msg.str().size(); if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size) { - llwarns << "failed to write full headers to " << STATS_FILE_NAME << llendl; + LL_WARNS() << "failed to write full headers to " << STATS_FILE_NAME << LL_ENDL; } } else { - //llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; + //LL_WARNS() << "Couldn't open " << STATS_FILE_NAME << " for logging." << LL_ENDL; return; } } @@ -257,7 +257,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) data_size = data_msg.str().size(); if ( data_size != fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile )) { - llwarns << "Unable to write complete column data to " << STATS_FILE_NAME << llendl; + LL_WARNS() << "Unable to write complete column data to " << STATS_FILE_NAME << LL_ENDL; } clearStats(); diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index 4cd4375146..62e8da81ec 100755 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -118,7 +118,7 @@ void LLViewerTexLayerSetBuffer::destroyGLTexture() // static void LLViewerTexLayerSetBuffer::dumpTotalByteCount() { - llinfos << "Composite System GL Buffers: " << (LLViewerTexLayerSetBuffer::sGLByteCount/1024) << "KB" << llendl; + LL_INFOS() << "Composite System GL Buffers: " << (LLViewerTexLayerSetBuffer::sGLByteCount/1024) << "KB" << LL_ENDL; } void LLViewerTexLayerSetBuffer::requestUpdate() @@ -231,7 +231,7 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success) { if (!success) { - llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << llendl; + LL_INFOS() << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << LL_ENDL; mUploadPending = FALSE; } else @@ -363,7 +363,7 @@ BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate() void LLViewerTexLayerSetBuffer::doUpload() { LLViewerTexLayerSet* layer_set = getViewerTexLayerSet(); - LL_DEBUGS("Avatar") << "Uploading baked " << layer_set->getBodyRegionName() << llendl; + LL_DEBUGS("Avatar") << "Uploading baked " << layer_set->getBodyRegionName() << LL_ENDL; add(LLStatViewer::TEX_BAKES, 1); // Don't need caches since we're baked now. (note: we won't *really* be baked @@ -449,7 +449,7 @@ void LLViewerTexLayerSetBuffer::doUpload() LLSD body = LLSD::emptyMap(); // The responder will call LLViewerTexLayerSetBuffer::onTextureUploadComplete() LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data)); - llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; + LL_INFOS() << "Baked texture upload via capability of " << mUploadID << " to " << url << LL_ENDL; } else { @@ -460,7 +460,7 @@ void LLViewerTexLayerSetBuffer::doUpload() TRUE, // temp_file TRUE, // is_priority TRUE); // store_local - llinfos << "Baked texture upload via Asset Store." << llendl; + LL_INFOS() << "Baked texture upload via Asset Store." << LL_ENDL; } if (highest_lod) @@ -497,7 +497,7 @@ void LLViewerTexLayerSetBuffer::doUpload() mUploadPending = FALSE; LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE, LLVFile::WRITE); file.remove(); - llinfos << "Unable to create baked upload file (reason: corrupted)." << llendl; + LL_INFOS() << "Unable to create baked upload file (reason: corrupted)." << LL_ENDL; } } } @@ -505,7 +505,7 @@ void LLViewerTexLayerSetBuffer::doUpload() { // The VFS write file operation failed. mUploadPending = FALSE; - llinfos << "Unable to create baked upload file (reason: failed to write file)" << llendl; + LL_INFOS() << "Unable to create baked upload file (reason: failed to write file)" << LL_ENDL; } delete [] baked_color_data; @@ -587,14 +587,14 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, LLAvatarAppearanceDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->getViewerTexLayerSet()); // Update baked texture info with the new UUID U64 now = LLFrameTimer::getTotalTime(); // Record starting time - llinfos << "Baked" << resolution << "texture upload for " << name << " took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl; + LL_INFOS() << "Baked" << resolution << "texture upload for " << name << " took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << LL_ENDL; gAgentAvatarp->setNewBakedTexture(baked_te, uuid); } else { ++failures; S32 max_attempts = baked_upload_data->mIsHighestRes ? BAKE_UPLOAD_ATTEMPTS : 1; // only retry final bakes - llwarns << "Baked" << resolution << "texture upload for " << name << " failed (attempt " << failures << "/" << max_attempts << ")" << llendl; + LL_WARNS() << "Baked" << resolution << "texture upload for " << name << " failed (attempt " << failures << "/" << max_attempts << ")" << LL_ENDL; if (failures < max_attempts) { layerset_buffer->mUploadFailCount = failures; @@ -605,7 +605,7 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, } else { - llinfos << "Received baked texture out of date, ignored." << llendl; + LL_INFOS() << "Received baked texture out of date, ignored." << LL_ENDL; } gAgentAvatarp->dirtyMesh(); @@ -617,7 +617,7 @@ void LLViewerTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, // and rebake it at some point in the future (after login?)), // or this response to upload is out of date, in which case a // current response should be on the way or already processed. - llwarns << "Baked upload failed" << llendl; + LL_WARNS() << "Baked upload failed" << LL_ENDL; } delete baked_upload_data; @@ -694,7 +694,7 @@ void LLViewerTexLayerSet::createComposite() // Composite other avatars at reduced resolution if( !mAvatarAppearance->isSelf() ) { - llerrs << "composites should not be created for non-self avatars!" << llendl; + LL_ERRS() << "composites should not be created for non-self avatars!" << LL_ENDL; } mComposite = new LLViewerTexLayerSetBuffer( this, width, height ); } diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 16b51c457a..41a2c670e6 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -100,7 +100,7 @@ public: if (item_ptr.isNull()) { // check to prevent a crash. See EXT-8459. - llwarns << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << llendl; + LL_WARNS() << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << LL_ENDL; } else { @@ -143,7 +143,7 @@ public: LLInventoryItem* item = gInventory.getItem(inv_item); if(!item) { - llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl; + LL_WARNS() << "Item add reported, but not found in inventory!: " << inv_item << LL_ENDL; } else { @@ -438,7 +438,7 @@ llwchar LLEmbeddedItems::getEmbeddedCharFromIndex(S32 index) { if (index >= (S32)mEmbeddedIndexedChars.size()) { - llwarns << "No item for embedded char " << index << " using LL_UNKNOWN_CHAR" << llendl; + LL_WARNS() << "No item for embedded char " << index << " using LL_UNKNOWN_CHAR" << LL_ENDL; return LL_UNKNOWN_CHAR; } return mEmbeddedIndexedChars[index]; @@ -494,7 +494,7 @@ S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch) } else { - llwarns << "Embedded char " << wch << " not found, using 0" << llendl; + LL_WARNS() << "Embedded char " << wch << " not found, using 0" << LL_ENDL; return 0; } } @@ -920,7 +920,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, } handled = TRUE; - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << LL_ENDL; return handled; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ed74bc744a..eb8faacac2 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -222,7 +222,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTex if(report_error) { - llerrs << "not a fetched texture type: " << type << llendl ; + LL_ERRS() << "not a fetched texture type: " << type << LL_ENDL ; } return NULL ; @@ -620,7 +620,7 @@ LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) : LLViewerTexture::~LLViewerTexture() { - // LL_DEBUGS("Avatar") << mID << llendl; + // LL_DEBUGS("Avatar") << mID << LL_ENDL; cleanup(); sImageCount--; } @@ -664,9 +664,9 @@ void LLViewerTexture::dump() { LLGLTexture::dump(); - llinfos << "LLViewerTexture" + LL_INFOS() << "LLViewerTexture" << " mID " << mID - << llendl; + << LL_ENDL; } void LLViewerTexture::setBoostLevel(S32 level) @@ -727,7 +727,7 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) } if (!res) { - llwarns << "LLViewerTexture::bindDefaultImage failed." << llendl; + LL_WARNS() << "LLViewerTexture::bindDefaultImage failed." << LL_ENDL; } stop_glerror(); @@ -1125,7 +1125,7 @@ void LLViewerFetchedTexture::loadFromFastCache() { //discard all oversized textures. destroyRawImage(); - llwarns << "oversized, setting as missing" << llendl; + LL_WARNS() << "oversized, setting as missing" << LL_ENDL; setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL ; } @@ -1202,25 +1202,25 @@ void LLViewerFetchedTexture::dump() { LLViewerTexture::dump(); - llinfos << "Dump : " << mID + LL_INFOS() << "Dump : " << mID << ", mIsMissingAsset = " << (S32)mIsMissingAsset << ", mFullWidth = " << (S32)mFullWidth << ", mFullHeight = " << (S32)mFullHeight << ", mOrigWidth = " << (S32)mOrigWidth << ", mOrigHeight = " << (S32)mOrigHeight - << llendl; - llinfos << " : " + << LL_ENDL; + LL_INFOS() << " : " << " mFullyLoaded = " << (S32)mFullyLoaded << ", mFetchState = " << (S32)mFetchState << ", mFetchPriority = " << (S32)mFetchPriority << ", mDownloadProgress = " << (F32)mDownloadProgress - << llendl; - llinfos << " : " + << LL_ENDL; + LL_INFOS() << " : " << " mHasFetcher = " << (S32)mHasFetcher << ", mIsFetching = " << (S32)mIsFetching << ", mIsFetched = " << (S32)mIsFetched << ", mBoostLevel = " << (S32)mBoostLevel - << llendl; + << LL_ENDL; } /////////////////////////////////////////////////////////////////////////////// @@ -1236,7 +1236,7 @@ void LLViewerFetchedTexture::destroyTexture() return ; } - //LL_DEBUGS("Avatar") << mID << llendl; + //LL_DEBUGS("Avatar") << mID << LL_ENDL; destroyGLTexture() ; mFullyLoaded = FALSE ; } @@ -1341,12 +1341,12 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mNeedsCreateTexture = FALSE; if (mRawImage.isNull()) { - llerrs << "LLViewerTexture trying to create texture with no Raw Image" << llendl; + LL_ERRS() << "LLViewerTexture trying to create texture with no Raw Image" << LL_ENDL; } -// llinfos << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ", +// LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ", // mRawDiscardLevel, // mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize()) -// << mID.getString() << llendl; +// << mID.getString() << LL_ENDL; BOOL res = TRUE; // store original size only for locally-sourced images @@ -1381,14 +1381,14 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel; if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE ) { - llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl; + LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL; size_okay = false; } if (!LLImageGL::checkSize(mRawImage->getWidth(), mRawImage->getHeight())) { // A non power-of-two image was uploaded (through a non standard client) - llinfos << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << llendl; + LL_INFOS() << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << LL_ENDL; size_okay = false; } @@ -1397,7 +1397,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) // An inappropriately-sized image was uploaded (through a non standard client) // We treat these images as missing assets which causes them to // be renderd as 'missing image' and to stop requesting data - llwarns << "!size_ok, setting as missing" << llendl; + LL_WARNS() << "!size_ok, setting as missing" << LL_ENDL; setIsMissingAsset(); destroyRawImage(); return FALSE; @@ -1864,7 +1864,7 @@ bool LLViewerFetchedTexture::updateFetch() { //discard all oversized textures. destroyRawImage(); - llwarns << "oversize, setting as missing" << llendl; + LL_WARNS() << "oversize, setting as missing" << LL_ENDL; setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL ; mIsFetching = FALSE ; @@ -1894,16 +1894,16 @@ bool LLViewerFetchedTexture::updateFetch() // We finished but received no data if (current_discard < 0) { - llwarns << "!mIsFetching, setting as missing, decode_priority " << decode_priority + LL_WARNS() << "!mIsFetching, setting as missing, decode_priority " << decode_priority << " mRawDiscardLevel " << mRawDiscardLevel << " current_discard " << current_discard - << llendl; + << LL_ENDL; setIsMissingAsset(); desired_discard = -1; } else { - //llwarns << mID << ": Setting min discard to " << current_discard << llendl; + //LL_WARNS() << mID << ": Setting min discard to " << current_discard << LL_ENDL; mMinDiscardLevel = current_discard; desired_discard = current_discard; } @@ -1921,7 +1921,7 @@ bool LLViewerFetchedTexture::updateFetch() // // Useful debugging code for undesired deprioritization of textures. // if (decode_priority <= 0.0f && desired_discard >= 0 && desired_discard < current_discard) // { -// llinfos << "Calling updateRequestPriority() with decode_priority = 0.0f" << llendl; +// LL_INFOS() << "Calling updateRequestPriority() with decode_priority = 0.0f" << LL_ENDL; // calcDecodePriority(); // } static const F32 MAX_HOLD_TIME = 5.0f ; //seconds to wait before canceling fecthing if decode_priority is 0.f. @@ -2036,7 +2036,7 @@ bool LLViewerFetchedTexture::updateFetch() const F32 FETCH_IDLE_TIME = 5.f; if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME) { - LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << llendl; + LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << LL_ENDL; LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); mHasFetcher = FALSE; } @@ -2080,14 +2080,14 @@ void LLViewerFetchedTexture::setIsMissingAsset() { if (mUrl.empty()) { - llwarns << mID << ": Marking image as missing" << llendl; + LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL; } else { // This may or may not be an error - it is normal to have no // map tile on an empty region, but bad if we're failing on a // server bake texture. - llwarns << mUrl << ": Marking image as missing" << llendl; + LL_WARNS() << mUrl << ": Marking image as missing" << LL_ENDL; } if (mHasFetcher) { @@ -2142,7 +2142,7 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { // We need aux data, but we've already loaded the image, and it didn't have any - llwarns << "No aux data available for callback for image:" << getID() << llendl; + LL_WARNS() << "No aux data available for callback for image:" << getID() << LL_ENDL; } mLastCallBackActiveTime = sCurrentTime ; } @@ -2437,7 +2437,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (run_raw_callbacks && mIsRawImageValid && (mRawDiscardLevel <= getMaxDiscardLevel())) { // Do callbacks which require raw image data. - //llinfos << "doLoadedCallbacks raw for " << getID() << llendl; + //LL_INFOS() << "doLoadedCallbacks raw for " << getID() << LL_ENDL; // Call each party interested in the raw data. for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -2455,11 +2455,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() //llassert_always(mRawImage.notNull()); if(mNeedsAux && mAuxRawImage.isNull()) { - llwarns << "Raw Image with no Aux Data for callback" << llendl; + LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL; } BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE; - //llinfos << "Running callback for " << getID() << llendl; - //llinfos << mRawImage->getWidth() << "x" << mRawImage->getHeight() << llendl; + //LL_INFOS() << "Running callback for " << getID() << LL_ENDL; + //LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL; entryp->mLastUsedDiscard = mRawDiscardLevel; entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); if (final) @@ -2477,7 +2477,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // if (run_gl_callbacks && (gl_discard <= getMaxDiscardLevel())) { - //llinfos << "doLoadedCallbacks GL for " << getID() << llendl; + //LL_INFOS() << "doLoadedCallbacks GL for " << getID() << LL_ENDL; // Call the callbacks interested in GL data. for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -3279,7 +3279,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) if(te && te->getID().notNull()) //should have a texture { - llerrs << "The face does not have a valid texture before media texture." << llendl ; + LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL ; } } @@ -3363,7 +3363,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) if(te && te->getID().notNull()) //should have a texture { - llerrs << "mTextureList texture reference number is corrupted." << llendl ; + LL_ERRS() << "mTextureList texture reference number is corrupted." << LL_ENDL ; } } @@ -3720,7 +3720,7 @@ void LLTexturePipelineTester::compareTestSessions(std::ofstream* os) LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast(mCurrentSessionp) ; if(!base_sessionp || !current_sessionp) { - llerrs << "type of test session does not match!" << llendl ; + LL_ERRS() << "type of test session does not match!" << LL_ENDL ; } //compare and output the comparison diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 6948c6699b..b0eae7c071 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -119,7 +119,7 @@ public: virtual S8 getType() const; virtual BOOL isMissingAsset()const ; - virtual void dump(); // debug info to llinfos + virtual void dump(); // debug info to LL_INFOS() /*virtual*/ bool bindDefaultImage(const S32 stage = 0) ; /*virtual*/ bool bindDebugImage(const S32 stage = 0) ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9b89ee2ec9..63debe0464 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -336,7 +336,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename); if (full_path.empty()) { - llwarns << "Failed to find local image file: " << filename << LL_ENDL; + LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL; return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); } @@ -377,7 +377,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLViewerFetchedTexture *texture = imagep.get(); if (texture->getUrl().empty()) { - llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL; + LL_WARNS() << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL; } else if (texture->getUrl() != url) { @@ -457,18 +457,18 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, if (request_from_host.isOk() && !texture->getTargetHost().isOk()) { - llwarns << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL; + LL_WARNS() << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL; } else if (request_from_host.isOk() && texture->getTargetHost().isOk() && request_from_host != texture->getTargetHost()) { - llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: " + LL_WARNS() << "Requested texture " << image_id << " already exists with a different target host, requested: " << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL; } if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type) { - llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL; + LL_WARNS() << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL; } } @@ -896,7 +896,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu if (type_from_host == LLImageBase::TYPE_NORMAL && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE) { - llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost" + LL_WARNS() << "TAT: get_image_type() type_from_host doesn't match type_from_boost" << " host " << target_host << " boost " << imagep->getBoostLevel() << " imageid " << imagep->getID() @@ -1275,7 +1275,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) max_texmem = 128; } - llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; + LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB @@ -1506,7 +1506,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLViewerFetchedTexture* image = gTextureList.findImage( image_id ); if( image ) { - llwarns << "not in db" << LL_ENDL; + LL_WARNS() << "not in db" << LL_ENDL; image->setIsMissingAsset(); } } @@ -1736,7 +1736,7 @@ bool LLUIImageList::initFromFile() std::vector::const_iterator pi(textures_paths.begin()), pend(textures_paths.end()); if (pi == pend) { - llwarns << "No textures.xml found in skins directories" << LL_ENDL; + LL_WARNS() << "No textures.xml found in skins directories" << LL_ENDL; return false; } @@ -1744,12 +1744,12 @@ bool LLUIImageList::initFromFile() LLXMLNodePtr root; if (!LLXMLNode::parseFile(*pi, root, NULL)) { - llwarns << "Unable to parse UI image list file " << *pi << LL_ENDL; + LL_WARNS() << "Unable to parse UI image list file " << *pi << LL_ENDL; return false; } if (!root->hasAttribute("version")) { - llwarns << "No valid version number in UI image list file " << *pi << LL_ENDL; + LL_WARNS() << "No valid version number in UI image list file " << *pi << LL_ENDL; return false; } diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index b8de5871ea..916dec86aa 100755 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -146,7 +146,7 @@ LLViewerThrottleGroup LLViewerThrottleGroup::operator-(const LLViewerThrottleGro void LLViewerThrottleGroup::sendToSim() const { - llinfos << "Sending throttle settings, total BW " << mThrottleTotal << llendl; + LL_INFOS() << "Sending throttle settings, total BW " << mThrottleTotal << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_AgentThrottle); @@ -316,7 +316,7 @@ void LLViewerThrottle::updateDynamicThrottle() mCurrentBandwidth = mMaxBandwidth * mThrottleFrac; mCurrent = getThrottleGroup(mCurrentBandwidth / 1024.0f); mCurrent.sendToSim(); - llinfos << "Tightening network throttle to " << mCurrentBandwidth << llendl; + LL_INFOS() << "Tightening network throttle to " << mCurrentBandwidth << LL_ENDL; } else if (mean_packets_lost <= EASE_THROTTLE_THRESHOLD) { @@ -329,6 +329,6 @@ void LLViewerThrottle::updateDynamicThrottle() mCurrentBandwidth = mMaxBandwidth * mThrottleFrac; mCurrent = getThrottleGroup(mCurrentBandwidth/1024.0f); mCurrent.sendToSim(); - llinfos << "Easing network throttle to " << mCurrentBandwidth << llendl; + LL_INFOS() << "Easing network throttle to " << mCurrentBandwidth << LL_ENDL; } } diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index c7e97cfe94..a544cc81da 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -104,7 +104,7 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st { // Shouldn't really log the asset id for security reasons, but // we need it in this case. - llwarns << "Bad Wearable asset header: " << mAssetID << llendl; + LL_WARNS() << "Bad Wearable asset header: " << mAssetID << LL_ENDL; //gVFS->dumpMap(); return result; } @@ -144,7 +144,7 @@ BOOL LLViewerWearable::isOldVersion() const if( LLWearable::sCurrentDefinitionVersion < mDefinitionVersion ) { - llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl; + LL_WARNS() << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << LL_ENDL; llassert(0); } @@ -537,8 +537,8 @@ struct LLWearableSaveData void LLViewerWearable::saveNewAsset() const { -// llinfos << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << llendl; - //llinfos << *this << llendl; +// LL_INFOS() << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << LL_ENDL; + //LL_INFOS() << *this << LL_ENDL; const std::string filename = asset_id_to_filename(mAssetID); LLFILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */ @@ -555,7 +555,7 @@ void LLViewerWearable::saveNewAsset() const if(!successful_save) { std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str()); - llwarns << buffer << llendl; + LL_WARNS() << buffer << LL_ENDL; LLSD args; args["NAME"] = mName; @@ -570,7 +570,7 @@ void LLViewerWearable::saveNewAsset() const std::string url = gAgent.getRegion()->getCapability("NewAgentInventory"); if (!url.empty()) { - llinfos << "Update Agent Inventory via capability" << llendl; + LL_INFOS() << "Update Agent Inventory via capability" << LL_ENDL; LLSD body; body["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetToFolderType(getAssetType())); body["asset_type"] = LLAssetType::lookup(getAssetType()); @@ -599,12 +599,12 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* if(0 == status) { // Success - llinfos << "Saved wearable " << type_name << llendl; + LL_INFOS() << "Saved wearable " << type_name << LL_ENDL; } else { std::string buffer = llformat("Unable to save %s to central asset store.", type_name.c_str()); - llwarns << buffer << " Status: " << status << llendl; + LL_WARNS() << buffer << " Status: " << status << LL_ENDL; LLSD args; args["NAME"] = type_name; LLNotificationsUtil::add("CannotSaveToAssetStore", args); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4ec9485aee..12d58b7521 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -886,7 +886,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK if (gDebugClicks) { - llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl; + LL_INFOS() << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << LL_ENDL; } // Make sure we get a corresponding mouseup event, even if the mouse leaves the window @@ -912,7 +912,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); if (LLView::sDebugMouseHandling) { - llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl; + LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << LL_ENDL; } return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); } @@ -946,13 +946,13 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK { if (LLView::sDebugMouseHandling) { - llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl; + LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << LL_ENDL; } return TRUE; } else if (LLView::sDebugMouseHandling) { - llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; + LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " not handled by view" << LL_ENDL; } } @@ -1077,7 +1077,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi S32 object_face = pick_info.mObjectFace; std::string url = data; - lldebugs << "Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << llendl; + LL_DEBUGS() << "Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << LL_ENDL; LLVOVolume *obj = dynamic_cast(static_cast(pick_info.getObject())); @@ -1566,7 +1566,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) LLNotifications::instance().setIgnoreAllNotifications(ignore); if (ignore) { - llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; + LL_INFOS() << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << LL_ENDL; } // Default to application directory. @@ -1604,14 +1604,14 @@ LLViewerWindow::LLViewerWindow(const Params& p) { LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate")); - LL_WARNS("Window") << "Failed to create window, to be shutting Down, be sure your graphics driver is updated." << llendl ; + LL_WARNS("Window") << "Failed to create window, to be shutting Down, be sure your graphics driver is updated." << LL_ENDL ; ms_sleep(5000) ; //wait for 5 seconds. LLSplashScreen::update(LLTrans::getString("ShuttingDown")); #if LL_LINUX || LL_SOLARIS - llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information." - << llendl; + LL_WARNS() << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information." + << LL_ENDL; #else LL_WARNS("Window") << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings" << LL_ENDL; @@ -1631,7 +1631,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) if(p.fullscreen && ( scr.mX!=p.width || scr.mY!=p.height)) { - llwarns << "Fullscreen has forced us in to a different resolution now using "<setVisible(FALSE); } - llinfos << "Global views cleaned." << llendl ; + LL_INFOS() << "Global views cleaned." << LL_ENDL ; // DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open // will crump with LL_ERRS. LLModalDialog::shutdownModals(); - llinfos << "LLModalDialog shut down." << llendl; + LL_INFOS() << "LLModalDialog shut down." << LL_ENDL; // destroy the nav bar, not currently part of gViewerWindow // *TODO: Make LLNavigationBar part of gViewerWindow @@ -2008,17 +2008,17 @@ void LLViewerWindow::shutdownViews() { delete LLNavigationBar::getInstance(); } - llinfos << "LLNavigationBar destroyed." << llendl ; + LL_INFOS() << "LLNavigationBar destroyed." << LL_ENDL ; // destroy menus after instantiating navbar above, as it needs // access to gMenuHolder cleanup_menus(); - llinfos << "menus destroyed." << llendl ; + LL_INFOS() << "menus destroyed." << LL_ENDL ; // Delete all child views. delete mRootView; mRootView = NULL; - llinfos << "RootView deleted." << llendl ; + LL_INFOS() << "RootView deleted." << LL_ENDL ; LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit(); @@ -2046,12 +2046,12 @@ void LLViewerWindow::shutdownGL() gSky.cleanup(); stop_glerror(); - llinfos << "Cleaning up pipeline" << llendl; + LL_INFOS() << "Cleaning up pipeline" << LL_ENDL; gPipeline.cleanup(); stop_glerror(); //MUST clean up pipeline before cleaning up wearables - llinfos << "Cleaning up wearables" << llendl; + LL_INFOS() << "Cleaning up wearables" << LL_ENDL; LLWearableList::instance().cleanup() ; gTextureList.shutdown(); @@ -2065,12 +2065,12 @@ void LLViewerWindow::shutdownGL() LLViewerTextureManager::cleanup() ; LLImageGL::cleanupClass() ; - llinfos << "All textures and llimagegl images are destroyed!" << llendl ; + LL_INFOS() << "All textures and llimagegl images are destroyed!" << LL_ENDL ; - llinfos << "Cleaning up select manager" << llendl; + LL_INFOS() << "Cleaning up select manager" << LL_ENDL; LLSelectMgr::getInstance()->cleanup(); - llinfos << "Stopping GL during shutdown" << llendl; + LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL; stopGL(FALSE); stop_glerror(); @@ -2078,13 +2078,13 @@ void LLViewerWindow::shutdownGL() LLVertexBuffer::cleanupClass(); - llinfos << "LLVertexBuffer cleaned." << llendl ; + LL_INFOS() << "LLVertexBuffer cleaned." << LL_ENDL ; } // shutdownViews() and shutdownGL() need to be called first LLViewerWindow::~LLViewerWindow() { - llinfos << "Destroying Window" << llendl; + LL_INFOS() << "Destroying Window" << LL_ENDL; destroyWindow(); delete mDebugText; @@ -2681,7 +2681,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) mouse_captor->handleScrollWheel(local_x, local_y, clicks); if (LLView::sDebugMouseHandling) { - llinfos << "Scroll Wheel handled by captor " << mouse_captor->getName() << llendl; + LL_INFOS() << "Scroll Wheel handled by captor " << mouse_captor->getName() << LL_ENDL; } return; } @@ -2699,13 +2699,13 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) { if (LLView::sDebugMouseHandling) { - llinfos << "Scroll Wheel" << LLView::sMouseHandlerMessage << llendl; + LL_INFOS() << "Scroll Wheel" << LLView::sMouseHandlerMessage << LL_ENDL; } return; } else if (LLView::sDebugMouseHandling) { - llinfos << "Scroll Wheel not handled by view" << llendl; + LL_INFOS() << "Scroll Wheel not handled by view" << LL_ENDL; } // Zoom the camera in and out behavior @@ -3019,12 +3019,12 @@ void LLViewerWindow::updateUI() handled = mouse_captor->handleHover(local_x, local_y, mask); if (LLView::sDebugMouseHandling) { - llinfos << "Hover handled by captor " << mouse_captor->getName() << llendl; + LL_INFOS() << "Hover handled by captor " << mouse_captor->getName() << LL_ENDL; } if( !handled ) { - LL_DEBUGS("UserInput") << "hover not handled by mouse captor" << llendl; + LL_DEBUGS("UserInput") << "hover not handled by mouse captor" << LL_ENDL; } } else @@ -3045,7 +3045,7 @@ void LLViewerWindow::updateUI() if (LLView::sDebugMouseHandling && LLView::sMouseHandlerMessage != last_handle_msg) { last_handle_msg = LLView::sMouseHandlerMessage; - llinfos << "Hover" << LLView::sMouseHandlerMessage << llendl; + LL_INFOS() << "Hover" << LLView::sMouseHandlerMessage << LL_ENDL; } handled = TRUE; } @@ -3054,7 +3054,7 @@ void LLViewerWindow::updateUI() if (last_handle_msg != LLStringUtil::null) { last_handle_msg.clear(); - llinfos << "Hover not handled by view" << llendl; + LL_INFOS() << "Hover not handled by view" << LL_ENDL; } } } @@ -3643,11 +3643,11 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe if (!intersect) { point_global = clickPointInWorldGlobal(x, y, objectp); - llinfos << "approx intersection at " << (objectp->getPositionGlobal() - point_global) << llendl; + LL_INFOS() << "approx intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL; } else { - llinfos << "good intersection at " << (objectp->getPositionGlobal() - point_global) << llendl; + LL_INFOS() << "good intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL; } return intersect; @@ -4015,13 +4015,13 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d S32 grids_per_edge = (S32) regionp->getLand().mGridsPerEdge; if ((i >= grids_per_edge) || (j >= grids_per_edge)) { - //llinfos << "LLViewerWindow::mousePointOnLand probe_point is out of region" << llendl; + //LL_INFOS() << "LLViewerWindow::mousePointOnLand probe_point is out of region" << LL_ENDL; continue; } land_z = regionp->getLand().resolveHeightRegion(probe_point_region); - //llinfos << "mousePointOnLand initial z " << land_z << llendl; + //LL_INFOS() << "mousePointOnLand initial z " << land_z << LL_ENDL; if (probe_point_region.mV[VZ] < land_z) { @@ -4062,7 +4062,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d j = (S32) (local_probe_point.mV[VY]/regionp->getLand().getMetersPerGrid()); if ((i >= regionp->getLand().mGridsPerEdge) || (j >= regionp->getLand().mGridsPerEdge)) { - // llinfos << "LLViewerWindow::mousePointOnLand probe_point is out of region" << llendl; + // LL_INFOS() << "LLViewerWindow::mousePointOnLand probe_point is out of region" << LL_ENDL; continue; } land_z = regionp->getLand().mSurfaceZ[ i + j * (regionp->getLand().mGridsPerEdge) ]; @@ -4070,7 +4070,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d land_z = regionp->getLand().resolveHeightRegion(probe_point_region); - //llinfos << "mousePointOnLand refine z " << land_z << llendl; + //LL_INFOS() << "mousePointOnLand refine z " << land_z << LL_ENDL; if (probe_point_region.mV[VZ] < land_z) { @@ -4090,7 +4090,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke { if (!image) { - llwarns << "No image to save" << llendl; + LL_WARNS() << "No image to save" << LL_ENDL; return FALSE; } @@ -4150,7 +4150,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke } while( -1 != err ); // search until the file is not found (i.e., stat() gives an error). - llinfos << "Saving snapshot to " << filepath << llendl; + LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL; return image->save(filepath); } @@ -4173,7 +4173,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) BOOL LLViewerWindow::saveSnapshot( const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) { - llinfos << "Saving snapshot to: " << filepath << llendl; + LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; LLPointer raw = new LLImageRaw; BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, do_rebuild); @@ -4188,12 +4188,12 @@ BOOL LLViewerWindow::saveSnapshot( const std::string& filepath, S32 image_width, } else { - llwarns << "Unable to encode bmp snapshot" << llendl; + LL_WARNS() << "Unable to encode bmp snapshot" << LL_ENDL; } } else { - llwarns << "Unable to capture raw snapshot" << llendl; + LL_WARNS() << "Unable to capture raw snapshot" << LL_ENDL; } return success; @@ -4234,7 +4234,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3)) { - llwarns << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << llendl ; + LL_WARNS() << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << LL_ENDL ; return FALSE ; //there is no enough memory for taking this snapshot. } } @@ -4328,7 +4328,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (show_ui && scale_factor > 1.f) { // Note: we should never get there... - llwarns << "over scaling UI not supported." << llendl; + LL_WARNS() << "over scaling UI not supported." << LL_ENDL; } S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f); @@ -4360,7 +4360,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (high_res && show_ui) { // Note: we should never get there... - llwarns << "High res UI snapshot not supported. " << llendl; + LL_WARNS() << "High res UI snapshot not supported. " << LL_ENDL; /*send_agent_pause(); //rescale fonts initFonts(scale_factor); @@ -4725,10 +4725,10 @@ LLProgressView *LLViewerWindow::getProgressView() const void LLViewerWindow::dumpState() { - llinfos << "LLViewerWindow Active " << S32(mActive) << llendl; - llinfos << "mWindow visible " << S32(mWindow->getVisible()) + LL_INFOS() << "LLViewerWindow Active " << S32(mActive) << LL_ENDL; + LL_INFOS() << "mWindow visible " << S32(mWindow->getVisible()) << " minimized " << S32(mWindow->getMinimized()) - << llendl; + << LL_ENDL; } void LLViewerWindow::stopGL(BOOL save_state) @@ -4739,7 +4739,7 @@ void LLViewerWindow::stopGL(BOOL save_state) //especially be careful to put anything behind gTextureList.destroyGL(save_state); if (!gGLManager.mIsDisabled) { - llinfos << "Shutting down GL..." << llendl; + LL_INFOS() << "Shutting down GL..." << LL_ENDL; // Pause texture decode threads (will get unpaused during main loop) LLAppViewer::getTextureCache()->pause(); @@ -4784,7 +4784,7 @@ void LLViewerWindow::stopGL(BOOL save_state) gGLManager.mIsDisabled = TRUE; stop_glerror(); - llinfos << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << llendl; + LL_INFOS() << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << LL_ENDL; } } @@ -4796,7 +4796,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) //especially, be careful to put something before gTextureList.restoreGL(); if (gGLManager.mIsDisabled) { - llinfos << "Restoring GL..." << llendl; + LL_INFOS() << "Restoring GL..." << LL_ENDL; gGLManager.mIsDisabled = FALSE; initGLDefaults(); @@ -4833,10 +4833,10 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) setShowProgress(TRUE); setProgressString(progress_message); } - llinfos << "...Restoring GL done" << llendl; + LL_INFOS() << "...Restoring GL done" << LL_ENDL; if(!LLAppViewer::instance()->restoreErrorTrap()) { - llwarns << " Someone took over my signal/exception handler (post restoreGL)!" << llendl; + LL_WARNS() << " Someone took over my signal/exception handler (post restoreGL)!" << LL_ENDL; } } @@ -4884,7 +4884,7 @@ void LLViewerWindow::checkSettings() void LLViewerWindow::restartDisplay(BOOL show_progress_bar) { - llinfos << "Restaring GL" << llendl; + LL_INFOS() << "Restaring GL" << LL_ENDL; stopGL(); if (show_progress_bar) { @@ -4927,7 +4927,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsyn LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); send_agent_pause(); - llinfos << "Stopping GL during changeDisplaySettings" << llendl; + LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL; stopGL(); mIgnoreActivate = TRUE; LLCoordScreen old_size; @@ -4953,7 +4953,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsyn } send_agent_resume(); - llinfos << "Restoring GL during resolution change" << llendl; + LL_INFOS() << "Restoring GL during resolution change" << LL_ENDL; if (show_progress_bar) { restoreGL(LLTrans::getString("ProgressChangingResolution")); @@ -5019,7 +5019,7 @@ void LLViewerWindow::calcDisplayScale() if (display_scale != mDisplayScale) { - llinfos << "Setting display scale to " << display_scale << llendl; + LL_INFOS() << "Setting display scale to " << display_scale << LL_ENDL; mDisplayScale = display_scale; // Init default fonts diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index cd2075b122..4e9400872a 100755 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -287,7 +287,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, { mDetailTextures[i]->destroyRawImage() ; } - lldebugs << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << llendl; + LL_DEBUGS() << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << LL_ENDL; return FALSE; } @@ -323,12 +323,12 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, if (x_end > mWidth) { - llwarns << "x end > width" << llendl; + LL_WARNS() << "x end > width" << LL_ENDL; x_end = mWidth; } if (y_end > mWidth) { - llwarns << "y end > width" << llendl; + LL_WARNS() << "y end > width" << LL_ENDL; y_end = mWidth; } @@ -358,7 +358,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, if (tex_comps != st_comps) { - llwarns << "Base texture comps != input texture comps" << llendl; + LL_WARNS() << "Base texture comps != input texture comps" << LL_ENDL; return FALSE; } @@ -416,8 +416,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, if (st_offset >= st_data_size[tex0] || st_offset >= st_data_size[tex1]) { // SJB: This shouldn't be happening, but does... Rounding error? - //llwarns << "offset 0 [" << tex0 << "] =" << st_offset << " >= size=" << st_data_size[tex0] << llendl; - //llwarns << "offset 1 [" << tex1 << "] =" << st_offset << " >= size=" << st_data_size[tex1] << llendl; + //LL_WARNS() << "offset 0 [" << tex0 << "] =" << st_offset << " >= size=" << st_data_size[tex0] << LL_ENDL; + //LL_WARNS() << "offset 1 [" << tex1 << "] =" << st_offset << " >= size=" << st_data_size[tex1] << LL_ENDL; } else { diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp index b231abc9c5..9b55bbf277 100755 --- a/indra/newview/llvlmanager.cpp +++ b/indra/newview/llvlmanager.cpp @@ -68,7 +68,7 @@ void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size) } else { - llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl; + LL_ERRS() << "Unknown layer type!" << (S32)vl_datap->mType << LL_ENDL; } mPacketData.push_back(vl_datap); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 04c1bd3968..5971da95ce 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -719,7 +719,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); - lldebugs << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS() << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL; mPelvisp = NULL; @@ -792,7 +792,7 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() << " Notification " << notification_name << " : " << comment - << llendl; + << LL_ENDL; if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { @@ -820,7 +820,7 @@ LLVOAvatar::~LLVOAvatar() logPendingPhases(); - lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; + LL_DEBUGS() << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << LL_ENDL; std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer()); mAttachmentPoints.clear(); @@ -832,7 +832,7 @@ LLVOAvatar::~LLVOAvatar() getPhases().clearPhases(); - lldebugs << "LLVOAvatar Destructor end" << llendl; + LL_DEBUGS() << "LLVOAvatar Destructor end" << LL_ENDL; } void LLVOAvatar::markDead() @@ -996,54 +996,54 @@ void LLVOAvatar::dumpBakedStatus() iter != LLCharacter::sInstances.end(); ++iter) { LLVOAvatar* inst = (LLVOAvatar*) *iter; - llinfos << "Avatar "; + LL_INFOS() << "Avatar "; LLNameValue* firstname = inst->getNVPair("FirstName"); LLNameValue* lastname = inst->getNVPair("LastName"); if( firstname ) { - llcont << firstname->getString(); + LL_CONT << firstname->getString(); } if( lastname ) { - llcont << " " << lastname->getString(); + LL_CONT << " " << lastname->getString(); } - llcont << " " << inst->mID; + LL_CONT << " " << inst->mID; if( inst->isDead() ) { - llcont << " DEAD ("<< inst->getNumRefs() << " refs)"; + LL_CONT << " DEAD ("<< inst->getNumRefs() << " refs)"; } if( inst->isSelf() ) { - llcont << " (self)"; + LL_CONT << " (self)"; } F64 dist_to_camera = (inst->getPositionGlobal() - camera_pos_global).length(); - llcont << " " << dist_to_camera << "m "; + LL_CONT << " " << dist_to_camera << "m "; - llcont << " " << inst->mPixelArea << " pixels"; + LL_CONT << " " << inst->mPixelArea << " pixels"; if( inst->isVisible() ) { - llcont << " (visible)"; + LL_CONT << " (visible)"; } else { - llcont << " (not visible)"; + LL_CONT << " (not visible)"; } if( inst->isFullyBaked() ) { - llcont << " Baked"; + LL_CONT << " Baked"; } else { - llcont << " Unbaked ("; + LL_CONT << " Unbaked ("; for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin(); iter != LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().end(); @@ -1053,16 +1053,16 @@ void LLVOAvatar::dumpBakedStatus() const ETextureIndex index = baked_dict->mTextureIndex; if (!inst->isTextureDefined(index)) { - llcont << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName; + LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName; } } - llcont << " ) " << inst->getUnbakedPixelAreaRank(); + LL_CONT << " ) " << inst->getUnbakedPixelAreaRank(); if( inst->isCulled() ) { - llcont << " culled"; + LL_CONT << " culled"; } } - llcont << llendl; + LL_CONT << LL_ENDL; } } @@ -1103,7 +1103,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll) { if (LLViewerTexLayerSet::sHasCaches) { - lldebugs << "Deleting layer set caches" << llendl; + LL_DEBUGS() << "Deleting layer set caches" << LL_ENDL; for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) { @@ -1604,14 +1604,14 @@ void LLVOAvatar::buildCharacter() // If we don't have the Ooh morph, use the Kiss morph if (!mOohMorph) { - llwarns << "Missing 'Ooh' morph for lipsync, using fallback." << llendl; + LL_WARNS() << "Missing 'Ooh' morph for lipsync, using fallback." << LL_ENDL; mOohMorph = getVisualParam( "Express_Kiss" ); } // If we don't have the Aah morph, use the Open Mouth morph if (!mAahMorph) { - llwarns << "Missing 'Aah' morph for lipsync, using fallback." << llendl; + LL_WARNS() << "Missing 'Aah' morph for lipsync, using fallback." << LL_ENDL; mAahMorph = getVisualParam( "Express_Open_Mouth" ); } @@ -1689,7 +1689,7 @@ void LLVOAvatar::restoreMeshData() { llassert(!isSelf()); - //llinfos << "Restoring" << llendl; + //LL_INFOS() << "Restoring" << LL_ENDL; mMeshValid = TRUE; updateJointLODs(); @@ -1800,7 +1800,7 @@ void LLVOAvatar::updateMeshData() // the case of more than one avatar in the pool (thus > 0 instead of >= 0) if (facep->getGeomIndex() > 0) { - llerrs << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << llendl; + LL_ERRS() << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << LL_ENDL; } for(S32 k = j ; k < part_index ; k++) @@ -1866,8 +1866,8 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, } } - //llinfos << getRotation() << llendl; - //llinfos << getPosition() << llendl; + //LL_INFOS() << getRotation() << LL_ENDL; + //LL_INFOS() << getPosition() << LL_ENDL; return retval; } @@ -1889,13 +1889,13 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU const std::string url = getImageURL(te,uuid); if (!url.empty()) { - LL_DEBUGS("Avatar") << avString() << "from URL " << url << llendl; + LL_DEBUGS("Avatar") << avString() << "from URL " << url << LL_ENDL; result = LLViewerTextureManager::getFetchedTextureFromUrl( url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); } else { - LL_DEBUGS("Avatar") << avString() << "from host " << uuid << llendl; + LL_DEBUGS("Avatar") << avString() << "from host " << uuid << LL_ENDL; LLHost host = getObjectHost(); result = LLViewerTextureManager::getFetchedTexture( uuid, FTT_HOST_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); @@ -1926,7 +1926,7 @@ static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ void LLVOAvatar::dumpAnimationState() { - llinfos << "==============================================" << llendl; + LL_INFOS() << "==============================================" << LL_ENDL; for (LLVOAvatar::AnimIterator it = mSignaledAnimations.begin(); it != mSignaledAnimations.end(); ++it) { LLUUID id = it->first; @@ -1935,7 +1935,7 @@ void LLVOAvatar::dumpAnimationState() { playtag = "*"; } - llinfos << gAnimLibrary.animationName(id) << playtag << llendl; + LL_INFOS() << gAnimLibrary.animationName(id) << playtag << LL_ENDL; } for (LLVOAvatar::AnimIterator it = mPlayingAnimations.begin(); it != mPlayingAnimations.end(); ++it) { @@ -1943,7 +1943,7 @@ void LLVOAvatar::dumpAnimationState() bool is_signaled = mSignaledAnimations.find(id) != mSignaledAnimations.end(); if (!is_signaled) { - llinfos << gAnimLibrary.animationName(id) << "!S" << llendl; + LL_INFOS() << gAnimLibrary.animationName(id) << "!S" << LL_ENDL; } } } @@ -1957,7 +1957,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) if (isDead()) { - llinfos << "Warning! Idle on dead avatar" << llendl; + LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL; return; } @@ -2088,7 +2088,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) if ( mCurrentGesticulationLevel == 0 ) { gestureString = "/voicelevel1"; } else if ( mCurrentGesticulationLevel == 1 ) { gestureString = "/voicelevel2"; } else if ( mCurrentGesticulationLevel == 2 ) { gestureString = "/voicelevel3"; } - else { llinfos << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << llendl; } + else { LL_INFOS() << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << LL_ENDL; } // this is the call that Karl S. created for triggering gestures from within the code. LLGestureMgr::instance().triggerAndReviseString( gestureString ); @@ -2164,7 +2164,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) { if (LLVOAvatar::sJointDebug) { - llinfos << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << llendl; + LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL; } LLJoint::sNumUpdates = 0; @@ -3152,7 +3152,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) removeAnimationData("Walk Speed"); } mMotionController.setTimeStep(time_step); -// llinfos << "Setting timestep to " << time_quantum * pixel_area_scale << llendl; +// LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL; } if (getParent() && !mIsSitting) @@ -3617,42 +3617,42 @@ void LLVOAvatar::updateVisibility() } else { - llinfos << "Avatar " << this << " updating visiblity" << llendl; + LL_INFOS() << "Avatar " << this << " updating visiblity" << LL_ENDL; } if (visible) { - llinfos << "Visible" << llendl; + LL_INFOS() << "Visible" << LL_ENDL; } else { - llinfos << "Not visible" << llendl; + LL_INFOS() << "Not visible" << LL_ENDL; } /*if (avatar_in_frustum) { - llinfos << "Avatar in frustum" << llendl; + LL_INFOS() << "Avatar in frustum" << LL_ENDL; } else { - llinfos << "Avatar not in frustum" << llendl; + LL_INFOS() << "Avatar not in frustum" << LL_ENDL; }*/ /*if (LLViewerCamera::getInstance()->sphereInFrustum(sel_pos_agent, 2.0f)) { - llinfos << "Sel pos visible" << llendl; + LL_INFOS() << "Sel pos visible" << LL_ENDL; } if (LLViewerCamera::getInstance()->sphereInFrustum(wrist_right_pos_agent, 0.2f)) { - llinfos << "Wrist pos visible" << llendl; + LL_INFOS() << "Wrist pos visible" << LL_ENDL; } if (LLViewerCamera::getInstance()->sphereInFrustum(getPositionAgent(), getMaxScale()*2.f)) { - llinfos << "Agent visible" << llendl; + LL_INFOS() << "Agent visible" << LL_ENDL; }*/ - llinfos << "PA: " << getPositionAgent() << llendl; - /*llinfos << "SPA: " << sel_pos_agent << llendl; - llinfos << "WPA: " << wrist_right_pos_agent << llendl;*/ + LL_INFOS() << "PA: " << getPositionAgent() << LL_ENDL; + /*LL_INFOS() << "SPA: " << sel_pos_agent << LL_ENDL; + LL_INFOS() << "WPA: " << wrist_right_pos_agent << LL_ENDL;*/ for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) @@ -3667,11 +3667,11 @@ void LLVOAvatar::updateVisibility() { if(attached_object->mDrawable->isVisible()) { - llinfos << attachment->getName() << " visible" << llendl; + LL_INFOS() << attachment->getName() << " visible" << LL_ENDL; } else { - llinfos << attachment->getName() << " not visible at " << mDrawable->getWorldPosition() << " and radius " << mDrawable->getRadius() << llendl; + LL_INFOS() << attachment->getName() << " not visible at " << mDrawable->getWorldPosition() << " and radius " << mDrawable->getRadius() << LL_ENDL; } } } @@ -3811,19 +3811,19 @@ U32 LLVOAvatar::renderSkinned() } else { - llinfos << "Avatar " << this << " in render" << llendl; + LL_INFOS() << "Avatar " << this << " in render" << LL_ENDL; } if (!mIsBuilt) { - llinfos << "Not built!" << llendl; + LL_INFOS() << "Not built!" << LL_ENDL; } else if (!gAgent.needsRenderAvatar()) { - llinfos << "Doesn't need avatar render!" << llendl; + LL_INFOS() << "Doesn't need avatar render!" << LL_ENDL; } else { - llinfos << "Rendering!" << llendl; + LL_INFOS() << "Rendering!" << LL_ENDL; } } @@ -4259,10 +4259,10 @@ void LLVOAvatar::releaseOldTextures() S32 new_total_mem = totalTextureMemForUUIDS(new_texture_ids); //S32 old_total_mem = totalTextureMemForUUIDS(mTextureIDs); - //LL_DEBUGS("Avatar") << getFullname() << " old_total_mem: " << old_total_mem << " new_total_mem (L/B): " << new_total_mem << " (" << new_local_mem <<", " << new_baked_mem << ")" << llendl; + //LL_DEBUGS("Avatar") << getFullname() << " old_total_mem: " << old_total_mem << " new_total_mem (L/B): " << new_total_mem << " (" << new_local_mem <<", " << new_baked_mem << ")" << LL_ENDL; if (!isSelf() && new_total_mem > new_baked_mem) { - llwarns << "extra local textures stored for non-self av" << llendl; + LL_WARNS() << "extra local textures stored for non-self av" << LL_ENDL; } for (std::set::iterator it = mTextureIDs.begin(); it != mTextureIDs.end(); ++it) { @@ -4350,7 +4350,7 @@ void LLVOAvatar::updateTextures() } else { - llwarns << "getTE( " << texture_index << " ) returned 0" <getID() << " for avatar " << (isSelf() ? "" : getID().asString()) - << " on host " << getRegion()->getHost() << llendl; + << " on host " << getRegion()->getHost() << LL_ENDL; } addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level ); @@ -4521,7 +4521,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) if (appearance_service_url.empty()) { // Probably a server-side issue if we get here: - llwarns << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << llendl; + LL_WARNS() << "AgentAppearanceServiceURL not set - Baked texture requests will fail" << LL_ENDL; return url; } @@ -4529,7 +4529,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) if (texture_entry != NULL) { url = appearance_service_url + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString(); - //llinfos << "baked texture url: " << url << llendl; + //LL_INFOS() << "baked texture url: " << url << LL_ENDL; } } return url; @@ -4579,7 +4579,7 @@ void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos LLVector3 relativePos = gAgent.getPosAgentFromGlobal(outPos) - obj->getPositionAgent(); LLVector3 linearComponent = angularVelocity % relativePos; -// llinfos << "Linear Component of Rotation Velocity " << linearComponent << llendl; +// LL_INFOS() << "Linear Component of Rotation Velocity " << linearComponent << LL_ENDL; mStepObjectVelocity = obj->getVelocity() + linearComponent; } } @@ -4732,7 +4732,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL } else { - llwarns << "Failed to start motion!" << llendl; + LL_WARNS() << "Failed to start motion!" << LL_ENDL; } } else //stop animation @@ -4828,13 +4828,13 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) //----------------------------------------------------------------------------- BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { - lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; + LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; + LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; } if (isSelf() && remap_id == ANIM_AGENT_AWAY) @@ -4850,13 +4850,13 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) { - lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; + LL_DEBUGS() << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; LLUUID remap_id = remapMotionID(id); if (remap_id != id) { - lldebugs << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << llendl; + LL_DEBUGS() << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL; } if (isSelf()) @@ -4949,7 +4949,7 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name ) } else { - llinfos<<"Did not find "<< name.c_str()<mJointName); if (!parentJoint) { - llwarns << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << llendl; + LL_WARNS() << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << LL_ENDL; delete attachment; continue; } @@ -5147,7 +5147,7 @@ BOOL LLVOAvatar::loadSkeletonNode () { if (group < 0 || group >= 9) { - llwarns << "Invalid group number (" << group << ") for attachment point " << info->mName << llendl; + LL_WARNS() << "Invalid group number (" << group << ") for attachment point " << info->mName << LL_ENDL; } else { @@ -5158,13 +5158,13 @@ BOOL LLVOAvatar::loadSkeletonNode () S32 attachmentID = info->mAttachmentID; if (attachmentID < 1 || attachmentID > 255) { - llwarns << "Attachment point out of range [1-255]: " << attachmentID << " on attachment point " << info->mName << llendl; + LL_WARNS() << "Attachment point out of range [1-255]: " << attachmentID << " on attachment point " << info->mName << LL_ENDL; delete attachment; continue; } if (mAttachmentPoints.find(attachmentID) != mAttachmentPoints.end()) { - llwarns << "Attachment point redefined with id " << attachmentID << " on attachment point " << info->mName << llendl; + LL_WARNS() << "Attachment point redefined with id " << attachmentID << " on attachment point " << info->mName << LL_ENDL; delete attachment; continue; } @@ -5350,7 +5350,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) if (!drawable) { - llerrs << "LLVOAvatar::updateGeometry() called with NULL drawable" << llendl; + LL_ERRS() << "LLVOAvatar::updateGeometry() called with NULL drawable" << LL_ENDL; } return TRUE; @@ -5436,7 +5436,7 @@ void LLVOAvatar::removeChild(LLViewerObject *childp) LLViewerObject::removeChild(childp); if (!detachObject(childp)) { - llwarns << "Calling detach on non-attached object " << llendl; + LL_WARNS() << "Calling detach on non-attached object " << LL_ENDL; } } @@ -5448,7 +5448,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi // correctly, but putting this check in here to be safe. if (attachmentID & ATTACHMENT_ADD) { - llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl; + LL_WARNS() << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << LL_ENDL; attachmentID &= ~ATTACHMENT_ADD; } @@ -5456,7 +5456,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { - llwarns << "Object attachment point invalid: " << attachmentID << llendl; + LL_WARNS() << "Object attachment point invalid: " << attachmentID << LL_ENDL; attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) } @@ -5624,7 +5624,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) { cleanupAttachedMesh( viewer_object ); attachment->removeObject(viewer_object); - lldebugs << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << llendl; + LL_DEBUGS() << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << LL_ENDL; return TRUE; } } @@ -5882,7 +5882,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL } else if (global_color == mTexEyeColor) { -// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl; +// LL_INFOS() << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << LL_ENDL; invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake ); } updateMeshTextures(); @@ -5980,11 +5980,11 @@ void LLVOAvatar::startPhase(const std::string& phase_name) { if (!completed) { - LL_DEBUGS("Avatar") << avString() << "no-op, start when started already for " << phase_name << llendl; + LL_DEBUGS("Avatar") << avString() << "no-op, start when started already for " << phase_name << LL_ENDL; return; } } - LL_DEBUGS("Avatar") << "started phase " << phase_name << llendl; + LL_DEBUGS("Avatar") << "started phase " << phase_name << LL_ENDL; getPhases().startPhase(phase_name); } @@ -5999,13 +5999,13 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) getPhases().stopPhase(phase_name); completed = true; logMetricsTimerRecord(phase_name, elapsed, completed); - LL_DEBUGS("Avatar") << avString() << "stopped phase " << phase_name << " elapsed " << elapsed << llendl; + LL_DEBUGS("Avatar") << avString() << "stopped phase " << phase_name << " elapsed " << elapsed << LL_ENDL; } else { if (err_check) { - LL_DEBUGS("Avatar") << "no-op, stop when stopped already for " << phase_name << llendl; + LL_DEBUGS("Avatar") << "no-op, stop when stopped already for " << phase_name << LL_ENDL; } } } @@ -6013,7 +6013,7 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) { if (err_check) { - LL_DEBUGS("Avatar") << "no-op, stop when not started for " << phase_name << llendl; + LL_DEBUGS("Avatar") << "no-op, stop when not started for " << phase_name << LL_ENDL; } } } @@ -6456,7 +6456,7 @@ void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com { if (index >= BAKED_NUM_INDICES) { - llwarns << "invalid baked texture index passed to applyMorphMask" << llendl; + LL_WARNS() << "invalid baked texture index passed to applyMorphMask" << LL_ENDL; return; } @@ -6625,7 +6625,7 @@ LLBBox LLVOAvatar::getHUDBBox() const const LLViewerObject* attached_object = (*attachment_iter); if (attached_object == NULL) { - llwarns << "HUD attached object is NULL!" << llendl; + LL_WARNS() << "HUD attached object is NULL!" << LL_ENDL; continue; } // initialize bounding box to contain identity orientation and center point for attached object @@ -6714,14 +6714,14 @@ bool LLVOAvatar::visualParamWeightsAreDefault() // we have to not care whether skirt weights are default, if we're not actually wearing a skirt (is_wearing_skirt || !is_skirt_param)) { - //llinfos << "param '" << param->getName() << "'=" << param->getWeight() << " which differs from default=" << param->getDefaultWeight() << llendl; + //LL_INFOS() << "param '" << param->getName() << "'=" << param->getWeight() << " which differs from default=" << param->getDefaultWeight() << LL_ENDL; rtn = false; break; } } } - //llinfos << "params are default ? " << int(rtn) << llendl; + //LL_INFOS() << "params are default ? " << int(rtn) << LL_ENDL; return rtn; } @@ -6771,7 +6771,7 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, } else { - LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl; + LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << LL_ENDL; } apr_file_printf(file, "
\n"); @@ -6814,7 +6814,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe U8 av_u8; mesgsys->getU8Fast(_PREHASH_AppearanceData, _PREHASH_AppearanceVersion, av_u8, 0); contents.mAppearanceVersion = av_u8; - LL_DEBUGS("Avatar") << "appversion set by AppearanceData field: " << contents.mAppearanceVersion << llendl; + LL_DEBUGS("Avatar") << "appversion set by AppearanceData field: " << contents.mAppearanceVersion << LL_ENDL; mesgsys->getS32Fast(_PREHASH_AppearanceData, _PREHASH_CofVersion, contents.mCOFVersion, 0); // For future use: //mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0); @@ -6831,7 +6831,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe llassert(param); // if this ever fires, we should do the same as when num_blocks<=1 if (!param) { - llwarns << "No visual params!" << llendl; + LL_WARNS() << "No visual params!" << LL_ENDL; } else { @@ -6861,18 +6861,18 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT if (num_blocks != expected_tweakable_count) { - LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl; + LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << LL_ENDL; } } else { if (drop_visual_params_debug) { - llinfos << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << llendl; + LL_INFOS() << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << LL_ENDL; } else { - LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl; + LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL; } } @@ -6884,7 +6884,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe { S32 index = it - contents.mParams.begin(); contents.mParamAppearanceVersion = llround(contents.mParamWeights[index]); - LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << llendl; + LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL; } } } @@ -6897,8 +6897,8 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 (contents.mParamAppearanceVersion >= 0) && (contents.mAppearanceVersion != contents.mParamAppearanceVersion)) { - llwarns << "inconsistent appearance_version settings - field: " << - contents.mAppearanceVersion << ", param: " << contents.mParamAppearanceVersion << llendl; + LL_WARNS() << "inconsistent appearance_version settings - field: " << + contents.mAppearanceVersion << ", param: " << contents.mParamAppearanceVersion << LL_ENDL; return false; } if (contents.mParamAppearanceVersion >= 0) // use visual param if available. @@ -6915,7 +6915,7 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 } LL_DEBUGS("Avatar") << "appearance version info - field " << contents.mAppearanceVersion << " param: " << contents.mParamAppearanceVersion - << " final: " << appearance_version << llendl; + << " final: " << appearance_version << LL_ENDL; return true; } @@ -6924,13 +6924,13 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 //----------------------------------------------------------------------------- void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { - LL_DEBUGS("Avatar") << "starts" << llendl; + LL_DEBUGS("Avatar") << "starts" << LL_ENDL; bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_"; if (gSavedSettings.getBOOL("BlockAvatarAppearanceMessages")) { - llwarns << "Blocking AvatarAppearance message" << llendl; + LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL; return; } @@ -6946,7 +6946,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) S32 appearance_version; if (!resolve_appearance_version(contents, appearance_version)) { - llwarns << "bad appearance version info, discarding" << llendl; + LL_WARNS() << "bad appearance version info, discarding" << LL_ENDL; return; } S32 this_update_cof_version = contents.mCOFVersion; @@ -6957,11 +6957,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version << " last_update_request_cof_version " << last_update_request_cof_version - << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl; + << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL; if (getRegion() && (getRegion()->getCentralBakeVersion()==0)) { - llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl; + LL_WARNS() << avString() << "Received AvatarAppearance message for self in non-server-bake region" << LL_ENDL; } if( mFirstTEMessageReceived && (appearance_version == 0)) { @@ -6970,7 +6970,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } else { - LL_DEBUGS("Avatar") << "appearance message received" << llendl; + LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL; } // Check for stale update. @@ -6978,14 +6978,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && (appearance_version>0) && (this_update_cof_version < last_update_request_cof_version)) { - llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version - << ", got " << this_update_cof_version << llendl; + LL_WARNS() << "Stale appearance update, wanted version " << last_update_request_cof_version + << ", got " << this_update_cof_version << LL_ENDL; return; } if (isSelf() && isEditingAppearance()) { - LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << llendl; + LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << LL_ENDL; return; } @@ -6996,7 +6996,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) // appearance version, which may cause us to look for baked // textures in the wrong place and flag them as missing // assets. - LL_DEBUGS("Avatar") << "ignoring appearance message due to lack of params" << llendl; + LL_DEBUGS("Avatar") << "ignoring appearance message due to lack of params" << LL_ENDL; return; } @@ -7064,7 +7064,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE); // don't worry about VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT if (num_params != expected_tweakable_count) { - LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl; + LL_DEBUGS("Avatar") << "Number of params in AvatarAppearance msg (" << num_params << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << LL_ENDL; } if (params_changed) @@ -7094,13 +7094,13 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if (visualParamWeightsAreDefault() && mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT_SECONDS) { // re-request appearance, hoping that it comes back with a shape next time - llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl; + LL_INFOS() << "Re-requesting AvatarAppearance for object: " << getID() << LL_ENDL; LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID()); mRuthTimer.reset(); } else { - llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl; + LL_INFOS() << "That's okay, we already have a non-default shape for object: " << getID() << LL_ENDL; // we don't really care. } } @@ -7154,7 +7154,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture { if (!userdata) return; - //llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl; + //LL_INFOS() << "onBakedTextureMasksLoaded: " << src_vi->getID() << LL_ENDL; const LLUUID id = src_vi->getID(); LLTextureMaskData* maskData = (LLTextureMaskData*) userdata; @@ -7168,7 +7168,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture { if (!aux_src->getData()) { - llerrs << "No auxiliary source (morph mask) data for image id " << id << llendl; + LL_ERRS() << "No auxiliary source (morph mask) data for image id " << id << LL_ENDL; return; } @@ -7189,7 +7189,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture /* if( id == head_baked->getID() ) if (self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet) - //llinfos << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << llendl; + //LL_INFOS() << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << LL_ENDL; self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet->applyMorphMask(aux_src->getData(), aux_src->getWidth(), aux_src->getHeight(), 1); maskData->mLastDiscardLevel = discard_level; */ BOOL found_texture_id = false; @@ -7220,7 +7220,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture } if (!found_texture_id) { - llinfos << "unexpected image id: " << id << llendl; + LL_INFOS() << "unexpected image id: " << id << LL_ENDL; } self->dirtyMesh(); } @@ -7228,7 +7228,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture { // this can happen when someone uses an old baked texture possibly provided by // viewer-side baked texture caching - llwarns << "Masks loaded callback but NO aux source, id " << id << llendl; + LL_WARNS() << "Masks loaded callback but NO aux source, id " << id << LL_ENDL; } } @@ -7308,7 +7308,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) if (isUsingLocalAppearance()) { - llinfos << "not changing to baked texture while isUsingLocalAppearance" << llendl; + LL_INFOS() << "not changing to baked texture while isUsingLocalAppearance" << LL_ENDL; } else { @@ -7401,7 +7401,7 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara } else { - llinfos << "xmlfile write handle obtained : " << fullpath << llendl; + LL_INFOS() << "xmlfile write handle obtained : " << fullpath << LL_ENDL; } apr_file_printf( file, "\n" ); @@ -7540,7 +7540,7 @@ void LLVOAvatar::cullAvatarsByPixelArea() if (inst->mCulled != culled) { inst->mCulled = culled; - lldebugs << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << llendl; + LL_DEBUGS() << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << LL_ENDL; inst->updateMeshTextures(); } @@ -7604,7 +7604,7 @@ BOOL LLVOAvatar::isUsingServerBakes() const F32 expect_wt = mUseServerBakes ? 1.0 : 0.0; if (!is_approx_equal(wt,expect_wt)) { - llwarns << "wt " << wt << " differs from expected " << expect_wt << llendl; + LL_WARNS() << "wt " << wt << " differs from expected " << expect_wt << LL_ENDL; } #endif @@ -7871,7 +7871,7 @@ void LLVOAvatar::idleUpdateRenderCost() if (all_textures.find(image_id) == all_textures.end()) { // attachment texture not previously seen. - llinfos << "attachment_texture: " << image_id.asString() << llendl; + LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL; all_textures.insert(image_id); } } @@ -7891,7 +7891,7 @@ void LLVOAvatar::idleUpdateRenderCost() continue; if (all_textures.find(image_id) == all_textures.end()) { - llinfos << "local_texture: " << texture_dict->mName << ": " << image_id << llendl; + LL_INFOS() << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL; all_textures.insert(image_id); } } @@ -7970,7 +7970,7 @@ BOOL LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U if( !getImage( te, index ) ) { - llwarns << "getImage( " << te << ", " << index << " ) returned 0" << llendl; + LL_WARNS() << "getImage( " << te << ", " << index << " ) returned 0" << LL_ENDL; return FALSE; } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 117169678e..12b9744b24 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -165,7 +165,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mMotionController.mIsSelf = TRUE; - lldebugs << "Marking avatar as self " << id << llendl; + LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL; } // Called periodically for diagnostics, return true when done. @@ -206,7 +206,7 @@ void LLVOAvatarSelf::initInstance() // adds attachment points to mScreen among other things LLVOAvatar::initInstance(); - llinfos << "Self avatar object created. Starting timer." << llendl; + LL_INFOS() << "Self avatar object created. Starting timer." << LL_ENDL; mDebugSelfLoadTimer.reset(); // clear all times to -1 for debugging for (U32 i =0; i < LLAvatarAppearanceDefines::TEX_NUM_INDICES; ++i) @@ -227,7 +227,7 @@ void LLVOAvatarSelf::initInstance() status &= buildMenus(); if (!status) { - llerrs << "Unable to load user's avatar" << llendl; + LL_ERRS() << "Unable to load user's avatar" << LL_ENDL; return; } @@ -271,7 +271,7 @@ BOOL LLVOAvatarSelf::loadAvatarSelf() // avatar_skeleton.xml if (!buildSkeletonSelf(sAvatarSkeletonInfo)) { - llwarns << "avatar file: buildSkeleton() failed" << llendl; + LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL; return FALSE; } @@ -889,9 +889,9 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) // Diagnostic info //LLVector3d pos_from_new_region = getPositionGlobal(); - //llinfos << "pos_from_old_region is " << global_pos_from_old_region + //LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region // << " while pos_from_new_region is " << pos_from_new_region - // << llendl; + // << LL_ENDL; } if (!regionp || (regionp->getHandle() != mLastRegionHandle)) @@ -903,7 +903,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics - llinfos << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << llendl; + LL_INFOS() << "Region crossing took " << (F32)(delta * 1000.0).value() << " ms " << LL_ENDL; } if (regionp) { @@ -987,7 +987,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() // virtual void LLVOAvatarSelf::restoreMeshData() { - //llinfos << "Restoring" << llendl; + //LL_INFOS() << "Restoring" << LL_ENDL; mMeshValid = TRUE; updateJointLODs(); updateAttachmentVisibility(gAgentCamera.getCameraMode()); @@ -1227,7 +1227,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // Update COF contents, don't trigger appearance update. if (!isValid()) { - llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl; + LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL; } else { @@ -1601,7 +1601,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r { return; } - // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << llendl; + // LL_INFOS() << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << LL_ENDL; layer_set->requestUpdate(); layer_set->invalidateMorphMasks(); @@ -1754,7 +1754,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te { if (type >= TEX_NUM_INDICES) { - llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl; + LL_ERRS() << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << LL_ENDL; return; } LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getInstance()->getTEWearableType(type); @@ -1767,7 +1767,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te local_tex_obj = getLocalTextureObject(type,index); if (!local_tex_obj) { - llerrs << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << llendl; + LL_ERRS() << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << LL_ENDL; return; } @@ -1829,7 +1829,7 @@ void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type // virtual void LLVOAvatarSelf::dumpLocalTextures() const { - llinfos << "Local Textures:" << llendl; + LL_INFOS() << "Local Textures:" << LL_ENDL; /* ETextureIndex baked_equiv[] = { TEX_UPPER_BAKED, @@ -1853,22 +1853,22 @@ void LLVOAvatarSelf::dumpLocalTextures() const #if LL_RELEASE_FOR_DOWNLOAD // End users don't get to trivially see avatar texture IDs, makes textures // easier to steal. JC - llinfos << "LocTex " << name << ": Baked " << llendl; + LL_INFOS() << "LocTex " << name << ": Baked " << LL_ENDL; #else - llinfos << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << llendl; + LL_INFOS() << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << LL_ENDL; #endif } else if (local_tex_obj && local_tex_obj->getImage() != NULL) { if (local_tex_obj->getImage()->getID() == IMG_DEFAULT_AVATAR) { - llinfos << "LocTex " << name << ": None" << llendl; + LL_INFOS() << "LocTex " << name << ": None" << LL_ENDL; } else { const LLViewerFetchedTexture* image = dynamic_cast( local_tex_obj->getImage() ); - llinfos << "LocTex " << name << ": " + LL_INFOS() << "LocTex " << name << ": " << "Discard " << image->getDiscardLevel() << ", " << "(" << image->getWidth() << ", " << image->getHeight() << ") " #if !LL_RELEASE_FOR_DOWNLOAD @@ -1877,12 +1877,12 @@ void LLVOAvatarSelf::dumpLocalTextures() const << image->getID() << " " #endif << "Priority: " << image->getDecodePriority() - << llendl; + << LL_ENDL; } } else { - llinfos << "LocTex " << name << ": No LLViewerTexture" << llendl; + LL_INFOS() << "LocTex " << name << ": No LLViewerTexture" << LL_ENDL; } } } @@ -1938,7 +1938,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() { S32 gl_bytes = 0; gAgentAvatarp->getLocalTextureByteCount(&gl_bytes); - llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl; + LL_INFOS() << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << LL_ENDL; } BOOL LLVOAvatarSelf::getIsCloud() const @@ -1962,12 +1962,12 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded due to missing one or more required body parts: " + LL_INFOS() << "Self is clouded due to missing one or more required body parts: " << (shape_count ? "" : "SHAPE ") << (hair_count ? "" : "HAIR ") << (eye_count ? "" : "EYES ") << (skin_count ? "" : "SKIN ") - << llendl; + << LL_ENDL; } return TRUE; } @@ -1976,7 +1976,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because of no hair texture" << llendl; + LL_INFOS() << "Self is clouded because of no hair texture" << LL_ENDL; } return TRUE; } @@ -1988,7 +1988,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because lower textures not baked" << llendl; + LL_INFOS() << "Self is clouded because lower textures not baked" << LL_ENDL; } return TRUE; } @@ -1998,7 +1998,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because upper textures not baked" << llendl; + LL_INFOS() << "Self is clouded because upper textures not baked" << LL_ENDL; } return TRUE; } @@ -2018,14 +2018,14 @@ BOOL LLVOAvatarSelf::getIsCloud() const { if (do_warn) { - llinfos << "Self is clouded because texture at index " << i - << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + LL_INFOS() << "Self is clouded because texture at index " << i + << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << LL_ENDL; } return TRUE; } } - lldebugs << "Avatar de-clouded" << llendl; + LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL; } return FALSE; } @@ -2146,7 +2146,7 @@ void LLVOAvatarSelf::dumpAllTextures() const if (!layerset_buffer) continue; vd_text += verboseDebugDumpLocalTextureDataInfo(layerset); } - LL_DEBUGS("Avatar") << vd_text << llendl; + LL_DEBUGS("Avatar") << vd_text << LL_ENDL; } const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const @@ -2433,7 +2433,7 @@ public: /* virtual */ void result(const LLSD& content) { - LL_DEBUGS("Avatar") << "status OK" << llendl; + LL_DEBUGS("Avatar") << "status OK" << LL_ENDL; } // Error @@ -2442,7 +2442,7 @@ public: if (isAgentAvatarValid()) { LL_DEBUGS("Avatar") << "failed, will rebake [status:" - << status << "]: " << content << llendl; + << status << "]: " << content << LL_ENDL; forceAppearanceUpdate(); } } @@ -2501,7 +2501,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const // Check if the texture hasn't been baked yet. if (!isTextureDefined(tex_index, 0)) { - lldebugs << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << llendl; + LL_DEBUGS() << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << LL_ENDL; return FALSE; } @@ -2520,7 +2520,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const const ETextureIndex t_index = (*iter); LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getTEWearableType(t_index); U32 count = gAgentWearables.getWearableCount(wearable_type); - lldebugs << "Checking index " << (U32) t_index << " count: " << count << llendl; + LL_DEBUGS() << "Checking index " << (U32) t_index << " count: " << count << LL_ENDL; for (U32 wearable_index = 0; wearable_index < count; ++wearable_index) { @@ -2542,7 +2542,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const asset_id_matches); BOOL can_grab = FALSE; - lldebugs << "item count for asset " << texture_id << ": " << items.size() << llendl; + LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL; if (items.size()) { // search for full permissions version @@ -2657,16 +2657,16 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) /* switch(te) case TEX_HEAD_BAKED: - llinfos << "New baked texture: HEAD" << llendl; */ + LL_INFOS() << "New baked texture: HEAD" << LL_ENDL; */ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(te); if (texture_dict->mIsBakedTexture) { debugBakedTextureUpload(texture_dict->mBakedTextureIndex, TRUE); // FALSE for start of upload, TRUE for finish. - llinfos << "New baked texture: " << texture_dict->mName << " UUID: " << uuid <mName << " UUID: " << uuid <getBakedTextures().begin(); @@ -2765,7 +2765,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const if (!layerset) continue; const LLViewerTexLayerSetBuffer *layerset_buffer = layerset->getViewerComposite(); if (!layerset_buffer) continue; - LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << llendl; + LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << LL_ENDL; } dumpAllTextures(); @@ -2805,11 +2805,11 @@ void LLVOAvatarSelf::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid { if (mInitialBakeIDs[i] == uuid) { - llinfos << "baked texture correctly loaded at login! " << i << llendl; + LL_INFOS() << "baked texture correctly loaded at login! " << i << LL_ENDL; } else { - llwarns << "baked texture does not match id loaded at login!" << i << llendl; + LL_WARNS() << "baked texture does not match id loaded at login!" << i << LL_ENDL; } mInitialBakeIDs[i] = LLUUID::null; } @@ -2845,7 +2845,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) LLViewerTexLayerSet* layer_set = gAgentAvatarp->getLayerSet(index); if (layer_set) { - llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; + LL_INFOS() << "TAT: rebake - matched entry " << (S32)index << LL_ENDL; gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; add(LLStatViewer::TEX_REBAKES, 1); @@ -2869,7 +2869,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) { - llinfos << "TAT: forced full rebake. " << llendl; + LL_INFOS() << "TAT: forced full rebake. " << LL_ENDL; for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -2888,7 +2888,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) } else { - llwarns << "TAT: NO LAYER SET FOR " << (S32)baked_index << llendl; + LL_WARNS() << "TAT: NO LAYER SET FOR " << (S32)baked_index << LL_ENDL; } } @@ -3069,7 +3069,7 @@ void LLVOAvatarSelf::deleteScratchTextures() if( sScratchTexBytes ) { - lldebugs << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << llendl; + LL_DEBUGS() << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; delete_and_clear(sScratchTexNames); LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; @@ -3080,7 +3080,7 @@ void LLVOAvatarSelf::deleteScratchTextures() // static void LLVOAvatarSelf::dumpScratchTextureByteCount() { - llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl; + LL_INFOS() << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; } void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile) diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index d1c27edce7..98a924b3be 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -138,7 +138,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) // We've got a bogus size, skip reading it. // We won't bother seeking, because the rest of this file // is likely bogus, and will be tossed anyway. - llwarns << "Bogus cache entry, size " << size << ", aborting!" << llendl; + LL_WARNS() << "Bogus cache entry, size " << size << ", aborting!" << LL_ENDL; success = FALSE; } } @@ -268,7 +268,7 @@ LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP(U32 crc) if ( (mCRC != crc) ||(mDP.getBufferSize() == 0)) { - //llinfos << "Not getting cache entry, invalid!" << llendl; + //LL_INFOS() << "Not getting cache entry, invalid!" << LL_ENDL; return NULL; } mHitCount++; @@ -279,7 +279,7 @@ LLDataPackerBinaryBuffer *LLVOCacheEntry::getDP() { if (mDP.getBufferSize() == 0) { - //llinfos << "Not getting cache entry, invalid!" << llendl; + //LL_INFOS() << "Not getting cache entry, invalid!" << LL_ENDL; return NULL; } @@ -295,12 +295,12 @@ void LLVOCacheEntry::recordHit() void LLVOCacheEntry::dump() const { - llinfos << "local " << mLocalID + LL_INFOS() << "local " << mLocalID << " crc " << mCRC << " hits " << mHitCount << " dupes " << mDupeCount << " change " << mCRCChangeCount - << llendl; + << LL_ENDL; } BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const @@ -640,13 +640,13 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) { if(!mEnabled) { - llwarns << "Not initializing cache: Cache is currently disabled." << llendl; + LL_WARNS() << "Not initializing cache: Cache is currently disabled." << LL_ENDL; return ; } if(mInitialized) { - llwarns << "Cache already initialized." << llendl; + LL_WARNS() << "Cache already initialized." << LL_ENDL; return ; } mInitialized = true; @@ -684,15 +684,15 @@ void LLVOCache::removeCache(ELLPath location, bool started) if(mReadOnly) { - llwarns << "Not removing cache at " << location << ": Cache is currently in read-only mode." << llendl; + LL_WARNS() << "Not removing cache at " << location << ": Cache is currently in read-only mode." << LL_ENDL; return ; } - llinfos << "about to remove the object cache due to settings." << llendl ; + LL_INFOS() << "about to remove the object cache due to settings." << LL_ENDL ; std::string mask = "*"; std::string cache_dir = gDirUtilp->getExpandedFilename(location, object_cache_dirname); - llinfos << "Removing cache at " << cache_dir << llendl; + LL_INFOS() << "Removing cache at " << cache_dir << LL_ENDL; gDirUtilp->deleteFilesInDir(cache_dir, mask); //delete all files LLFile::rmdir(cache_dir); @@ -705,17 +705,17 @@ void LLVOCache::removeCache() if(!mInitialized) { //OK to remove cache even it is not initialized. - llwarns << "Object cache is not initialized yet." << llendl; + LL_WARNS() << "Object cache is not initialized yet." << LL_ENDL; } if(mReadOnly) { - llwarns << "Not clearing object cache: Cache is currently in read-only mode." << llendl; + LL_WARNS() << "Not clearing object cache: Cache is currently in read-only mode." << LL_ENDL; return ; } std::string mask = "*"; - llinfos << "Removing object cache at " << mObjectCacheDirName << llendl; + LL_INFOS() << "Removing object cache at " << mObjectCacheDirName << LL_ENDL; gDirUtilp->deleteFilesInDir(mObjectCacheDirName, mask); clearCacheInMemory() ; @@ -787,7 +787,7 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry) { if(mReadOnly) { - llwarns << "Not removing cache for handle " << entry->mHandle << ": Cache is currently in read-only mode." << llendl; + LL_WARNS() << "Not removing cache for handle " << entry->mHandle << ": Cache is currently in read-only mode." << LL_ENDL; return ; } @@ -802,7 +802,7 @@ void LLVOCache::readCacheHeader() { if(!mEnabled) { - llwarns << "Not reading cache header: Cache is currently disabled." << llendl; + LL_WARNS() << "Not reading cache header: Cache is currently disabled." << LL_ENDL; return; } @@ -832,7 +832,7 @@ void LLVOCache::readCacheHeader() if(!success) //failed { - llwarns << "Error reading cache header entry. (entry_index=" << mNumEntries << ")" << llendl; + LL_WARNS() << "Error reading cache header entry. (entry_index=" << mNumEntries << ")" << LL_ENDL; delete entry ; entry = NULL ; break ; @@ -860,7 +860,7 @@ void LLVOCache::readCacheHeader() //for(header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; success && iter != mHeaderEntryQueue.end(); ++iter) //{ // getObjectCacheFilename((*iter)->mHandle, name) ; - // llinfos << name << llendl ; + // LL_INFOS() << name << LL_ENDL ; //} //----------- } @@ -885,13 +885,13 @@ void LLVOCache::writeCacheHeader() { if (!mEnabled) { - llwarns << "Not writing cache header: Cache is currently disabled." << llendl; + LL_WARNS() << "Not writing cache header: Cache is currently disabled." << LL_ENDL; return; } if(mReadOnly) { - llwarns << "Not writing cache header: Cache is currently in read-only mode." << llendl; + LL_WARNS() << "Not writing cache header: Cache is currently in read-only mode." << LL_ENDL; return; } @@ -945,7 +945,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca { if(!mEnabled) { - llwarns << "Not reading cache for handle " << handle << "): Cache is currently disabled." << llendl; + LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL; return ; } llassert_always(mInitialized); @@ -953,7 +953,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca handle_entry_map_t::iterator iter = mHandleEntryMap.find(handle) ; if(iter == mHandleEntryMap.end()) //no cache { - llwarns << "No handle map entry for " << handle << llendl; + LL_WARNS() << "No handle map entry for " << handle << LL_ENDL; return ; } @@ -970,7 +970,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca { if(cache_id != id) { - llinfos << "Cache ID doesn't match for this region, discarding"<< llendl; + LL_INFOS() << "Cache ID doesn't match for this region, discarding"<< LL_ENDL; success = false ; } @@ -986,7 +986,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca LLPointer entry = new LLVOCacheEntry(&apr_file); if (!entry->getLocalID()) { - llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl; + LL_WARNS() << "Aborting cache file load for " << filename << ", cache file corruption!" << LL_ENDL; success = false ; break ; } @@ -1026,14 +1026,14 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: { if(!mEnabled) { - llwarns << "Not writing cache for handle " << handle << "): Cache is currently disabled." << llendl; + LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL; return ; } llassert_always(mInitialized); if(mReadOnly) { - llwarns << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << llendl; + LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << LL_ENDL; return ; } @@ -1068,13 +1068,13 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: //update cache header if(!updateEntry(entry)) { - llwarns << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << llendl; + LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << LL_ENDL; return ; //update failed. } if(!dirty_cache) { - llwarns << "Skipping write to cache for handle " << handle << ": cache not dirty" << llendl; + LL_WARNS() << "Skipping write to cache for handle " << handle << ": cache not dirty" << LL_ENDL; return ; //nothing changed, no need to update. } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 62fe6e7b12..a60d8a2284 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -97,7 +97,7 @@ void LLVOGrass::updateSpecies() if (!sSpeciesTable.count(mSpecies)) { - llinfos << "Unknown grass type, substituting grass type." << llendl; + LL_INFOS() << "Unknown grass type, substituting grass type." << LL_ENDL; SpeciesMap::const_iterator it = sSpeciesTable.begin(); mSpecies = (*it).first; } @@ -119,7 +119,7 @@ void LLVOGrass::initClass() if (!grass_def_grass.parseFile(xml_filename)) { - llerrs << "Failed to parse grass file." << llendl; + LL_ERRS() << "Failed to parse grass file." << LL_ENDL; return; } @@ -131,7 +131,7 @@ void LLVOGrass::initClass() { if (!grass_def->hasName("grass")) { - llwarns << "Invalid grass definition node " << grass_def->getName() << llendl; + LL_WARNS() << "Invalid grass definition node " << grass_def->getName() << LL_ENDL; continue; } F32 F32_val; @@ -143,13 +143,13 @@ void LLVOGrass::initClass() static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id"); if (!grass_def->getFastAttributeS32(species_id_string, species)) { - llwarns << "No species id defined" << llendl; + LL_WARNS() << "No species id defined" << LL_ENDL; continue; } if (species < 0) { - llwarns << "Invalid species id " << species << llendl; + LL_WARNS() << "Invalid species id " << species << LL_ENDL; continue; } @@ -170,7 +170,7 @@ void LLVOGrass::initClass() if (sSpeciesTable.count(species)) { - llinfos << "Grass species " << species << " already defined! Duplicate discarded." << llendl; + LL_INFOS() << "Grass species " << species << " already defined! Duplicate discarded." << LL_ENDL; delete newGrass; continue; } @@ -186,7 +186,7 @@ void LLVOGrass::initClass() std::string name; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); grass_def->getFastAttributeString(name_string, name); - llwarns << "Incomplete definition of grass " << name << llendl; + LL_WARNS() << "Incomplete definition of grass " << name << LL_ENDL; } } @@ -257,7 +257,7 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys, ||(getAcceleration().lengthSquared() > 0.f) ||(getAngularVelocity().lengthSquared() > 0.f)) { - llinfos << "ACK! Moving grass!" << llendl; + LL_INFOS() << "ACK! Moving grass!" << LL_ENDL; setVelocity(LLVector3::zero); setAcceleration(LLVector3::zero); setAngularVelocity(LLVector3::zero); @@ -444,7 +444,7 @@ void LLVOGrass::plantBlades() // This is bad, but not the end of the world. if (!sSpeciesTable.count(mSpecies)) { - llinfos << "Unknown grass species " << mSpecies << llendl; + LL_INFOS() << "Unknown grass species " << mSpecies << LL_ENDL; return; } diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp index 9281334d81..23a8a61b85 100755 --- a/indra/newview/llvoicevisualizer.cpp +++ b/indra/newview/llvoicevisualizer.cpp @@ -310,7 +310,7 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah ) aah = transfer_aah * sAah[elapsed_aahs]; /* - llinfos << " elapsed frames " << elapsed_frames + LL_INFOS() << " elapsed frames " << elapsed_frames << " ooh " << ooh << " aah " << aah << " transfer ooh" << transfer_ooh @@ -320,7 +320,7 @@ void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah ) << " elapsed time " << elapsed_time << " elapsed oohs " << elapsed_oohs << " elapsed aahs " << elapsed_aahs - << llendl; + << LL_ENDL; */ } else @@ -590,7 +590,7 @@ void LLVoiceVisualizer::unpackData(LLMessageSystem *mesgsys, S32 blocknum) S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData); if (size != 1) { - llwarns << "Voice effect with bad size " << size << llendl; + LL_WARNS() << "Voice effect with bad size " << size << LL_ENDL; return; } mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, 1, blocknum); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index df5d413407..5e8a771929 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1364,7 +1364,7 @@ void LLVivoxVoiceClient::stateMachine() { // Notify observers to let them know there is problem with voice notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); - llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; + LL_WARNS() << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << LL_ENDL; } // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 487227f006..1f346b2928 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -329,7 +329,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) facep = drawable->getFace(i); if (!facep) { - llwarns << "No face found for index " << i << "!" << llendl; + LL_WARNS() << "No face found for index " << i << "!" << LL_ENDL; continue; } @@ -375,7 +375,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) LLFace* facep = drawable->getFace(i); if (!facep) { - llwarns << "No face found for index " << i << "!" << llendl; + LL_WARNS() << "No face found for index " << i << "!" << LL_ENDL; continue; } facep->setTEOffset(i); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 4633b62bfb..178542cc88 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -72,7 +72,7 @@ public: if ((data_mask & type_mask) != data_mask) { - llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl; + LL_ERRS() << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << LL_ENDL; } if (data_mask & MAP_NORMAL) @@ -291,7 +291,7 @@ void LLVOSurfacePatch::updateFaceSize(S32 idx) { if (idx != 0) { - llwarns << "Terrain partition requested invalid face!!!" << llendl; + LL_WARNS() << "Terrain partition requested invalid face!!!" << LL_ENDL; return; } diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index dc20d348c0..f5206b74ea 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -112,7 +112,7 @@ void LLVOTree::initClass() if (!tree_def_tree.parseFile(xml_filename)) { - llerrs << "Failed to parse tree file." << llendl; + LL_ERRS() << "Failed to parse tree file." << LL_ENDL; } LLXmlTreeNode* rootp = tree_def_tree.getRoot(); @@ -123,7 +123,7 @@ void LLVOTree::initClass() { if (!tree_def->hasName("tree")) { - llwarns << "Invalid tree definition node " << tree_def->getName() << llendl; + LL_WARNS() << "Invalid tree definition node " << tree_def->getName() << LL_ENDL; continue; } F32 F32_val; @@ -138,19 +138,19 @@ void LLVOTree::initClass() static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id"); if (!tree_def->getFastAttributeS32(species_id_string, species)) { - llwarns << "No species id defined" << llendl; + LL_WARNS() << "No species id defined" << LL_ENDL; continue; } if (species < 0) { - llwarns << "Invalid species id " << species << llendl; + LL_WARNS() << "Invalid species id " << species << LL_ENDL; continue; } if (sSpeciesTable.count(species)) { - llwarns << "Tree species " << species << " already defined! Duplicate discarded." << llendl; + LL_WARNS() << "Tree species " << species << " already defined! Duplicate discarded." << LL_ENDL; continue; } @@ -241,7 +241,7 @@ void LLVOTree::initClass() std::string name; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); tree_def->getFastAttributeString(name_string, name); - llwarns << "Incomplete definition of tree " << name << llendl; + LL_WARNS() << "Incomplete definition of tree " << name << LL_ENDL; } } @@ -283,7 +283,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, ||(getAcceleration().lengthSquared() > 0.f) ||(getAngularVelocity().lengthSquared() > 0.f)) { - llinfos << "ACK! Moving tree!" << llendl; + LL_INFOS() << "ACK! Moving tree!" << LL_ENDL; setVelocity(LLVector3::zero); setAcceleration(LLVector3::zero); setAngularVelocity(LLVector3::zero); @@ -697,8 +697,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) slices = sLODSlices[lod]; F32 base_radius = 0.65f; F32 top_radius = base_radius * sSpeciesTable[mSpecies]->mTaper; - //llinfos << "Species " << ((U32) mSpecies) << ", taper = " << sSpeciesTable[mSpecies].mTaper << llendl; - //llinfos << "Droop " << mDroop << ", branchlength: " << mBranchLength << llendl; + //LL_INFOS() << "Species " << ((U32) mSpecies) << ", taper = " << sSpeciesTable[mSpecies].mTaper << LL_ENDL; + //LL_INFOS() << "Droop " << mDroop << ", branchlength: " << mBranchLength << LL_ENDL; F32 angle = 0; F32 angle_inc = 360.f/(slices-1); F32 z = 0.f; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 632f4d178a..547ea3369d 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -390,8 +390,8 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp); if (!res) { - llwarns << "Bogus volume parameters in object " << getID() << llendl; - llwarns << getRegion()->getOriginGlobal() << llendl; + LL_WARNS() << "Bogus volume parameters in object " << getID() << LL_ENDL; + LL_WARNS() << getRegion()->getOriginGlobal() << LL_ENDL; } volume_params.setSculptID(sculpt_id, sculpt_type); @@ -405,14 +405,14 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, { // There's something bogus in the data that we're unpacking. dp->dumpBufferToLog(); - llwarns << "Flushing cache files" << llendl; + LL_WARNS() << "Flushing cache files" << LL_ENDL; if(LLVOCache::instanceExists() && getRegion()) { LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ; } - llwarns << "Bogus TE data in " << getID() << llendl; + LL_WARNS() << "Bogus TE data in " << getID() << LL_ENDL; } else { @@ -1120,9 +1120,9 @@ void LLVOVolume::sculpt() static S32 low_sculpty_discard_warning_count = 100; if (++low_sculpty_discard_warning_count >= 100) { // Log first time, then every 100 afterwards otherwise this can flood the logs - llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + LL_WARNS() << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() << " at " << current_discard - << " is less than -2." << llendl; + << " is less than -2." << LL_ENDL; low_sculpty_discard_warning_count = 0; } @@ -1134,9 +1134,9 @@ void LLVOVolume::sculpt() static S32 high_sculpty_discard_warning_count = 100; if (++high_sculpty_discard_warning_count >= 100) { // Log first time, then every 100 afterwards otherwise this can flood the logs - llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + LL_WARNS() << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() << " at " << current_discard - << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl; + << " is more than than allowed max of " << MAX_DISCARD_LEVEL << LL_ENDL; high_sculpty_discard_warning_count = 0; } @@ -2148,7 +2148,7 @@ void LLVOVolume::updateObjectMediaData(const LLSD &media_data_array, const std:: if ( (S32)fetched_version > mLastFetchedMediaVersion) { mLastFetchedMediaVersion = fetched_version; - //llinfos << "updating:" << this->getID() << " " << ll_pretty_print_sd(media_data_array) << llendl; + //LL_INFOS() << "updating:" << this->getID() << " " << ll_pretty_print_sd(media_data_array) << LL_ENDL; LLSD::array_const_iterator iter = media_data_array.beginArray(); LLSD::array_const_iterator end = media_data_array.endArray(); @@ -2176,7 +2176,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index << " hasMedia = " << te->hasMedia() << " : " - << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; + << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL; std::string previous_url; LLMediaEntry* mep = te->getMediaData(); @@ -2218,7 +2218,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m LL_DEBUGS("MediaOnAPrim") << "AFTER: texture_index = " << texture_index << " hasMedia = " << te->hasMedia() << " : " - << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; + << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL; } void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) @@ -4080,7 +4080,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_NORMAL)) { - llwarns << "Non fullbright face has no normals!" << llendl; + LL_WARNS() << "Non fullbright face has no normals!" << LL_ENDL; return; } @@ -4496,7 +4496,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) for ( int i=0; imJointNames[i].c_str(); - //llinfos<<"joint name "<getJoint( lookingForJoint ); if ( pJoint && pJoint->getId() != currentId ) { @@ -4996,7 +4996,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) //if not all buffers are unmapped if(num_mapped_veretx_buffer != LLVertexBuffer::sMappedCount) { - llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ; + LL_WARNS() << "Not all mapped vertex buffers are unmapped!" << LL_ENDL ; for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable(); @@ -5294,7 +5294,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: if (batch_textures && facep->getTextureIndex() == 255) { - llerrs << "Invalid texture index." << llendl; + LL_ERRS() << "Invalid texture index." << LL_ENDL; } { @@ -5319,7 +5319,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: if (!facep->getGeometryVolume(*volume, te_idx, vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), index_offset,true)) { - llwarns << "Failed to get geometry for face!" << llendl; + LL_WARNS() << "Failed to get geometry for face!" << LL_ENDL; } if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 0f2f49a975..96a94e0af4 100755 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -321,7 +321,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) if(!success) { - llerrs << "Failed updating WindLight sky geometry." << llendl; + LL_ERRS() << "Failed updating WindLight sky geometry." << LL_ENDL; } buildFanBuffer(vertices, texCoords, indices); @@ -345,7 +345,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) // round up to a whole number of segments const U32 strips_segments = (total_stacks+stacks_per_seg-1) / stacks_per_seg; - llinfos << "WL Skydome strips in " << strips_segments << " batches." << llendl; + LL_INFOS() << "WL Skydome strips in " << strips_segments << " batches." << LL_ENDL; mStripsVerts.resize(strips_segments, NULL); @@ -384,7 +384,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) if(!success) { - llerrs << "Failed updating WindLight sky geometry." << llendl; + LL_ERRS() << "Failed updating WindLight sky geometry." << LL_ENDL; } // fill it @@ -394,7 +394,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) segment->flush(); } - llinfos << "completed in " << llformat("%.2f", timer.getElapsedTimeF32().value()) << "seconds" << llendl; + LL_INFOS() << "completed in " << llformat("%.2f", timer.getElapsedTimeF32().value()) << "seconds" << LL_ENDL; } #else mStripsVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); @@ -786,7 +786,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) if(!success) { - llerrs << "Failed updating star geometry." << llendl; + LL_ERRS() << "Failed updating star geometry." << LL_ENDL; } // *TODO: fix LLStrider with a real prefix increment operator so it can be @@ -795,7 +795,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) if (mStarVertices.size() < getStarsNumVerts()) { - llerrs << "Star reference geometry insufficient." << llendl; + LL_ERRS() << "Star reference geometry insufficient." << LL_ENDL; } for (U32 vtx = 0; vtx < getStarsNumVerts(); ++vtx) diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index c852f1869b..7b5bcf4db0 100755 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -222,7 +222,7 @@ void LLWatchdog::run() if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER)) { - llinfos << "Watchdog thread delayed: resetting entries." << llendl; + LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL; std::for_each(mSuspects.begin(), mSuspects.end(), std::mem_fun(&LLWatchdogEntry::reset) @@ -244,7 +244,7 @@ void LLWatchdog::run() mTimer->stop(); } - llinfos << "Watchdog detected error:" << llendl; + LL_INFOS() << "Watchdog detected error:" << LL_ENDL; mKillerCallback(); } } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index ec1f0389ea..74100910f5 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -103,7 +103,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) std::string path = gDirUtilp->add(dir, file); if (!loadPreset(path)) { - llwarns << "Error loading water preset from " << path << llendl; + LL_WARNS() << "Error loading water preset from " << path << LL_ENDL; } } } @@ -202,7 +202,7 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate) { if (params.size() == 0) { - llwarns << "Undefined water params" << llendl; + LL_WARNS() << "Undefined water params" << LL_ENDL; return; } diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index c196d70617..ca60b79f9d 100755 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -558,7 +558,7 @@ LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparato if(const_it == mWearableOrder.end()) { - llwarns<<"Absent information about order rang of items of "<getUUID(), ADD_BOTTOM, rearrange); if (!is_item_added) { - llwarns << "Couldn't add flat list item." << llendl; + LL_WARNS() << "Couldn't add flat list item." << LL_ENDL; llassert(is_item_added); } } @@ -825,7 +825,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu { if (!menu) { - llwarns << "Invalid menu" << llendl; + LL_WARNS() << "Invalid menu" << LL_ENDL; return; } @@ -846,7 +846,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu if (!item) { - llwarns << "Invalid item" << llendl; + LL_WARNS() << "Invalid item" << LL_ENDL; // *NOTE: the logic below may not work in this case continue; } @@ -919,7 +919,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu if (mask & MASK_UNKNOWN) { - llwarns << "Non-wearable items passed." << llendl; + LL_WARNS() << "Non-wearable items passed." << LL_ENDL; } U32 num_visible_items = 0; @@ -1026,7 +1026,7 @@ bool LLWearableItemsList::ContextMenu::canAddWearables(const uuid_vec_t& item_id } else { - llwarns << "Unexpected wearable type" << llendl; + LL_WARNS() << "Unexpected wearable type" << LL_ENDL; return false; } } diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 79c2778253..6085893129 100755 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -216,7 +216,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearable, const std::string& new_name) { - lldebugs << "LLWearableList::createCopy()" << llendl; + LL_DEBUGS() << "LLWearableList::createCopy()" << LL_ENDL; LLViewerWearable *wearable = generateNewWearable(); wearable->copyDataFrom(old_wearable); @@ -235,7 +235,7 @@ LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearabl LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type, LLAvatarAppearance *avatarp ) { - lldebugs << "LLWearableList::createNewWearable()" << llendl; + LL_DEBUGS() << "LLWearableList::createNewWearable()" << LL_ENDL; LLViewerWearable *wearable = generateNewWearable(); wearable->setType( type, avatarp ); diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 83337b386d..665671a38f 100755 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -121,7 +121,7 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin if(gSavedSettings.getBOOL("DisableExternalBrowser")) { // Don't open an external browser under any circumstances. - llwarns << "Blocked attempt to open external browser." << llendl; + LL_WARNS() << "Blocked attempt to open external browser." << LL_ENDL; return; } diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 641f338f2c..b77a8375d1 100755 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -80,7 +80,7 @@ public: if (status != 200) { - llwarns << "Failed to get upload config (" << status << ")" << llendl; + LL_WARNS() << "Failed to get upload config (" << status << ")" << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); return; } @@ -89,7 +89,7 @@ public: Json::Reader reader; if (!reader.parse(body, root)) { - llwarns << "Failed to parse upload config: " << reader.getFormatedErrorMessages() << llendl; + LL_WARNS() << "Failed to parse upload config: " << reader.getFormatedErrorMessages() << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); return; } @@ -112,7 +112,7 @@ public: config["caption"] = data.get("caption", "").asString(); // Do the actual image upload using the configuration. - LL_DEBUGS("Snapshots") << "Got upload config, POSTing image to " << upload_url << ", config=[" << config << "]" << llendl; + LL_DEBUGS("Snapshots") << "Got upload config, POSTing image to " << upload_url << ", config=[" << config << "]" << LL_ENDL; LLWebProfile::post(mImagep, config, upload_url); } @@ -135,7 +135,7 @@ public: { if (status != 200) { - llwarns << "Failed to upload image: " << status << " " << reason << llendl; + LL_WARNS() << "Failed to upload image: " << status << " " << reason << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); return; } @@ -144,8 +144,8 @@ public: std::stringstream strstrm; strstrm << istr.rdbuf(); const std::string body = strstrm.str(); - llinfos << "Image uploaded." << llendl; - LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << body << "]" << llendl; + LL_INFOS() << "Image uploaded." << LL_ENDL; + LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << body << "]" << LL_ENDL; LLWebProfile::reportImageUploadStatus(true); } @@ -171,13 +171,13 @@ public: LLSD headers = LLViewerMedia::getHeaders(); headers["Cookie"] = LLWebProfile::getAuthCookie(); const std::string& redir_url = content["location"]; - LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << llendl; + LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << LL_ENDL; LLHTTPClient::get(redir_url, new LLWebProfileResponders::PostImageRedirectResponder, headers); } else { - llwarns << "Unexpected POST status: " << status << " " << reason << llendl; - LL_DEBUGS("Snapshots") << "headers: [" << content << "]" << llendl; + LL_WARNS() << "Unexpected POST status: " << status << " " << reason << LL_ENDL; + LL_DEBUGS("Snapshots") << "headers: [" << content << "]" << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); } } @@ -204,7 +204,7 @@ void LLWebProfile::uploadImage(LLPointer image, const std::str config_url += "?caption=" + LLURI::escape(caption); config_url += "&add_loc=" + std::string(add_location ? "1" : "0"); - LL_DEBUGS("Snapshots") << "Requesting " << config_url << llendl; + LL_DEBUGS("Snapshots") << "Requesting " << config_url << LL_ENDL; LLSD headers = LLViewerMedia::getHeaders(); headers["Cookie"] = getAuthCookie(); LLHTTPClient::get(config_url, new LLWebProfileResponders::ConfigResponder(image), headers); @@ -213,7 +213,7 @@ void LLWebProfile::uploadImage(LLPointer image, const std::str // static void LLWebProfile::setAuthCookie(const std::string& cookie) { - LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << llendl; + LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << LL_ENDL; sAuthCookie = cookie; } @@ -222,7 +222,7 @@ void LLWebProfile::post(LLPointer image, const LLSD& config, c { if (dynamic_cast(image.get()) == 0) { - llwarns << "Image to upload is not a PNG" << llendl; + LL_WARNS() << "Image to upload is not a PNG" << LL_ENDL; llassert(dynamic_cast(image.get()) != 0); return; } diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 4c0cb7c0f4..e9b0baf612 100755 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -46,7 +46,7 @@ LLWLDayCycle::~LLWLDayCycle() void LLWLDayCycle::loadDayCycle(const LLSD& day_data, LLWLParamKey::EScope scope) { - lldebugs << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << llendl; + LL_DEBUGS() << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << LL_ENDL; mTimeMap.clear(); // add each key frame @@ -128,7 +128,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path) void LLWLDayCycle::saveDayCycle(const std::string & fileName) { std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", fileName)); - //llinfos << "Saving WindLight settings to " << pathName << llendl; + //LL_INFOS() << "Saving WindLight settings to " << pathName << LL_ENDL; save(pathName); } @@ -154,7 +154,7 @@ LLSD LLWLDayCycle::asLLSD() day_data.append(key); } - lldebugs << "Dumping day cycle (" << mTimeMap.size() << ") to LLSD: " << day_data << llendl; + LL_DEBUGS() << "Dumping day cycle (" << mTimeMap.size() << ") to LLSD: " << day_data << LL_ENDL; return day_data; } @@ -169,7 +169,7 @@ bool LLWLDayCycle::getSkyRefs(std::map& refs) const const LLWLParamKey& key = iter->second; if (!wl_mgr.getParamSet(key, refs[key])) { - llwarns << "Cannot find sky [" << key.name << "] referenced by a day cycle" << llendl; + LL_WARNS() << "Cannot find sky [" << key.name << "] referenced by a day cycle" << LL_ENDL; result = false; } } @@ -192,7 +192,7 @@ bool LLWLDayCycle::getSkyMap(LLSD& sky_map) const void LLWLDayCycle::clearKeyframes() { - lldebugs << "Clearing key frames" << llendl; + LL_DEBUGS() << "Clearing key frames" << LL_ENDL; mTimeMap.clear(); } @@ -209,18 +209,18 @@ bool LLWLDayCycle::addKeyframe(F32 newTime, LLWLParamKey frame) if(mTimeMap.find(newTime) == mTimeMap.end()) { mTimeMap.insert(std::pair(newTime, frame)); - lldebugs << "Adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl; + LL_DEBUGS() << "Adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << LL_ENDL; return true; } // otherwise, don't add, and return error - llwarns << "Error adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << llendl; + LL_WARNS() << "Error adding key frame (" << newTime << ", " << frame.toLLSD() << ")" << LL_ENDL; return false; } bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime) { - lldebugs << "Changing key frame time (" << oldTime << " => " << newTime << ")" << llendl; + LL_DEBUGS() << "Changing key frame time (" << oldTime << " => " << newTime << ")" << LL_ENDL; // just remove and add back LLWLParamKey frame = mTimeMap[oldTime]; @@ -228,7 +228,7 @@ bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime) bool stat = removeKeyframe(oldTime); if(stat == false) { - lldebugs << "Failed to change key frame time (" << oldTime << " => " << newTime << ")" << llendl; + LL_DEBUGS() << "Failed to change key frame time (" << oldTime << " => " << newTime << ")" << LL_ENDL; return stat; } @@ -237,7 +237,7 @@ bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime) bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key) { - lldebugs << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << llendl; + LL_DEBUGS() << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; // just remove and add back // make sure param exists @@ -245,7 +245,7 @@ bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key) bool stat = LLWLParamManager::getInstance()->getParamSet(key, tmp); if(stat == false) { - lldebugs << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << llendl; + LL_DEBUGS() << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; return stat; } @@ -256,7 +256,7 @@ bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key) bool LLWLDayCycle::removeKeyframe(F32 time) { - lldebugs << "Removing key frame (" << time << ")" << llendl; + LL_DEBUGS() << "Removing key frame (" << time << ")" << LL_ENDL; // look for the time. If there, erase it std::map::iterator mIt = mTimeMap.find(time); @@ -295,7 +295,7 @@ bool LLWLDayCycle::getKeyedParam(F32 time, LLWLParamSet& param) } // return error if not found - lldebugs << "Key " << time << " not found" << llendl; + LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL; return false; } @@ -310,7 +310,7 @@ bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name) } // return error if not found - lldebugs << "Key " << time << " not found" << llendl; + LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL; return false; } @@ -322,7 +322,7 @@ bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe) { - lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl; + LL_DEBUGS() << "Removing references to key frame " << keyframe.toLLSD() << LL_ENDL; F32 keytime; bool might_exist; do diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index c729d6ff4f..6e6510d9c9 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -128,12 +128,12 @@ void LLWLParamManager::clearParamSetsOfScope(LLWLParamKey::EScope scope) // side effect: applies changes to all internal structures! std::map LLWLParamManager::finalizeFromDayCycle(LLWLParamKey::EScope scope) { - lldebugs << "mDay before finalizing:" << llendl; + LL_DEBUGS() << "mDay before finalizing:" << LL_ENDL; { for (std::map::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter) { LLWLParamKey& key = iter->second; - lldebugs << iter->first << "->" << key.name << llendl; + LL_DEBUGS() << iter->first << "->" << key.name << LL_ENDL; } } @@ -219,12 +219,12 @@ std::map LLWLParamManager::finalizeFromDayCycle(LLWL final_references[new_key] = iter->second; } - lldebugs << "mDay after finalizing:" << llendl; + LL_DEBUGS() << "mDay after finalizing:" << LL_ENDL; { for (std::map::iterator iter = mDay.mTimeMap.begin(); iter != mDay.mTimeMap.end(); ++iter) { LLWLParamKey& key = iter->second; - lldebugs << iter->first << "->" << key.name << llendl; + LL_DEBUGS() << iter->first << "->" << key.name << LL_ENDL; } } @@ -286,7 +286,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir) std::string path = gDirUtilp->add(dir, file); if (!loadPreset(path)) { - llwarns << "Error loading sky preset from " << path << llendl; + LL_WARNS() << "Error loading sky preset from " << path << LL_ENDL; } } } @@ -577,7 +577,7 @@ void LLWLParamManager::removeParamSet(const LLWLParamKey& key, bool delete_from_ if (key.scope == LLEnvKey::SCOPE_REGION) { - llwarns << "Removing region skies not supported" << llendl; + LL_WARNS() << "Removing region skies not supported" << LL_ENDL; llassert(key.scope == LLEnvKey::SCOPE_LOCAL); return; } @@ -677,7 +677,7 @@ void LLWLParamManager::initSingleton() if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay)) { // Fall back to default. - llwarns << "No day cycle named " << preferred_day << ", falling back to defaults" << llendl; + LL_WARNS() << "No day cycle named " << preferred_day << ", falling back to defaults" << LL_ENDL; mDay.loadDayCycleFromFile("Default.xml"); // *TODO: Fix user preferences accordingly. @@ -687,7 +687,7 @@ void LLWLParamManager::initSingleton() std::string sky = LLEnvManagerNew::instance().getSkyPresetName(); if (!getParamSet(LLWLParamKey(sky, LLWLParamKey::SCOPE_LOCAL), mCurParams)) { - llwarns << "No sky preset named " << sky << ", falling back to defaults" << llendl; + LL_WARNS() << "No sky preset named " << sky << ", falling back to defaults" << LL_ENDL; getParamSet(LLWLParamKey("Default", LLWLParamKey::SCOPE_LOCAL), mCurParams); // *TODO: Fix user preferences accordingly. diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index bfc5077c90..101f3b203b 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -141,11 +141,11 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { - llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; + LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) { - llinfos << "Region exists, removing it " << llendl; + LL_INFOS() << "Region exists, removing it " << LL_ENDL; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) @@ -156,12 +156,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) if (host != old_host) { - llwarns << "LLWorld::addRegion exists, but old host " << old_host - << " does not match new host " << host << llendl; + LL_WARNS() << "LLWorld::addRegion exists, but old host " << old_host + << " does not match new host " << host << LL_ENDL; } if (!regionp->isAlive()) { - llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl; + LL_WARNS() << "LLWorld::addRegion exists, but isn't alive" << LL_ENDL; } // Kill the old host, and then we can continue on and add the new host. We have to kill even if the host @@ -174,8 +174,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) from_region_handle(region_handle, &iindex, &jindex); S32 x = (S32)(iindex/mWidth); S32 y = (S32)(jindex/mWidth); - llinfos << "Adding new region (" << x << ":" << y << ")" << llendl; - llinfos << "Host: " << host << llendl; + LL_INFOS() << "Adding new region (" << x << ":" << y << ")" << LL_ENDL; + LL_INFOS() << "Host: " << host << LL_ENDL; LLVector3d origin_global; @@ -188,7 +188,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) getRegionWidthInMeters() ); if (!regionp) { - llerrs << "Unable to create new region!" << llendl; + LL_ERRS() << "Unable to create new region!" << LL_ENDL; } mRegionList.push_back(regionp); @@ -221,7 +221,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) neighborp = getRegionFromHandle(adj_handle); if (neighborp) { - //llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl; + //LL_INFOS() << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << LL_ENDL; regionp->connectNeighbor(neighborp, dir); } } @@ -239,7 +239,7 @@ void LLWorld::removeRegion(const LLHost &host) LLViewerRegion *regionp = getRegion(host); if (!regionp) { - llwarns << "Trying to remove region that doesn't exist!" << llendl; + LL_WARNS() << "Trying to remove region that doesn't exist!" << LL_ENDL; return; } @@ -249,21 +249,21 @@ void LLWorld::removeRegion(const LLHost &host) iter != mRegionList.end(); ++iter) { LLViewerRegion* reg = *iter; - llwarns << "RegionDump: " << reg->getName() + LL_WARNS() << "RegionDump: " << reg->getName() << " " << reg->getHost() << " " << reg->getOriginGlobal() - << llendl; + << LL_ENDL; } - llwarns << "Agent position global " << gAgent.getPositionGlobal() + LL_WARNS() << "Agent position global " << gAgent.getPositionGlobal() << " agent " << gAgent.getPositionAgent() - << llendl; + << LL_ENDL; - llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl; + LL_WARNS() << "Regions visited " << gAgent.getRegionsVisited() << LL_ENDL; - llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; + LL_WARNS() << "gFrameTimeSeconds " << gFrameTimeSeconds << LL_ENDL; - llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; + LL_WARNS() << "Disabling region " << regionp->getName() << " that agent is in!" << LL_ENDL; LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected")); regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed. @@ -271,7 +271,7 @@ void LLWorld::removeRegion(const LLHost &host) } from_region_handle(regionp->getHandle(), &x, &y); - llinfos << "Removing region " << x << ":" << y << llendl; + LL_INFOS() << "Removing region " << x << ":" << y << LL_ENDL; mRegionList.remove(regionp); mActiveRegionList.remove(regionp); @@ -756,8 +756,8 @@ void LLWorld::updateNetStats() void LLWorld::printPacketsLost() { - llinfos << "Simulators:" << llendl; - llinfos << "----------" << llendl; + LL_INFOS() << "Simulators:" << LL_ENDL; + LL_INFOS() << "----------" << LL_ENDL; LLCircuitData *cdp = NULL; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -769,8 +769,8 @@ void LLWorld::printPacketsLost() { LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal(); - llinfos << regionp->getHost() << ", range: " << range.length() - << " packets lost: " << cdp->getPacketsLost() << llendl; + LL_INFOS() << regionp->getHost() << ", range: " << range.length() + << " packets lost: " << cdp->getPacketsLost() << LL_ENDL; } } } @@ -826,7 +826,7 @@ void LLWorld::updateWaterObjects() } if (mRegionList.empty()) { - llwarns << "No regions!" << llendl; + LL_WARNS() << "No regions!" << LL_ENDL; return; } @@ -1021,7 +1021,7 @@ void LLWorld::disconnectRegions() continue; } - llinfos << "Sending AgentQuitCopy to: " << regionp->getHost() << llendl; + LL_INFOS() << "Sending AgentQuitCopy to: " << regionp->getHost() << LL_ENDL; msg->newMessageFast(_PREHASH_AgentQuitCopy); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -1055,7 +1055,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) LLWorld::getInstance()->addRegion(handle, sim); // give the simulator a message it can use to get ip and port - llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl; + LL_INFOS() << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << LL_ENDL; msg->newMessageFast(_PREHASH_UseCircuitCode); msg->nextBlockFast(_PREHASH_CircuitCode); msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode()); @@ -1083,7 +1083,7 @@ public: !input["body"].has("sim-ip-and-port") || !input["body"].has("seed-capability")) { - llwarns << "invalid parameters" << llendl; + LL_WARNS() << "invalid parameters" << LL_ENDL; return; } @@ -1092,8 +1092,8 @@ public: LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim); if (!regionp) { - llwarns << "Got EstablishAgentCommunication for unknown region " - << sim << llendl; + LL_WARNS() << "Got EstablishAgentCommunication for unknown region " + << sim << LL_ENDL; return; } regionp->setSeedCapability(input["body"]["seed-capability"]); @@ -1106,7 +1106,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) { LLHost host = mesgsys->getSender(); - //llinfos << "Disabling simulator with message from " << host << llendl; + //LL_INFOS() << "Disabling simulator with message from " << host << LL_ENDL; LLWorld::getInstance()->removeRegion(host); mesgsys->disableCircuit(host); @@ -1119,8 +1119,8 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data) LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(host); if (!regionp) { - llwarns << "Got region handshake for unknown region " - << host << llendl; + LL_WARNS() << "Got region handshake for unknown region " + << host << LL_ENDL; return; } diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 8307d32336..865292fa90 100755 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -156,7 +156,7 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**) // There's only one flag that we ever use here if (agent_flags != LAYER_FLAG) { - llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl; + LL_WARNS() << "Invalid map image type returned! layer = " << agent_flags << LL_ENDL; return; } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 977d967a76..0f306af05a 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1723,7 +1723,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) { gViewerWindow->setCursor( UI_CURSOR_CROSS ); } - LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << LL_ENDL; return TRUE; } } diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 583196fb7a..8e164337b6 100755 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -309,7 +309,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) } if(!mCurlRequest->isValid()) { - llwarns << "mCurlRequest is invalid." << llendl ; + LL_WARNS() << "mCurlRequest is invalid." << LL_ENDL ; delete mCurlRequest ; mCurlRequest = NULL ; @@ -375,7 +375,7 @@ bool LLXMLRPCTransaction::Impl::process() { if(!mCurlRequest || !mCurlRequest->isValid()) { - llwarns << "transaction failed." << llendl ; + LL_WARNS() << "transaction failed." << LL_ENDL ; delete mCurlRequest ; mCurlRequest = NULL ; @@ -425,10 +425,10 @@ bool LLXMLRPCTransaction::Impl::process() // appropriate setCurlStatus(result); - llwarns << "LLXMLRPCTransaction CURL error " - << mCurlCode << ": " << mCurlRequest->getErrorString() << llendl; - llwarns << "LLXMLRPCTransaction request URI: " - << mURI << llendl; + LL_WARNS() << "LLXMLRPCTransaction CURL error " + << mCurlCode << ": " << mCurlRequest->getErrorString() << LL_ENDL; + LL_WARNS() << "LLXMLRPCTransaction request URI: " + << mURI << LL_ENDL; } return true; @@ -462,12 +462,12 @@ bool LLXMLRPCTransaction::Impl::process() { setStatus(LLXMLRPCTransaction::StatusXMLRPCError); - llwarns << "LLXMLRPCTransaction XMLRPC " + LL_WARNS() << "LLXMLRPCTransaction XMLRPC " << (hasError ? "error " : "fault ") << faultCode << ": " - << faultString << llendl; - llwarns << "LLXMLRPCTransaction request URI: " - << mURI << llendl; + << faultString << LL_ENDL; + LL_WARNS() << "LLXMLRPCTransaction request URI: " + << mURI << LL_ENDL; } return true; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1d9137c161..21cb19b8ec 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -459,7 +459,7 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name) LLPointer cntrl_ptr = gSavedSettings.getControl(name); if ( cntrl_ptr.isNull() ) { - llwarns << "Global setting name not found:" << name << llendl; + LL_WARNS() << "Global setting name not found:" << name << LL_ENDL; } else { @@ -681,11 +681,11 @@ void LLPipeline::cleanup() if (!mTerrainPools.empty()) { - llwarns << "Terrain Pools not cleaned up" << llendl; + LL_WARNS() << "Terrain Pools not cleaned up" << LL_ENDL; } if (!mTreePools.empty()) { - llwarns << "Tree Pools not cleaned up" << llendl; + LL_WARNS() << "Tree Pools not cleaned up" << LL_ENDL; } delete mAlphaPool; @@ -886,7 +886,7 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY) releaseScreenBuffers(); } - llwarns << "Unable to allocate screen buffer at any resolution!" << llendl; + LL_WARNS() << "Unable to allocate screen buffer at any resolution!" << LL_ENDL; } return ret; @@ -1476,7 +1476,7 @@ void LLPipeline::unloadShaders() void LLPipeline::assertInitializedDoError() { - llerrs << "LLPipeline used when uninitialized." << llendl; + LL_ERRS() << "LLPipeline used when uninitialized." << LL_ENDL; } //============================================================================ @@ -1661,7 +1661,7 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0) default: llassert(0); - llerrs << "Invalid Pool Type in LLPipeline::findPool() type=" << type << llendl; + LL_ERRS() << "Invalid Pool Type in LLPipeline::findPool() type=" << type << LL_ENDL; break; } @@ -1798,9 +1798,9 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup())) { #ifdef LL_RELEASE_FOR_DOWNLOAD - llwarns << "Couldn't remove object from spatial group!" << llendl; + LL_WARNS() << "Couldn't remove object from spatial group!" << LL_ENDL; #else - llerrs << "Couldn't remove object from spatial group!" << llendl; + LL_ERRS() << "Couldn't remove object from spatial group!" << LL_ENDL; #endif } } @@ -1910,7 +1910,7 @@ void LLPipeline::createObject(LLViewerObject* vobj) } else { - llerrs << "Redundant drawable creation!" << llendl; + LL_ERRS() << "Redundant drawable creation!" << LL_ENDL; } llassert(drawablep); @@ -1960,7 +1960,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) } if (!drawablep) { - llerrs << "updateMove called with NULL drawablep" << llendl; + LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL; return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) @@ -1990,7 +1990,7 @@ void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) } if (!drawablep) { - llerrs << "updateMove called with NULL drawablep" << llendl; + LL_ERRS() << "updateMove called with NULL drawablep" << LL_ENDL; return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) @@ -2170,7 +2170,7 @@ void check_references(LLSpatialGroup* group, LLDrawable* drawable) { if (drawable == (LLDrawable*)(*i)->getDrawable()) { - llerrs << "LLDrawable deleted while actively reference by LLPipeline." << llendl; + LL_ERRS() << "LLDrawable deleted while actively reference by LLPipeline." << LL_ENDL; } } } @@ -2181,7 +2181,7 @@ void check_references(LLDrawable* drawable, LLFace* face) { if (drawable->getFace(i) == face) { - llerrs << "LLFace deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLFace deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2257,7 +2257,7 @@ void LLPipeline::checkReferences(LLDrawable* drawable) { if (drawable == *iter) { - llerrs << "LLDrawable deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLDrawable deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2274,7 +2274,7 @@ void check_references(LLSpatialGroup* group, LLDrawInfo* draw_info) LLDrawInfo* params = *j; if (params == draw_info) { - llerrs << "LLDrawInfo deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLDrawInfo deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -2316,7 +2316,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } @@ -2324,7 +2324,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } @@ -2332,7 +2332,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) { if (group == *iter) { - llerrs << "LLSpatialGroup deleted while actively referenced by LLPipeline." << llendl; + LL_ERRS() << "LLSpatialGroup deleted while actively referenced by LLPipeline." << LL_ENDL; } } } @@ -3083,13 +3083,13 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) { if (!drawablep) { - //llerrs << "Sending null drawable to moved list!" << llendl; + //LL_ERRS() << "Sending null drawable to moved list!" << LL_ENDL; return; } if (drawablep->isDead()) { - llwarns << "Marking NULL or dead drawable moved!" << llendl; + LL_WARNS() << "Marking NULL or dead drawable moved!" << LL_ENDL; return; } @@ -4159,7 +4159,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4207,7 +4207,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4237,7 +4237,7 @@ void LLPipeline::renderHighlights() LLFace *facep = mSelectedFaces[i]; if (!facep || facep->getDrawable()->isDead()) { - llerrs << "Bad face on selection" << llendl; + LL_ERRS() << "Bad face on selection" << LL_ENDL; return; } @@ -4291,7 +4291,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { if (!verify()) { - llerrs << "Pipeline verification failed!" << llendl; + LL_ERRS() << "Pipeline verification failed!" << LL_ENDL; } } @@ -5567,7 +5567,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mSimplePool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5579,7 +5579,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mAlphaMaskPool) { llassert(0); - llwarns << "Ignoring duplicate alpha mask pool." << llendl; + LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL; break; } else @@ -5592,7 +5592,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mFullbrightAlphaMaskPool) { llassert(0); - llwarns << "Ignoring duplicate alpha mask pool." << llendl; + LL_WARNS() << "Ignoring duplicate alpha mask pool." << LL_ENDL; break; } else @@ -5605,7 +5605,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mGrassPool) { llassert(0); - llwarns << "Ignoring duplicate grass pool." << llendl; + LL_WARNS() << "Ignoring duplicate grass pool." << LL_ENDL; } else { @@ -5617,7 +5617,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mFullbrightPool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5629,7 +5629,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mInvisiblePool) { llassert(0); - llwarns << "Ignoring duplicate simple pool." << llendl; + LL_WARNS() << "Ignoring duplicate simple pool." << LL_ENDL; } else { @@ -5641,7 +5641,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mGlowPool) { llassert(0); - llwarns << "Ignoring duplicate glow pool." << llendl; + LL_WARNS() << "Ignoring duplicate glow pool." << LL_ENDL; } else { @@ -5661,7 +5661,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mBumpPool) { llassert(0); - llwarns << "Ignoring duplicate bump pool." << llendl; + LL_WARNS() << "Ignoring duplicate bump pool." << LL_ENDL; } else { @@ -5672,7 +5672,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if (mMaterialsPool) { llassert(0); - llwarns << "Ignorning duplicate materials pool." << llendl; + LL_WARNS() << "Ignorning duplicate materials pool." << LL_ENDL; } else { @@ -5683,7 +5683,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mAlphaPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Alpha pool" << LL_ENDL; } else { @@ -5698,7 +5698,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mSkyPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Sky pool" << LL_ENDL; } else { @@ -5710,7 +5710,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mWaterPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Water pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Water pool" << LL_ENDL; } else { @@ -5722,7 +5722,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mGroundPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate Ground Pool" << LL_ENDL; } else { @@ -5734,7 +5734,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) if( mWLSkyPool ) { llassert(0); - llwarns << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << llendl; + LL_WARNS() << "LLPipeline::addPool(): Ignoring duplicate WLSky Pool" << LL_ENDL; } else { @@ -5744,7 +5744,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) default: llassert(0); - llwarns << "Invalid Pool Type in LLPipeline::addPool()" << llendl; + LL_WARNS() << "Invalid Pool Type in LLPipeline::addPool()" << LL_ENDL; break; } } @@ -5859,7 +5859,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) default: llassert(0); - llwarns << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << llendl; + LL_WARNS() << "Invalid Pool Type in LLPipeline::removeFromQuickLookup() type=" << poolp->getType() << LL_ENDL; break; } } @@ -6537,28 +6537,28 @@ void LLPipeline::findReferences(LLDrawable *drawablep) assertInitialized(); if (mLights.find(drawablep) != mLights.end()) { - llinfos << "In mLights" << llendl; + LL_INFOS() << "In mLights" << LL_ENDL; } if (std::find(mMovedList.begin(), mMovedList.end(), drawablep) != mMovedList.end()) { - llinfos << "In mMovedList" << llendl; + LL_INFOS() << "In mMovedList" << LL_ENDL; } if (std::find(mShiftList.begin(), mShiftList.end(), drawablep) != mShiftList.end()) { - llinfos << "In mShiftList" << llendl; + LL_INFOS() << "In mShiftList" << LL_ENDL; } if (mRetexturedList.find(drawablep) != mRetexturedList.end()) { - llinfos << "In mRetexturedList" << llendl; + LL_INFOS() << "In mRetexturedList" << LL_ENDL; } if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end()) { - llinfos << "In mBuildQ1" << llendl; + LL_INFOS() << "In mBuildQ1" << LL_ENDL; } if (std::find(mBuildQ2.begin(), mBuildQ2.end(), drawablep) != mBuildQ2.end()) { - llinfos << "In mBuildQ2" << llendl; + LL_INFOS() << "In mBuildQ2" << LL_ENDL; } S32 count; @@ -6566,7 +6566,7 @@ void LLPipeline::findReferences(LLDrawable *drawablep) count = gObjectList.findReferences(drawablep); if (count) { - llinfos << "In other drawables: " << count << " references" << llendl; + LL_INFOS() << "In other drawables: " << count << " references" << LL_ENDL; } } @@ -6587,7 +6587,7 @@ BOOL LLPipeline::verify() if (!ok) { - llwarns << "Pipeline verify failed!" << llendl; + LL_WARNS() << "Pipeline verify failed!" << LL_ENDL; } return ok; } @@ -6725,11 +6725,11 @@ void LLPipeline::toggleRenderTypeControl(void* data) U32 bit = (1< 0) { - llwarns << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << llendl; + LL_WARNS() << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << LL_ENDL; } LLVertexBuffer::unbind(); @@ -7325,18 +7325,18 @@ void validate_framebuffer_object() break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format - llerrs << "Framebuffer Incomplete Missing Attachment." << llendl; + LL_ERRS() << "Framebuffer Incomplete Missing Attachment." << LL_ENDL; break; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format - llerrs << "Framebuffer Incomplete Attachment." << llendl; + LL_ERRS() << "Framebuffer Incomplete Attachment." << LL_ENDL; break; case GL_FRAMEBUFFER_UNSUPPORTED: /* choose different formats */ - llerrs << "Framebuffer unsupported." << llendl; + LL_ERRS() << "Framebuffer unsupported." << LL_ENDL; break; default: - llerrs << "Unknown framebuffer status." << llendl; + LL_ERRS() << "Unknown framebuffer status." << LL_ENDL; break; } } @@ -10864,7 +10864,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } } @@ -10885,7 +10885,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } return FALSE; @@ -10902,7 +10902,7 @@ void LLPipeline::popRenderTypeMask() { if (mRenderTypeEnableStack.empty()) { - llerrs << "Depleted render type stack." << llendl; + LL_ERRS() << "Depleted render type stack." << LL_ENDL; } memcpy(mRenderTypeEnabled, mRenderTypeEnableStack.top().data(), sizeof(mRenderTypeEnabled)); @@ -10933,7 +10933,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } for (U32 i = 0; i < LLPipeline::NUM_RENDER_TYPES; ++i) @@ -10958,7 +10958,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...) if (type > END_RENDER_TYPES) { - llerrs << "Invalid render type." << llendl; + LL_ERRS() << "Invalid render type." << LL_ENDL; } } diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 8f33b2ad58..b8408a6fb4 100755 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -311,7 +311,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD login_para sendProgressEvent("offline", "fail.login", error_response); } catch (...) { - llerrs << "login exception caught" << llendl; + LL_ERRS() << "login exception caught" << LL_ENDL; } } diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp index 36d988ead7..a89b289a82 100755 --- a/indra/win_crash_logger/llcrashloggerwindows.cpp +++ b/indra/win_crash_logger/llcrashloggerwindows.cpp @@ -257,7 +257,7 @@ bool LLCrashLoggerWindows::init(void) swprintf(gProductName, L"Second Life"); */ - llinfos << "Loading dialogs" << llendl; + LL_INFOS() << "Loading dialogs" << LL_ENDL; // Initialize global strings LoadString(mhInst, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); @@ -296,7 +296,7 @@ void LLCrashLoggerWindows::gatherPlatformSpecificFiles() bool LLCrashLoggerWindows::mainLoop() { - llinfos << "CrashSubmitBehavior is " << mCrashBehavior << llendl; + LL_INFOS() << "CrashSubmitBehavior is " << mCrashBehavior << LL_ENDL; // Note: parent hwnd is 0 (the desktop). No dlg proc. See Petzold (5th ed) HexCalc example, Chapter 11, p529 // win_crash_logger.rc has been edited by hand. @@ -309,7 +309,7 @@ bool LLCrashLoggerWindows::mainLoop() if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND) { - llinfos << "Showing crash report submit progress window." << llendl; + LL_INFOS() << "Showing crash report submit progress window." << LL_ENDL; ShowWindow(gHwndProgress, SW_SHOW ); sendCrashLogs(); } @@ -348,7 +348,7 @@ bool LLCrashLoggerWindows::mainLoop() } else { - llwarns << "Unknown crash behavior " << mCrashBehavior << llendl; + LL_WARNS() << "Unknown crash behavior " << mCrashBehavior << LL_ENDL; return 1; } return 0; diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp index 8e916ae437..a221f4c9c5 100755 --- a/indra/win_crash_logger/win_crash_logger.cpp +++ b/indra/win_crash_logger/win_crash_logger.cpp @@ -34,7 +34,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) { - llinfos << "Starting crash reporter." << llendl; + LL_INFOS() << "Starting crash reporter." << LL_ENDL; LLCrashLoggerWindows app; app.setHandle(hInstance); @@ -42,12 +42,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, if (! app.init()) { - llwarns << "Unable to initialize application." << llendl; + LL_WARNS() << "Unable to initialize application." << LL_ENDL; return -1; } app.mainLoop(); app.cleanup(); - llinfos << "Crash reporter finished normally." << llendl; + LL_INFOS() << "Crash reporter finished normally." << LL_ENDL; return 0; } -- cgit v1.3 From 9f7bfa1c3710856cd2b0a0a8a429d6c45b0fcd09 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Aug 2013 00:02:23 -0700 Subject: moved unit types out of LLUnits namespace, since they are prefixed --- indra/llcharacter/llkeyframewalkmotion.cpp | 2 +- indra/llcommon/llfasttimer.cpp | 10 +- indra/llcommon/llfasttimer.h | 2 +- indra/llcommon/lltimer.cpp | 2 +- indra/llcommon/lltraceaccumulators.h | 6 +- indra/llcommon/lltracerecording.cpp | 62 +++--- indra/llcommon/lltracerecording.h | 36 +-- indra/llcommon/llunit.h | 342 +++++++++++++++-------------- indra/llinventory/llparcel.cpp | 2 +- indra/llrender/llimagegl.cpp | 8 +- indra/llrender/llimagegl.h | 6 +- indra/llui/llstatbar.cpp | 14 +- indra/newview/llconversationlog.cpp | 6 +- indra/newview/llconversationlog.h | 6 +- indra/newview/llconversationloglist.cpp | 4 +- indra/newview/llfasttimerview.cpp | 36 +-- indra/newview/llfasttimerview.h | 6 +- indra/newview/llscenemonitor.cpp | 2 +- indra/newview/llstartup.cpp | 2 +- indra/newview/lltexturefetch.cpp | 8 +- indra/newview/lltexturefetch.h | 12 +- indra/newview/lltextureinfo.cpp | 26 +-- indra/newview/lltextureinfo.h | 14 +- indra/newview/lltextureinfodetails.h | 4 +- indra/newview/lltextureview.cpp | 20 +- indra/newview/llviewerassetstats.cpp | 10 +- indra/newview/llviewerassetstats.h | 2 +- indra/newview/llviewermessage.cpp | 18 +- indra/newview/llviewerobjectlist.cpp | 6 +- indra/newview/llviewerstats.cpp | 54 ++--- indra/newview/llviewerstats.h | 30 +-- indra/newview/llviewertexture.cpp | 16 +- indra/newview/llviewertexture.h | 14 +- indra/newview/llviewertexturelist.cpp | 8 +- indra/newview/llviewertexturelist.h | 8 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatarself.cpp | 2 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llworld.cpp | 6 +- 39 files changed, 414 insertions(+), 402 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 66e4b947c4..65c1fcd99d 100755 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -383,7 +383,7 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, LLUnits::U32Milliseconds(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, U32Milliseconds(100)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index a91e716f19..5f92c66f47 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -339,7 +339,7 @@ void TimeBlock::logStats() } call_count++; - LLUnits::F64Seconds total_time(0); + F64Seconds total_time(0); LLSD sd; { @@ -382,11 +382,11 @@ void TimeBlock::dumpCurTimes() ++it) { TimeBlock* timerp = (*it); - LLUnits::F64Seconds total_time = last_frame_recording.getSum(*timerp); + F64Seconds total_time = last_frame_recording.getSum(*timerp); U32 num_calls = last_frame_recording.getSum(timerp->callCount()); // Don't bother with really brief times, keep output concise - if (total_time < LLUnits::F32Milliseconds(0.1f)) continue; + if (total_time < F32Milliseconds(0.1f)) continue; std::ostringstream out_str; TimeBlock* parent_timerp = timerp; @@ -466,11 +466,11 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other ) } } -LLUnits::F64Seconds BlockTimer::getElapsedTime() +F64Seconds BlockTimer::getElapsedTime() { U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime; - return LLUnits::F64Seconds((F64)total_time / (F64)TimeBlock::countsPerSecond()); + return F64Seconds((F64)total_time / (F64)TimeBlock::countsPerSecond()); } diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 589b9bb941..ccf71c3f4c 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -48,7 +48,7 @@ public: BlockTimer(TimeBlock& timer); ~BlockTimer(); - LLUnits::F64Seconds getElapsedTime(); + F64Seconds getElapsedTime(); private: diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 7077ea4b4f..74f3a7f587 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -262,7 +262,7 @@ LLUnitImplicit totalTime() } // Return the total clock tick count in microseconds. - return LLUnits::U64Microseconds(gTotalTimeClockCount*gClocksToMicroseconds); + return U64Microseconds(gTotalTimeClockCount*gClocksToMicroseconds); } diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 4d79964526..73da6bd2d8 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -418,7 +418,7 @@ namespace LLTrace class TimeBlockAccumulator { public: - typedef LLUnits::F64Seconds value_t; + typedef F64Seconds value_t; typedef TimeBlockAccumulator self_t; // fake classes that allows us to view different facets of underlying statistic @@ -429,7 +429,7 @@ namespace LLTrace struct SelfTimeFacet { - typedef LLUnits::F64Seconds value_t; + typedef F64Seconds value_t; }; TimeBlockAccumulator(); @@ -492,7 +492,7 @@ namespace LLTrace struct ChildMemFacet { - typedef LLUnit value_t; + typedef F64Bytes value_t; }; MemStatAccumulator() diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 963f0cd174..bc98eebf31 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -95,7 +95,7 @@ void Recording::handleReset() { mBuffers.write()->reset(); - mElapsedSeconds = LLUnits::F64Seconds(0.0); + mElapsedSeconds = F64Seconds(0.0); mSamplingTimer.reset(); } @@ -128,17 +128,17 @@ void Recording::appendRecording( Recording& other ) mElapsedSeconds += other.mElapsedSeconds; } -LLUnits::F64Seconds Recording::getSum(const TraceType& stat) +F64Seconds Recording::getSum(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return LLUnits::F64Seconds((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) + return F64Seconds((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond()); } -LLUnits::F64Seconds Recording::getSum(const TraceType& stat) +F64Seconds Recording::getSum(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return LLUnits::F64Seconds((F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond()); + return F64Seconds((F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond()); } @@ -147,19 +147,19 @@ U32 Recording::getSum(const TraceType& sta return mBuffers->mStackTimers[stat.getIndex()].mCalls; } -LLUnits::F64Seconds Recording::getPerSec(const TraceType& stat) +F64Seconds Recording::getPerSec(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return LLUnits::F64Seconds((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) + return F64Seconds((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); } -LLUnits::F64Seconds Recording::getPerSec(const TraceType& stat) +F64Seconds Recording::getPerSec(const TraceType& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return LLUnits::F64Seconds((F64)(accumulator.mSelfTimeCounter) + return F64Seconds((F64)(accumulator.mSelfTimeCounter) / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); } @@ -168,54 +168,54 @@ F32 Recording::getPerSec(const TraceType& return (F32)mBuffers->mStackTimers[stat.getIndex()].mCalls / mElapsedSeconds.value(); } -LLUnits::F64Bytes Recording::getMin(const TraceType& stat) +F64Bytes Recording::getMin(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); } -LLUnits::F64Bytes Recording::getMean(const TraceType& stat) +F64Bytes Recording::getMean(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); } -LLUnits::F64Bytes Recording::getMax(const TraceType& stat) +F64Bytes Recording::getMax(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); } -LLUnits::F64Bytes Recording::getStandardDeviation(const TraceType& stat) +F64Bytes Recording::getStandardDeviation(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); } -LLUnits::F64Bytes Recording::getLastValue(const TraceType& stat) +F64Bytes Recording::getLastValue(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } -LLUnits::F64Bytes Recording::getMin(const TraceType& stat) +F64Bytes Recording::getMin(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMin()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMin()); } -LLUnits::F64Bytes Recording::getMean(const TraceType& stat) +F64Bytes Recording::getMean(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMean()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMean()); } -LLUnits::F64Bytes Recording::getMax(const TraceType& stat) +F64Bytes Recording::getMax(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMax()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMax()); } -LLUnits::F64Bytes Recording::getStandardDeviation(const TraceType& stat) +F64Bytes Recording::getStandardDeviation(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getStandardDeviation()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getStandardDeviation()); } -LLUnits::F64Bytes Recording::getLastValue(const TraceType& stat) +F64Bytes Recording::getLastValue(const TraceType& stat) { - return LLUnits::F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getLastValue()); + return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mChildSize.getLastValue()); } U32 Recording::getSum(const TraceType& stat) @@ -427,9 +427,9 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other ) getCurRecording().setPlayState(getPlayState()); } -LLUnits::F64Seconds PeriodicRecording::getDuration() const +F64Seconds PeriodicRecording::getDuration() const { - LLUnits::F64Seconds duration; + F64Seconds duration; size_t num_periods = mRecordingPeriods.size(); for (size_t i = 1; i <= num_periods; i++) { diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 3c23c6a3f6..68b95a1003 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -166,26 +166,26 @@ namespace LLTrace void makeUnique() { mBuffers.makeUnique(); } // Timer accessors - LLUnits::F64Seconds getSum(const TraceType& stat); - LLUnits::F64Seconds getSum(const TraceType& stat); + F64Seconds getSum(const TraceType& stat); + F64Seconds getSum(const TraceType& stat); U32 getSum(const TraceType& stat); - LLUnits::F64Seconds getPerSec(const TraceType& stat); - LLUnits::F64Seconds getPerSec(const TraceType& stat); + F64Seconds getPerSec(const TraceType& stat); + F64Seconds getPerSec(const TraceType& stat); F32 getPerSec(const TraceType& stat); // Memory accessors - LLUnit getMin(const TraceType& stat); - LLUnit getMean(const TraceType& stat); - LLUnit getMax(const TraceType& stat); - LLUnit getStandardDeviation(const TraceType& stat); - LLUnit getLastValue(const TraceType& stat); - - LLUnit getMin(const TraceType& stat); - LLUnit getMean(const TraceType& stat); - LLUnit getMax(const TraceType& stat); - LLUnit getStandardDeviation(const TraceType& stat); - LLUnit getLastValue(const TraceType& stat); + F64Bytes getMin(const TraceType& stat); + F64Bytes getMean(const TraceType& stat); + F64Bytes getMax(const TraceType& stat); + F64Bytes getStandardDeviation(const TraceType& stat); + F64Bytes getLastValue(const TraceType& stat); + + F64Bytes getMin(const TraceType& stat); + F64Bytes getMean(const TraceType& stat); + F64Bytes getMax(const TraceType& stat); + F64Bytes getStandardDeviation(const TraceType& stat); + F64Bytes getLastValue(const TraceType& stat); U32 getSum(const TraceType& stat); U32 getSum(const TraceType& stat); @@ -295,7 +295,7 @@ namespace LLTrace U32 getSampleCount(const TraceType& stat); - LLUnits::F64Seconds getDuration() const { return mElapsedSeconds; } + F64Seconds getDuration() const { return mElapsedSeconds; } protected: friend class ThreadRecorder; @@ -310,7 +310,7 @@ namespace LLTrace class ThreadRecorder* getThreadRecorder(); LLTimer mSamplingTimer; - LLUnits::F64Seconds mElapsedSeconds; + F64Seconds mElapsedSeconds; LLCopyOnWritePointer mBuffers; bool mInHandOff; @@ -325,7 +325,7 @@ namespace LLTrace void nextPeriod(); size_t getNumRecordedPeriods() { return mNumPeriods; } - LLUnits::F64Seconds getDuration() const; + F64Seconds getDuration() const; void appendPeriodicRecording(PeriodicRecording& other); void appendRecording(Recording& recording); diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 9a367d9182..b62bebc440 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -643,55 +643,58 @@ LL_DECLARE_DERIVED_UNIT(Megabytes, * 1000, Gigabytes, "GB"); LL_DECLARE_DERIVED_UNIT(Bytes, * 1024, Kibibytes, "KiB"); LL_DECLARE_DERIVED_UNIT(Kibibytes, * 1024, Mibibytes, "MiB"); LL_DECLARE_DERIVED_UNIT(Mibibytes, * 1024, Gibibytes, "GiB"); +} -typedef LLUnit F32Bytes; -typedef LLUnit F32KiloBytes; -typedef LLUnit F32MegaBytes; -typedef LLUnit F32GigaBytes; -typedef LLUnit F32KibiBytes; -typedef LLUnit F32MibiBytes; -typedef LLUnit F32GibiBytes; - -typedef LLUnit F64Bytes; -typedef LLUnit F64KiloBytes; -typedef LLUnit F64MegaBytes; -typedef LLUnit F64GigaBytes; -typedef LLUnit F64KibiBytes; -typedef LLUnit F64MibiBytes; -typedef LLUnit F64GibiBytes; - -typedef LLUnit S32Bytes; -typedef LLUnit S32KiloBytes; -typedef LLUnit S32MegaBytes; -typedef LLUnit S32GigaBytes; -typedef LLUnit S32KibiBytes; -typedef LLUnit S32MibiBytes; -typedef LLUnit S32GibiBytes; - -typedef LLUnit U32Bytes; -typedef LLUnit U32KiloBytes; -typedef LLUnit U32MegaBytes; -typedef LLUnit U32GigaBytes; -typedef LLUnit U32KibiBytes; -typedef LLUnit U32MibiBytes; -typedef LLUnit U32GibiBytes; - -typedef LLUnit S64Bytes; -typedef LLUnit S64KiloBytes; -typedef LLUnit S64MegaBytes; -typedef LLUnit S64GigaBytes; -typedef LLUnit S64KibiBytes; -typedef LLUnit S64MibiBytes; -typedef LLUnit S64GibiBytes; - -typedef LLUnit U64Bytes; -typedef LLUnit U64KiloBytes; -typedef LLUnit U64MegaBytes; -typedef LLUnit U64GigaBytes; -typedef LLUnit U64KibiBytes; -typedef LLUnit U64MibiBytes; -typedef LLUnit U64GibiBytes; +typedef LLUnit F32Bytes; +typedef LLUnit F32Kilobytes; +typedef LLUnit F32Megabytes; +typedef LLUnit F32Gigabytes; +typedef LLUnit F32Kibibytes; +typedef LLUnit F32Mibibytes; +typedef LLUnit F32Gibibytes; + +typedef LLUnit F64Bytes; +typedef LLUnit F64Kilobytes; +typedef LLUnit F64Megabytes; +typedef LLUnit F64Gigabytes; +typedef LLUnit F64Kibibytes; +typedef LLUnit F64Mibibytes; +typedef LLUnit F64Gibibytes; + +typedef LLUnit S32Bytes; +typedef LLUnit S32Kilobytes; +typedef LLUnit S32Megabytes; +typedef LLUnit S32Gigabytes; +typedef LLUnit S32Kibibytes; +typedef LLUnit S32Mibibytes; +typedef LLUnit S32Gibibytes; + +typedef LLUnit U32Bytes; +typedef LLUnit U32Kilobytes; +typedef LLUnit U32Megabytes; +typedef LLUnit U32Gigabytes; +typedef LLUnit U32Kibibytes; +typedef LLUnit U32Mibibytes; +typedef LLUnit U32Gibibytes; + +typedef LLUnit S64Bytes; +typedef LLUnit S64Kilobytes; +typedef LLUnit S64Megabytes; +typedef LLUnit S64Gigabytes; +typedef LLUnit S64Kibibytes; +typedef LLUnit S64Mibibytes; +typedef LLUnit S64Gibibytes; + +typedef LLUnit U64Bytes; +typedef LLUnit U64Kilobytes; +typedef LLUnit U64Megabytes; +typedef LLUnit U64Gigabytes; +typedef LLUnit U64Kibibytes; +typedef LLUnit U64Mibibytes; +typedef LLUnit U64Gibibytes; +namespace LLUnits +{ LL_DECLARE_DERIVED_UNIT(Bytes, / 8, Bits, "b"); LL_DECLARE_DERIVED_UNIT(Bits, * 1000, Kilobits, "Kb"); LL_DECLARE_DERIVED_UNIT(Kilobits, * 1000, Megabits, "Mb"); @@ -699,55 +702,58 @@ LL_DECLARE_DERIVED_UNIT(Megabits, * 1000, Gigabits, "Gb"); LL_DECLARE_DERIVED_UNIT(Bits, * 1024, Kibibits, "Kib"); LL_DECLARE_DERIVED_UNIT(Kibibits, * 1024, Mibibits, "Mib"); LL_DECLARE_DERIVED_UNIT(Mibibits, * 1024, Gibibits, "Gib"); +} -typedef LLUnit F32Bits; -typedef LLUnit F32KiloBits; -typedef LLUnit F32MegaBits; -typedef LLUnit F32GigaBits; -typedef LLUnit F32KibiBits; -typedef LLUnit F32MibiBits; -typedef LLUnit F32GibiBits; - -typedef LLUnit F64Bits; -typedef LLUnit F64KiloBits; -typedef LLUnit F64MegaBits; -typedef LLUnit F64GigaBits; -typedef LLUnit F64KibiBits; -typedef LLUnit F64MibiBits; -typedef LLUnit F64GibiBits; - -typedef LLUnit S32Bits; -typedef LLUnit S32KiloBits; -typedef LLUnit S32MegaBits; -typedef LLUnit S32GigaBits; -typedef LLUnit S32KibiBits; -typedef LLUnit S32MibiBits; -typedef LLUnit S32GibiBits; - -typedef LLUnit U32Bits; -typedef LLUnit U32KiloBits; -typedef LLUnit U32MegaBits; -typedef LLUnit U32GigaBits; -typedef LLUnit U32KibiBits; -typedef LLUnit U32MibiBits; -typedef LLUnit U32GibiBits; - -typedef LLUnit S64Bits; -typedef LLUnit S64KiloBits; -typedef LLUnit S64MegaBits; -typedef LLUnit S64GigaBits; -typedef LLUnit S64KibiBits; -typedef LLUnit S64MibiBits; -typedef LLUnit S64GibiBits; - -typedef LLUnit U64Bits; -typedef LLUnit U64KiloBits; -typedef LLUnit U64MegaBits; -typedef LLUnit U64GigaBits; -typedef LLUnit U64KibiBits; -typedef LLUnit U64MibiBits; -typedef LLUnit U64GibiBits; +typedef LLUnit F32Bits; +typedef LLUnit F32Kilobits; +typedef LLUnit F32Megabits; +typedef LLUnit F32Gigabits; +typedef LLUnit F32Kibibits; +typedef LLUnit F32Mibibits; +typedef LLUnit F32Gibibits; + +typedef LLUnit F64Bits; +typedef LLUnit F64Kilobits; +typedef LLUnit F64Megabits; +typedef LLUnit F64Gigabits; +typedef LLUnit F64Kibibits; +typedef LLUnit F64Mibibits; +typedef LLUnit F64Gibibits; + +typedef LLUnit S32Bits; +typedef LLUnit S32Kilobits; +typedef LLUnit S32Megabits; +typedef LLUnit S32Gigabits; +typedef LLUnit S32Kibibits; +typedef LLUnit S32Mibibits; +typedef LLUnit S32Gibibits; + +typedef LLUnit U32Bits; +typedef LLUnit U32Kilobits; +typedef LLUnit U32Megabits; +typedef LLUnit U32Gigabits; +typedef LLUnit U32Kibibits; +typedef LLUnit U32Mibibits; +typedef LLUnit U32Gibibits; + +typedef LLUnit S64Bits; +typedef LLUnit S64Kilobits; +typedef LLUnit S64Megabits; +typedef LLUnit S64Gigabits; +typedef LLUnit S64Kibibits; +typedef LLUnit S64Mibibits; +typedef LLUnit S64Gibibits; + +typedef LLUnit U64Bits; +typedef LLUnit U64Kilobits; +typedef LLUnit U64Megabits; +typedef LLUnit U64Gigabits; +typedef LLUnit U64Kibibits; +typedef LLUnit U64Mibibits; +typedef LLUnit U64Gibibits; +namespace LLUnits +{ LL_DECLARE_BASE_UNIT(Seconds, "s"); LL_DECLARE_DERIVED_UNIT(Seconds, * 60, Minutes, "min"); LL_DECLARE_DERIVED_UNIT(Minutes, * 60, Hours, "h"); @@ -755,90 +761,96 @@ LL_DECLARE_DERIVED_UNIT(Hours, * 24, Days, "d"); LL_DECLARE_DERIVED_UNIT(Seconds, / 1000, Milliseconds, "ms"); LL_DECLARE_DERIVED_UNIT(Milliseconds, / 1000, Microseconds, "\x09\x3cs"); LL_DECLARE_DERIVED_UNIT(Microseconds, / 1000, Nanoseconds, "ns"); +} -typedef LLUnit F32Seconds; -typedef LLUnit F32Minutes; -typedef LLUnit F32Hours; -typedef LLUnit F32Days; -typedef LLUnit F32Milliseconds; -typedef LLUnit F32Microseconds; -typedef LLUnit F32Nanoseconds; - -typedef LLUnit F64Seconds; -typedef LLUnit F64Minutes; -typedef LLUnit F64Hours; -typedef LLUnit F64Days; -typedef LLUnit F64Milliseconds; -typedef LLUnit F64Microseconds; -typedef LLUnit F64Nanoseconds; - -typedef LLUnit S32Seconds; -typedef LLUnit S32Minutes; -typedef LLUnit S32Hours; -typedef LLUnit S32Days; -typedef LLUnit S32Milliseconds; -typedef LLUnit S32Microseconds; -typedef LLUnit S32Nanoseconds; - -typedef LLUnit U32Seconds; -typedef LLUnit U32Minutes; -typedef LLUnit U32Hours; -typedef LLUnit U32Days; -typedef LLUnit U32Milliseconds; -typedef LLUnit U32Microseconds; -typedef LLUnit U32Nanoseconds; - -typedef LLUnit S64Seconds; -typedef LLUnit S64Minutes; -typedef LLUnit S64Hours; -typedef LLUnit S64Days; -typedef LLUnit S64Milliseconds; -typedef LLUnit S64Microseconds; -typedef LLUnit S64Nanoseconds; - -typedef LLUnit U64Seconds; -typedef LLUnit U64Minutes; -typedef LLUnit U64Hours; -typedef LLUnit U64Days; -typedef LLUnit U64Milliseconds; -typedef LLUnit U64Microseconds; -typedef LLUnit U64Nanoseconds; +typedef LLUnit F32Seconds; +typedef LLUnit F32Minutes; +typedef LLUnit F32Hours; +typedef LLUnit F32Days; +typedef LLUnit F32Milliseconds; +typedef LLUnit F32Microseconds; +typedef LLUnit F32Nanoseconds; + +typedef LLUnit F64Seconds; +typedef LLUnit F64Minutes; +typedef LLUnit F64Hours; +typedef LLUnit F64Days; +typedef LLUnit F64Milliseconds; +typedef LLUnit F64Microseconds; +typedef LLUnit F64Nanoseconds; + +typedef LLUnit S32Seconds; +typedef LLUnit S32Minutes; +typedef LLUnit S32Hours; +typedef LLUnit S32Days; +typedef LLUnit S32Milliseconds; +typedef LLUnit S32Microseconds; +typedef LLUnit S32Nanoseconds; + +typedef LLUnit U32Seconds; +typedef LLUnit U32Minutes; +typedef LLUnit U32Hours; +typedef LLUnit U32Days; +typedef LLUnit U32Milliseconds; +typedef LLUnit U32Microseconds; +typedef LLUnit U32Nanoseconds; + +typedef LLUnit S64Seconds; +typedef LLUnit S64Minutes; +typedef LLUnit S64Hours; +typedef LLUnit S64Days; +typedef LLUnit S64Milliseconds; +typedef LLUnit S64Microseconds; +typedef LLUnit S64Nanoseconds; + +typedef LLUnit U64Seconds; +typedef LLUnit U64Minutes; +typedef LLUnit U64Hours; +typedef LLUnit U64Days; +typedef LLUnit U64Milliseconds; +typedef LLUnit U64Microseconds; +typedef LLUnit U64Nanoseconds; +namespace LLUnits +{ LL_DECLARE_BASE_UNIT(Meters, "m"); LL_DECLARE_DERIVED_UNIT(Meters, * 1000, Kilometers, "km"); LL_DECLARE_DERIVED_UNIT(Meters, / 100, Centimeters, "cm"); LL_DECLARE_DERIVED_UNIT(Meters, / 1000, Millimeters, "mm"); +} -typedef LLUnit F32Meters; -typedef LLUnit F32Kilometers; -typedef LLUnit F32Centimeters; -typedef LLUnit F32Millimeters; +typedef LLUnit F32Meters; +typedef LLUnit F32Kilometers; +typedef LLUnit F32Centimeters; +typedef LLUnit F32Millimeters; -typedef LLUnit F64Meters; -typedef LLUnit F64Kilometers; -typedef LLUnit F64Centimeters; -typedef LLUnit F64Millimeters; +typedef LLUnit F64Meters; +typedef LLUnit F64Kilometers; +typedef LLUnit F64Centimeters; +typedef LLUnit F64Millimeters; -typedef LLUnit S32Meters; -typedef LLUnit S32Kilometers; -typedef LLUnit S32Centimeters; -typedef LLUnit S32Millimeters; +typedef LLUnit S32Meters; +typedef LLUnit S32Kilometers; +typedef LLUnit S32Centimeters; +typedef LLUnit S32Millimeters; -typedef LLUnit U32Meters; -typedef LLUnit U32Kilometers; -typedef LLUnit U32Centimeters; -typedef LLUnit U32Millimeters; +typedef LLUnit U32Meters; +typedef LLUnit U32Kilometers; +typedef LLUnit U32Centimeters; +typedef LLUnit U32Millimeters; -typedef LLUnit S64Meters; -typedef LLUnit S64Kilometers; -typedef LLUnit S64Centimeters; -typedef LLUnit S64Millimeters; +typedef LLUnit S64Meters; +typedef LLUnit S64Kilometers; +typedef LLUnit S64Centimeters; +typedef LLUnit S64Millimeters; -typedef LLUnit U64Meters; -typedef LLUnit U64Kilometers; -typedef LLUnit U64Centimeters; -typedef LLUnit U64Millimeters; +typedef LLUnit U64Meters; +typedef LLUnit U64Kilometers; +typedef LLUnit U64Centimeters; +typedef LLUnit U64Millimeters; +namespace LLUnits +{ // rare units LL_DECLARE_BASE_UNIT(Hertz, "Hz"); LL_DECLARE_DERIVED_UNIT(Hertz, * 1000, Kilohertz, "KHz"); diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 25c7f58c91..2bb78ea839 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1082,7 +1082,7 @@ void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group) mGroupID.setNull(); } mSaleTimerExpires.start(); - mSaleTimerExpires.setTimerExpirySec(LLUnits::U64Microseconds(DEFAULT_USEC_SALE_TIMEOUT)); + mSaleTimerExpires.setTimerExpirySec(U64Microseconds(DEFAULT_USEC_SALE_TIMEOUT)); mStatus = OS_LEASE_PENDING; mClaimDate = time(NULL); setAuctionID(0); diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 6a45ebc598..b63ee7f9f9 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -51,9 +51,9 @@ U32 wpo2(U32 i); U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; -LLUnit LLImageGL::sGlobalTextureMemory(0); -LLUnit LLImageGL::sBoundTextureMemory(0); -LLUnit LLImageGL::sCurBoundTextureMemory(0); +S32Bytes LLImageGL::sGlobalTextureMemory(0); +S32Bytes LLImageGL::sBoundTextureMemory(0); +S32Bytes LLImageGL::sCurBoundTextureMemory(0); S32 LLImageGL::sCount = 0; LLImageGL::dead_texturelist_t LLImageGL::sDeadTextureList[LLTexUnit::TT_NONE]; U32 LLImageGL::sCurTexName = 1; @@ -249,7 +249,7 @@ void LLImageGL::updateStats(F32 current_time) LLFastTimer t(FTM_IMAGE_UPDATE_STATS); sLastFrameTime = current_time; sBoundTextureMemory = sCurBoundTextureMemory; - sCurBoundTextureMemory = LLUnits::S32Bytes(0); + sCurBoundTextureMemory = S32Bytes(0); } //static diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index c38b8d3cfa..035d42c3ad 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -246,9 +246,9 @@ public: static F32 sLastFrameTime; // Global memory statistics - static LLUnit sGlobalTextureMemory; // Tracks main memory texmem - static LLUnit sBoundTextureMemory; // Tracks bound texmem for last completed frame - static LLUnit sCurBoundTextureMemory; // Tracks bound texmem for current frame + static S32Bytes sGlobalTextureMemory; // Tracks main memory texmem + static S32Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame + static S32Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame static U32 sBindCount; // Tracks number of texture binds for current frame static U32 sUniqueCount; // Tracks number of unique texture binds for current frame static BOOL sGlobalUseAnisotropic; diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 5857e32821..4c64cc944e 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -44,12 +44,12 @@ // rate at which to update display of value that is rapidly changing const F32 MEAN_VALUE_UPDATE_TIME = 1.f / 4.f; // time between value changes that qualifies as a "rapid change" -const LLUnits::F32Seconds RAPID_CHANGE_THRESHOLD(0.2f); +const F32Seconds RAPID_CHANGE_THRESHOLD(0.2f); // maximum number of rapid changes in RAPID_CHANGE_WINDOW before switching over to displaying the mean // instead of latest value const S32 MAX_RAPID_CHANGES_PER_SEC = 10; // period of time over which to measure rapid changes -const LLUnits::F32Seconds RAPID_CHANGE_WINDOW(1.f); +const F32Seconds RAPID_CHANGE_WINDOW(1.f); F32 calc_tick_value(F32 min, F32 max) { @@ -250,12 +250,12 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) } template -S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const T& stat, const LLUnits::F32Seconds time_period) +S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const T& stat, const F32Seconds time_period) { - LLUnits::F32Seconds elapsed_time, + F32Seconds elapsed_time, time_since_value_changed; S32 num_rapid_changes = 0; - const LLUnits::F32Seconds RAPID_CHANGE_THRESHOLD = LLUnits::F32Seconds(0.3f); + const F32Seconds RAPID_CHANGE_THRESHOLD = F32Seconds(0.3f); F64 last_value = periodic_recording.getPrevRecording(1).getLastValue(stat); for (S32 i = 2; i < periodic_recording.getNumRecordedPeriods(); i++) @@ -277,9 +277,9 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const return num_rapid_changes; } -S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType& stat, const LLUnits::F32Seconds time_period) +S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType& stat, const F32Seconds time_period) { - LLUnits::F32Seconds elapsed_time, + F32Seconds elapsed_time, time_since_value_changed; S32 num_rapid_changes = 0; diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index a17a4e5e21..9311056a27 100755 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -39,7 +39,7 @@ const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days b struct ConversationParams : public LLInitParam::Block { - Mandatory > time; + Mandatory time; Mandatory timestamp; Mandatory conversation_type; Mandatory conversation_name, @@ -113,7 +113,7 @@ void LLConversation::onIMFloaterShown(const LLUUID& session_id) } // static -const std::string LLConversation::createTimestamp(const LLUnit& utc_time) +const std::string LLConversation::createTimestamp(const U64Seconds& utc_time) { std::string timeStr; LLSD substitution; @@ -132,7 +132,7 @@ const std::string LLConversation::createTimestamp(const LLUnit now(time_corrected()); + U64Seconds now(time_corrected()); LLUnit age = now - mTime; return age > days; diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 5d94cb6497..fd6ad9ad66 100755 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -55,7 +55,7 @@ public: const LLUUID& getSessionID() const { return mSessionID; } const LLUUID& getParticipantID() const { return mParticipantID; } const std::string& getTimestamp() const { return mTimestamp; } - const LLUnit& + const U64Seconds& getTime() const { return mTime; } bool hasOfflineMessages() const { return mHasOfflineIMs; } @@ -76,7 +76,7 @@ public: /* * returns string representation(in form of: mm/dd/yyyy hh:mm) of time when conversation was started */ - static const std::string createTimestamp(const LLUnit& utc_time); + static const std::string createTimestamp(const U64Seconds& utc_time); private: @@ -88,7 +88,7 @@ private: boost::signals2::connection mIMFloaterShowedConnection; - LLUnit mTime; // last interaction time + U64Seconds mTime; // last interaction time SessionType mConversationType; std::string mConversationName; std::string mHistoryFileName; diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index bd5e0b8f88..93719ac7fb 100755 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -518,8 +518,8 @@ bool LLConversationLogListNameComparator::doCompare(const LLConversationLogListI bool LLConversationLogListDateComparator::doCompare(const LLConversationLogListItem* conversation1, const LLConversationLogListItem* conversation2) const { - LLUnit date1 = conversation1->getConversation()->getTime(); - LLUnit date2 = conversation2->getConversation()->getTime(); + U64Seconds date1 = conversation1->getConversation()->getTime(); + U64Seconds date2 = conversation2->getConversation()->getTime(); const LLUUID& id1 = conversation1->getConversation()->getParticipantID(); const LLUUID& id2 = conversation2->getConversation()->getParticipantID(); diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 11a9a70b18..725a2f2daf 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -260,7 +260,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) TimerBarRow& row = mHoverBarIndex == 0 ? mAverageTimerRow : mTimerBarRows[mScrollIndex + mHoverBarIndex - 1]; TimerBar* hover_bar = NULL; - LLUnits::F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; + F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; for (int bar_index = 0, end_index = LLInstanceTracker::instanceCount(); bar_index < end_index; ++bar_index) @@ -317,11 +317,11 @@ static std::string get_tooltip(TimeBlock& timer, S32 history_index, PeriodicReco if (history_index == 0) { // by default, show average number of call - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPeriodMean (timer, RUNNING_AVERAGE_WIDTH)).value(), (S32)frame_recording.getPeriodMean(timer.callCount(), RUNNING_AVERAGE_WIDTH)); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPeriodMean (timer, RUNNING_AVERAGE_WIDTH)).value(), (S32)frame_recording.getPeriodMean(timer.callCount(), RUNNING_AVERAGE_WIDTH)); } else { - tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)LLUnit(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); + tooltip = llformat("%s (%d ms, %d calls)", timer.getName().c_str(), (S32)F64Milliseconds(frame_recording.getPrevRecording(history_index).getSum(timer)).value(), (S32)frame_recording.getPrevRecording(history_index).getSum(timer.callCount())); } return tooltip; } @@ -996,7 +996,7 @@ void LLFastTimerView::printLineStats() } first = false; - LLUnits::F32Seconds ticks; + F32Seconds ticks; if (mStatsIndex == 0) { ticks = mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH); @@ -1005,7 +1005,7 @@ void LLFastTimerView::printLineStats() { ticks = mRecording.getPrevRecording(mStatsIndex).getSum(*idp); } - LLUnit ms = ticks; + F32Milliseconds ms = ticks; timer_stat += llformat("%.1f",ms.value()); @@ -1029,7 +1029,7 @@ void LLFastTimerView::drawLineGraph() LLLocalClipRect clip(mGraphRect); //normalize based on last frame's maximum - static LLUnits::F32Seconds max_time(0.000001); + static F32Seconds max_time(0.000001); static U32 max_calls = 0; static F32 alpha_interp = 0.f; @@ -1060,7 +1060,7 @@ void LLFastTimerView::drawLineGraph() } } - LLUnits::F32Seconds cur_max(0); + F32Seconds cur_max(0); U32 cur_max_calls = 0; for(timer_tree_iterator_t it = begin_timer_tree(FTM_FRAME); it != end_timer_tree(); @@ -1101,7 +1101,7 @@ void LLFastTimerView::drawLineGraph() j--) { LLTrace::Recording& recording = mRecording.getPrevRecording(j); - LLUnits::F32Seconds time = llmax(recording.getSum(*idp), LLUnits::F64Seconds(0.000001)); + F32Seconds time = llmax(recording.getSum(*idp), F64Seconds(0.000001)); U32 calls = recording.getSum(idp->callCount()); if (is_hover_timer) @@ -1146,7 +1146,7 @@ void LLFastTimerView::drawLineGraph() max_time = lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f)); if (llabs((max_time - cur_max).value()) <= 1) { - max_time = llmax(LLUnits::F32Microseconds(1.f), LLUnits::F32Microseconds(cur_max)); + max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max)); } max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f))); @@ -1179,7 +1179,7 @@ void LLFastTimerView::drawLineGraph() switch(mDisplayType) { case DISPLAY_TIME: - axis_label = llformat("%4.2f ms", LLUnit(max_time).value()); + axis_label = llformat("%4.2f ms", F32Milliseconds(max_time).value()); break; case DISPLAY_CALLS: axis_label = llformat("%d calls", (int)max_calls); @@ -1230,7 +1230,7 @@ void LLFastTimerView::drawLegend() llassert(idp->getIndex() < sTimerColors.size()); gl_rect_2d(bar_rect, sTimerColors[idp->getIndex()]); - LLUnit ms(0); + F32Milliseconds ms(0); S32 calls = 0; if (mHoverBarIndex > 0 && mHoverID) { @@ -1240,7 +1240,7 @@ void LLFastTimerView::drawLegend() } else { - ms = LLUnits::F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH)); + ms = F64Seconds(mRecording.getPeriodMean(*idp, RUNNING_AVERAGE_WIDTH)); calls = (S32)mRecording.getPeriodMean(idp->callCount(), RUNNING_AVERAGE_WIDTH); } @@ -1346,7 +1346,7 @@ void LLFastTimerView::drawTicks() { // Draw MS ticks { - LLUnit ms = mTotalTimeDisplay; + U32Milliseconds ms = mTotalTimeDisplay; std::string tick_label; S32 x; S32 barw = mBarRect.getWidth(); @@ -1423,7 +1423,7 @@ void LLFastTimerView::updateTotalTime() mTotalTimeDisplay = mRecording.getPeriodMax(FTM_FRAME, 20); break; default: - mTotalTimeDisplay = LLUnits::F64Milliseconds(100); + mTotalTimeDisplay = F64Milliseconds(100); break; } @@ -1511,14 +1511,14 @@ void LLFastTimerView::drawBars() static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); -LLUnits::F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) +F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) { LLFastTimer _(FTM_UPDATE_TIMER_BAR_WIDTHS); - const LLUnits::F32Seconds self_time = history_index == -1 + const F32Seconds self_time = history_index == -1 ? mRecording.getPeriodMean(time_block->selfTime(), RUNNING_AVERAGE_WIDTH) : mRecording.getPrevRecording(history_index).getSum(time_block->selfTime()); - LLUnits::F32Seconds full_time = self_time; + F32Seconds full_time = self_time; // reserve a spot for this bar to be rendered before its children // even though we don't know its size yet @@ -1544,7 +1544,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer LLFastTimer _(FTM_UPDATE_TIMER_BAR_FRACTIONS); TimerBar& timer_bar = row.mBars[timer_bar_index]; - const LLUnits::F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; + const F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; timer_bar.mChildrenStart = timer_bar.mSelfStart + timer_bar.mSelfTime / 2; timer_bar.mChildrenEnd = timer_bar.mChildrenStart + timer_bar.mTotalTime - timer_bar.mSelfTime; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 8f61a2fc87..d184aae03d 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -87,7 +87,7 @@ private: mFirstChild(false), mLastChild(false) {} - LLUnits::F32Seconds mTotalTime, + F32Seconds mTotalTime, mSelfTime, mChildrenStart, mChildrenEnd, @@ -113,7 +113,7 @@ private: TimerBar* mBars; }; - LLUnits::F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); + F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); S32 updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0); S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0); void setPauseState(bool pause_state); @@ -128,7 +128,7 @@ private: DISPLAY_HZ } mDisplayType; bool mPauseHistory; - LLUnits::F64Seconds mAllTimeMax, + F64Seconds mAllTimeMax, mTotalTimeDisplay; S32 mScrollIndex, mHoverBarIndex, diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index d16c2d3984..ecee801e8e 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -525,7 +525,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) PeriodicRecording& scene_load_recording = mSceneLoadRecording.getResults(); const U32 frame_count = scene_load_recording.getNumRecordedPeriods(); - LLUnits::F64Seconds frame_time; + F64Seconds frame_time; os << "Stat"; for (S32 frame = 1; frame <= frame_count; frame++) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3a3731d519..61def8f723 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1429,7 +1429,7 @@ bool idle_startup() LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL; gFrameTime = totalTime(); - LLUnits::F32Seconds last_time = gFrameTimeSeconds; + F32Seconds last_time = gFrameTimeSeconds; gFrameTimeSeconds = (gFrameTime - gStartTime); gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0e6ef76845..07ff1de702 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -66,7 +66,7 @@ bool LLTextureFetchDebugger::sDebuggerEnabled = false; LLTrace::EventStatHandle > LLTextureFetch::sCacheHitRate("texture_cache_hits"); -LLTrace::EventStatHandle > LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); +LLTrace::EventStatHandle LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); ////////////////////////////////////////////////////////////////////////////// @@ -2393,7 +2393,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mFetcherLocked(FALSE) { mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); - mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), LLUnits::U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold"))); + mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold"))); LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"); if(LLTextureFetchDebugger::isEnabled()) @@ -2761,7 +2761,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, discard_level = worker->mDecodedDiscard; raw = worker->mRawImage; aux = worker->mAuxImage; - LLUnits::F32Seconds cache_read_time(worker->mCacheReadTime); + F32Seconds cache_read_time(worker->mCacheReadTime); if (cache_read_time != 0.f) { record(sCacheReadLatency, cache_read_time); @@ -3372,7 +3372,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 if (log_to_viewer_log || log_to_sim) { - LLUnit timeNow = LLTimer::getTotalTime(); + U64Microseconds timeNow = LLTimer::getTotalTime(); mTextureInfo.setRequestSize(id, worker->mFileSize); mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow); } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 38272b40dc..78b13cdd80 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(LLUnit bandwidth) { mTextureBandwidth = bandwidth; } + void setTextureBandwidth(F32Kibibits bandwidth) { mTextureBandwidth = bandwidth; } // Threads: T* (but not safe) - LLUnit getTextureBandwidth() { return mTextureBandwidth; } + F32Kibibits getTextureBandwidth() { return mTextureBandwidth; } // Threads: T* BOOL isFromLocalCache(const LLUUID& id); @@ -310,7 +310,7 @@ private: LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue. static LLTrace::EventStatHandle > sCacheHitRate; - static LLTrace::EventStatHandle > sCacheReadLatency; + static LLTrace::EventStatHandle sCacheReadLatency; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; @@ -325,12 +325,12 @@ private: queue_t mHTTPTextureQueue; // Mfnq typedef std::map > cancel_queue_t; cancel_queue_t mCancelQueue; // Mfnq - LLUnit mTextureBandwidth; // - LLUnit mMaxBandwidth; // Mfnq + F32Kibibits mTextureBandwidth; // + F32Kibibits mMaxBandwidth; // Mfnq LLTextureInfo mTextureInfo; // XXX possible delete - LLUnit mHTTPTextureBits; // Mfnq + U32Bits mHTTPTextureBits; // Mfnq // XXX possible delete //debug use diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index 9dee92bf12..6906f82c1c 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -33,8 +33,8 @@ static LLTrace::CountStatHandle sTextureDownloadsStarted("texture_downloads_started", "number of texture downloads initiated"); static LLTrace::CountStatHandle sTextureDownloadsCompleted("texture_downloads_completed", "number of texture downloads completed"); -static LLTrace::CountStatHandle > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded"); -static LLTrace::CountStatHandle > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures"); +static LLTrace::CountStatHandle sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded"); +static LLTrace::CountStatHandle sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures"); LLTextureInfo::LLTextureInfo() : mLogTextureDownloadsToViewerLog(false), @@ -46,11 +46,11 @@ LLTextureInfo::LLTextureInfo() : mRecording.start(); } -void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, LLUnit textureLogThreshold) +void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold) { mLogTextureDownloadsToViewerLog = writeToViewerLog; mLogTextureDownloadsToSimulator = sendToSim; - mTextureLogThreshold = LLUnit(textureLogThreshold); + mTextureLogThreshold = U32Bytes(textureLogThreshold); } LLTextureInfo::~LLTextureInfo() @@ -126,7 +126,7 @@ void LLTextureInfo::setRequestType(const LLUUID& id, LLTextureInfoDetails::LLReq mTextures[id]->mType = type; } -void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, LLUnit completeTime) +void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microseconds completeTime) { if (!has(id)) { @@ -160,7 +160,7 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, LLUnitgetTextureBandwidth(); + F32Kibibits 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.value(), max_bandwidth.value()); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index b176c69691..e009863002 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -233,7 +233,7 @@ namespace LLViewerAssetStatsFF &sDequeuedAssetRequestsOther }; - static LLTrace::EventStatHandle sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", + static LLTrace::EventStatHandle sResponseAssetRequestsTempTextureHTTP ("assetresponsetimestemptexturehttp", "Time spent responding to temporary texture asset http requests"), sResponseAssetRequestsTempTextureUDP ("assetresponsetimestemptextureudp", "Time spent responding to temporary texture asset udp requests"), @@ -250,7 +250,7 @@ namespace LLViewerAssetStatsFF sResponsedAssetRequestsOther ("assetresponsetimesother", "Time spent responding to other asset requests"); - static LLTrace::EventStatHandle* sResponse[EVACCount] = { + static LLTrace::EventStatHandle* sResponse[EVACCount] = { &sResponseAssetRequestsTempTextureHTTP, &sResponseAssetRequestsTempTextureUDP, &sResponseAssetRequestsNonTempTextureHTTP, @@ -487,10 +487,10 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) grid_from_region_handle(it->first, &grid_x, &grid_y); r .grid_x(grid_x) .grid_y(grid_y) - .duration(LLUnit(rec.getDuration()).value()); + .duration(F64Microseconds(rec.getDuration()).value()); } - stats.duration(mCurRecording ? LLUnit(mCurRecording->getDuration()).value() : 0.0); + stats.duration(mCurRecording ? F64Microseconds(mCurRecording->getDuration()).value() : 0.0); } LLSD LLViewerAssetStats::asLLSD(bool compact_output) @@ -540,7 +540,7 @@ void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, { const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp)); - record(*sResponse[int(eac)], LLUnit(duration)); + record(*sResponse[int(eac)], F64Microseconds(duration)); } void init() diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index a42060d4d8..aaa299bf4b 100755 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -82,7 +82,7 @@ public: * for compatibility with the pre-existing timestamp on the texture * fetcher class, LLTextureFetch. */ - typedef LLUnit duration_t; + typedef U64Microseconds duration_t; /** * Type for the region identifier used in stats. Currently uses diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f12df23a36..6c435bf147 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4487,18 +4487,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 LLUnit gObjectData; +extern U32Bits gObjectData; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4510,11 +4510,11 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4526,11 +4526,11 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) // Update the data counters if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } // Update the object... @@ -4542,11 +4542,11 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ { if (mesgsys->getReceiveCompressedSize()) { - gObjectData += (LLUnit)mesgsys->getReceiveCompressedSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveCompressedSize(); } else { - gObjectData += (LLUnit)mesgsys->getReceiveSize(); + gObjectData += (U32Bytes)mesgsys->getReceiveSize(); } gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index a8183e76b4..4643430c6b 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -995,13 +995,13 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // update global timer F32 last_time = gFrameTimeSeconds; - LLUnit time = totalTime(); // this will become the new gFrameTime when the update is done + U64Microseconds time = totalTime(); // this will become the new gFrameTime when the update is done // Time _can_ go backwards, for example if the user changes the system clock. // It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here. // llassert(time > gFrameTime); - LLUnits::F64Seconds time_diff = time - gFrameTime; + F64Seconds time_diff = time - gFrameTime; gFrameTime = time; - LLUnits::F64Seconds time_since_start = gFrameTime - gStartTime; + F64Seconds time_since_start = gFrameTime - gStartTime; gFrameTimeSeconds = time_since_start; gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 568d4b42ca..67005e1978 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -95,7 +95,7 @@ LLTrace::CountStatHandle > LLTrace::EventStatHandle > TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat"); -LLTrace::CountStatHandle > +LLTrace::CountStatHandle 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"), @@ -104,7 +104,7 @@ LLTrace::CountStatHandle > MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"), MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data"); -LLTrace::CountStatHandle +LLTrace::CountStatHandle 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%"); @@ -152,15 +152,15 @@ LLTrace::SampleStatHandle > static LLTrace::SampleStatHandle CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled"); -LLTrace::SampleStatHandle > GL_TEX_MEM("gltexmemstat"), +LLTrace::SampleStatHandle GL_TEX_MEM("gltexmemstat"), GL_BOUND_MEM("glboundmemstat"), RAW_MEM("rawmemstat"), FORMATTED_MEM("formattedmemstat"); -LLTrace::SampleStatHandle > DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), +LLTrace::SampleStatHandle DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting"); -SimMeasurement > SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS), +SimMeasurement 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), @@ -175,10 +175,10 @@ SimMeasurement > SIM_FRAME_TIME("simframemsec SIM_SLEEP_TIME("simsleepmsec", "", LL_SIM_STAT_SIMSLEEPTIME), SIM_PUMP_IO_TIME("simpumpiomsec", "", LL_SIM_STAT_IOPUMPTIME); -SimMeasurement > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES); -SimMeasurement > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); +SimMeasurement SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_SIM_STAT_TOTAL_UNACKED_BYTES); +SimMeasurement SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); -LLTrace::SampleStatHandle > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), +LLTrace::SampleStatHandle FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), SIM_PING("simpingstat"); @@ -186,7 +186,7 @@ LLTrace::EventStatHandle > AGENT_POSITION_SNAP("age LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY("loadingwearableslongdelay", "Wearables took too long to load"); -LLTrace::EventStatHandle > REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"), +LLTrace::EventStatHandle REGION_CROSSING_TIME("regioncrossingtime", "CROSSING_AVG"), FRAME_STACKTIME("framestacktime", "FRAME_SECS"), UPDATE_STACKTIME("updatestacktime", "UPDATE_SECS"), NETWORK_STACKTIME("networkstacktime", "NETWORK_SECS"), @@ -194,7 +194,7 @@ LLTrace::EventStatHandle > REGION_CROSSING_TI REBUILD_STACKTIME("rebuildstacktime", "REBUILD_SECS"), RENDER_STACKTIME("renderstacktime", "RENDER_SECS"); -LLTrace::EventStatHandle AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), +LLTrace::EventStatHandle AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"), TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"), MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"), FPS_10_TIME("fps10time", "Seconds below 10 FPS"), @@ -219,7 +219,7 @@ void LLViewerStats::resetStats() LLViewerStats::instance().mRecording.reset(); } -void LLViewerStats::updateFrameStats(const LLUnits::F64Seconds time_diff) +void LLViewerStats::updateFrameStats(const F64Seconds time_diff) { if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) { @@ -258,15 +258,15 @@ void LLViewerStats::updateFrameStats(const LLUnits::F64Seconds time_diff) add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); // old stats that were never really used - sample(LLStatViewer::FRAMETIME_JITTER, LLUnit (mLastTimeDiff - time_diff)); + sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff)); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - sample(LLStatViewer::FRAMETIME_SLEW, LLUnit (average_frametime - time_diff)); + sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff)); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - sample(LLStatViewer::DELTA_BANDWIDTH, LLUnit(delta_bandwidth)); - sample(LLStatViewer::MAX_BANDWIDTH, LLUnit(max_bandwidth)); + sample(LLStatViewer::DELTA_BANDWIDTH, F64Bits(delta_bandwidth)); + sample(LLStatViewer::MAX_BANDWIDTH, F64Bits(max_bandwidth)); } mLastTimeDiff = time_diff; @@ -299,13 +299,13 @@ F32 gAveLandCompression = 0.f, gWorstLandCompression = 0.f, gWorstWaterCompression = 0.f; -LLUnits::U32Bytes gTotalWorldData, +U32Bytes gTotalWorldData, gTotalObjectData, gTotalTextureData; U32 gSimPingCount = 0; -LLUnits::U32Bits gObjectData; +U32Bits gObjectData; F32 gAvgSimPing = 0.f; -LLUnits::U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {LLUnits::U32Bytes(0)}; +U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)}; extern U32 gVisCompared; extern U32 gVisTested; @@ -345,8 +345,8 @@ void update_statistics() typedef LLInstanceTracker, std::string> trace_type_t; - LLUnits::F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); - LLUnits::F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); + F64Seconds idle_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Idle")); + F64Seconds network_secs = last_frame_recording.getSum(*trace_type_t::getInstance("Network")); record(LLStatViewer::FRAME_STACKTIME, last_frame_recording.getSum(*trace_type_t::getInstance("Frame"))); record(LLStatViewer::UPDATE_STACKTIME, idle_secs - network_secs); @@ -358,13 +358,13 @@ void update_statistics() LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - sample(LLStatViewer::SIM_PING, LLUnit (cdp->getPingDelay())); + sample(LLStatViewer::SIM_PING, F64Milliseconds (cdp->getPingDelay())); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - sample(LLStatViewer::SIM_PING, LLUnits::U32Seconds(10)); + sample(LLStatViewer::SIM_PING, U32Seconds(10)); } if (LLViewerStats::instance().getRecording().getSum(LLStatViewer::FPS)) @@ -374,10 +374,10 @@ void update_statistics() add(LLStatViewer::FPS, 1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, LLUnit(layer_bits)); + add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, F64Bits(layer_bits)); add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData); sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending()); - add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, LLUnit(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); + add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, F64Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) @@ -553,9 +553,9 @@ void send_stats() LLSD &download = body["downloads"]; - download["world_kbytes"] = LLUnit(gTotalWorldData).value(); - download["object_kbytes"] = LLUnit(gTotalObjectData).value(); - download["texture_kbytes"] = LLUnit(gTotalTextureData).value(); + download["world_kbytes"] = F64Kibibytes(gTotalWorldData).value(); + download["object_kbytes"] = F64Kibibytes(gTotalObjectData).value(); + download["texture_kbytes"] = F64Kibibytes(gTotalTextureData).value(); download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0; LLSD &in = body["stats"]["net"]["in"]; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 2cea575252..42c56e8835 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -142,7 +142,7 @@ extern LLTrace::CountStatHandle<> FPS, extern LLTrace::CountStatHandle > TRIANGLES_DRAWN; -extern LLTrace::CountStatHandle > ACTIVE_MESSAGE_DATA_RECEIVED, +extern LLTrace::CountStatHandle ACTIVE_MESSAGE_DATA_RECEIVED, LAYERS_NETWORK_DATA_RECEIVED, OBJECT_NETWORK_DATA_RECEIVED, ASSET_UDP_DATA_RECEIVED, @@ -150,7 +150,7 @@ extern LLTrace::CountStatHandle > ACTIVE_MESSAGE MESSAGE_SYSTEM_DATA_IN, MESSAGE_SYSTEM_DATA_OUT; -extern LLTrace::CountStatHandle SIM_20_FPS_TIME, +extern LLTrace::CountStatHandle SIM_20_FPS_TIME, SIM_PHYSICS_20_FPS_TIME, LOSS_5_PERCENT_TIME; @@ -192,13 +192,13 @@ extern LLTrace::SampleStatHandle<> FPS_SAMPLE, extern LLTrace::SampleStatHandle > PACKETS_LOST_PERCENT; -extern LLTrace::SampleStatHandle > GL_TEX_MEM, +extern LLTrace::SampleStatHandle GL_TEX_MEM, GL_BOUND_MEM, RAW_MEM, FORMATTED_MEM; -extern LLTrace::SampleStatHandle > DELTA_BANDWIDTH, +extern LLTrace::SampleStatHandle DELTA_BANDWIDTH, MAX_BANDWIDTH; -extern SimMeasurement > SIM_FRAME_TIME, +extern SimMeasurement SIM_FRAME_TIME, SIM_NET_TIME, SIM_OTHER_TIME, SIM_PHYSICS_TIME, @@ -213,11 +213,11 @@ extern SimMeasurement > SIM_FRAME_TIME, SIM_SLEEP_TIME, SIM_PUMP_IO_TIME; -extern SimMeasurement > SIM_UNACKED_BYTES; -extern SimMeasurement > SIM_PHYSICS_MEM; +extern SimMeasurement SIM_UNACKED_BYTES; +extern SimMeasurement SIM_PHYSICS_MEM; -extern LLTrace::SampleStatHandle > FRAMETIME_JITTER, +extern LLTrace::SampleStatHandle FRAMETIME_JITTER, FRAMETIME_SLEW, SIM_PING; @@ -225,7 +225,7 @@ extern LLTrace::EventStatHandle > AGENT_POSITION_SN extern LLTrace::EventStatHandle<> LOADING_WEARABLES_LONG_DELAY; -extern LLTrace::EventStatHandle > REGION_CROSSING_TIME, +extern LLTrace::EventStatHandle REGION_CROSSING_TIME, FRAME_STACKTIME, UPDATE_STACKTIME, NETWORK_STACKTIME, @@ -233,7 +233,7 @@ extern LLTrace::EventStatHandle > REGION_CROS REBUILD_STACKTIME, RENDER_STACKTIME; -extern LLTrace::EventStatHandle AVATAR_EDIT_TIME, +extern LLTrace::EventStatHandle AVATAR_EDIT_TIME, TOOLBOX_TIME, MOUSELOOK_TIME, FPS_10_TIME, @@ -254,7 +254,7 @@ public: LLViewerStats(); ~LLViewerStats(); - void updateFrameStats(const LLUnits::F64Seconds time_diff); + void updateFrameStats(const F64Seconds time_diff); void addToMessage(LLSD &body); @@ -370,7 +370,7 @@ public: private: LLTrace::Recording mRecording; - LLUnits::F64Seconds mLastTimeDiff; // used for time stat updates + F64Seconds mLastTimeDiff; // used for time stat updates }; static const F32 SEND_STATS_PERIOD = 300.0f; @@ -380,7 +380,7 @@ void update_statistics(); void send_stats(); extern LLFrameTimer gTextureTimer; -extern LLUnit gTotalTextureData; -extern LLUnit gTotalObjectData; -extern LLUnit gTotalTextureBytesPerBoostLevel[] ; +extern U32Bytes gTotalTextureData; +extern U32Bytes gTotalObjectData; +extern U32Bytes gTotalTextureBytesPerBoostLevel[] ; #endif // LL_LLVIEWERSTATS_H diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c780814e50..4290d338c1 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,8 +63,8 @@ /////////////////////////////////////////////////////////////////////////////// // extern -const LLUnit gMinVideoRam(32); -const LLUnit gMaxVideoRam(512); +const S32Mibibytes gMinVideoRam(32); +const S32Mibibytes gMaxVideoRam(512); // statics @@ -86,11 +86,11 @@ S32 LLViewerTexture::sAuxCount = 0; LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; -LLUnit LLViewerTexture::sBoundTextureMemory; -LLUnit LLViewerTexture::sTotalTextureMemory; -LLUnit LLViewerTexture::sMaxBoundTextureMem; -LLUnit LLViewerTexture::sMaxTotalTextureMem; -LLUnit LLViewerTexture::sMaxDesiredTextureMem; +S32Bytes LLViewerTexture::sBoundTextureMemory; +S32Bytes LLViewerTexture::sTotalTextureMemory; +S32Mibibytes LLViewerTexture::sMaxBoundTextureMem; +S32Mibibytes LLViewerTexture::sMaxTotalTextureMem; +S32Bytes LLViewerTexture::sMaxDesiredTextureMem; S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; F32 LLViewerTexture::sCameraMovingBias = 0.0f ; S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size @@ -540,7 +540,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit(gMaxVideoRam)); + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, S32Bytes(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b0eae7c071..9a00ccd8c6 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -38,8 +38,8 @@ #include #include -extern const LLUnit gMinVideoRam; -extern const LLUnit gMaxVideoRam; +extern const S32Mibibytes gMinVideoRam; +extern const S32Mibibytes gMaxVideoRam; class LLImageGL ; class LLImageRaw; @@ -205,11 +205,11 @@ public: static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; - static LLUnit sBoundTextureMemory; - static LLUnit sTotalTextureMemory; - static LLUnit sMaxBoundTextureMem; - static LLUnit sMaxTotalTextureMem; - static LLUnit sMaxDesiredTextureMem ; + static S32Bytes sBoundTextureMemory; + static S32Bytes sTotalTextureMemory; + static S32Mibibytes sMaxBoundTextureMem; + static S32Mibibytes sMaxTotalTextureMem; + static S32Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; static S32 sMaxSculptRez ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2030b490e4..888174a6cf 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -670,8 +670,8 @@ void LLViewerTextureList::updateImages(F32 max_time) sample(NUM_RAW_IMAGES, LLImageRaw::sRawImageCount); sample(GL_TEX_MEM, LLImageGL::sGlobalTextureMemory); sample(GL_BOUND_MEM, LLImageGL::sBoundTextureMemory); - sample(RAW_MEM, LLUnit(LLImageRaw::sGlobalRawMemory)); - sample(FORMATTED_MEM, LLUnit(LLImageFormatted::sGlobalFormattedMemory)); + sample(RAW_MEM, F64Bytes(LLImageRaw::sGlobalRawMemory)); + sample(FORMATTED_MEM, F64Bytes(LLImageFormatted::sGlobalFormattedMemory)); } { @@ -1373,7 +1373,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1447,7 +1447,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d received_size = msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, LLUnit(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); add(LLStatViewer::TEXTURE_PACKETS, 1); //llprintline("Start decode, image header..."); diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 673b55be69..53bda6e6ab 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -101,8 +101,8 @@ public: void setUpdateStats(BOOL b) { mUpdateStats = b; } - LLUnit getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } - LLUnit getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} + S32Mibibytes getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } + S32Mibibytes getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} S32 getNumImages() { return mImageList.size(); } void updateMaxResidentTexMem(S32 mem); @@ -200,8 +200,8 @@ private: BOOL mInitialized ; BOOL mUpdateStats; - LLUnit mMaxResidentTexMemInMegaBytes; - LLUnit mMaxTotalTextureMemInMegaBytes; + S32Mibibytes mMaxResidentTexMemInMegaBytes; + S32Mibibytes mMaxTotalTextureMemInMegaBytes; LLFrameTimer mForceDecodeTimer; private: diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 12d58b7521..1e60b59932 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -738,7 +738,7 @@ public: { if(gTotalTextureBytesPerBoostLevel[i] > 0) { - addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, LLUnit(gTotalTextureBytesPerBoostLevel[i]).value())); + addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, F32Mibibytes(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 66206fe53e..db6d2d6fe9 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -899,7 +899,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) if (mLastRegionHandle != 0) { ++mRegionCrossingCount; - LLUnits::F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); + F64Seconds delta(mRegionCrossingTimer.getElapsedTimeF32()); record(LLStatViewer::REGION_CROSSING_TIME, delta); // Diagnostics diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 31b7e5a01c..93351d21f5 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6547,7 +6547,7 @@ void LLVivoxVoiceClient::expireVoiceFonts() // Give a warning notification if any voice fonts are due to expire. if (will_expire) { - LLUnit seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); + S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); args["INTERVAL"] = llformat("%d", LLUnit(seconds).value()); LLNotificationsUtil::add("VoiceEffectsWillExpire", args); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 38818e242b..9d727dafbe 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -717,7 +717,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - LLUnits::F64Bits bits; + F64Bits bits; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -735,8 +735,8 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - LLUnit actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); - LLUnit actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); + F64Bits actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits()); + F64Bits actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits()); add(LLStatViewer::MESSAGE_SYSTEM_DATA_IN, actual_in_bits); add(LLStatViewer::MESSAGE_SYSTEM_DATA_OUT, actual_out_bits); -- cgit v1.3 From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits --- indra/llcommon/llcriticaldamp.cpp | 2 +- indra/llcommon/llcriticaldamp.h | 4 +- indra/llcommon/lldate.cpp | 2 +- indra/llcommon/lldate.h | 2 +- indra/llcommon/llframetimer.h | 4 +- indra/llcommon/llmemory.cpp | 46 +- indra/llcommon/llmemory.h | 18 +- indra/llcommon/llprocessor.cpp | 2 +- indra/llcommon/llprocessor.h | 2 +- indra/llcommon/llsys.cpp | 18 +- indra/llcommon/llsys.h | 4 +- indra/llcommon/lltimer.cpp | 18 +- indra/llcommon/lltimer.h | 20 +- indra/llcommon/lltraceaccumulators.cpp | 2 +- indra/llcommon/lltraceaccumulators.h | 20 +- indra/llcommon/lltracerecording.h | 4 +- indra/llcommon/llunit.h | 727 +++++++++----- indra/llcommon/tests/llunits_test.cpp | 126 ++- indra/llmessage/llassetstorage.cpp | 8 +- indra/llmessage/llassetstorage.h | 12 +- indra/llmessage/llcircuit.cpp | 32 +- indra/llmessage/llcircuit.h | 4 +- indra/llmessage/llhttpassetstorage.cpp | 4 +- indra/llmessage/llhttpassetstorage.h | 4 +- indra/llmessage/llpacketack.h | 2 +- indra/llmessage/llthrottle.cpp | 8 +- indra/llmessage/message.cpp | 18 +- indra/llmessage/message.h | 2 +- indra/llrender/llgltexture.cpp | 2 +- indra/llrender/llgltexture.h | 2 +- indra/llrender/llimagegl.cpp | 12 +- indra/llrender/llimagegl.h | 6 +- indra/llui/llstatbar.cpp | 10 +- indra/newview/llappviewer.cpp | 20 +- indra/newview/llappviewer.h | 8 +- indra/newview/llconversationlog.cpp | 8 +- indra/newview/llconversationlog.h | 2 +- indra/newview/llfasttimerview.cpp | 8 +- indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llfloaterabout.cpp | 2 +- indra/newview/llfloaterhardwaresettings.cpp | 4 +- indra/newview/llscenemonitor.cpp | 7 +- indra/newview/llscenemonitor.h | 2 +- indra/newview/llsurfacepatch.cpp | 2 +- indra/newview/lltexturefetch.cpp | 18 +- indra/newview/lltexturefetch.h | 10 +- indra/newview/lltextureinfo.cpp | 8 +- indra/newview/lltextureinfodetails.h | 8 +- indra/newview/lltextureview.cpp | 20 +- indra/newview/llviewerassetstorage.cpp | 6 +- indra/newview/llviewerassetstorage.h | 4 +- indra/newview/llviewercontrol.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 4 +- indra/newview/llviewermessage.cpp | 4 +- indra/newview/llviewerobject.cpp | 24 +- indra/newview/llviewerobject.h | 8 +- indra/newview/llviewerregion.cpp | 6 +- indra/newview/llviewerstats.cpp | 30 +- indra/newview/llviewerstats.h | 4 +- indra/newview/llviewertexture.cpp | 1398 +++++++++++++-------------- indra/newview/llviewertexture.h | 24 +- indra/newview/llviewertexturelist.cpp | 88 +- indra/newview/llviewertexturelist.h | 15 +- indra/newview/llviewerwindow.cpp | 4 +- indra/newview/llvlmanager.cpp | 18 +- indra/newview/llvlmanager.h | 16 +- indra/newview/llvoavatar.cpp | 10 +- indra/newview/llvoavatar.h | 40 +- indra/newview/llvoavatarself.cpp | 8 +- indra/newview/llvoavatarself.h | 2 +- indra/newview/llvopartgroup.cpp | 2 +- indra/newview/llworld.cpp | 6 +- indra/newview/llworld.h | 6 +- indra/newview/pipeline.cpp | 2 +- 74 files changed, 1642 insertions(+), 1365 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/llcriticaldamp.cpp b/indra/llcommon/llcriticaldamp.cpp index 5ffad88973..9f4cb09000 100755 --- a/indra/llcommon/llcriticaldamp.cpp +++ b/indra/llcommon/llcriticaldamp.cpp @@ -81,7 +81,7 @@ void LLSmoothInterpolation::updateInterpolants() //----------------------------------------------------------------------------- // getInterpolant() //----------------------------------------------------------------------------- -F32 LLSmoothInterpolation::getInterpolant(LLUnitImplicit time_constant, bool use_cache) +F32 LLSmoothInterpolation::getInterpolant(F32SecondsImplicit time_constant, bool use_cache) { if (time_constant == 0.f) { diff --git a/indra/llcommon/llcriticaldamp.h b/indra/llcommon/llcriticaldamp.h index 7b2a414459..a02a2a0dcf 100755 --- a/indra/llcommon/llcriticaldamp.h +++ b/indra/llcommon/llcriticaldamp.h @@ -42,10 +42,10 @@ public: static void updateInterpolants(); // ACCESSORS - static F32 getInterpolant(LLUnitImplicit time_constant, bool use_cache = true); + static F32 getInterpolant(F32SecondsImplicit time_constant, bool use_cache = true); template - static T lerp(T a, T b, LLUnitImplicit time_constant, bool use_cache = true) + static T lerp(T a, T b, F32SecondsImplicit time_constant, bool use_cache = true) { F32 interpolant = getInterpolant(time_constant, use_cache); return ((a * (1.f - interpolant)) diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index cb6f239396..4f2e1304b2 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -55,7 +55,7 @@ LLDate::LLDate(const LLDate& date) : mSecondsSinceEpoch(date.mSecondsSinceEpoch) {} -LLDate::LLDate(LLUnitImplicit seconds_since_epoch) : +LLDate::LLDate(F64SecondsImplicit seconds_since_epoch) : mSecondsSinceEpoch(seconds_since_epoch.value()) {} diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 816bc62b14..aecf3b765e 100755 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -59,7 +59,7 @@ public: * * @param seconds_since_epoch The number of seconds since UTC epoch. */ - LLDate(LLUnitImplicit seconds_since_epoch); + LLDate(F64SecondsImplicit seconds_since_epoch); /** * @brief Construct a date from a string representation diff --git a/indra/llcommon/llframetimer.h b/indra/llcommon/llframetimer.h index d64009440c..81bd5da8a3 100755 --- a/indra/llcommon/llframetimer.h +++ b/indra/llcommon/llframetimer.h @@ -43,7 +43,7 @@ public: // Return the number of seconds since the start of this // application instance. - static F64 getElapsedSeconds() + static F64SecondsImplicit getElapsedSeconds() { // Loses msec precision after ~4.5 hours... return sFrameTime; @@ -52,7 +52,7 @@ public: // Return a low precision usec since epoch static U64 getTotalTime() { - return sTotalTime ? LLUnitImplicit(sTotalTime) : totalTime(); + return sTotalTime ? U64MicrosecondsImplicit(sTotalTime) : totalTime(); } // Return a low precision seconds since epoch diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index c59b61471a..d46e205500 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -47,11 +47,11 @@ //static char* LLMemory::reserveMem = 0; -U32Kibibytes LLMemory::sAvailPhysicalMemInKB(U32_MAX); -U32Kibibytes LLMemory::sMaxPhysicalMemInKB(0); -U32Kibibytes LLMemory::sAllocatedMemInKB(0); -U32Kibibytes LLMemory::sAllocatedPageSizeInKB(0); -U32Kibibytes LLMemory::sMaxHeapSizeInKB(U32_MAX); +U32Kilobytes LLMemory::sAvailPhysicalMemInKB(U32_MAX); +U32Kilobytes LLMemory::sMaxPhysicalMemInKB(0); +U32Kilobytes LLMemory::sAllocatedMemInKB(0); +U32Kilobytes LLMemory::sAllocatedPageSizeInKB(0); +U32Kilobytes LLMemory::sMaxHeapSizeInKB(U32_MAX); BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE; #if __DEBUG_PRIVATE_MEM__ @@ -94,9 +94,9 @@ void LLMemory::freeReserve() } //static -void LLMemory::initMaxHeapSizeGB(F32 max_heap_size_gb, BOOL prevent_heap_failure) +void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure) { - sMaxHeapSizeInKB = (U32)(max_heap_size_gb * 1024 * 1024) ; + sMaxHeapSizeInKB = max_heap_size; sEnableMemoryFailurePrevention = prevent_heap_failure ; } @@ -113,10 +113,10 @@ void LLMemory::updateMemoryInfo() return ; } - sAllocatedMemInKB = (U32)(counters.WorkingSetSize / 1024) ; - sAllocatedPageSizeInKB = (U32)(counters.PagefileUsage / 1024) ; + sAllocatedMemInKB = (U32Bytes)(counters.WorkingSetSize) ; + sAllocatedPageSizeInKB = (U32Bytes)(counters.PagefileUsage) ; - U32Kibibytes avail_phys, avail_virtual; + U32Kilobytes avail_phys, avail_virtual; LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ; sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB); @@ -126,7 +126,7 @@ void LLMemory::updateMemoryInfo() } else { - sAvailPhysicalMemInKB = 0 ; + sAvailPhysicalMemInKB = U32Kilobytes(0); } #else //not valid for other systems for now. @@ -187,8 +187,8 @@ void LLMemory::logMemoryInfo(BOOL update) //static bool LLMemory::isMemoryPoolLow() { - static const U32 LOW_MEMEOY_POOL_THRESHOLD_KB = 64 * 1024 ; //64 MB for emergency use - const static U32 MAX_SIZE_CHECKED_MEMORY_BLOCK = 64 * 1024 * 1024 ; //64 MB + static const U32Megabytes LOW_MEMORY_POOL_THRESHOLD(64); + const static U32Megabytes MAX_SIZE_CHECKED_MEMORY_BLOCK(64); static void* last_reserved_address = NULL ; if(!sEnableMemoryFailurePrevention) @@ -196,32 +196,32 @@ bool LLMemory::isMemoryPoolLow() return false ; //no memory failure prevention. } - if(sAvailPhysicalMemInKB < (LOW_MEMEOY_POOL_THRESHOLD_KB >> 2)) //out of physical memory + if(sAvailPhysicalMemInKB < (LOW_MEMORY_POOL_THRESHOLD / 4)) //out of physical memory { return true ; } - if(sAllocatedPageSizeInKB + (LOW_MEMEOY_POOL_THRESHOLD_KB >> 2) > sMaxHeapSizeInKB) //out of virtual address space. + if(sAllocatedPageSizeInKB + (LOW_MEMORY_POOL_THRESHOLD / 4) > sMaxHeapSizeInKB) //out of virtual address space. { return true ; } - bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMEOY_POOL_THRESHOLD_KB || - sAllocatedPageSizeInKB + LOW_MEMEOY_POOL_THRESHOLD_KB > sMaxHeapSizeInKB) ; + bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMORY_POOL_THRESHOLD || + sAllocatedPageSizeInKB + LOW_MEMORY_POOL_THRESHOLD > sMaxHeapSizeInKB) ; //check the virtual address space fragmentation if(!is_low) { if(!last_reserved_address) { - last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ; + last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ; } else { - last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ; + last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ; if(!last_reserved_address) //failed, try once more { - last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ; + last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK.value()) ; } } @@ -232,19 +232,19 @@ bool LLMemory::isMemoryPoolLow() } //static -U32Kibibytes LLMemory::getAvailableMemKB() +U32Kilobytes LLMemory::getAvailableMemKB() { return sAvailPhysicalMemInKB ; } //static -U32Kibibytes LLMemory::getMaxMemKB() +U32Kilobytes LLMemory::getMaxMemKB() { return sMaxPhysicalMemInKB ; } //static -U32Kibibytes LLMemory::getAllocatedMemKB() +U32Kilobytes LLMemory::getAllocatedMemKB() { return sAllocatedMemInKB ; } diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index c45c7ed213..23be1e5b2d 100755 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -166,22 +166,22 @@ public: static U64 getCurrentRSS(); static U32 getWorkingSetSize(); static void* tryToAlloc(void* address, U32 size); - static void initMaxHeapSizeGB(F32 max_heap_size_gb, BOOL prevent_heap_failure); + static void initMaxHeapSizeGB(F32Gigabytes max_heap_size, BOOL prevent_heap_failure); static void updateMemoryInfo() ; static void logMemoryInfo(BOOL update = FALSE); static bool isMemoryPoolLow(); - static U32Kibibytes getAvailableMemKB() ; - static U32Kibibytes getMaxMemKB() ; - static U32Kibibytes getAllocatedMemKB() ; + static U32Kilobytes getAvailableMemKB() ; + static U32Kilobytes getMaxMemKB() ; + static U32Kilobytes getAllocatedMemKB() ; private: static char* reserveMem; - static U32Kibibytes sAvailPhysicalMemInKB ; - static U32Kibibytes sMaxPhysicalMemInKB ; - static U32Kibibytes sAllocatedMemInKB; - static U32Kibibytes sAllocatedPageSizeInKB ; + static U32Kilobytes sAvailPhysicalMemInKB ; + static U32Kilobytes sMaxPhysicalMemInKB ; + static U32Kilobytes sAllocatedMemInKB; + static U32Kilobytes sAllocatedPageSizeInKB ; - static U32Kibibytes sMaxHeapSizeInKB; + static U32Kilobytes sMaxHeapSizeInKB; static BOOL sEnableMemoryFailurePrevention; }; diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 80b86153e4..69043dc173 100755 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -875,7 +875,7 @@ LLProcessorInfo::LLProcessorInfo() : mImpl(NULL) LLProcessorInfo::~LLProcessorInfo() {} -LLUnitImplicit LLProcessorInfo::getCPUFrequency() const { return mImpl->getCPUFrequency(); } +F64MegahertzImplicit LLProcessorInfo::getCPUFrequency() const { return mImpl->getCPUFrequency(); } bool LLProcessorInfo::hasSSE() const { return mImpl->hasSSE(); } bool LLProcessorInfo::hasSSE2() const { return mImpl->hasSSE2(); } bool LLProcessorInfo::hasAltivec() const { return mImpl->hasAltivec(); } diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h index 7f220467b0..4956a39700 100755 --- a/indra/llcommon/llprocessor.h +++ b/indra/llcommon/llprocessor.h @@ -37,7 +37,7 @@ public: LLProcessorInfo(); ~LLProcessorInfo(); - LLUnitImplicit getCPUFrequency() const; + F64MegahertzImplicit getCPUFrequency() const; bool hasSSE() const; bool hasSSE2() const; bool hasAltivec() const; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 8f7e60fb68..1ff45d3d90 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -832,7 +832,7 @@ LLMemoryInfo::LLMemoryInfo() } #if LL_WINDOWS -static U32Kibibytes LLMemoryAdjustKBResult(U32Kibibytes inKB) +static U32Kilobytes LLMemoryAdjustKBResult(U32Kilobytes inKB) { // Moved this here from llfloaterabout.cpp @@ -843,16 +843,16 @@ static U32Kibibytes LLMemoryAdjustKBResult(U32Kibibytes inKB) // returned from the GetMemoryStatusEx function. Here we keep the // original adjustment from llfoaterabout.cpp until this can be // fixed somehow. - inKB += U32Mibibytes(1); + inKB += U32Megabytes(1); return inKB; } #endif -U32Kibibytes LLMemoryInfo::getPhysicalMemoryKB() const +U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const { #if LL_WINDOWS - return LLMemoryAdjustKBResult(U32Kibibytes(mStatsMap["Total Physical KB"].asInteger())); + return LLMemoryAdjustKBResult(U32Kilobytes(mStatsMap["Total Physical KB"].asInteger())); #elif LL_DARWIN // This might work on Linux as well. Someone check... @@ -885,8 +885,8 @@ U32Bytes LLMemoryInfo::getPhysicalMemoryClamped() const // Return the total physical memory in bytes, but clamp it // to no more than U32_MAX - U32Bytes phys_kb = getPhysicalMemoryKB(); - if (phys_kb >= 4194304 /* 4GB in KB */) + U32Kilobytes phys_kb = getPhysicalMemoryKB(); + if (phys_kb >= U32Gigabytes(4)) { return U32Bytes(U32_MAX); } @@ -897,15 +897,15 @@ U32Bytes LLMemoryInfo::getPhysicalMemoryClamped() const } //static -void LLMemoryInfo::getAvailableMemoryKB(U32Kibibytes& avail_physical_mem_kb, U32Kibibytes& avail_virtual_mem_kb) +void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb) { #if LL_WINDOWS // Sigh, this shouldn't be a static method, then we wouldn't have to // reload this data separately from refresh() LLSD statsMap(loadStatsMap()); - avail_physical_mem_kb = statsMap["Avail Physical KB"].asInteger(); - avail_virtual_mem_kb = statsMap["Avail Virtual KB"].asInteger(); + avail_physical_mem_kb = (U32Kilobytes)statsMap["Avail Physical KB"].asInteger(); + avail_virtual_mem_kb = (U32Kilobytes)statsMap["Avail Virtual KB"].asInteger(); #elif LL_DARWIN // mStatsMap is derived from vm_stat, look for (e.g.) "kb free": diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index ad4f243d05..962367f69f 100755 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -112,7 +112,7 @@ public: LLMemoryInfo(); ///< Default constructor void stream(std::ostream& s) const; ///< output text info to s - U32Kibibytes getPhysicalMemoryKB() const; + U32Kilobytes getPhysicalMemoryKB() const; /*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will ** be returned. @@ -120,7 +120,7 @@ public: U32Bytes getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes //get the available memory infomation in KiloBytes. - static void getAvailableMemoryKB(U32Kibibytes& avail_physical_mem_kb, U32Kibibytes& avail_virtual_mem_kb); + static void getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb); // Retrieve a map of memory statistics. The keys of the map are platform- // dependent. The values are in kilobytes to try to avoid integer overflow. diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 74f3a7f587..da9d2b646c 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -225,7 +225,7 @@ void update_clock_frequencies() // returns a U64 number that represents the number of // microseconds since the unix epoch - Jan 1, 1970 -LLUnitImplicit totalTime() +U64MicrosecondsImplicit totalTime() { U64 current_clock_count = get_clock_count(); if (!gTotalTimeClockCount) @@ -295,14 +295,14 @@ void LLTimer::cleanupClass() } // static -LLUnitImplicit LLTimer::getTotalTime() +U64MicrosecondsImplicit LLTimer::getTotalTime() { // simply call into the implementation function. return totalTime(); } // static -LLUnitImplicit LLTimer::getTotalSeconds() +F64SecondsImplicit LLTimer::getTotalSeconds() { return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64; } @@ -351,36 +351,36 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount) } -LLUnitImplicit LLTimer::getElapsedTimeF64() const +F64SecondsImplicit LLTimer::getElapsedTimeF64() const { U64 last = mLastClockCount; return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv; } -LLUnitImplicit LLTimer::getElapsedTimeF32() const +F32SecondsImplicit LLTimer::getElapsedTimeF32() const { return (F32)getElapsedTimeF64(); } -LLUnitImplicit LLTimer::getElapsedTimeAndResetF64() +F64SecondsImplicit LLTimer::getElapsedTimeAndResetF64() { return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv; } -LLUnitImplicit LLTimer::getElapsedTimeAndResetF32() +F32SecondsImplicit LLTimer::getElapsedTimeAndResetF32() { return (F32)getElapsedTimeAndResetF64(); } /////////////////////////////////////////////////////////////////////////////// -void LLTimer::setTimerExpirySec(LLUnitImplicit expiration) +void LLTimer::setTimerExpirySec(F32SecondsImplicit expiration) { mExpirationTicks = get_clock_count() + (U64)((F32)(expiration * gClockFrequency)); } -LLUnitImplicit LLTimer::getRemainingTimeF32() const +F32SecondsImplicit LLTimer::getRemainingTimeF32() const { U64 cur_ticks = get_clock_count(); if (cur_ticks > mExpirationTicks) diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index 1f2c56432b..12a453e897 100755 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -67,7 +67,7 @@ public: // Return a high precision number of seconds since the start of // this application instance. - static LLUnitImplicit getElapsedSeconds() + static F64SecondsImplicit getElapsedSeconds() { if (sTimer) { @@ -80,10 +80,10 @@ public: } // Return a high precision usec since epoch - static LLUnitImplicit getTotalTime(); + static U64MicrosecondsImplicit getTotalTime(); // Return a high precision seconds since epoch - static LLUnitImplicit getTotalSeconds(); + static F64SecondsImplicit getTotalSeconds(); // MANIPULATORS @@ -91,19 +91,19 @@ public: void stop() { mStarted = FALSE; } void reset(); // Resets the timer void setLastClockCount(U64 current_count); // Sets the timer so that the next elapsed call will be relative to this time - void setTimerExpirySec(LLUnitImplicit expiration); + void setTimerExpirySec(F32SecondsImplicit expiration); BOOL checkExpirationAndReset(F32 expiration); BOOL hasExpired() const; - LLUnitImplicit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset - LLUnitImplicit getElapsedTimeAndResetF64(); + F32SecondsImplicit getElapsedTimeAndResetF32(); // Returns elapsed time in seconds with reset + F64SecondsImplicit getElapsedTimeAndResetF64(); - LLUnitImplicit getRemainingTimeF32() const; + F32SecondsImplicit getRemainingTimeF32() const; static BOOL knownBadTimer(); // ACCESSORS - LLUnitImplicit getElapsedTimeF32() const; // Returns elapsed time in seconds - LLUnitImplicit getElapsedTimeF64() const; // Returns elapsed time in seconds + F32SecondsImplicit getElapsedTimeF32() const; // Returns elapsed time in seconds + F64SecondsImplicit getElapsedTimeF64() const; // Returns elapsed time in seconds bool getStarted() const { return mStarted; } @@ -171,6 +171,6 @@ LL_COMMON_API struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_dayli LL_COMMON_API void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); LL_COMMON_API void secondsToTimecodeString(F32 current_time, std::string& tcstring); -LLUnitImplicit LL_COMMON_API totalTime(); // Returns current system time in microseconds +U64MicrosecondsImplicit LL_COMMON_API totalTime(); // Returns current system time in microseconds #endif diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp index a632f5634c..1fb68c8158 100644 --- a/indra/llcommon/lltraceaccumulators.cpp +++ b/indra/llcommon/lltraceaccumulators.cpp @@ -114,7 +114,7 @@ void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other) void AccumulatorBufferGroup::sync() { - LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); + F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds(); mSamples.sync(time_stamp); mMemStats.sync(time_stamp); diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 73da6bd2d8..f9d223066d 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -118,7 +118,7 @@ namespace LLTrace } } - void sync(LLUnitImplicit time_stamp) + void sync(F64SecondsImplicit time_stamp) { llassert(mStorageSize >= sNextStorageSlot); for (size_t i = 0; i < sNextStorageSlot; i++) @@ -260,7 +260,7 @@ namespace LLTrace void addSamples(const EventAccumulator& other, EBufferAppendType append_type); void reset(const EventAccumulator* other); - void sync(LLUnitImplicit) {} + void sync(F64SecondsImplicit) {} F64 getSum() const { return mSum; } F64 getMin() const { return mMin; } @@ -305,7 +305,7 @@ namespace LLTrace void sample(F64 value) { - LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); + F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds(); // store effect of last value sync(time_stamp); @@ -332,11 +332,11 @@ namespace LLTrace void addSamples(const SampleAccumulator& other, EBufferAppendType append_type); void reset(const SampleAccumulator* other); - void sync(LLUnitImplicit time_stamp) + void sync(F64SecondsImplicit time_stamp) { if (mHasValue) { - LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; + F64SecondsImplicit delta_time = time_stamp - mLastSampleTimeStamp; mSum += mLastValue * delta_time; mTotalSamplingTime += delta_time; F64 old_mean = mMean; @@ -353,7 +353,7 @@ namespace LLTrace F64 getMean() const { return mMean; } F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); } F64 getSumOfSquares() const { return mSumOfSquares; } - LLUnitImplicit getSamplingTime() { return mTotalSamplingTime; } + F64SecondsImplicit getSamplingTime() { return mTotalSamplingTime; } U32 getSampleCount() const { return mNumSamples; } bool hasValue() const { return mHasValue; } @@ -368,7 +368,7 @@ namespace LLTrace F64 mMean, mSumOfSquares; - LLUnitImplicit + F64SecondsImplicit mLastSampleTimeStamp, mTotalSamplingTime; @@ -403,7 +403,7 @@ namespace LLTrace mSum = 0; } - void sync(LLUnitImplicit) {} + void sync(F64SecondsImplicit) {} F64 getSum() const { return mSum; } @@ -435,7 +435,7 @@ namespace LLTrace TimeBlockAccumulator(); void addSamples(const self_t& other, EBufferAppendType append_type); void reset(const self_t* other); - void sync(LLUnitImplicit) {} + void sync(F64SecondsImplicit) {} // // members @@ -516,7 +516,7 @@ namespace LLTrace mDeallocatedCount = 0; } - void sync(LLUnitImplicit time_stamp) + void sync(F64SecondsImplicit time_stamp) { mSize.sync(time_stamp); mChildSize.sync(time_stamp); diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index f5fb2bf561..ea090e6ee1 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -490,7 +490,7 @@ namespace LLTrace for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); - if (recording.getDuration() > 0.f) + if (recording.getDuration() > (F32Seconds)0.f) { mean += recording.getSum(stat); } @@ -530,7 +530,7 @@ namespace LLTrace for (S32 i = 1; i <= num_periods; i++) { Recording& recording = getPrevRecording(i); - if (recording.getDuration() > 0.f) + if (recording.getDuration() > (F32Seconds)0.f) { mean += recording.getPerSec(stat); } diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index b62bebc440..c49c882f23 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -31,11 +31,29 @@ #include "llpreprocessor.h" #include "llerror.h" +//lightweight replacement of type traits for simple type equality check +template +struct LLIsSameType +{ + static const bool value = false; +}; + +template +struct LLIsSameType +{ + static const bool value = true; +}; + +template +struct LLPromotedType +{ + typedef decltype(S() + T()) type_t; +}; + template struct LLUnit { typedef LLUnit self_t; - typedef STORAGE_TYPE storage_t; // value initialization @@ -49,18 +67,6 @@ struct LLUnit : mValue(convert(other).mValue) {} - bool operator == (const self_t& other) - { - return mValue = other.mValue; - } - - // value assignment - self_t& operator = (storage_t value) - { - mValue = value; - return *this; - } - // unit assignment template self_t& operator = (LLUnit other) @@ -91,22 +97,12 @@ struct LLUnit *this = LLUnit(value); } - void operator += (storage_t value) - { - mValue += value; - } - template void operator += (LLUnit other) { mValue += convert(other).mValue; } - void operator -= (storage_t value) - { - mValue -= value; - } - template void operator -= (LLUnit other) { @@ -161,7 +157,7 @@ std::istream& operator >>(std::istream& s, LLUnit& unit { STORAGE_TYPE val; s >> val; - unit = val; + unit.value(val); return s; } @@ -181,12 +177,37 @@ struct LLUnitImplicit : public LLUnit : base_t(convert(other)) {} - // unlike LLUnit, LLUnitImplicit is *implicitly* convertable to a POD scalar (F32, S32, etc) + // unlike LLUnit, LLUnitImplicit is *implicitly* convertable to a POD value (F32, S32, etc) // this allows for interoperability with legacy code operator storage_t() const { return base_t::value(); } + + using base_t::operator +=; + void operator += (storage_t value) + { + mValue += value; + } + + template + void operator += (LLUnitImplicit other) + { + mValue += convert(other).value(); + } + + using base_t::operator -=; + void operator -= (storage_t value) + { + mValue -= value; + } + + template + void operator -= (LLUnitImplicit other) + { + mValue -= convert(other).value(); + } + }; template @@ -205,24 +226,12 @@ std::istream& operator >>(std::istream& s, LLUnitImplicit -struct LLIsSameType -{ - static const bool value = false; -}; - -template -struct LLIsSameType -{ - static const bool value = true; -}; - template LL_FORCE_INLINE void ll_convert_units(LLUnit in, LLUnit& out, ...) { LL_STATIC_ASSERT((LLIsSameType::value || !LLIsSameType::value - || !LLIsSameType::value), "invalid conversion"); + || !LLIsSameType::value), "invalid conversion: incompatible units"); if (LLIsSameType::value) { @@ -253,65 +262,63 @@ LL_FORCE_INLINE void ll_convert_units(LLUnit in, LLUnit& out, .. // operator + // template -LLUnit operator + (LLUnit first, LLUnit second) +LLUnit operator + (LLUnit first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result += second; return result; } -template -LLUnit operator + (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator + (LLUnit first, UNITLESS second) { - LLUnit result(first); - result += second; - return result; + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "operator + requires compatible unit types"); + return LLUnit(0); } -template -LLUnit operator + (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator + (UNITLESS first, LLUnit second) { - LLUnit result(first); - result += second; - return result; + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "operator + requires compatible unit types"); + return LLUnit(0); } template -LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) +LLUnitImplicit operator + (LLUnitImplicit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } template -LLUnitImplicit operator + (LLUnit first, LLUnitImplicit second) +LLUnitImplicit operator + (LLUnit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } template -LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) +LLUnitImplicit operator + (LLUnitImplicit first, LLUnit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += LLUnitImplicit(second); return result; } -template -LLUnitImplicit operator + (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator + (LLUnitImplicit first, UNITLESS_TYPE second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } -template -LLUnitImplicit operator + (SCALAR_TYPE first, LLUnitImplicit second) +template +LLUnitImplicit operator + (UNITLESS_TYPE first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result += second; return result; } @@ -320,65 +327,63 @@ LLUnitImplicit operator + (SCALAR_TYPE first, LLUnitImp // operator - // template -LLUnit operator - (LLUnit first, LLUnit second) +LLUnit operator - (LLUnit first, LLUnit second) { - LLUnit result(first); + LLUnit result(first); result -= second; return result; } -template -LLUnit operator - (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator - (LLUnit first, UNITLESS second) { - LLUnit result(first); - result -= second; - return result; + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "operator - requires compatible unit types"); + return LLUnit(0); } -template -LLUnit operator - (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator - (UNITLESS first, LLUnit second) { - LLUnit result(first); - result -= second; - return result; + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "operator - requires compatible unit types"); + return LLUnit(0); } template -LLUnitImplicit operator - (LLUnitImplicit first, LLUnitImplicit second) +LLUnitImplicit operator - (LLUnitImplicit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } template -LLUnitImplicit operator - (LLUnit first, LLUnitImplicit second) +LLUnitImplicit operator - (LLUnit first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } template -LLUnitImplicit operator - (LLUnitImplicit first, LLUnit second) +LLUnitImplicit operator - (LLUnitImplicit first, LLUnit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= LLUnitImplicit(second); return result; } -template -LLUnitImplicit operator - (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator - (LLUnitImplicit first, UNITLESS_TYPE second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } -template -LLUnitImplicit operator - (SCALAR_TYPE first, LLUnitImplicit second) +template +LLUnitImplicit operator - (UNITLESS_TYPE first, LLUnitImplicit second) { - LLUnitImplicit result(first); + LLUnitImplicit result(first); result -= second; return result; } @@ -390,119 +395,144 @@ template operator * (LLUnit, LLUnit) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "Multiplication of unit types results in new unit type - not supported."); + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "multiplication of unit types results in new unit type - not supported."); return LLUnit(); } -template -LLUnit operator * (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator * (LLUnit first, UNITLESS_TYPE second) { - return LLUnit((STORAGE_TYPE)(first.value() * second)); + return LLUnit(first.value() * second); } -template -LLUnit operator * (SCALAR_TYPE first, LLUnit second) +template +LLUnit operator * (UNITLESS_TYPE first, LLUnit second) { - return LLUnit((STORAGE_TYPE)(first * second.value())); + return LLUnit(first * second.value()); } template LLUnitImplicit operator * (LLUnitImplicit, LLUnitImplicit) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template - LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "Multiplication of unit types results in new unit type - not supported."); + LL_BAD_TEMPLATE_INSTANTIATION(STORAGE_TYPE1, "multiplication of unit types results in new unit type - not supported."); return LLUnitImplicit(); } -template -LLUnitImplicit operator * (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator * (LLUnitImplicit first, UNITLESS_TYPE second) { - return LLUnitImplicit(first.value() * second); + return LLUnitImplicit(first.value() * second); } -template -LLUnitImplicit operator * (SCALAR_TYPE first, LLUnitImplicit second) +template +LLUnitImplicit operator * (UNITLESS_TYPE first, LLUnitImplicit second) { - return LLUnitImplicit(first * second.value()); + return LLUnitImplicit(first * second.value()); } // // operator / // -template -SCALAR_TYPE operator / (SCALAR_TYPE first, LLUnit second) -{ - return SCALAR_TYPE(first / second.value()); -} -template -LLUnit operator / (LLUnit first, SCALAR_TYPE second) +template +LLUnit operator / (LLUnit first, UNITLESS_TYPE second) { - return LLUnit((STORAGE_TYPE)(first.value() / second)); + return LLUnit(first.value() / second); } template -STORAGE_TYPE1 operator / (LLUnit first, LLUnit second) +decltype(STORAGE_TYPE1() / STORAGE_TYPE2()) operator / (LLUnit first, LLUnit second) { - return STORAGE_TYPE1(first.value() / first.convert(second)); + return first.value() / first.convert(second).value(); } -template -LLUnitImplicit operator / (LLUnitImplicit first, SCALAR_TYPE second) +template +LLUnitImplicit operator / (LLUnitImplicit first, UNITLESS_TYPE second) { - return LLUnitImplicit((STORAGE_TYPE)(first.value() / second)); + return LLUnitImplicit(first.value() / second); } template -STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUnitImplicit second) +decltype(STORAGE_TYPE1() / STORAGE_TYPE2()) operator / (LLUnitImplicit first, LLUnitImplicit second) { - return STORAGE_TYPE1(first.value() / first.convert(second)); + return (decltype(STORAGE_TYPE1() / STORAGE_TYPE2()))(first.value() / first.convert(second).value()); } template -STORAGE_TYPE1 operator / (LLUnit first, LLUnitImplicit second) +decltype(STORAGE_TYPE1() / STORAGE_TYPE2()) operator / (LLUnit first, LLUnitImplicit second) { - return STORAGE_TYPE1(first.value() / first.convert(second)); + return (decltype(STORAGE_TYPE1() / STORAGE_TYPE2()))(first.value() / first.convert(second).value()); } template -STORAGE_TYPE1 operator / (LLUnitImplicit first, LLUnit second) -{ - return STORAGE_TYPE1(first.value() / first.convert(second)); -} - -#define COMPARISON_OPERATORS(op) \ -template \ -bool operator op (SCALAR_TYPE first, LLUnit second) \ -{ \ - return first op second.value(); \ -} \ - \ -template \ -bool operator op (LLUnit first, SCALAR_TYPE second) \ -{ \ - return first.value() op second; \ -} \ - \ -template \ -bool operator op (LLUnitImplicit first, LLUnitImplicit second) \ -{ \ - return first.value() op first.convert(second); \ -} \ - \ -template \ - bool operator op (LLUnit first, LLUnit second) \ -{ \ - return first.value() op first.convert(second); \ -} - -COMPARISON_OPERATORS(<) -COMPARISON_OPERATORS(<=) -COMPARISON_OPERATORS(>) -COMPARISON_OPERATORS(>=) -COMPARISON_OPERATORS(==) -COMPARISON_OPERATORS(!=) +decltype(STORAGE_TYPE1() / STORAGE_TYPE2()) operator / (LLUnitImplicit first, LLUnit second) +{ + return (decltype(STORAGE_TYPE1() / STORAGE_TYPE2()))(first.value() / first.convert(second).value()); +} + +// +// comparison operators +// + +#define LL_UNIT_DECLARE_COMPARISON_OPERATOR(op) \ +template \ +bool operator op (LLUnitImplicit first, LLUnitImplicit second) \ +{ \ + return first.value() op first.convert(second).value(); \ +} \ + \ +template \ +bool operator op (LLUnitImplicit first, UNITLESS_TYPE second) \ +{ \ + return first.value() op second; \ +} \ + \ +template \ +bool operator op (UNITLESS_TYPE first, LLUnitImplicit second) \ +{ \ + return first op second.value(); \ +} \ + \ +template \ +bool operator op (LLUnit first, LLUnit second) \ +{ \ + return first.value() op first.convert(second).value(); \ +} \ + \ +template \ +bool operator op (LLUnit first, UNITLESS_TYPE second) \ +{ \ + LL_BAD_TEMPLATE_INSTANTIATION(UNITLESS_TYPE, "operator " #op " requires compatible unit types"); \ + return false; \ +} \ + \ +template \ +bool operator op (UNITLESS_TYPE first, LLUnit second) \ +{ \ + LL_BAD_TEMPLATE_INSTANTIATION(UNITLESS_TYPE, "operator " #op " requires compatible unit types"); \ + return false; \ +} \ + \ +template \ +bool operator op (LLUnit first, LLUnitImplicit second) \ +{ \ + return first.value() op first.convert(second).value(); \ +} \ + \ +template \ +bool operator op (LLUnitImplicit first, LLUnit second) \ +{ \ + return first.value() op first.convert(second).value(); \ +} + +LL_UNIT_DECLARE_COMPARISON_OPERATOR(<); +LL_UNIT_DECLARE_COMPARISON_OPERATOR(<=); +LL_UNIT_DECLARE_COMPARISON_OPERATOR(>); +LL_UNIT_DECLARE_COMPARISON_OPERATOR(>=); +LL_UNIT_DECLARE_COMPARISON_OPERATOR(==); +LL_UNIT_DECLARE_COMPARISON_OPERATOR(!=); template @@ -517,8 +547,6 @@ struct LLGetUnitLabel > static const char* getUnitLabel() { return T::getUnitLabel(); } }; -#define LL_UNIT_PROMOTE_VALUE(output_type, value) ((true ? (output_type)(1) : (value/value)) * value) - template struct LLUnitLinearOps { @@ -534,25 +562,25 @@ struct LLUnitLinearOps template output_t operator * (T other) { - return mInput * other; + return typename LLPromotedType::type_t(mInput) * other; } template output_t operator / (T other) { - return LL_UNIT_PROMOTE_VALUE(OUTPUT_TYPE, mInput) / other; + return typename LLPromotedType::type_t(mInput) / other; } template output_t operator + (T other) { - return mInput + other; + return typename LLPromotedType::type_t(mInput) + other; } template output_t operator - (T other) { - return mInput - other; + return typename LLPromotedType::type_t(mInput) - other; } }; @@ -571,25 +599,25 @@ struct LLUnitInverseLinearOps template output_t operator * (T other) { - return LL_UNIT_PROMOTE_VALUE(OUTPUT_TYPE, mInput) / other; + return typename LLPromotedType::type_t(mInput) / other; } template output_t operator / (T other) { - return mInput * other; + return typename LLPromotedType::type_t(mInput) * other; } template output_t operator + (T other) { - return mInput - other; + return typename LLPromotedType::type_t(mInput) - other; } template output_t operator - (T other) { - return mInput + other; + return typename LLPromotedType::type_t(mInput) + other; } }; @@ -621,13 +649,13 @@ struct unit_name template \ void ll_convert_units(LLUnit in, LLUnit& out) \ { \ - out = LLUnit((S2)(LLUnitLinearOps(in.value()) conversion_operation)); \ + out = LLUnit((S2)(LLUnitLinearOps(in.value()) conversion_operation)); \ } \ \ template \ void ll_convert_units(LLUnit in, LLUnit& out) \ { \ - out = LLUnit((S2)(LLUnitInverseLinearOps(in.value()) conversion_operation)); \ + out = LLUnit((S2)(LLUnitInverseLinearOps(in.value()) conversion_operation)); \ } // @@ -637,120 +665,140 @@ void ll_convert_units(LLUnit in, LLUnit& out) namespace LLUnits { LL_DECLARE_BASE_UNIT(Bytes, "B"); -LL_DECLARE_DERIVED_UNIT(Bytes, * 1000, Kilobytes, "KB"); -LL_DECLARE_DERIVED_UNIT(Kilobytes, * 1000, Megabytes, "MB"); -LL_DECLARE_DERIVED_UNIT(Megabytes, * 1000, Gigabytes, "GB"); -LL_DECLARE_DERIVED_UNIT(Bytes, * 1024, Kibibytes, "KiB"); -LL_DECLARE_DERIVED_UNIT(Kibibytes, * 1024, Mibibytes, "MiB"); -LL_DECLARE_DERIVED_UNIT(Mibibytes, * 1024, Gibibytes, "GiB"); +// technically, these are kibibytes, mibibytes, etc. but we should stick with commonly accepted terminology +LL_DECLARE_DERIVED_UNIT(Bytes, * 1024, Kilobytes, "KB"); +LL_DECLARE_DERIVED_UNIT(Kilobytes, * 1024, Megabytes, "MB"); +LL_DECLARE_DERIVED_UNIT(Megabytes, * 1024, Gigabytes, "GB"); } typedef LLUnit F32Bytes; typedef LLUnit F32Kilobytes; typedef LLUnit F32Megabytes; typedef LLUnit F32Gigabytes; -typedef LLUnit F32Kibibytes; -typedef LLUnit F32Mibibytes; -typedef LLUnit F32Gibibytes; + +typedef LLUnitImplicit F32BytesImplicit; +typedef LLUnitImplicit F32KilobytesImplicit; +typedef LLUnitImplicit F32MegabytesImplicit; +typedef LLUnitImplicit F32GigabytesImplicit; typedef LLUnit F64Bytes; typedef LLUnit F64Kilobytes; typedef LLUnit F64Megabytes; typedef LLUnit F64Gigabytes; -typedef LLUnit F64Kibibytes; -typedef LLUnit F64Mibibytes; -typedef LLUnit F64Gibibytes; + +typedef LLUnitImplicit F64BytesImplicit; +typedef LLUnitImplicit F64KilobytesImplicit; +typedef LLUnitImplicit F64MegabytesImplicit; +typedef LLUnitImplicit F64GigabytesImplicit; typedef LLUnit S32Bytes; typedef LLUnit S32Kilobytes; typedef LLUnit S32Megabytes; typedef LLUnit S32Gigabytes; -typedef LLUnit S32Kibibytes; -typedef LLUnit S32Mibibytes; -typedef LLUnit S32Gibibytes; -typedef LLUnit U32Bytes; -typedef LLUnit U32Kilobytes; -typedef LLUnit U32Megabytes; -typedef LLUnit U32Gigabytes; -typedef LLUnit U32Kibibytes; -typedef LLUnit U32Mibibytes; -typedef LLUnit U32Gibibytes; +typedef LLUnitImplicit S32BytesImplicit; +typedef LLUnitImplicit S32KilobytesImplicit; +typedef LLUnitImplicit S32MegabytesImplicit; +typedef LLUnitImplicit S32GigabytesImplicit; typedef LLUnit S64Bytes; typedef LLUnit S64Kilobytes; typedef LLUnit S64Megabytes; typedef LLUnit S64Gigabytes; -typedef LLUnit S64Kibibytes; -typedef LLUnit S64Mibibytes; -typedef LLUnit S64Gibibytes; + +typedef LLUnitImplicit S64BytesImplicit; +typedef LLUnitImplicit S64KilobytesImplicit; +typedef LLUnitImplicit S64MegabytesImplicit; +typedef LLUnitImplicit S64GigabytesImplicit; + +typedef LLUnit U32Bytes; +typedef LLUnit U32Kilobytes; +typedef LLUnit U32Megabytes; +typedef LLUnit U32Gigabytes; + +typedef LLUnitImplicit U32BytesImplicit; +typedef LLUnitImplicit U32KilobytesImplicit; +typedef LLUnitImplicit U32MegabytesImplicit; +typedef LLUnitImplicit U32GigabytesImplicit; typedef LLUnit U64Bytes; typedef LLUnit U64Kilobytes; typedef LLUnit U64Megabytes; typedef LLUnit U64Gigabytes; -typedef LLUnit U64Kibibytes; -typedef LLUnit U64Mibibytes; -typedef LLUnit U64Gibibytes; + +typedef LLUnitImplicit U64BytesImplicit; +typedef LLUnitImplicit U64KilobytesImplicit; +typedef LLUnitImplicit U64MegabytesImplicit; +typedef LLUnitImplicit U64GigabytesImplicit; namespace LLUnits { +// technically, these are kibibits, mibibits, etc. but we should stick with commonly accepted terminology LL_DECLARE_DERIVED_UNIT(Bytes, / 8, Bits, "b"); -LL_DECLARE_DERIVED_UNIT(Bits, * 1000, Kilobits, "Kb"); -LL_DECLARE_DERIVED_UNIT(Kilobits, * 1000, Megabits, "Mb"); -LL_DECLARE_DERIVED_UNIT(Megabits, * 1000, Gigabits, "Gb"); -LL_DECLARE_DERIVED_UNIT(Bits, * 1024, Kibibits, "Kib"); -LL_DECLARE_DERIVED_UNIT(Kibibits, * 1024, Mibibits, "Mib"); -LL_DECLARE_DERIVED_UNIT(Mibibits, * 1024, Gibibits, "Gib"); +LL_DECLARE_DERIVED_UNIT(Bits, * 1024, Kilobits, "Kb"); +LL_DECLARE_DERIVED_UNIT(Kilobits, * 1024, Megabits, "Mb"); +LL_DECLARE_DERIVED_UNIT(Megabits, * 1024, Gigabits, "Gb"); } typedef LLUnit F32Bits; typedef LLUnit F32Kilobits; typedef LLUnit F32Megabits; typedef LLUnit F32Gigabits; -typedef LLUnit F32Kibibits; -typedef LLUnit F32Mibibits; -typedef LLUnit F32Gibibits; - + +typedef LLUnitImplicit F32BitsImplicit; +typedef LLUnitImplicit F32KilobitsImplicit; +typedef LLUnitImplicit F32MegabitsImplicit; +typedef LLUnitImplicit F32GigabitsImplicit; + typedef LLUnit F64Bits; typedef LLUnit F64Kilobits; typedef LLUnit F64Megabits; typedef LLUnit F64Gigabits; -typedef LLUnit F64Kibibits; -typedef LLUnit F64Mibibits; -typedef LLUnit F64Gibibits; + +typedef LLUnitImplicit F64BitsImplicit; +typedef LLUnitImplicit F64KilobitsImplicit; +typedef LLUnitImplicit F64MegabitsImplicit; +typedef LLUnitImplicit F64GigabitsImplicit; typedef LLUnit S32Bits; typedef LLUnit S32Kilobits; typedef LLUnit S32Megabits; typedef LLUnit S32Gigabits; -typedef LLUnit S32Kibibits; -typedef LLUnit S32Mibibits; -typedef LLUnit S32Gibibits; -typedef LLUnit U32Bits; -typedef LLUnit U32Kilobits; -typedef LLUnit U32Megabits; -typedef LLUnit U32Gigabits; -typedef LLUnit U32Kibibits; -typedef LLUnit U32Mibibits; -typedef LLUnit U32Gibibits; +typedef LLUnitImplicit S32BitsImplicit; +typedef LLUnitImplicit S32KilobitsImplicit; +typedef LLUnitImplicit S32MegabitsImplicit; +typedef LLUnitImplicit S32GigabitsImplicit; typedef LLUnit S64Bits; typedef LLUnit S64Kilobits; typedef LLUnit S64Megabits; typedef LLUnit S64Gigabits; -typedef LLUnit S64Kibibits; -typedef LLUnit S64Mibibits; -typedef LLUnit S64Gibibits; + +typedef LLUnitImplicit S64BitsImplicit; +typedef LLUnitImplicit S64KilobitsImplicit; +typedef LLUnitImplicit S64MegabitsImplicit; +typedef LLUnitImplicit S64GigabitsImplicit; + +typedef LLUnit U32Bits; +typedef LLUnit U32Kilobits; +typedef LLUnit U32Megabits; +typedef LLUnit U32Gigabits; + +typedef LLUnitImplicit U32BitsImplicit; +typedef LLUnitImplicit U32KilobitsImplicit; +typedef LLUnitImplicit U32MegabitsImplicit; +typedef LLUnitImplicit U32GigabitsImplicit; typedef LLUnit U64Bits; typedef LLUnit U64Kilobits; typedef LLUnit U64Megabits; typedef LLUnit U64Gigabits; -typedef LLUnit U64Kibibits; -typedef LLUnit U64Mibibits; -typedef LLUnit U64Gibibits; + +typedef LLUnitImplicit U64BitsImplicit; +typedef LLUnitImplicit U64KilobitsImplicit; +typedef LLUnitImplicit U64MegabitsImplicit; +typedef LLUnitImplicit U64GigabitsImplicit; namespace LLUnits { @@ -771,6 +819,14 @@ typedef LLUnit F32Milliseconds; typedef LLUnit F32Microseconds; typedef LLUnit F32Nanoseconds; +typedef LLUnitImplicit F32SecondsImplicit; +typedef LLUnitImplicit F32MinutesImplicit; +typedef LLUnitImplicit F32HoursImplicit; +typedef LLUnitImplicit F32DaysImplicit; +typedef LLUnitImplicit F32MillisecondsImplicit; +typedef LLUnitImplicit F32MicrosecondsImplicit; +typedef LLUnitImplicit F32NanosecondsImplicit; + typedef LLUnit F64Seconds; typedef LLUnit F64Minutes; typedef LLUnit F64Hours; @@ -779,6 +835,14 @@ typedef LLUnit F64Milliseconds; typedef LLUnit F64Microseconds; typedef LLUnit F64Nanoseconds; +typedef LLUnitImplicit F64SecondsImplicit; +typedef LLUnitImplicit F64MinutesImplicit; +typedef LLUnitImplicit F64HoursImplicit; +typedef LLUnitImplicit F64DaysImplicit; +typedef LLUnitImplicit F64MillisecondsImplicit; +typedef LLUnitImplicit F64MicrosecondsImplicit; +typedef LLUnitImplicit F64NanosecondsImplicit; + typedef LLUnit S32Seconds; typedef LLUnit S32Minutes; typedef LLUnit S32Hours; @@ -787,13 +851,13 @@ typedef LLUnit S32Milliseconds; typedef LLUnit S32Microseconds; typedef LLUnit S32Nanoseconds; -typedef LLUnit U32Seconds; -typedef LLUnit U32Minutes; -typedef LLUnit U32Hours; -typedef LLUnit U32Days; -typedef LLUnit U32Milliseconds; -typedef LLUnit U32Microseconds; -typedef LLUnit U32Nanoseconds; +typedef LLUnitImplicit S32SecondsImplicit; +typedef LLUnitImplicit S32MinutesImplicit; +typedef LLUnitImplicit S32HoursImplicit; +typedef LLUnitImplicit S32DaysImplicit; +typedef LLUnitImplicit S32MillisecondsImplicit; +typedef LLUnitImplicit S32MicrosecondsImplicit; +typedef LLUnitImplicit S32NanosecondsImplicit; typedef LLUnit S64Seconds; typedef LLUnit S64Minutes; @@ -802,7 +866,31 @@ typedef LLUnit S64Days; typedef LLUnit S64Milliseconds; typedef LLUnit S64Microseconds; typedef LLUnit S64Nanoseconds; - + +typedef LLUnitImplicit S64SecondsImplicit; +typedef LLUnitImplicit S64MinutesImplicit; +typedef LLUnitImplicit S64HoursImplicit; +typedef LLUnitImplicit S64DaysImplicit; +typedef LLUnitImplicit S64MillisecondsImplicit; +typedef LLUnitImplicit S64MicrosecondsImplicit; +typedef LLUnitImplicit S64NanosecondsImplicit; + +typedef LLUnit U32Seconds; +typedef LLUnit U32Minutes; +typedef LLUnit U32Hours; +typedef LLUnit U32Days; +typedef LLUnit U32Milliseconds; +typedef LLUnit U32Microseconds; +typedef LLUnit U32Nanoseconds; + +typedef LLUnitImplicit U32SecondsImplicit; +typedef LLUnitImplicit U32MinutesImplicit; +typedef LLUnitImplicit U32HoursImplicit; +typedef LLUnitImplicit U32DaysImplicit; +typedef LLUnitImplicit U32MillisecondsImplicit; +typedef LLUnitImplicit U32MicrosecondsImplicit; +typedef LLUnitImplicit U32NanosecondsImplicit; + typedef LLUnit U64Seconds; typedef LLUnit U64Minutes; typedef LLUnit U64Hours; @@ -811,6 +899,14 @@ typedef LLUnit U64Milliseconds; typedef LLUnit U64Microseconds; typedef LLUnit U64Nanoseconds; +typedef LLUnitImplicit U64SecondsImplicit; +typedef LLUnitImplicit U64MinutesImplicit; +typedef LLUnitImplicit U64HoursImplicit; +typedef LLUnitImplicit U64DaysImplicit; +typedef LLUnitImplicit U64MillisecondsImplicit; +typedef LLUnitImplicit U64MicrosecondsImplicit; +typedef LLUnitImplicit U64NanosecondsImplicit; + namespace LLUnits { LL_DECLARE_BASE_UNIT(Meters, "m"); @@ -824,31 +920,61 @@ typedef LLUnit F32Kilometers; typedef LLUnit F32Centimeters; typedef LLUnit F32Millimeters; +typedef LLUnitImplicit F32MetersImplicit; +typedef LLUnitImplicit F32KilometersImplicit; +typedef LLUnitImplicit F32CentimetersImplicit; +typedef LLUnitImplicit F32MillimetersImplicit; + typedef LLUnit F64Meters; typedef LLUnit F64Kilometers; typedef LLUnit F64Centimeters; typedef LLUnit F64Millimeters; +typedef LLUnitImplicit F64MetersImplicit; +typedef LLUnitImplicit F64KilometersImplicit; +typedef LLUnitImplicit F64CentimetersImplicit; +typedef LLUnitImplicit F64MillimetersImplicit; + typedef LLUnit S32Meters; typedef LLUnit S32Kilometers; typedef LLUnit S32Centimeters; typedef LLUnit S32Millimeters; -typedef LLUnit U32Meters; -typedef LLUnit U32Kilometers; -typedef LLUnit U32Centimeters; -typedef LLUnit U32Millimeters; +typedef LLUnitImplicit S32MetersImplicit; +typedef LLUnitImplicit S32KilometersImplicit; +typedef LLUnitImplicit S32CentimetersImplicit; +typedef LLUnitImplicit S32MillimetersImplicit; typedef LLUnit S64Meters; typedef LLUnit S64Kilometers; typedef LLUnit S64Centimeters; typedef LLUnit S64Millimeters; +typedef LLUnitImplicit S64MetersImplicit; +typedef LLUnitImplicit S64KilometersImplicit; +typedef LLUnitImplicit S64CentimetersImplicit; +typedef LLUnitImplicit S64MillimetersImplicit; + +typedef LLUnit U32Meters; +typedef LLUnit U32Kilometers; +typedef LLUnit U32Centimeters; +typedef LLUnit U32Millimeters; + +typedef LLUnitImplicit U32MetersImplicit; +typedef LLUnitImplicit U32KilometersImplicit; +typedef LLUnitImplicit U32CentimetersImplicit; +typedef LLUnitImplicit U32MillimetersImplicit; + typedef LLUnit U64Meters; typedef LLUnit U64Kilometers; typedef LLUnit U64Centimeters; typedef LLUnit U64Millimeters; +typedef LLUnitImplicit U64MetersImplicit; +typedef LLUnitImplicit U64KilometersImplicit; +typedef LLUnitImplicit U64CentimetersImplicit; +typedef LLUnitImplicit U64MillimetersImplicit; + namespace LLUnits { // rare units @@ -868,4 +994,137 @@ LL_DECLARE_DERIVED_UNIT(Triangles, * 1000, Kilotriangles, "ktris"); } // namespace LLUnits +// rare units +typedef LLUnit F32Hertz; +typedef LLUnit F32Kilohertz; +typedef LLUnit F32Megahertz; +typedef LLUnit F32Gigahertz; +typedef LLUnit F32Radians; +typedef LLUnit F32Degrees; +typedef LLUnit F32Percent; +typedef LLUnit F32Ratio; +typedef LLUnit F32Triangles; +typedef LLUnit F32KiloTriangles; + +typedef LLUnitImplicit F32HertzImplicit; +typedef LLUnitImplicit F32KilohertzImplicit; +typedef LLUnitImplicit F32MegahertzImplicit; +typedef LLUnitImplicit F32GigahertzImplicit; +typedef LLUnitImplicit F32RadiansImplicit; +typedef LLUnitImplicit F32DegreesImplicit; +typedef LLUnitImplicit F32PercentImplicit; +typedef LLUnitImplicit F32RatioImplicit; +typedef LLUnitImplicit F32TrianglesImplicit; +typedef LLUnitImplicit F32KiloTrianglesImplicit; + +typedef LLUnit F64Hertz; +typedef LLUnit F64Kilohertz; +typedef LLUnit F64Megahertz; +typedef LLUnit F64Gigahertz; +typedef LLUnit F64Radians; +typedef LLUnit F64Degrees; +typedef LLUnit F64Percent; +typedef LLUnit F64Ratio; +typedef LLUnit F64Triangles; +typedef LLUnit F64KiloTriangles; + +typedef LLUnitImplicit F64HertzImplicit; +typedef LLUnitImplicit F64KilohertzImplicit; +typedef LLUnitImplicit F64MegahertzImplicit; +typedef LLUnitImplicit F64GigahertzImplicit; +typedef LLUnitImplicit F64RadiansImplicit; +typedef LLUnitImplicit F64DegreesImplicit; +typedef LLUnitImplicit F64PercentImplicit; +typedef LLUnitImplicit F64RatioImplicit; +typedef LLUnitImplicit F64TrianglesImplicit; +typedef LLUnitImplicit F64KiloTrianglesImplicit; + +typedef LLUnit S32Hertz; +typedef LLUnit S32Kilohertz; +typedef LLUnit S32Megahertz; +typedef LLUnit S32Gigahertz; +typedef LLUnit S32Radians; +typedef LLUnit S32Degrees; +typedef LLUnit S32Percent; +typedef LLUnit S32Ratio; +typedef LLUnit S32Triangles; +typedef LLUnit S32KiloTriangles; + +typedef LLUnitImplicit S32HertzImplicit; +typedef LLUnitImplicit S32KilohertzImplicit; +typedef LLUnitImplicit S32MegahertzImplicit; +typedef LLUnitImplicit S32GigahertzImplicit; +typedef LLUnitImplicit S32RadiansImplicit; +typedef LLUnitImplicit S32DegreesImplicit; +typedef LLUnitImplicit S32PercentImplicit; +typedef LLUnitImplicit S32RatioImplicit; +typedef LLUnitImplicit S32TrianglesImplicit; +typedef LLUnitImplicit S32KiloTrianglesImplicit; + +typedef LLUnit S64Hertz; +typedef LLUnit S64Kilohertz; +typedef LLUnit S64Megahertz; +typedef LLUnit S64Gigahertz; +typedef LLUnit S64Radians; +typedef LLUnit S64Degrees; +typedef LLUnit S64Percent; +typedef LLUnit S64Ratio; +typedef LLUnit S64Triangles; +typedef LLUnit S64KiloTriangles; + +typedef LLUnitImplicit S64HertzImplicit; +typedef LLUnitImplicit S64KilohertzImplicit; +typedef LLUnitImplicit S64MegahertzImplicit; +typedef LLUnitImplicit S64GigahertzImplicit; +typedef LLUnitImplicit S64RadiansImplicit; +typedef LLUnitImplicit S64DegreesImplicit; +typedef LLUnitImplicit S64PercentImplicit; +typedef LLUnitImplicit S64RatioImplicit; +typedef LLUnitImplicit S64TrianglesImplicit; +typedef LLUnitImplicit S64KiloTrianglesImplicit; + +typedef LLUnit U32Hertz; +typedef LLUnit U32Kilohertz; +typedef LLUnit U32Megahertz; +typedef LLUnit U32Gigahertz; +typedef LLUnit U32Radians; +typedef LLUnit U32Degrees; +typedef LLUnit U32Percent; +typedef LLUnit U32Ratio; +typedef LLUnit U32Triangles; +typedef LLUnit U32KiloTriangles; + +typedef LLUnitImplicit U32HertzImplicit; +typedef LLUnitImplicit U32KilohertzImplicit; +typedef LLUnitImplicit U32MegahertzImplicit; +typedef LLUnitImplicit U32GigahertzImplicit; +typedef LLUnitImplicit U32RadiansImplicit; +typedef LLUnitImplicit U32DegreesImplicit; +typedef LLUnitImplicit U32PercentImplicit; +typedef LLUnitImplicit U32RatioImplicit; +typedef LLUnitImplicit U32TrianglesImplicit; +typedef LLUnitImplicit U32KiloTrianglesImplicit; + +typedef LLUnit U64Hertz; +typedef LLUnit U64Kilohertz; +typedef LLUnit U64Megahertz; +typedef LLUnit U64Gigahertz; +typedef LLUnit U64Radians; +typedef LLUnit U64Degrees; +typedef LLUnit U64Percent; +typedef LLUnit U64Ratio; +typedef LLUnit U64Triangles; +typedef LLUnit U64KiloTriangles; + +typedef LLUnitImplicit U64HertzImplicit; +typedef LLUnitImplicit U64KilohertzImplicit; +typedef LLUnitImplicit U64MegahertzImplicit; +typedef LLUnitImplicit U64GigahertzImplicit; +typedef LLUnitImplicit U64RadiansImplicit; +typedef LLUnitImplicit U64DegreesImplicit; +typedef LLUnitImplicit U64PercentImplicit; +typedef LLUnitImplicit U64RatioImplicit; +typedef LLUnitImplicit U64TrianglesImplicit; +typedef LLUnitImplicit U64KiloTrianglesImplicit; + #endif // LL_LLUNIT_H diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp index 8546bcbc54..a8e9be86ca 100644 --- a/indra/llcommon/tests/llunits_test.cpp +++ b/indra/llcommon/tests/llunits_test.cpp @@ -38,6 +38,13 @@ namespace LLUnits LL_DECLARE_DERIVED_UNIT(Latinum, / 16, Solari, "Sol"); } +typedef LLUnit F32Quatloos; +typedef LLUnit S32Quatloos; +typedef LLUnit F32Latinum; +typedef LLUnit S32Latinum; +typedef LLUnit F32Solari; +typedef LLUnit S32Solari; + namespace tut { using namespace LLUnits; @@ -54,28 +61,28 @@ namespace tut void units_object_t::test<1>() { LLUnit float_quatloos; - ensure("default float unit is zero", float_quatloos == 0.f); + ensure("default float unit is zero", float_quatloos == F32Quatloos(0.f)); LLUnit float_initialize_quatloos(1); - ensure("non-zero initialized unit", float_initialize_quatloos == 1.f); + ensure("non-zero initialized unit", float_initialize_quatloos == F32Quatloos(1.f)); LLUnit int_quatloos; - ensure("default int unit is zero", int_quatloos == 0); + ensure("default int unit is zero", int_quatloos == S32Quatloos(0)); - int_quatloos = 42; - ensure("int assignment is preserved", int_quatloos == 42); + int_quatloos = S32Quatloos(42); + ensure("int assignment is preserved", int_quatloos == S32Quatloos(42)); float_quatloos = int_quatloos; - ensure("float assignment from int preserves value", float_quatloos == 42.f); + ensure("float assignment from int preserves value", float_quatloos == F32Quatloos(42.f)); int_quatloos = float_quatloos; - ensure("int assignment from float preserves value", int_quatloos == 42); + ensure("int assignment from float preserves value", int_quatloos == S32Quatloos(42)); - float_quatloos = 42.1f; + float_quatloos = F32Quatloos(42.1f); int_quatloos = float_quatloos; - ensure("int units truncate float units on assignment", int_quatloos == 42); + ensure("int units truncate float units on assignment", int_quatloos == S32Quatloos(42)); LLUnit unsigned_int_quatloos(float_quatloos); - ensure("unsigned int can be initialized from signed int", unsigned_int_quatloos == 42); + ensure("unsigned int can be initialized from signed int", unsigned_int_quatloos == S32Quatloos(42)); } // conversions to/from base unit @@ -84,15 +91,15 @@ namespace tut { LLUnit quatloos(1.f); LLUnit latinum_bars(quatloos); - ensure("conversion between units is automatic via initialization", latinum_bars == 1.f / 4.f); + ensure("conversion between units is automatic via initialization", latinum_bars == F32Latinum(1.f / 4.f)); - latinum_bars = 256; + latinum_bars = S32Latinum(256); quatloos = latinum_bars; - ensure("conversion between units is automatic via assignment, and bidirectional", quatloos == 1024); + ensure("conversion between units is automatic via assignment, and bidirectional", quatloos == S32Quatloos(1024)); LLUnit single_quatloo(1); LLUnit quarter_latinum = single_quatloo; - ensure("division of integer unit preserves fractional values when converted to float unit", quarter_latinum == 0.25f); + ensure("division of integer unit preserves fractional values when converted to float unit", quarter_latinum == F32Latinum(0.25f)); } // conversions across non-base units @@ -101,10 +108,10 @@ namespace tut { LLUnit quatloos(1024); LLUnit solari(quatloos); - ensure("conversions can work between indirectly related units: Quatloos -> Latinum -> Solari", solari == 4096); + ensure("conversions can work between indirectly related units: Quatloos -> Latinum -> Solari", solari == S32Solari(4096)); LLUnit latinum_bars = solari; - ensure("Non base units can be converted between each other", latinum_bars == 256); + ensure("Non base units can be converted between each other", latinum_bars == S32Latinum(256)); } // math operations @@ -114,36 +121,36 @@ namespace tut // exercise math operations LLUnit quatloos(1.f); quatloos *= 4.f; - ensure(quatloos == 4); + ensure(quatloos == S32Quatloos(4)); quatloos = quatloos * 2; - ensure(quatloos == 8); + ensure(quatloos == S32Quatloos(8)); quatloos = 2.f * quatloos; - ensure(quatloos == 16); - - quatloos += 4.f; - ensure(quatloos == 20); - quatloos += 4; - ensure(quatloos == 24); - quatloos = quatloos + 4; - ensure(quatloos == 28); - quatloos = 4 + quatloos; - ensure(quatloos == 32); + ensure(quatloos == S32Quatloos(16)); + + quatloos += F32Quatloos(4.f); + ensure(quatloos == S32Quatloos(20)); + quatloos += S32Quatloos(4); + ensure(quatloos == S32Quatloos(24)); + quatloos = quatloos + S32Quatloos(4); + ensure(quatloos == S32Quatloos(28)); + quatloos = S32Quatloos(4) + quatloos; + ensure(quatloos == S32Quatloos(32)); quatloos += quatloos * 3; - ensure(quatloos == 128); + ensure(quatloos == S32Quatloos(128)); quatloos -= quatloos / 4 * 3; - ensure(quatloos == 32); - quatloos = quatloos - 8; - ensure(quatloos == 24); - quatloos -= 4; - ensure(quatloos == 20); - quatloos -= 4.f; - ensure(quatloos == 16); + ensure(quatloos == S32Quatloos(32)); + quatloos = quatloos - S32Quatloos(8); + ensure(quatloos == S32Quatloos(24)); + quatloos -= S32Quatloos(4); + ensure(quatloos == S32Quatloos(20)); + quatloos -= F32Quatloos(4.f); + ensure(quatloos == S32Quatloos(16)); quatloos /= 2.f; - ensure(quatloos == 8); + ensure(quatloos == S32Quatloos(8)); quatloos = quatloos / 4; - ensure(quatloos == 2); + ensure(quatloos == S32Quatloos(2)); F32 ratio = quatloos / LLUnit(2.f); ensure(ratio == 1); @@ -151,23 +158,54 @@ namespace tut ensure(ratio == 1); quatloos += LLUnit(8.f); - ensure(quatloos == 4); + ensure(quatloos == S32Quatloos(4)); quatloos -= LLUnit(1.f); - ensure(quatloos == 0); + ensure(quatloos == S32Quatloos(0)); } - // implicit units + // comparison operators template<> template<> void units_object_t::test<5>() + { + LLUnit quatloos(1); + ensure("can perform less than comparison against same type", quatloos < S32Quatloos(2)); + ensure("can perform less than comparison against different storage type", quatloos < F32Quatloos(2.f)); + ensure("can perform less than comparison against different units", quatloos < S32Latinum(5)); + ensure("can perform less than comparison against different storage type and units", quatloos < F32Latinum(5.f)); + + ensure("can perform greater than comparison against same type", quatloos > S32Quatloos(0)); + ensure("can perform greater than comparison against different storage type", quatloos > F32Quatloos(0.f)); + ensure("can perform greater than comparison against different units", quatloos > S32Latinum(0)); + ensure("can perform greater than comparison against different storage type and units", quatloos > F32Latinum(0.f)); + + } + + bool accept_explicit_quatloos(S32Quatloos q) + { + return true; + } + + // signature compatibility + template<> template<> + void units_object_t::test<6>() + { + S32Quatloos quatloos(1); + ensure("can pass unit values as argument", accept_explicit_quatloos(S32Quatloos(1))); + ensure("can pass unit values as argument", accept_explicit_quatloos(quatloos)); + } + + // implicit units + template<> template<> + void units_object_t::test<7>() { LLUnit quatloos; - LLUnitImplicit quatloos_implicit = quatloos + 1; + LLUnitImplicit quatloos_implicit = quatloos + S32Quatloos(1); ensure("can initialize implicit unit from explicit", quatloos_implicit == 1); quatloos = quatloos_implicit; - ensure("can assign implicit unit to explicit unit", quatloos == 1); + ensure("can assign implicit unit to explicit unit", quatloos == S32Quatloos(1)); quatloos += quatloos_implicit; - ensure("can perform math operation using mixture of implicit and explicit units", quatloos == 2); + ensure("can perform math operation using mixture of implicit and explicit units", quatloos == S32Quatloos(2)); // math operations on implicits quatloos_implicit = 1; diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 413266a29d..94552750f4 100755 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1405,7 +1405,7 @@ void LLAssetStorage::storeAssetData( bool is_priority, bool store_local, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call @@ -1424,7 +1424,7 @@ void LLAssetStorage::storeAssetData( bool store_local, const LLUUID& requesting_agent_id, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call @@ -1442,7 +1442,7 @@ void LLAssetStorage::storeAssetData( bool temp_file, bool is_priority, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call @@ -1460,7 +1460,7 @@ void LLAssetStorage::storeAssetData( bool temp_file, bool is_priority, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LL_WARNS() << "storeAssetData: wrong version called" << LL_ENDL; // LLAssetStorage metric: Virtual base call diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 6ed1027cee..1bb4acea9e 100755 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -49,7 +49,7 @@ class LLSD; // anything that takes longer than this to download will abort. // HTTP Uploads also timeout if they take longer than this. -const F32 LL_ASSET_STORAGE_TIMEOUT = 5 * 60.0f; +const F32Minutes LL_ASSET_STORAGE_TIMEOUT(5); // Specific error codes @@ -103,7 +103,7 @@ public: void setUUID(const LLUUID& id) { mUUID = id; } void setType(LLAssetType::EType type) { mType = type; } - void setTimeout (F64 timeout) { mTimeout = timeout; } + void setTimeout (F64Seconds timeout) { mTimeout = timeout; } protected: LLUUID mUUID; @@ -279,7 +279,7 @@ public: bool is_priority = false, bool store_local = false, bool user_waiting= false, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); /* * AssetID version @@ -295,7 +295,7 @@ public: bool store_local = false, const LLUUID& requesting_agent_id = LLUUID::null, bool user_waiting= false, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void checkForTimeouts(); @@ -403,7 +403,7 @@ public: bool temp_file = false, bool is_priority = false, bool user_waiting = false, - F64 timeout = LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout = LL_ASSET_STORAGE_TIMEOUT); /* * TransactionID version @@ -417,7 +417,7 @@ public: bool temp_file = false, bool is_priority = false, bool user_waiting = false, - F64 timeout = LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout = LL_ASSET_STORAGE_TIMEOUT); static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status, LLExtStat ext_status); static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status); diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 1ace4d9b70..5aaada63b1 100755 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -207,7 +207,7 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) } if (packetp->mCallback) { - if (packetp->mTimeout < 0.f) // negative timeout will always return timeout even for successful ack, for debugging + if (packetp->mTimeout < F32Seconds(0.f)) // negative timeout will always return timeout even for successful ack, for debugging { packetp->mCallback(packetp->mCallbackData,LL_ERR_TCP_TIMEOUT); } @@ -241,7 +241,7 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) } if (packetp->mCallback) { - if (packetp->mTimeout < 0.f) // negative timeout will always return timeout even for successful ack, for debugging + if (packetp->mTimeout < F32Seconds(0.f)) // negative timeout will always return timeout even for successful ack, for debugging { packetp->mCallback(packetp->mCallbackData,LL_ERR_TCP_TIMEOUT); } @@ -540,8 +540,8 @@ void LLCircuitData::checkPeriodTime() mBytesInLastPeriod = mBytesInThisPeriod; mBytesOutLastPeriod = mBytesOutThisPeriod; - mBytesInThisPeriod = 0; - mBytesOutThisPeriod = 0; + mBytesInThisPeriod = S32Bytes(0); + mBytesOutThisPeriod = S32Bytes(0); mLastPeriodLength = period_length; mPeriodTime = mt_sec; @@ -549,14 +549,14 @@ void LLCircuitData::checkPeriodTime() } -void LLCircuitData::addBytesIn(S32 bytes) +void LLCircuitData::addBytesIn(S32Bytes bytes) { mBytesIn += bytes; mBytesInThisPeriod += bytes; } -void LLCircuitData::addBytesOut(S32 bytes) +void LLCircuitData::addBytesOut(S32Bytes bytes) { mBytesOut += bytes; mBytesOutThisPeriod += bytes; @@ -743,7 +743,7 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) } // LL_INFOS() << "adding potential lost: " << index << LL_ENDL; - mPotentialLostPackets[index] = time.value(); + mPotentialLostPackets[index] = time; index++; index = index % LL_MAX_OUT_PACKET_ID; gap_count++; @@ -1152,23 +1152,23 @@ std::ostream& operator<<(std::ostream& s, LLCircuitData& circuit) << endl; s << "Global In/Out " << S32(age) << " sec" - << " KBytes: " << circuit.mBytesIn.valueInUnits() << "/" << circuit.mBytesOut.valueInUnits() + << " KBytes: " << circuit.mBytesIn.valueInUnits() << "/" << circuit.mBytesOut.valueInUnits() << " Kbps: " - << S32(circuit.mBytesIn.valueInUnits() / circuit.mExistenceTimer.getElapsedTimeF32().value()) + << S32(circuit.mBytesIn.valueInUnits() / circuit.mExistenceTimer.getElapsedTimeF32().value()) << "/" - << S32(circuit.mBytesOut.valueInUnits() / circuit.mExistenceTimer.getElapsedTimeF32().value()) + << S32(circuit.mBytesOut.valueInUnits() / circuit.mExistenceTimer.getElapsedTimeF32().value()) << " Packets: " << circuit.mPacketsIn << "/" << circuit.mPacketsOut << endl; s << "Recent In/Out " << circuit.mLastPeriodLength << " KBytes: " - << circuit.mBytesInLastPeriod.valueInUnits() + << circuit.mBytesInLastPeriod.valueInUnits() << "/" - << circuit.mBytesOutLastPeriod.valueInUnits() + << circuit.mBytesOutLastPeriod.valueInUnits() << " Kbps: " - << (S32)(circuit.mBytesInLastPeriod.valueInUnits() / circuit.mLastPeriodLength.value()) + << (S32)(circuit.mBytesInLastPeriod.valueInUnits() / circuit.mLastPeriodLength.value()) << "/" - << (S32)(circuit.mBytesOutLastPeriod.valueInUnits() / circuit.mLastPeriodLength.value()) + << (S32)(circuit.mBytesOutLastPeriod.valueInUnits() / circuit.mLastPeriodLength.value()) << " Peak kbps: " << S32(circuit.mPeakBPSIn / 1024.f) << "/" @@ -1261,7 +1261,7 @@ void LLCircuitData::pingTimerStop(const U8 ping_id) // Nota Bene: no averaging of ping times until we get a feel for how this works F64Seconds time = mt_secs - mPingTime; - if (time == 0.0) + if (time == F32Seconds(0.0)) { // Ack, we got our ping response on the same frame! Sigh, let's get a real time otherwise // all of our ping calculations will be skewed. @@ -1368,7 +1368,7 @@ F32Milliseconds LLCircuitData::getPingInTransitTime() if (mPingsInTransit) { - time_since_ping_was_sent = ((mPingsInTransit*mHeartbeatInterval - 1) + time_since_ping_was_sent = ((mPingsInTransit*mHeartbeatInterval - F32Seconds(1)) + (LLMessageSystem::getMessageTimeSeconds() - mPingTime)); } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index bc29805859..5b109fc218 100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -167,8 +167,8 @@ protected: void setPingDelay(U32Milliseconds ping); BOOL checkCircuitTimeout(); // Return FALSE if the circuit is dead and should be cleaned up - void addBytesIn(S32 bytes); - void addBytesOut(S32 bytes); + void addBytesIn(S32Bytes bytes); + void addBytesOut(S32Bytes bytes); U8 nextPingID() { mLastPingID++; return mLastPingID; } diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index d9b537941b..095da6f0f9 100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -456,7 +456,7 @@ void LLHTTPAssetStorage::storeAssetData( bool store_local, const LLUUID& requesting_agent_id, bool user_waiting, - F64 timeout) + F64Seconds timeout) { if (mVFS->getExists(uuid, type)) // VFS treats nonexistant and zero-length identically { @@ -516,7 +516,7 @@ void LLHTTPAssetStorage::storeAssetData( bool temp_file, bool is_priority, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LL_INFOS() << "LLAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL; diff --git a/indra/llmessage/llhttpassetstorage.h b/indra/llmessage/llhttpassetstorage.h index f743ccf0ac..783e95cac6 100755 --- a/indra/llmessage/llhttpassetstorage.h +++ b/indra/llmessage/llhttpassetstorage.h @@ -69,7 +69,7 @@ public: bool store_local = false, const LLUUID& requesting_agent_id = LLUUID::null, bool user_waiting=FALSE, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void storeAssetData( const std::string& filename, @@ -80,7 +80,7 @@ public: bool temp_file, bool is_priority, bool user_waiting=FALSE, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); virtual LLSD getPendingDetails(ERequestType rt, LLAssetType::EType asset_type, diff --git a/indra/llmessage/llpacketack.h b/indra/llmessage/llpacketack.h index 0a5604f74f..f55d5246f6 100755 --- a/indra/llmessage/llpacketack.h +++ b/indra/llmessage/llpacketack.h @@ -54,7 +54,7 @@ public: mHost.invalidate(); mRetries = 0; mPingBasedRetry = TRUE; - mTimeout = 0.f; + mTimeout = F32Seconds(0.f); mCallback = NULL; mCallbackData = NULL; mMessageName = NULL; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 00eaa7e2ec..e484bd258d 100755 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -356,7 +356,7 @@ BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) BOOL LLThrottleGroup::dynamicAdjust() { - const F32 DYNAMIC_ADJUST_TIME = 1.0f; // seconds + const F32Seconds DYNAMIC_ADJUST_TIME(1.0f); const F32 CURRENT_PERIOD_WEIGHT = .25f; // how much weight to give to last period while determining BPS utilization const F32 BUSY_PERCENT = 0.75f; // if use more than this fraction of BPS, you are busy const F32 IDLE_PERCENT = 0.70f; // if use less than this fraction, you are "idle" @@ -405,7 +405,7 @@ BOOL LLThrottleGroup::dynamicAdjust() for (i = 0; i < TC_EOF; i++) { // Is this a busy channel? - if (mBitsSentHistory[i] >= BUSY_PERCENT * DYNAMIC_ADJUST_TIME * mCurrentBPS[i]) + if (mBitsSentHistory[i] >= BUSY_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) { // this channel is busy channels_busy = TRUE; @@ -418,7 +418,7 @@ BOOL LLThrottleGroup::dynamicAdjust() } // Is this an idle channel? - if ((mBitsSentHistory[i] < IDLE_PERCENT * DYNAMIC_ADJUST_TIME * mCurrentBPS[i]) && + if ((mBitsSentHistory[i] < IDLE_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) && (mBitsAvailable[i] > 0)) { channel_idle[i] = TRUE; @@ -462,7 +462,7 @@ BOOL LLThrottleGroup::dynamicAdjust() // Therefore it's a candidate to give up some bandwidth. // Figure out how much bandwidth it has been using, and how // much is available to steal. - used_bps = mBitsSentHistory[i] / DYNAMIC_ADJUST_TIME; + used_bps = mBitsSentHistory[i] / DYNAMIC_ADJUST_TIME.value(); // CRO make sure to keep a minimum amount of throttle available // CRO NB: channels set to < MINIMUM_BPS will never give up bps, diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 1f4dd11f73..88c73852af 100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -80,7 +80,7 @@ // Constants //const char* MESSAGE_LOG_FILENAME = "message.log"; -static const F32 CIRCUIT_DUMP_TIMEOUT = 30.f; +static const F32Seconds CIRCUIT_DUMP_TIMEOUT(30.f); static const S32 TRUST_TIME_WINDOW = 3; // *NOTE: This needs to be moved into a seperate file so that it never gets @@ -259,7 +259,7 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, mSendPacketFailureCount = 0; - mCircuitPrintFreq = 60.f; // seconds + mCircuitPrintFreq = F32Seconds(60.f); loadTemplateFile(filename, failure_is_fatal); @@ -312,11 +312,11 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, // Constants for dumping output based on message processing time/count mNumMessageCounts = 0; mMaxMessageCounts = 200; // >= 0 means dump warnings - mMaxMessageTime = 1.f; + mMaxMessageTime = F32Seconds(1.f); mTrueReceiveSize = 0; - mReceiveTime = 0.f; + mReceiveTime = F32Seconds(0.f); } @@ -833,7 +833,7 @@ void LLMessageSystem::processAcks() } } - if (mMaxMessageTime >= 0.f) + if (mMaxMessageTime >= F32Seconds(0.f)) { // This is one of the only places where we're required to get REAL message system time. mReceiveTime = getMessageTimeSeconds(TRUE) - mMessageCountTime; @@ -1337,7 +1337,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) else { // mCircuitInfo already points to the correct circuit data - cdp->addBytesOut( buffer_length ); + cdp->addBytesOut( (S32Bytes)buffer_length ); } if(mVerboseLog) @@ -1464,7 +1464,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r { // update circuit packet ID tracking (missing/out of order packets) cdp->checkPacketInID( mCurrentRecvPacketID, recv_resent ); - cdp->addBytesIn( mTrueReceiveSize ); + cdp->addBytesIn( (S32Bytes)mTrueReceiveSize ); } if(mVerboseLog) @@ -1731,7 +1731,7 @@ LLHost LLMessageSystem::findHost(const U32 circuit_code) void LLMessageSystem::setMaxMessageTime(const F32 seconds) { - mMaxMessageTime = seconds; + mMaxMessageTime = F32Seconds(seconds); } void LLMessageSystem::setMaxMessageCounts(const S32 num) @@ -2752,7 +2752,7 @@ void LLMessageSystem::dumpReceiveCounts() if (mt->mReceiveCount > 0) { LL_INFOS("Messaging") << "Num: " << std::setw(3) << mt->mReceiveCount << " Bytes: " << std::setw(6) << mt->mReceiveBytes - << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime) << "%" << LL_ENDL; + << " Invalid: " << std::setw(3) << mt->mReceiveInvalid << " " << mt->mName << " " << llround(100 * mt->mDecodeTimeThisFrame / mReceiveTime.value()) << "%" << LL_ENDL; } } } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index 75eccc7f75..da06b64506 100755 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -267,7 +267,7 @@ public: LLCircuit mCircuitInfo; F64Seconds mCircuitPrintTime; // used to print circuit debug info every couple minutes - F32 mCircuitPrintFreq; // seconds + F32Seconds mCircuitPrintFreq; std::map mIPPortToCircuitCode; std::map mCircuitCodeToIPPort; diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp index d06ed5e57b..56e263c5f1 100644 --- a/indra/llrender/llgltexture.cpp +++ b/indra/llrender/llgltexture.cpp @@ -294,7 +294,7 @@ LLTexUnit::eTextureAddressMode LLGLTexture::getAddressMode(void) const return mGLTexturep->getAddressMode() ; } -S32 LLGLTexture::getTextureMemory() const +S32Bytes LLGLTexture::getTextureMemory() const { llassert(mGLTexturep.notNull()) ; diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index 6b85f81aee..45592ee077 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -138,7 +138,7 @@ public: S32 getDiscardLevel() const; S8 getComponents() const; BOOL getBoundRecently() const; - S32 getTextureMemory() const ; + S32Bytes getTextureMemory() const ; LLGLenum getPrimaryFormat() const; BOOL getIsAlphaMask() const ; LLTexUnit::eTextureType getTarget(void) const ; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index b63ee7f9f9..5d46fb290c 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -253,7 +253,7 @@ void LLImageGL::updateStats(F32 current_time) } //static -S32 LLImageGL::updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) +S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) { LLImageGL::sCurBoundTextureMemory += mem ; return LLImageGL::sCurBoundTextureMemory.value(); @@ -398,7 +398,7 @@ void LLImageGL::init(BOOL usemipmaps) // so that it is obvious by visual inspection if we forgot to // init a field. - mTextureMemory = 0; + mTextureMemory = (S32Bytes)0; mLastBindTime = 0.f; mPickMask = NULL; @@ -563,7 +563,7 @@ void LLImageGL::forceUpdateBindStats(void) const mLastBindTime = sLastFrameTime; } -BOOL LLImageGL::updateBindStats(S32 tex_mem) const +BOOL LLImageGL::updateBindStats(S32Bytes tex_mem) const { if (mTexName != 0) { @@ -1460,7 +1460,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ stop_glerror(); } - mTextureMemory = getMipBytes(discard_level); + mTextureMemory = (S32Bytes)getMipBytes(discard_level); sGlobalTextureMemory += mTextureMemory; mTexelsInGLTexture = getWidth() * getHeight() ; @@ -1618,10 +1618,10 @@ void LLImageGL::destroyGLTexture() { if (mTexName != 0) { - if(mTextureMemory) + if(mTextureMemory != S32Bytes(0)) { sGlobalTextureMemory -= mTextureMemory; - mTextureMemory = 0; + mTextureMemory = (S32Bytes)0; } LLImageGL::deleteTextures(mBindTarget, mFormatInternal, mMipLevels, 1, &mTexName); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 035d42c3ad..5e027851f3 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -63,7 +63,7 @@ public: static S32 dataFormatBytes(S32 dataformat, S32 width, S32 height); static S32 dataFormatComponents(S32 dataformat); - BOOL updateBindStats(S32 tex_mem) const ; + BOOL updateBindStats(S32Bytes tex_mem) const ; F32 getTimePassedSinceLastBound(); void forceUpdateBindStats(void) const; @@ -76,7 +76,7 @@ public: static void dirtyTexOptions(); // Sometimes called externally for textures not using LLImageGL (should go away...) - static S32 updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) ; + static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ; static bool checkSize(S32 width, S32 height); @@ -189,7 +189,7 @@ public: public: // Various GL/Rendering options - S32 mTextureMemory; + S32Bytes mTextureMemory; mutable F32 mLastBindTime; // last time this was bound, by discard level private: diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 4c64cc944e..03a2895289 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -253,7 +253,7 @@ template S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const T& stat, const F32Seconds time_period) { F32Seconds elapsed_time, - time_since_value_changed; + time_since_value_changed; S32 num_rapid_changes = 0; const F32Seconds RAPID_CHANGE_THRESHOLD = F32Seconds(0.3f); @@ -266,7 +266,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const if (last_value != cur_value) { if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; - time_since_value_changed = 0; + time_since_value_changed = (F32Seconds)0; } last_value = cur_value; @@ -280,7 +280,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType& stat, const F32Seconds time_period) { F32Seconds elapsed_time, - time_since_value_changed; + time_since_value_changed; S32 num_rapid_changes = 0; F64 last_value = periodic_recording.getPrevRecording(1).getSum(stat); @@ -292,7 +292,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const if (last_value != cur_value) { if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; - time_since_value_changed = 0; + time_since_value_changed = (F32Seconds)0; } last_value = cur_value; @@ -355,7 +355,7 @@ void LLStatBar::draw() mean = frame_recording.getPeriodMean(sample_stat, num_frames); num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, RAPID_CHANGE_WINDOW); - if (num_rapid_changes / RAPID_CHANGE_WINDOW > MAX_RAPID_CHANGES_PER_SEC) + if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC) { display_value = mean; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 339a8f1ab0..f506765da3 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -293,12 +293,12 @@ U32 gFrameCount = 0; U32 gForegroundFrameCount = 0; // number of frames that app window was in foreground LLPumpIO* gServicePump = NULL; -LLUnitImplicit gFrameTime = 0; -LLUnitImplicit gFrameTimeSeconds = 0.f; -LLUnitImplicit gFrameIntervalSeconds = 0.f; +U64MicrosecondsImplicit gFrameTime = 0; +F32SecondsImplicit gFrameTimeSeconds = 0.f; +F32SecondsImplicit 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 -LLUnitImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds +U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds U32 gFrameStalls = 0; const F64 FRAME_STALL_THRESHOLD = 1.0; @@ -1046,9 +1046,8 @@ bool LLAppViewer::init() // get RAM data from XML std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount")); - U64 minRAM = 0; + U64Bytes minRAM; minRAMString >> minRAM; - minRAM = minRAM * 1024 * 1024; if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN) { @@ -1202,7 +1201,7 @@ void LLAppViewer::initMaxHeapSize() //currently SL is built under 32-bit setting, we set its max heap size no more than 1.6 GB. //F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ; - F32 max_heap_size_gb = gSavedSettings.getF32("MaxHeapSize") ; + F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ; BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ; LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ; @@ -1464,7 +1463,7 @@ bool LLAppViewer::mainLoop() ms_sleep(500); } - const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, LLUnitImplicit(0.005f)); // 5 ms a second + const F64 max_idle_time = llmin(.005f*10.f*(F32MillisecondsImplicit)gFrameTimeSeconds, F32MillisecondsImplicit(5)); // 5 ms a second idleTimer.reset(); S32 total_work_pending = 0; S32 total_io_pending = 0; @@ -3138,8 +3137,7 @@ bool LLAppViewer::meetsRequirementsForMaximizedStart() { bool maximizedOk = (LLFeatureManager::getInstance()->getGPUClass() >= GPU_CLASS_2); - const U32 one_gigabyte_kb = 1024 * 1024; - maximizedOk &= (gSysMemory.getPhysicalMemoryKB() >= one_gigabyte_kb); + maximizedOk &= (gSysMemory.getPhysicalMemoryKB() >= U32Gigabytes(1)); return maximizedOk; } @@ -3330,7 +3328,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB().value()); - gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits()); + gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated.valueInUnits()); gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple(); // The user is not logged on yet, but record the current grid choice login url diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 10452e64e2..6b16a96c11 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -334,10 +334,10 @@ extern U32 gForegroundFrameCount; extern LLPumpIO* gServicePump; -extern LLUnitImplicit gStartTime; -extern LLUnitImplicit gFrameTime; // The timestamp of the most-recently-processed frame -extern LLUnitImplicit gFrameTimeSeconds; // Loses msec precision after ~4.5 hours... -extern LLUnitImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds +extern U64MicrosecondsImplicit gStartTime; +extern U64MicrosecondsImplicit gFrameTime; // The timestamp of the most-recently-processed frame +extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4.5 hours... +extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame extern F32 gFrameDTClamped; extern U32 gFrameStalls; diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 9311056a27..03b1f14a03 100755 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -35,7 +35,7 @@ #include #include "boost/lexical_cast.hpp" -const int CONVERSATION_LIFETIME = 30; // lifetime of LLConversation is 30 days by spec +const S32Days CONVERSATION_LIFETIME = (S32Days)30; // lifetime of LLConversation is 30 days by spec struct ConversationParams : public LLInitParam::Block { @@ -100,7 +100,7 @@ LLConversation::~LLConversation() void LLConversation::updateTimestamp() { - mTime = time_corrected(); + mTime = (U64Seconds)time_corrected(); mTimestamp = createTimestamp(mTime); } @@ -130,10 +130,10 @@ const std::string LLConversation::createTimestamp(const U64Seconds& utc_time) return timeStr; } -bool LLConversation::isOlderThan(U32 days) const +bool LLConversation::isOlderThan(U32Days days) const { U64Seconds now(time_corrected()); - LLUnit age = now - mTime; + U32Days age = now - mTime; return age > days; } diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index fd6ad9ad66..b38d472156 100755 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -61,7 +61,7 @@ public: void setConversationName(std::string conv_name) { mConversationName = conv_name; } void setOfflineMessages(bool new_messages) { mHasOfflineIMs = new_messages; } - bool isOlderThan(U32 days) const; + bool isOlderThan(U32Days days) const; /* * updates last interaction time diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 725a2f2daf..36cbd67333 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1143,7 +1143,7 @@ void LLFastTimerView::drawLineGraph() } //interpolate towards new maximum - max_time = lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f)); + max_time = (F32Seconds)lerp(max_time.value(), cur_max.value(), LLSmoothInterpolation::getInterpolant(0.1f)); if (llabs((max_time - cur_max).value()) <= 1) { max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max)); @@ -1439,7 +1439,7 @@ void LLFastTimerView::drawBars() bar_height -= vpad; updateTotalTime(); - if (mTotalTimeDisplay <= 0.0) return; + if (mTotalTimeDisplay <= (F32Seconds)0.0) return; drawTicks(); const S32 bars_top = mBarRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4); @@ -1550,7 +1550,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer if (timer_bar_index == 0) { - timer_bar.mSelfStart = 0.f; + timer_bar.mSelfStart = F32Seconds(0.f); timer_bar.mSelfEnd = bar_time; } @@ -1583,7 +1583,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer } child_timer_bar.mStartFraction = bar_fraction_start; - child_timer_bar.mEndFraction = bar_time > 0 + child_timer_bar.mEndFraction = bar_time > (S32Seconds)0 ? bar_fraction_start + child_timer_bar.mTotalTime / bar_time : 1.f; child_timer_bar.mSelfStart = timer_bar.mChildrenStart diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 01596f0b4b..333e8ee67e 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -867,7 +867,7 @@ void LLFeatureManager::applyBaseMasks() maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024) + if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index ad94949863..7f81d40ebb 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -259,7 +259,7 @@ LLSD LLFloaterAbout::getInfo() // CPU info["CPU"] = gSysCPU.getCPUString(); - info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits()); + info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits()); // Moved hack adjustment to Windows memory size into llsys.cpp info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString(); info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index adb490d524..9efdf9d10e 100755 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -89,8 +89,8 @@ void LLFloaterHardwareSettings::refresh() void LLFloaterHardwareSettings::refreshEnabledState() { - S32Mibibytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting(); - S32Mibibytes max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(); + S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting(); + S32Megabytes max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(); getChild("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value()); getChild("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value()); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index ecee801e8e..7fafabb493 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -471,7 +471,8 @@ void LLSceneMonitor::fetchQueryResult() LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF); // also throttle timing here, to avoid going below sample time due to phasing with frame capture - static LLCachedControl scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime"); + static LLCachedControl scene_load_sample_time_control(gSavedSettings, "SceneLoadingMonitorSampleTime"); + F32Seconds scene_load_sample_time = (F32Seconds)scene_load_sample_time_control(); if(mDiffState == WAIT_ON_RESULT && !LLAppViewer::instance()->quitRequested()) @@ -491,7 +492,7 @@ void LLSceneMonitor::fetchQueryResult() record(sFramePixelDiff, mDiffResult); static LLCachedControl diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold"); - F32 elapsed_time = mRecordingTimer.getElapsedTimeF32(); + F32Seconds elapsed_time = mRecordingTimer.getElapsedTimeF32(); if (elapsed_time > scene_load_sample_time) { @@ -649,7 +650,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) for (S32 frame = 1; frame <= frame_count; frame++) { - os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).valueInUnits(); + os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).valueInUnits(); } os << '\n'; diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index f94232e536..c99ec1e824 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.getResults().getDuration() != 0;} + bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);} private: void freezeScene(); diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 55afc3e454..2d06b8599c 100755 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -43,7 +43,7 @@ #include "noise.h" extern bool gShiftFrame; -extern LLUnitImplicit gFrameTime; +extern U64MicrosecondsImplicit gFrameTime; extern LLPipeline gPipeline; LLSurfacePatch::LLSurfacePatch() diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 07ff1de702..8d63ebdffc 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -946,7 +946,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker() mHttpBufferArray = NULL; } unlockWorkMutex(); // -Mw - mFetcher->removeFromHTTPQueue(mID, 0); + mFetcher->removeFromHTTPQueue(mID, (S32Bytes)0); mFetcher->removeHttpWaiter(mID); mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount); } @@ -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().value() << "/" << mFetcher->mMaxBandwidth + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth << LL_ENDL; // Will call callbackHttpGet when curl request completes @@ -1931,7 +1931,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe partial = (par_status == status); } - S32 data_size = callbackHttpGet(response, partial, success); + S32BytesImplicit data_size = callbackHttpGet(response, partial, success); if (log_texture_traffic && data_size > 0) { @@ -2352,7 +2352,7 @@ void LLTextureFetchWorker::recordTextureDone(bool is_http) is_http, LLImageBase::TYPE_AVATAR_BAKE == mType, LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime); - mMetricsStartTime = 0; + mMetricsStartTime = (U32Seconds)0; } LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE, is_http, @@ -2607,11 +2607,11 @@ void LLTextureFetch::addToHTTPQueue(const LLUUID& id) } // -Mfnq // Threads: T* -void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32 received_size) +void LLTextureFetch::removeFromHTTPQueue(const LLUUID& id, S32Bytes received_size) { LLMutexLock lock(&mNetworkQueueMutex); // +Mfnq mHTTPTextureQueue.erase(id); - mHTTPTextureBits += received_size * 8; // Approximate - does not include header bits + mHTTPTextureBits += received_size; // Approximate - does not include header bits } // -Mfnq // NB: If you change deleteRequest() you should probably make @@ -2762,7 +2762,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, raw = worker->mRawImage; aux = worker->mAuxImage; F32Seconds cache_read_time(worker->mCacheReadTime); - if (cache_read_time != 0.f) + if (cache_read_time != (F32Seconds)0.f) { record(sCacheReadLatency, cache_read_time); } @@ -2888,10 +2888,10 @@ S32 LLTextureFetch::update(F32 max_time_ms) { mNetworkQueueMutex.lock(); // +Mfnq - mMaxBandwidth = band_width; + mMaxBandwidth = band_width(); add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits); - mHTTPTextureBits = 0; + mHTTPTextureBits = (U32Bits)0; mNetworkQueueMutex.unlock(); // -Mfnq } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 78b13cdd80..81c505679e 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(F32Kibibits bandwidth) { mTextureBandwidth = bandwidth; } + void setTextureBandwidth(F32 bandwidth) { mTextureBandwidth = bandwidth; } // Threads: T* (but not safe) - F32Kibibits getTextureBandwidth() { return mTextureBandwidth; } + F32 getTextureBandwidth() { return mTextureBandwidth; } // Threads: T* BOOL isFromLocalCache(const LLUUID& id); @@ -234,7 +234,7 @@ protected: // XXX possible delete // Threads: T* - void removeFromHTTPQueue(const LLUUID& id, S32 received_size); + void removeFromHTTPQueue(const LLUUID& id, S32Bytes received_size); // Identical to @deleteRequest but with different arguments // (caller already has the worker pointer). @@ -325,8 +325,8 @@ private: queue_t mHTTPTextureQueue; // Mfnq typedef std::map > cancel_queue_t; cancel_queue_t mCancelQueue; // Mfnq - F32Kibibits mTextureBandwidth; // - F32Kibibits mMaxBandwidth; // Mfnq + F32 mTextureBandwidth; // + F32 mMaxBandwidth; // Mfnq LLTextureInfo mTextureInfo; // XXX possible delete diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index 6906f82c1c..59d692b287 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -40,7 +40,7 @@ LLTextureInfo::LLTextureInfo() : mLogTextureDownloadsToViewerLog(false), mLogTextureDownloadsToSimulator(false), mTextureDownloadProtocol("NONE"), - mTextureLogThreshold(LLUnits::Kibibytes::fromValue(100)) + mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100)) { mTextures.clear(); mRecording.start(); @@ -95,7 +95,7 @@ void LLTextureInfo::setRequestStartTime(const LLUUID& id, U64 startTime) { addRequest(id); } - mTextures[id]->mStartTime = startTime; + mTextures[id]->mStartTime = (U64Microseconds)startTime; add(sTextureDownloadsStarted, 1); } @@ -105,7 +105,7 @@ void LLTextureInfo::setRequestSize(const LLUUID& id, U32 size) { addRequest(id); } - mTextures[id]->mSize = size; + mTextures[id]->mSize = (U32Bytes)size; } void LLTextureInfo::setRequestOffset(const LLUUID& id, U32 offset) @@ -194,7 +194,7 @@ LLSD LLTextureInfo::getAverages() LLSD averagedTextureData; S32 averageDownloadRate; U32Milliseconds download_time = mRecording.getSum(sTexureDownloadTime); - if(download_time == 0) + if(download_time == (U32Milliseconds)0) { averageDownloadRate = 0; } diff --git a/indra/newview/lltextureinfodetails.h b/indra/newview/lltextureinfodetails.h index 0ad95eb94e..7cba87e5a8 100755 --- a/indra/newview/lltextureinfodetails.h +++ b/indra/newview/lltextureinfodetails.h @@ -40,10 +40,10 @@ struct LLTextureInfoDetails }; U32Microseconds mStartTime, - mCompleteTime; - U32 mOffset; - U32Bytes mSize; - LLRequestType mType; + mCompleteTime; + U32 mOffset; + U32Bytes mSize; + LLRequestType mType; LLTextureInfoDetails(); }; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index f39d41c2b8..3974668d09 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -350,7 +350,7 @@ void LLTextureBar::draw() // draw the image size at the end { std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(), - mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0); + mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory().value() : 0); LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, LLFontGL::LEFT, LLFontGL::TOP); } @@ -507,13 +507,13 @@ private: void LLGLTexMemBar::draw() { - S32Mibibytes bound_mem = LLViewerTexture::sBoundTextureMemory; - S32Mibibytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; - S32Mibibytes total_mem = LLViewerTexture::sTotalTextureMemory; - S32Mibibytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; + S32Megabytes bound_mem = LLViewerTexture::sBoundTextureMemory; + S32Megabytes max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + S32Megabytes total_mem = LLViewerTexture::sTotalTextureMemory; + S32Megabytes max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getUsage()).value() ; - F32 cache_max_usage = (F32)F32Mibibytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; + F32 cache_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)F32Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32Bytes total_texture_downloaded = gTotalTextureData; @@ -586,8 +586,8 @@ void LLGLTexMemBar::draw() left = 550; - F32Kibibits bandwidth = LLAppViewer::getTextureFetch()->getTextureBandwidth(); - F32Kibibits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth()); + F32Kilobits 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.value(), max_bandwidth.value()); @@ -793,7 +793,7 @@ void LLTextureView::draw() if (mPrintList) { - S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ; + S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory().value() : 0 ; LL_INFOS() << imagep->getID() << "\t" << tex_mem << "\t" << imagep->getBoostLevel() diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index df65a637b7..5fb99ce02f 100755 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -77,7 +77,7 @@ protected: LLViewerAssetStatsFF::record_response(mType, false, false, (LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime)); - mMetricsStartTime = 0; + mMetricsStartTime = (U32Seconds)0; } } @@ -113,7 +113,7 @@ void LLViewerAssetStorage::storeAssetData( bool is_priority, bool store_local, bool user_waiting, - F64 timeout) + F64Seconds timeout) { LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type) @@ -237,7 +237,7 @@ void LLViewerAssetStorage::storeAssetData( bool temp_file, bool is_priority, bool user_waiting, - F64 timeout) + F64Seconds timeout) { if(filename.empty()) { diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index ca9b9943fa..6baec647e6 100755 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -51,7 +51,7 @@ public: bool is_priority = false, bool store_local = false, bool user_waiting=FALSE, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void storeAssetData( const std::string& filename, @@ -62,7 +62,7 @@ public: bool temp_file = false, bool is_priority = false, bool user_waiting=FALSE, - F64 timeout=LL_ASSET_STORAGE_TIMEOUT); + F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT); protected: using LLAssetStorage::_queueDataRequest; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index d0491450dc..95419c7cf3 100755 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -287,7 +287,7 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue) static bool handleVideoMemoryChanged(const LLSD& newvalue) { - gTextureList.updateMaxResidentTexMem(S32Mibibytes(newvalue.asInteger())); + gTextureList.updateMaxResidentTexMem(S32Megabytes(newvalue.asInteger())); return true; } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index cb5078b988..d2a702049a 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -220,8 +220,8 @@ void display_stats() F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency"); if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq) { - gMemoryAllocated = LLMemory::getCurrentRSS(); - U32Mibibytes memory = gMemoryAllocated; + gMemoryAllocated = (U64Bytes)LLMemory::getCurrentRSS(); + U32Megabytes memory = gMemoryAllocated; LL_INFOS() << llformat("MEMORY: %d MB", memory.value()) << LL_ENDL; LLMemory::logMemoryInfo(TRUE) ; gRecentMemoryTime.reset(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6c435bf147..cbc895390c 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -401,11 +401,11 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) LLVLData *vl_datap = new LLVLData(regionp, type, datap, size); if (mesgsys->getReceiveCompressedSize()) { - gVLManager.addLayerData(vl_datap, mesgsys->getReceiveCompressedSize()); + gVLManager.addLayerData(vl_datap, (S32Bytes)mesgsys->getReceiveCompressedSize()); } else { - gVLManager.addLayerData(vl_datap, mesgsys->getReceiveSize()); + gVLManager.addLayerData(vl_datap, (S32Bytes)mesgsys->getReceiveSize()); } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b054e519e0..8092eda7b2 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2417,14 +2417,14 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) if (!mStatic && sVelocityInterpolate && !isSelected()) { // calculate dt from last update - F32 dt_raw = (F32)(time - mLastInterpUpdateSecs); + F32 dt_raw = ((F64Seconds)time - mLastInterpUpdateSecs).value(); F32 dt = mTimeDilation * dt_raw; applyAngularVelocity(dt); if (isAttachment()) { - mLastInterpUpdateSecs = time; + mLastInterpUpdateSecs = (F64Seconds)time; return; } else @@ -2438,8 +2438,8 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } -// Move an object due to idle-time viewer side updates by iterpolating motion -void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) +// Move an object due to idle-time viewer side updates by interpolating motion +void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& time, const F32SecondsImplicit& dt) { // linear motion // PHYSICS_TIMESTEP is used below to correct for the fact that the velocity in object @@ -2450,8 +2450,8 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) // to see if object is selected, instead of explicitly // zeroing it out - F64 time_since_last_update = time - mLastMessageUpdateSecs; - if (time_since_last_update <= 0.0 || dt <= 0.f) + F64Seconds time_since_last_update = time - mLastMessageUpdateSecs; + if (time_since_last_update <= (F64Seconds)0.0 || dt <= (F32Seconds)0.f) { return; } @@ -2459,11 +2459,11 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) LLVector3 accel = getAcceleration(); LLVector3 vel = getVelocity(); - if (sMaxUpdateInterpolationTime <= 0.0) + if (sMaxUpdateInterpolationTime <= (F64Seconds)0.0) { // Old code path ... unbounded, simple interpolation if (!(accel.isExactlyZero() && vel.isExactlyZero())) { - LLVector3 pos = (vel + (0.5f * (dt-PHYSICS_TIMESTEP)) * accel) * dt; + LLVector3 pos = (vel + (0.5f * (dt-PHYSICS_TIMESTEP)) * accel) * dt.value(); // region local setPositionRegion(pos + getPositionRegion()); @@ -2477,12 +2477,12 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) { // Object is moving, and hasn't been too long since we got an update from the server // Calculate predicted position and velocity - LLVector3 new_pos = (vel + (0.5f * (dt-PHYSICS_TIMESTEP)) * accel) * dt; + LLVector3 new_pos = (vel + (0.5f * (dt-PHYSICS_TIMESTEP)) * accel) * dt.value(); LLVector3 new_v = accel * dt; if (time_since_last_update > sPhaseOutUpdateInterpolationTime && - sPhaseOutUpdateInterpolationTime > 0.0) - { // Haven't seen a viewer update in a while, check to see if the ciruit is still active + sPhaseOutUpdateInterpolationTime > (F64Seconds)0.0) + { // Haven't seen a viewer update in a while, check to see if the circuit is still active if (mRegionp) { // The simulator will NOT send updates if the object continues normally on the path // predicted by the velocity and the acceleration (often gravity) sent to the viewer @@ -2498,7 +2498,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) (time_since_last_packet > sPhaseOutUpdateInterpolationTime)) { // Start to reduce motion interpolation since we haven't seen a server update in a while - F64 time_since_last_interpolation = time - mLastInterpUpdateSecs; + F64Seconds time_since_last_interpolation = time - mLastInterpUpdateSecs; F64 phase_out = 1.0; if (time_since_last_update > sMaxUpdateInterpolationTime) { // Past the time limit, so stop the object diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 3943709049..24dff45ae8 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -580,7 +580,7 @@ private: U32 checkMediaURL(const std::string &media_url); // Motion prediction between updates - void interpolateLinearMotion(const F64 & time, const F32 & dt); + void interpolateLinearMotion(const F64SecondsImplicit & time, const F32SecondsImplicit & dt); static void initObjectDataMap(); @@ -707,8 +707,8 @@ protected: child_list_t mChildList; - F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation - F64 mLastMessageUpdateSecs; // Last update from a message from the simulator + F64Seconds mLastInterpUpdateSecs; // Last update for purposes of interpolation + F64Seconds mLastMessageUpdateSecs; // Last update from a message from the simulator TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator // extra data sent from the sim...currently only used for tree species info @@ -781,7 +781,7 @@ protected: mutable LLVector3 mPositionAgent; static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; } - static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64) value; } + static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; } static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } static void setPingInterpolate(BOOL value) { sPingInterpolate = value; } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 24c56df8db..61a0ed098a 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -428,14 +428,14 @@ void LLViewerRegion::initStats() { mImpl->mLastNetUpdate.reset(); mPacketsIn = 0; - mBitsIn = 0; - mLastBitsIn = 0; + mBitsIn = (U32Bits)0; + mLastBitsIn = (U32Bits)0; mLastPacketsIn = 0; mPacketsOut = 0; mLastPacketsOut = 0; mPacketsLost = 0; mLastPacketsLost = 0; - mPingDelay = 0; + mPingDelay = (U32Seconds)0; mAlive = false; // can become false if circuit disconnects } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index bb2c13df33..f300983f19 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -95,7 +95,7 @@ LLTrace::CountStatHandle > LLTrace::EventStatHandle > TRIANGLES_DRAWN_PER_FRAME("trianglesdrawnperframestat"); -LLTrace::CountStatHandle +LLTrace::CountStatHandle 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"), @@ -156,7 +156,7 @@ LLTrace::SampleStatHandle GL_TEX_MEM("gltexmemstat"), GL_BOUND_MEM("glboundmemstat"), RAW_MEM("rawmemstat"), FORMATTED_MEM("formattedmemstat"); -LLTrace::SampleStatHandle DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), +LLTrace::SampleStatHandle DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"), MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting"); @@ -221,7 +221,7 @@ void LLViewerStats::resetStats() void LLViewerStats::updateFrameStats(const F64Seconds time_diff) { - if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > 5.0) + if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > F32Percent(5.0)) { add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff); } @@ -239,20 +239,20 @@ void LLViewerStats::updateFrameStats(const F64Seconds time_diff) add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff); } - if (time_diff >= 0.5) + if (time_diff >= (F64Seconds)0.5) { record(LLStatViewer::FPS_2_TIME, time_diff); } - if (time_diff >= 0.125) + if (time_diff >= (F64Seconds)0.125) { record(LLStatViewer::FPS_8_TIME, time_diff); } - if (time_diff >= 0.1) + if (time_diff >= (F64Seconds)0.1) { record(LLStatViewer::FPS_10_TIME, time_diff); } - if (gFrameCount && mLastTimeDiff > 0.0) + if (gFrameCount && mLastTimeDiff > (F64Seconds)0.0) { // new "stutter" meter add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); @@ -260,7 +260,7 @@ void LLViewerStats::updateFrameStats(const F64Seconds time_diff) // old stats that were never really used sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff)); - F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; + F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff)); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); @@ -359,7 +359,7 @@ void update_statistics() if (cdp) { sample(LLStatViewer::SIM_PING, F64Milliseconds (cdp->getPingDelay())); - gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay().value())) / ((F32)gSimPingCount + 1); + gAvgSimPing = ((gAvgSimPing * gSimPingCount) + cdp->getPingDelay()) / (gSimPingCount + 1); gSimPingCount++; } else @@ -373,8 +373,8 @@ void update_statistics() } add(LLStatViewer::FPS, 1); - F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, F64Bits(layer_bits)); + F64Bits layer_bits = gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits(); + add(LLStatViewer::LAYERS_NETWORK_DATA_RECEIVED, layer_bits); add(LLStatViewer::OBJECT_NETWORK_DATA_RECEIVED, gObjectData); sample(LLStatViewer::PENDING_VFS_OPERATIONS, LLVFile::getVFSThread()->getPending()); add(LLStatViewer::ASSET_UDP_DATA_RECEIVED, F64Bits(gTransferManager.getTransferBitsIn(LLTCT_ASSET))); @@ -395,7 +395,7 @@ void update_statistics() // Reset all of these values. gVLManager.resetBitCounts(); - gObjectData = 0; + gObjectData = (U32Bytes)0; // gDecodedBits = 0; // Only update texture stats periodically so that they are less noisy @@ -553,9 +553,9 @@ void send_stats() LLSD &download = body["downloads"]; - download["world_kbytes"] = F64Kibibytes(gTotalWorldData).value(); - download["object_kbytes"] = F64Kibibytes(gTotalObjectData).value(); - download["texture_kbytes"] = F64Kibibytes(gTotalTextureData).value(); + download["world_kbytes"] = F64Kilobytes(gTotalWorldData).value(); + download["object_kbytes"] = F64Kilobytes(gTotalObjectData).value(); + download["texture_kbytes"] = F64Kilobytes(gTotalTextureData).value(); download["mesh_kbytes"] = LLMeshRepository::sBytesReceived/1024.0; LLSD &in = body["stats"]["net"]["in"]; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 42c56e8835..0d959ed034 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -142,7 +142,7 @@ extern LLTrace::CountStatHandle<> FPS, extern LLTrace::CountStatHandle > TRIANGLES_DRAWN; -extern LLTrace::CountStatHandle ACTIVE_MESSAGE_DATA_RECEIVED, +extern LLTrace::CountStatHandle ACTIVE_MESSAGE_DATA_RECEIVED, LAYERS_NETWORK_DATA_RECEIVED, OBJECT_NETWORK_DATA_RECEIVED, ASSET_UDP_DATA_RECEIVED, @@ -196,7 +196,7 @@ extern LLTrace::SampleStatHandle GL_TEX_MEM, GL_BOUND_MEM, RAW_MEM, FORMATTED_MEM; -extern LLTrace::SampleStatHandle DELTA_BANDWIDTH, +extern LLTrace::SampleStatHandle DELTA_BANDWIDTH, MAX_BANDWIDTH; extern SimMeasurement SIM_FRAME_TIME, SIM_NET_TIME, diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4290d338c1..6bda1499d0 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -63,8 +63,8 @@ /////////////////////////////////////////////////////////////////////////////// // extern -const S32Mibibytes gMinVideoRam(32); -const S32Mibibytes gMaxVideoRam(512); +const S32Megabytes gMinVideoRam(32); +const S32Megabytes gMaxVideoRam(512); // statics @@ -76,8 +76,8 @@ LLPointer LLViewerFetchedTexture::sWhiteImagep = NULL; LLPointer LLViewerFetchedTexture::sDefaultImagep = NULL; LLPointer LLViewerFetchedTexture::sSmokeImagep = NULL; LLPointer LLViewerFetchedTexture::sFlatNormalImagep = NULL; -LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap ; -LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL ; +LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap; +LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL; const std::string sTesterName("TextureTester"); S32 LLViewerTexture::sImageCount = 0; @@ -88,19 +88,19 @@ F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; S32Bytes LLViewerTexture::sBoundTextureMemory; S32Bytes LLViewerTexture::sTotalTextureMemory; -S32Mibibytes LLViewerTexture::sMaxBoundTextureMem; -S32Mibibytes LLViewerTexture::sMaxTotalTextureMem; +S32Megabytes LLViewerTexture::sMaxBoundTextureMem; +S32Megabytes LLViewerTexture::sMaxTotalTextureMem; S32Bytes LLViewerTexture::sMaxDesiredTextureMem; -S8 LLViewerTexture::sCameraMovingDiscardBias = 0 ; -F32 LLViewerTexture::sCameraMovingBias = 0.0f ; -S32 LLViewerTexture::sMaxSculptRez = 128 ; //max sculpt image size -const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64 ; -const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez ; -const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128 ; -S32 LLViewerTexture::sMinLargeImageSize = 65536 ; //256 * 256. -S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ; -BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ; -F32 LLViewerTexture::sCurrentTime = 0.0f ; +S8 LLViewerTexture::sCameraMovingDiscardBias = 0; +F32 LLViewerTexture::sCameraMovingBias = 0.0f; +S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size +const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64; +const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez; +const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128; +S32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256. +S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA; +BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE; +F32 LLViewerTexture::sCurrentTime = 0.0f; F32 LLViewerTexture::sTexelPixelRatio = 1.0f; LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF; @@ -142,7 +142,7 @@ void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex) { if(mSourceCallbackList) { - mSourceCallbackList->erase(tex->getID()) ; + mSourceCallbackList->erase(tex->getID()); } } @@ -155,33 +155,33 @@ void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_ca for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = callback_list->begin(); iter != callback_list->end(); ++iter) { - LLViewerFetchedTexture* tex = gTextureList.findImage(*iter) ; + LLViewerFetchedTexture* tex = gTextureList.findImage(*iter); if(tex) { - tex->deleteCallbackEntry(callback_list) ; + tex->deleteCallbackEntry(callback_list); } } - callback_list->clear() ; + callback_list->clear(); } } LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image) { - return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ; + return new LLViewerMediaTexture(media_id, usemipmaps, gl_image); } LLViewerTexture* LLViewerTextureManager::findTexture(const LLUUID& id) { - LLViewerTexture* tex ; + LLViewerTexture* tex; //search fetched texture list - tex = gTextureList.findImage(id) ; + tex = gTextureList.findImage(id); //search media texture list if(!tex) { - tex = LLViewerTextureManager::findMediaTexture(id) ; + tex = LLViewerTextureManager::findMediaTexture(id); } - return tex ; + return tex; } LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id) @@ -191,78 +191,78 @@ LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id) { - return LLViewerMediaTexture::findMediaTexture(media_id) ; + return LLViewerMediaTexture::findMediaTexture(media_id); } LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image) { - LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id) ; + LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id); if(!tex) { - tex = LLViewerTextureManager::createMediaTexture(id, usemipmaps, gl_image) ; + tex = LLViewerTextureManager::createMediaTexture(id, usemipmaps, gl_image); } - tex->initVirtualSize() ; + tex->initVirtualSize(); - return tex ; + return tex; } LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, BOOL report_error) { if(!tex) { - return NULL ; + return NULL; } - S8 type = tex->getType() ; + S8 type = tex->getType(); if(type == LLViewerTexture::FETCHED_TEXTURE || type == LLViewerTexture::LOD_TEXTURE) { - return static_cast(tex) ; + return static_cast(tex); } if(report_error) { - LL_ERRS() << "not a fetched texture type: " << type << LL_ENDL ; + LL_ERRS() << "not a fetched texture type: " << type << LL_ENDL; } - return NULL ; + return NULL; } LLPointer LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(usemipmaps) ; + LLPointer tex = new LLViewerTexture(usemipmaps); if(generate_gl_tex) { - tex->generateGLTexture() ; - tex->setCategory(LLGLTexture::LOCAL) ; + tex->generateGLTexture(); + tex->setCategory(LLGLTexture::LOCAL); } - return tex ; + return tex; } LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(id, usemipmaps) ; + LLPointer tex = new LLViewerTexture(id, usemipmaps); if(generate_gl_tex) { - tex->generateGLTexture() ; - tex->setCategory(LLGLTexture::LOCAL) ; + tex->generateGLTexture(); + tex->setCategory(LLGLTexture::LOCAL); } - return tex ; + return tex; } LLPointer LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) { - LLPointer tex = new LLViewerTexture(raw, usemipmaps) ; - tex->setCategory(LLGLTexture::LOCAL) ; - return tex ; + LLPointer tex = new LLViewerTexture(raw, usemipmaps); + tex->setCategory(LLGLTexture::LOCAL); + return tex; } LLPointer LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(width, height, components, usemipmaps) ; + LLPointer tex = new LLViewerTexture(width, height, components, usemipmaps); if(generate_gl_tex) { - tex->generateGLTexture() ; - tex->setCategory(LLGLTexture::LOCAL) ; + tex->generateGLTexture(); + tex->setCategory(LLGLTexture::LOCAL); } - return tex ; + return tex; } LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( @@ -275,7 +275,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( LLGLenum primary_format, LLHost request_from_host) { - return gTextureList.getImage(image_id, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ; + return gTextureList.getImage(image_id, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host); } LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( @@ -288,7 +288,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( LLGLenum primary_format, const LLUUID& force_id) { - return gTextureList.getImageFromFile(filename, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; + return gTextureList.getImageFromFile(filename, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id); } //static @@ -302,12 +302,12 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const s const LLUUID& force_id ) { - return gTextureList.getImageFromUrl(url, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; + return gTextureList.getImageFromUrl(url, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id); } LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, FTType f_type, LLHost host) { - return gTextureList.getImageFromHost(image_id, f_type, host) ; + return gTextureList.getImageFromHost(image_id, f_type, host); } // Create a bridge to the viewer texture manager. @@ -335,15 +335,15 @@ void LLViewerTextureManager::init() { LLPointer raw = new LLImageRaw(1,1,3); raw->clear(0x77, 0x77, 0x77, 0xFF); - LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ; + LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE); } const S32 dim = 128; LLPointer image_raw = new LLImageRaw(dim,dim,3); U8* data = image_raw->getData(); - memset(data, 0, dim * dim * 3) ; - LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE) ; + memset(data, 0, dim * dim * 3); + LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE); #if 1 LLPointer imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT); @@ -372,16 +372,16 @@ void LLViewerTextureManager::init() } imagep->createGLTexture(0, image_raw); //cache the raw image - imagep->setCachedRawImage(0, image_raw) ; + imagep->setCachedRawImage(0, image_raw); image_raw = NULL; #else LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI); #endif LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); - LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER) ; + LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER); LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ; + LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); image_raw = new LLImageRaw(32,32,3); data = image_raw->getData(); @@ -398,14 +398,14 @@ void LLViewerTextureManager::init() LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE); - LLViewerTexture::initClass() ; + LLViewerTexture::initClass(); // Create a texture manager bridge. gTextureManagerBridgep = new LLViewerTextureManagerBridge; if (LLMetricPerformanceTesterBasic::isMetricLogRequested(sTesterName) && !LLMetricPerformanceTesterBasic::getTester(sTesterName)) { - sTesterp = new LLTexturePipelineTester() ; + sTesterp = new LLTexturePipelineTester(); if (!sTesterp->isValid()) { delete sTesterp; @@ -419,7 +419,7 @@ void LLViewerTextureManager::cleanup() stop_glerror(); delete gTextureManagerBridgep; - LLImageGL::sDefaultGLTexture = NULL ; + LLImageGL::sDefaultGLTexture = NULL; LLViewerTexture::sNullImagep = NULL; LLViewerTexture::sBlackImagep = NULL; LLViewerTexture::sCheckerBoardImagep = NULL; @@ -429,7 +429,7 @@ void LLViewerTextureManager::cleanup() LLViewerFetchedTexture::sWhiteImagep = NULL; LLViewerFetchedTexture::sFlatNormalImagep = NULL; - LLViewerMediaTexture::cleanUpClass() ; + LLViewerMediaTexture::cleanUpClass(); } //---------------------------------------------------------------------------------------------- @@ -439,7 +439,7 @@ void LLViewerTextureManager::cleanup() // static void LLViewerTexture::initClass() { - LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ; + LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture(); if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled")) { @@ -460,37 +460,37 @@ static LLFastTimer::DeclareTimer FTM_TEXTURE_MEMORY_CHECK("Memory Check"); //static bool LLViewerTexture::isMemoryForTextureLow() { - const F32 WAIT_TIME = 1.0f ; //second - static LLFrameTimer timer ; + const F32 WAIT_TIME = 1.0f; //second + static LLFrameTimer timer; if(timer.getElapsedTimeF32() < WAIT_TIME) //call this once per second. { return false; } - timer.reset() ; + timer.reset(); LLFastTimer t(FTM_TEXTURE_MEMORY_CHECK); - const S32 MIN_FREE_TEXTURE_MEMORY = 5 ; //MB - const S32 MIN_FREE_MAIN_MEMORy = 100 ; //MB + const S32Megabytes MIN_FREE_TEXTURE_MEMORY(5); //MB + const S32Megabytes MIN_FREE_MAIN_MEMORY(100); //MB - bool low_mem = false ; + bool low_mem = false; if (gGLManager.mHasATIMemInfo) { S32 meminfo[4]; glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo); - if(meminfo[0] / 1024 < MIN_FREE_TEXTURE_MEMORY) + if((S32Megabytes)meminfo[0] < MIN_FREE_TEXTURE_MEMORY) { - low_mem = true ; + low_mem = true; } if(!low_mem) //check main memory, only works for windows. { - LLMemory::updateMemoryInfo() ; - if(LLMemory::getAvailableMemKB() / 1024 < MIN_FREE_MAIN_MEMORy) + LLMemory::updateMemoryInfo(); + if(LLMemory::getAvailableMemKB() < MIN_FREE_TEXTURE_MEMORY) { - low_mem = true ; + low_mem = true; } } } @@ -502,12 +502,12 @@ bool LLViewerTexture::isMemoryForTextureLow() if(free_memory / 1024 < MIN_FREE_TEXTURE_MEMORY) { - low_mem = true ; + low_mem = true; } } #endif - return low_mem ; + return low_mem; } static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_MEDIA("Media"); @@ -516,31 +516,31 @@ static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_TEST("Test"); //static void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity) { - sCurrentTime = gFrameTimeSeconds ; + sCurrentTime = gFrameTimeSeconds; LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { LLFastTimer t(FTM_TEXTURE_UPDATE_TEST); - tester->update() ; + tester->update(); } { LLFastTimer t(FTM_TEXTURE_UPDATE_MEDIA); - LLViewerMediaTexture::updateClass() ; + LLViewerMediaTexture::updateClass(); } sBoundTextureMemory = LLImageGL::sBoundTextureMemory; sTotalTextureMemory = LLImageGL::sGlobalTextureMemory; sMaxBoundTextureMem = gTextureList.getMaxResidentTexMem(); sMaxTotalTextureMem = gTextureList.getMaxTotalTextureMem(); - sMaxDesiredTextureMem = sMaxTotalTextureMem ; //in Bytes, by default and when total used texture memory is small. + sMaxDesiredTextureMem = sMaxTotalTextureMem; //in Bytes, by default and when total used texture memory is small. if (sBoundTextureMemory >= sMaxBoundTextureMem || sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, S32Bytes(gMaxVideoRam)); + sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level @@ -569,13 +569,13 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity } sDesiredDiscardBias = llclamp(sDesiredDiscardBias, desired_discard_bias_min, desired_discard_bias_max); - F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ; + F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed(); F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed(); sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1); sCameraMovingDiscardBias = (S8)(sCameraMovingBias); LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) && - (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale) ; + (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale); } //end of static functions @@ -631,31 +631,31 @@ void LLViewerTexture::init(bool firstinit) mSelectedTime = 0.f; mMaxVirtualSize = 0.f; mMaxVirtualSizeResetInterval = 1; - mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval ; - mAdditionalDecodePriority = 0.f ; - mParcelMedia = NULL ; + mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval; + mAdditionalDecodePriority = 0.f; + mParcelMedia = NULL; mNumVolumes = 0; - mFaceList[LLRender::DIFFUSE_MAP].clear() ; - mFaceList[LLRender::NORMAL_MAP].clear() ; - mFaceList[LLRender::SPECULAR_MAP].clear() ; + mFaceList[LLRender::DIFFUSE_MAP].clear(); + mFaceList[LLRender::NORMAL_MAP].clear(); + mFaceList[LLRender::SPECULAR_MAP].clear(); mNumFaces[LLRender::DIFFUSE_MAP] = mNumFaces[LLRender::NORMAL_MAP] = - mNumFaces[LLRender::SPECULAR_MAP] = 0 ; + mNumFaces[LLRender::SPECULAR_MAP] = 0; mVolumeList.clear(); } //virtual S8 LLViewerTexture::getType() const { - return LLViewerTexture::LOCAL_TEXTURE ; + return LLViewerTexture::LOCAL_TEXTURE; } void LLViewerTexture::cleanup() { - mFaceList[LLRender::DIFFUSE_MAP].clear() ; - mFaceList[LLRender::NORMAL_MAP].clear() ; - mFaceList[LLRender::SPECULAR_MAP].clear() ; + mFaceList[LLRender::DIFFUSE_MAP].clear(); + mFaceList[LLRender::NORMAL_MAP].clear(); + mFaceList[LLRender::SPECULAR_MAP].clear(); mVolumeList.clear(); } @@ -673,11 +673,11 @@ void LLViewerTexture::setBoostLevel(S32 level) { if(mBoostLevel != level) { - mBoostLevel = level ; + mBoostLevel = level; if(mBoostLevel != LLViewerTexture::BOOST_NONE && mBoostLevel != LLViewerTexture::BOOST_SELECTED) { - setNoDelete() ; + setNoDelete(); } } @@ -732,12 +732,12 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) stop_glerror(); //check if there is cached raw image and switch to it if possible - switchToCachedImage() ; + switchToCachedImage(); LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - tester->updateGrayTextureBinding() ; + tester->updateGrayTextureBinding(); } return res; } @@ -757,17 +757,17 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co { if(needs_gltexture) { - mNeedsGLTexture = TRUE ; + mNeedsGLTexture = TRUE; } virtual_size *= sTexelPixelRatio; if(!mMaxVirtualSizeResetCounter) { //flag to reset the values because the old values are used. - resetMaxVirtualSizeResetCounter() ; + resetMaxVirtualSizeResetCounter(); mMaxVirtualSize = virtual_size; - mAdditionalDecodePriority = 0.f ; - mNeedsGLTexture = needs_gltexture ; + mAdditionalDecodePriority = 0.f; + mNeedsGLTexture = needs_gltexture; } else if (virtual_size > mMaxVirtualSize) { @@ -777,15 +777,15 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co void LLViewerTexture::resetTextureStats() { - mMaxVirtualSize = 0.0f ; - mAdditionalDecodePriority = 0.f ; - mMaxVirtualSizeResetCounter = 0 ; + mMaxVirtualSize = 0.0f; + mAdditionalDecodePriority = 0.f; + mMaxVirtualSizeResetCounter = 0; } //virtual F32 LLViewerTexture::getMaxVirtualSize() { - return mMaxVirtualSize ; + return mMaxVirtualSize; } //virtual @@ -801,12 +801,12 @@ void LLViewerTexture::addFace(U32 ch, LLFace* facep) if(mNumFaces[ch] >= mFaceList[ch].size()) { - mFaceList[ch].resize(2 * mNumFaces[ch] + 1) ; + mFaceList[ch].resize(2 * mNumFaces[ch] + 1); } - mFaceList[ch][mNumFaces[ch]] = facep ; - facep->setIndexInTex(ch, mNumFaces[ch]) ; - mNumFaces[ch]++ ; - mLastFaceListUpdateTimer.reset() ; + mFaceList[ch][mNumFaces[ch]] = facep; + facep->setIndexInTex(ch, mNumFaces[ch]); + mNumFaces[ch]++; + mLastFaceListUpdateTimer.reset(); } //virtual @@ -816,18 +816,18 @@ void LLViewerTexture::removeFace(U32 ch, LLFace* facep) if(mNumFaces[ch] > 1) { - S32 index = facep->getIndexInTex(ch) ; + S32 index = facep->getIndexInTex(ch); llassert(index < mFaceList[ch].size()); llassert(index < mNumFaces[ch]); - mFaceList[ch][index] = mFaceList[ch][--mNumFaces[ch]] ; - mFaceList[ch][index]->setIndexInTex(ch, index) ; + mFaceList[ch][index] = mFaceList[ch][--mNumFaces[ch]]; + mFaceList[ch][index]->setIndexInTex(ch, index); } else { - mFaceList[ch].clear() ; - mNumFaces[ch] = 0 ; + mFaceList[ch].clear(); + mNumFaces[ch] = 0; } - mLastFaceListUpdateTimer.reset() ; + mLastFaceListUpdateTimer.reset(); } S32 LLViewerTexture::getTotalNumFaces() const @@ -854,12 +854,12 @@ void LLViewerTexture::addVolume(LLVOVolume* volumep) { if( mNumVolumes >= mVolumeList.size()) { - mVolumeList.resize(2 * mNumVolumes + 1) ; + mVolumeList.resize(2 * mNumVolumes + 1); } - mVolumeList[mNumVolumes] = volumep ; - volumep->setIndexInTex(mNumVolumes) ; - mNumVolumes++ ; - mLastVolumeListUpdateTimer.reset() ; + mVolumeList[mNumVolumes] = volumep; + volumep->setIndexInTex(mNumVolumes); + mNumVolumes++; + mLastVolumeListUpdateTimer.reset(); } //virtual @@ -867,64 +867,64 @@ void LLViewerTexture::removeVolume(LLVOVolume* volumep) { if(mNumVolumes > 1) { - S32 index = volumep->getIndexInTex() ; + S32 index = volumep->getIndexInTex(); llassert(index < mVolumeList.size()); llassert(index < mNumVolumes); - mVolumeList[index] = mVolumeList[--mNumVolumes] ; - mVolumeList[index]->setIndexInTex(index) ; + mVolumeList[index] = mVolumeList[--mNumVolumes]; + mVolumeList[index]->setIndexInTex(index); } else { - mVolumeList.clear() ; - mNumVolumes = 0 ; + mVolumeList.clear(); + mNumVolumes = 0; } - mLastVolumeListUpdateTimer.reset() ; + mLastVolumeListUpdateTimer.reset(); } S32 LLViewerTexture::getNumVolumes() const { - return mNumVolumes ; + return mNumVolumes; } void LLViewerTexture::reorganizeFaceList() { static const F32 MAX_WAIT_TIME = 20.f; // seconds - static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ; + static const U32 MAX_EXTRA_BUFFER_SIZE = 4; if(mLastFaceListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME) { - return ; + return; } for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i) { if(mNumFaces[i] + MAX_EXTRA_BUFFER_SIZE > mFaceList[i].size()) { - return ; + return; } mFaceList[i].erase(mFaceList[i].begin() + mNumFaces[i], mFaceList[i].end()); } - mLastFaceListUpdateTimer.reset() ; + mLastFaceListUpdateTimer.reset(); } void LLViewerTexture::reorganizeVolumeList() { static const F32 MAX_WAIT_TIME = 20.f; // seconds - static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ; + static const U32 MAX_EXTRA_BUFFER_SIZE = 4; if(mNumVolumes + MAX_EXTRA_BUFFER_SIZE > mVolumeList.size()) { - return ; + return; } if(mLastVolumeListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME) { - return ; + return; } - mLastVolumeListUpdateTimer.reset() ; + mLastVolumeListUpdateTimer.reset(); mVolumeList.erase(mVolumeList.begin() + mNumVolumes, mVolumeList.end()); } @@ -942,7 +942,7 @@ void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) BOOL LLViewerTexture::isLargeImage() { - return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize ; + return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize; } //virtual @@ -951,7 +951,7 @@ void LLViewerTexture::updateBindStatsForTester() LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - tester->updateTextureBindingStats(this) ; + tester->updateTextureBindingStats(this); } } @@ -967,19 +967,19 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, : LLViewerTexture(id, usemipmaps), mTargetHost(host) { - init(TRUE) ; + init(TRUE); mFTType = f_type; if (mFTType == FTT_HOST_BAKE) { mCanUseHTTP = false; } - generateGLTexture() ; + generateGLTexture(); } LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps) : LLViewerTexture(raw, usemipmaps) { - init(TRUE) ; + init(TRUE); mFTType = f_type; } @@ -987,9 +987,9 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_ : LLViewerTexture(id, usemipmaps), mUrl(url) { - init(TRUE) ; + init(TRUE); mFTType = f_type; - generateGLTexture() ; + generateGLTexture(); } void LLViewerFetchedTexture::init(bool firstinit) @@ -1000,7 +1000,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mRequestedDiscardLevel = -1; mRequestedDownloadPriority = 0.f; mFullyLoaded = FALSE; - mCanUseHTTP = true ; + mCanUseHTTP = true; mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; @@ -1008,7 +1008,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mKnownDrawWidth = 0; mKnownDrawHeight = 0; - mKnownDrawSizeChanged = FALSE ; + mKnownDrawSizeChanged = FALSE; if (firstinit) { @@ -1021,7 +1021,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mIsMissingAsset = FALSE; mLoadedCallbackDesiredDiscardLevel = S8_MAX; - mPauseLoadedCallBacks = FALSE ; + mPauseLoadedCallBacks = FALSE; mNeedsCreateTexture = FALSE; @@ -1036,21 +1036,21 @@ void LLViewerFetchedTexture::init(bool firstinit) mDownloadProgress = 0.f; mFetchDeltaTime = 999999.f; mRequestDeltaTime = 0.f; - mForSculpt = FALSE ; - mIsFetched = FALSE ; + mForSculpt = FALSE; + mIsFetched = FALSE; mInFastCacheList = FALSE; - mCachedRawImage = NULL ; - mCachedRawDiscardLevel = -1 ; - mCachedRawImageReady = FALSE ; - - mSavedRawImage = NULL ; - mForceToSaveRawImage = FALSE ; - mSaveRawImage = FALSE ; - mSavedRawDiscardLevel = -1 ; - mDesiredSavedRawDiscardLevel = -1 ; - mLastReferencedSavedRawImageTime = 0.0f ; - mKeptSavedRawImageTime = 0.f ; + mCachedRawImage = NULL; + mCachedRawDiscardLevel = -1; + mCachedRawImageReady = FALSE; + + mSavedRawImage = NULL; + mForceToSaveRawImage = FALSE; + mSaveRawImage = FALSE; + mSavedRawDiscardLevel = -1; + mDesiredSavedRawDiscardLevel = -1; + mLastReferencedSavedRawImageTime = 0.0f; + mKeptSavedRawImageTime = 0.f; mLastCallBackActiveTime = 0.f; mInDebug = FALSE; @@ -1073,7 +1073,7 @@ LLViewerFetchedTexture::~LLViewerFetchedTexture() //virtual S8 LLViewerFetchedTexture::getType() const { - return LLViewerTexture::FETCHED_TEXTURE ; + return LLViewerTexture::FETCHED_TEXTURE; } FTType LLViewerFetchedTexture::getFTType() const @@ -1090,7 +1090,7 @@ void LLViewerFetchedTexture::cleanup() // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. entryp->mCallback( FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData ); - entryp->removeTexture(this) ; + entryp->removeTexture(this); delete entryp; } mLoadedCallbackList.clear(); @@ -1098,10 +1098,10 @@ void LLViewerFetchedTexture::cleanup() // Clean up image data destroyRawImage(); - mCachedRawImage = NULL ; - mCachedRawDiscardLevel = -1 ; - mCachedRawImageReady = FALSE ; - mSavedRawImage = NULL ; + mCachedRawImage = NULL; + mCachedRawDiscardLevel = -1; + mCachedRawImageReady = FALSE; + mSavedRawImage = NULL; mSavedRawDiscardLevel = -1; } @@ -1114,7 +1114,7 @@ void LLViewerFetchedTexture::loadFromFastCache() } mInFastCacheList = FALSE; - mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel) ; + mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel); if(mRawImage.notNull()) { mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; @@ -1127,56 +1127,56 @@ void LLViewerFetchedTexture::loadFromFastCache() destroyRawImage(); LL_WARNS() << "oversized, setting as missing" << LL_ENDL; setIsMissingAsset(); - mRawDiscardLevel = INVALID_DISCARD_LEVEL ; + mRawDiscardLevel = INVALID_DISCARD_LEVEL; } else { mRequestedDiscardLevel = mDesiredDiscardLevel + 1; mIsRawImageValid = TRUE; - addToCreateTexture() ; + addToCreateTexture(); } } } void LLViewerFetchedTexture::setForSculpt() { - static const S32 MAX_INTERVAL = 8 ; //frames + static const S32 MAX_INTERVAL = 8; //frames - mForSculpt = TRUE ; + mForSculpt = TRUE; if(isForSculptOnly() && hasGLTexture() && !getBoundRecently()) { - destroyGLTexture() ; //sculpt image does not need gl texture. + destroyGLTexture(); //sculpt image does not need gl texture. mTextureState = ACTIVE; } - checkCachedRawSculptImage() ; - setMaxVirtualSizeResetInterval(MAX_INTERVAL) ; + checkCachedRawSculptImage(); + setMaxVirtualSizeResetInterval(MAX_INTERVAL); } BOOL LLViewerFetchedTexture::isForSculptOnly() const { - return mForSculpt && !mNeedsGLTexture ; + return mForSculpt && !mNeedsGLTexture; } BOOL LLViewerFetchedTexture::isDeleted() { - return mTextureState == DELETED ; + return mTextureState == DELETED; } BOOL LLViewerFetchedTexture::isInactive() { - return mTextureState == INACTIVE ; + return mTextureState == INACTIVE; } BOOL LLViewerFetchedTexture::isDeletionCandidate() { - return mTextureState == DELETION_CANDIDATE ; + return mTextureState == DELETION_CANDIDATE; } void LLViewerFetchedTexture::setDeletionCandidate() { if(mGLTexturep.notNull() && mGLTexturep->getTexName() && (mTextureState == INACTIVE)) { - mTextureState = DELETION_CANDIDATE ; + mTextureState = DELETION_CANDIDATE; } } @@ -1185,7 +1185,7 @@ void LLViewerFetchedTexture::setInactive() { if(mTextureState == ACTIVE && mGLTexturep.notNull() && mGLTexturep->getTexName() && !mGLTexturep->getBoundRecently()) { - mTextureState = INACTIVE ; + mTextureState = INACTIVE; } } @@ -1229,57 +1229,57 @@ void LLViewerFetchedTexture::destroyTexture() { //if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes)//not ready to release unused memory. //{ - // return ; + // return; //} if (mNeedsCreateTexture)//return if in the process of generating a new texture. { - return ; + return; } //LL_DEBUGS("Avatar") << mID << LL_ENDL; - destroyGLTexture() ; - mFullyLoaded = FALSE ; + destroyGLTexture(); + mFullyLoaded = FALSE; } void LLViewerFetchedTexture::addToCreateTexture() { - bool force_update = false ; + bool force_update = false; if (getComponents() != mRawImage->getComponents()) { // We've changed the number of components, so we need to move any // objects using this pool to a different pool. mComponents = mRawImage->getComponents(); - mGLTexturep->setComponents(mComponents) ; - force_update = true ; + mGLTexturep->setComponents(mComponents); + force_update = true; for (U32 j = 0; j < LLRender::NUM_TEXTURE_CHANNELS; ++j) { llassert(mNumFaces[j] <= mFaceList[j].size()); - for(U32 i = 0 ; i < mNumFaces[j]; i++) + for(U32 i = 0; i < mNumFaces[j]; i++) { - mFaceList[j][i]->dirtyTexture() ; + mFaceList[j][i]->dirtyTexture(); } } //discard the cached raw image and the saved raw image - mCachedRawImageReady = FALSE ; - mCachedRawDiscardLevel = -1 ; - mCachedRawImage = NULL ; - mSavedRawDiscardLevel = -1 ; - mSavedRawImage = NULL ; + mCachedRawImageReady = FALSE; + mCachedRawDiscardLevel = -1; + mCachedRawImage = NULL; + mSavedRawDiscardLevel = -1; + mSavedRawImage = NULL; } if(isForSculptOnly()) { //just update some variables, not to create a real GL texture. - createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE) ; - mNeedsCreateTexture = FALSE ; + createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE); + mNeedsCreateTexture = FALSE; destroyRawImage(); } else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) { - mNeedsCreateTexture = FALSE ; + mNeedsCreateTexture = FALSE; destroyRawImage(); } else @@ -1299,11 +1299,11 @@ void LLViewerFetchedTexture::addToCreateTexture() //scale it down to size >= LLViewerTexture::sMinLargeImageSize if(w * h > LLViewerTexture::sMinLargeImageSize) { - S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel ; + S32 d_level = llmin(mRequestedDiscardLevel, (S32)mDesiredDiscardLevel) - mRawDiscardLevel; if(d_level > 0) { - S32 i = 0 ; + S32 i = 0; while((d_level > 0) && ((w >> i) * (h >> i) > LLViewerTexture::sMinLargeImageSize)) { i++; @@ -1311,14 +1311,14 @@ void LLViewerFetchedTexture::addToCreateTexture() } if(i > 0) { - mRawDiscardLevel += i ; + mRawDiscardLevel += i; if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) { - mNeedsCreateTexture = FALSE ; + mNeedsCreateTexture = FALSE; destroyRawImage(); - return ; + return; } - mRawImage->scale(w >> i, h >> i) ; + mRawImage->scale(w >> i, h >> i); } } } @@ -1327,7 +1327,7 @@ void LLViewerFetchedTexture::addToCreateTexture() mNeedsCreateTexture = TRUE; gTextureList.mCreateTextureList.insert(this); } - return ; + return; } // ONLY called from LLViewerTextureList @@ -1405,7 +1405,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); - setActive() ; + setActive(); if (!needsToSaveRawImage()) { @@ -1421,11 +1421,11 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) { if(mKnownDrawWidth < width || mKnownDrawHeight < height) { - mKnownDrawWidth = llmax(mKnownDrawWidth, width) ; - mKnownDrawHeight = llmax(mKnownDrawHeight, height) ; + mKnownDrawWidth = llmax(mKnownDrawWidth, width); + mKnownDrawHeight = llmax(mKnownDrawHeight, height); - mKnownDrawSizeChanged = TRUE ; - mFullyLoaded = FALSE ; + mKnownDrawSizeChanged = TRUE; + mFullyLoaded = FALSE; } addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight)); } @@ -1437,13 +1437,13 @@ void LLViewerFetchedTexture::processTextureStats() { if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more { - mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; - mFullyLoaded = FALSE ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel); + mFullyLoaded = FALSE; } } else { - updateVirtualSize() ; + updateVirtualSize(); static LLCachedControl textures_fullres(gSavedSettings,"TextureLoadFullRes"); @@ -1453,7 +1453,7 @@ void LLViewerFetchedTexture::processTextureStats() } else if(!mFullWidth || !mFullHeight) { - mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel) ; + mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel); } else { @@ -1471,36 +1471,36 @@ void LLViewerFetchedTexture::processTextureStats() else if(mKnownDrawSizeChanged)//known draw size is set { mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2, - log((F32)mFullHeight / mKnownDrawHeight) / log_2) ; - mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ; - mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; + log((F32)mFullHeight / mKnownDrawHeight) / log_2); + mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()); + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel); } - mKnownDrawSizeChanged = FALSE ; + mKnownDrawSizeChanged = FALSE; if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel)) { - mFullyLoaded = TRUE ; + mFullyLoaded = TRUE; } } } if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0) //force to refetch the texture. { - mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel); if(getDiscardLevel() < 0 || getDiscardLevel() > mDesiredDiscardLevel) { - mFullyLoaded = FALSE ; + mFullyLoaded = FALSE; } } } -const F32 MAX_PRIORITY_PIXEL = 999.f ; //pixel area -const F32 PRIORITY_BOOST_LEVEL_FACTOR = 1000.f ; //boost level -const F32 PRIORITY_DELTA_DISCARD_LEVEL_FACTOR = 100000.f ; //delta discard -const S32 MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY = 4 ; -const F32 PRIORITY_ADDITIONAL_FACTOR = 1000000.f ; //additional -const S32 MAX_ADDITIONAL_LEVEL_FOR_PRIORITY = 8 ; -const F32 PRIORITY_BOOST_HIGH_FACTOR = 10000000.f ;//boost high +const F32 MAX_PRIORITY_PIXEL = 999.f; //pixel area +const F32 PRIORITY_BOOST_LEVEL_FACTOR = 1000.f; //boost level +const F32 PRIORITY_DELTA_DISCARD_LEVEL_FACTOR = 100000.f; //delta discard +const S32 MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY = 4; +const F32 PRIORITY_ADDITIONAL_FACTOR = 1000000.f; //additional +const S32 MAX_ADDITIONAL_LEVEL_FOR_PRIORITY = 8; +const F32 PRIORITY_BOOST_HIGH_FACTOR = 10000000.f;//boost high F32 LLViewerFetchedTexture::calcDecodePriority() { #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -1516,7 +1516,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture { - return -1.0f ; //alreay fetched + return -1.0f; //alreay fetched } S32 cur_discard = getCurrentDiscardLevelForFetching(); @@ -1531,7 +1531,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1) { - priority = -2.0f ; + priority = -2.0f; } else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel) { @@ -1568,7 +1568,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 ddiscard = MAX_DISCARD_LEVEL - (S32)desired; ddiscard = llclamp(ddiscard, 0, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; - setAdditionalDecodePriority(0.1f) ;//boost the textures without any data so far. + setAdditionalDecodePriority(0.1f);//boost the textures without any data so far. } else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel)) { @@ -1603,13 +1603,13 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // [10,000,000] + [1,000,000-9,000,000] + [100,000-500,000] + [1-20,000] + [0-999] if (priority > 0.0f) { - bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize) ; + bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize); if(large_enough) { //Note: //to give small, low-priority textures some chance to be fetched, //cut the priority in half if the texture size is larger than 256 * 256 and has a 64*64 ready. - priority *= 0.5f ; + priority *= 0.5f; } pixel_priority = llclamp(pixel_priority, 0.0f, MAX_PRIORITY_PIXEL); @@ -1628,7 +1628,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() //Note: //to give small, low-priority textures some chance to be fetched, //if high priority texture has a 64*64 ready, lower its fetching priority. - setAdditionalDecodePriority(0.5f) ; + setAdditionalDecodePriority(0.5f); } else { @@ -1645,7 +1645,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() //Note: //to give small, low-priority textures some chance to be fetched, //cut the additional priority to a quarter if the texture size is larger than 256 * 256 and has a 64*64 ready. - additional *= 0.25f ; + additional *= 0.25f; } priority += additional; } @@ -1660,9 +1660,9 @@ F32 LLViewerFetchedTexture::maxDecodePriority() PRIORITY_ADDITIONAL_FACTOR * (MAX_ADDITIONAL_LEVEL_FOR_PRIORITY + 1) + //additional (view dependent factors) PRIORITY_DELTA_DISCARD_LEVEL_FACTOR * (MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY + 1) + //delta discard PRIORITY_BOOST_LEVEL_FACTOR * (BOOST_MAX_LEVEL - 1) + //boost level - MAX_PRIORITY_PIXEL + 1.0f ; //pixel area. + MAX_PRIORITY_PIXEL + 1.0f; //pixel area. - return max_priority ; + return max_priority; } //============================================================================ @@ -1673,7 +1673,7 @@ void LLViewerFetchedTexture::setDecodePriority(F32 priority) if(mDecodePriority < F_ALMOST_ZERO) { - mStopFetchingTimer.reset() ; + mStopFetchingTimer.reset(); } } @@ -1690,16 +1690,16 @@ void LLViewerFetchedTexture::updateVirtualSize() { if(!mMaxVirtualSizeResetCounter) { - addTextureStats(0.f, FALSE) ;//reset + addTextureStats(0.f, FALSE);//reset } for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) { llassert(mNumFaces[ch] <= mFaceList[ch].size()); - for(U32 i = 0 ; i < mNumFaces[ch]; i++) + for(U32 i = 0; i < mNumFaces[ch]; i++) { - LLFace* facep = mFaceList[ch][i] ; + LLFace* facep = mFaceList[ch][i]; if( facep ) { LLDrawable* drawable = facep->getDrawable(); @@ -1712,8 +1712,8 @@ void LLViewerFetchedTexture::updateVirtualSize() { setBoostLevel(LLViewerTexture::BOOST_SELECTED); } - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + addTextureStats(facep->getVirtualSize()); + setAdditionalDecodePriority(facep->getImportanceToCamera()); } } } @@ -1732,26 +1732,26 @@ void LLViewerFetchedTexture::updateVirtualSize() { mMaxVirtualSizeResetCounter--; } - reorganizeFaceList() ; + reorganizeFaceList(); reorganizeVolumeList(); } S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching() { - S32 current_discard = getDiscardLevel() ; + S32 current_discard = getDiscardLevel(); if(mForceToSaveRawImage) { if(mSavedRawDiscardLevel < 0 || current_discard < 0) { - current_discard = -1 ; + current_discard = -1; } else { - current_discard = llmax(current_discard, mSavedRawDiscardLevel) ; + current_discard = llmax(current_discard, mSavedRawDiscardLevel); } } - return current_discard ; + return current_discard; } bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level) @@ -1782,7 +1782,7 @@ bool LLViewerFetchedTexture::updateFetch() static LLCachedControl sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost"); if(textures_decode_disabled) { - return false ; + return false; } mFetchState = 0; @@ -1817,7 +1817,7 @@ bool LLViewerFetchedTexture::updateFetch() return false; } - S32 current_discard = getCurrentDiscardLevelForFetching() ; + S32 current_discard = getCurrentDiscardLevelForFetching(); S32 desired_discard = getDesiredDiscardLevel(); F32 decode_priority = getDecodePriority(); decode_priority = llclamp(decode_priority, 0.0f, maxDecodePriority()); @@ -1835,7 +1835,7 @@ bool LLViewerFetchedTexture::updateFetch() if (finished) { mIsFetching = FALSE; - mLastPacketTimer.reset() ; + mLastPacketTimer.reset(); } else { @@ -1849,8 +1849,8 @@ bool LLViewerFetchedTexture::updateFetch() LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - mIsFetched = TRUE ; - tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)) ; + mIsFetched = TRUE; + tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)); } mRawDiscardLevel = fetch_discard; if ((mRawImage->getDataSize() > 0 && mRawDiscardLevel >= 0) && @@ -1866,17 +1866,17 @@ bool LLViewerFetchedTexture::updateFetch() destroyRawImage(); LL_WARNS() << "oversize, setting as missing" << LL_ENDL; setIsMissingAsset(); - mRawDiscardLevel = INVALID_DISCARD_LEVEL ; - mIsFetching = FALSE ; + mRawDiscardLevel = INVALID_DISCARD_LEVEL; + mIsFetching = FALSE; mLastPacketTimer.reset(); } else { mIsRawImageValid = TRUE; - addToCreateTexture() ; + addToCreateTexture(); } - return TRUE ; + return TRUE; } else { @@ -1924,10 +1924,10 @@ bool LLViewerFetchedTexture::updateFetch() // LL_INFOS() << "Calling updateRequestPriority() with decode_priority = 0.0f" << LL_ENDL; // calcDecodePriority(); // } - static const F32 MAX_HOLD_TIME = 5.0f ; //seconds to wait before canceling fecthing if decode_priority is 0.f. + static const F32 MAX_HOLD_TIME = 5.0f; //seconds to wait before canceling fecthing if decode_priority is 0.f. if(decode_priority > 0.0f || mStopFetchingTimer.getElapsedTimeF32() > MAX_HOLD_TIME) { - mStopFetchingTimer.reset() ; + mStopFetchingTimer.reset(); LLAppViewer::getTextureFetch()->updateRequestPriority(mID, decode_priority); } } @@ -1953,7 +1953,7 @@ bool LLViewerFetchedTexture::updateFetch() else if(mCachedRawImage.notNull() && (current_discard < 0 || current_discard > mCachedRawDiscardLevel)) { make_request = false; - switchToCachedImage() ; //use the cached raw data first + switchToCachedImage(); //use the cached raw data first } //else if (!isJustBound() && mCachedRawImageReady) //{ @@ -1965,7 +1965,7 @@ bool LLViewerFetchedTexture::updateFetch() // Load the texture progressively: we try not to rush to the desired discard too fast. // If the camera is not moving, we do not tweak the discard level notch by notch but go to the desired discard with larger boosted steps // This mitigates the "textures stay blurry" problem when loading while not killing the texture memory while moving around - S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1 ; + S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1; if (current_discard < 0) { desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); @@ -2051,7 +2051,7 @@ void LLViewerFetchedTexture::clearFetchedResults() { if(mNeedsCreateTexture || mIsFetching) { - return ; + return; } cleanup(); @@ -2068,7 +2068,7 @@ void LLViewerFetchedTexture::forceToDeleteRequest() if (mHasFetcher) { mHasFetcher = FALSE; - mIsFetching = FALSE ; + mIsFetching = FALSE; } resetTextureStats(); @@ -2116,19 +2116,19 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call } else { - mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ; + mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level); } if(mPauseLoadedCallBacks) { if(!pause) { - unpauseLoadedCallbacks(src_callback_list) ; + unpauseLoadedCallbacks(src_callback_list); } } else if(pause) { - pauseLoadedCallbacks(src_callback_list) ; + pauseLoadedCallbacks(src_callback_list); } LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, this, pause); @@ -2137,21 +2137,21 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call mNeedsAux |= needs_aux; if(keep_imageraw) { - mSaveRawImage = TRUE ; + mSaveRawImage = TRUE; } if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { // We need aux data, but we've already loaded the image, and it didn't have any LL_WARNS() << "No aux data available for callback for image:" << getID() << LL_ENDL; } - mLastCallBackActiveTime = sCurrentTime ; + mLastCallBackActiveTime = sCurrentTime; } void LLViewerFetchedTexture::clearCallbackEntryList() { if(mLoadedCallbackList.empty()) { - return ; + return; } for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -2162,29 +2162,29 @@ void LLViewerFetchedTexture::clearCallbackEntryList() // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); - iter = mLoadedCallbackList.erase(iter) ; + iter = mLoadedCallbackList.erase(iter); delete entryp; } gTextureList.mCallbackList.erase(this); - mLoadedCallbackDesiredDiscardLevel = S8_MAX ; + mLoadedCallbackDesiredDiscardLevel = S8_MAX; if(needsToSaveRawImage()) { - destroySavedRawImage() ; + destroySavedRawImage(); } - return ; + return; } void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::source_callback_list_t* callback_list) { if(mLoadedCallbackList.empty() || !callback_list) { - return ; + return; } - S32 desired_discard = S8_MAX ; - S32 desired_raw_discard = INVALID_DISCARD_LEVEL ; + S32 desired_discard = S8_MAX; + S32 desired_raw_discard = INVALID_DISCARD_LEVEL; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { @@ -2194,17 +2194,17 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); - iter = mLoadedCallbackList.erase(iter) ; + iter = mLoadedCallbackList.erase(iter); delete entryp; } else { ++iter; - desired_discard = llmin(desired_discard, entryp->mDesiredDiscard) ; + desired_discard = llmin(desired_discard, entryp->mDesiredDiscard); if(entryp->mNeedsImageRaw) { - desired_raw_discard = llmin(desired_raw_discard, entryp->mDesiredDiscard) ; + desired_raw_discard = llmin(desired_raw_discard, entryp->mDesiredDiscard); } } } @@ -2217,18 +2217,18 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so if(needsToSaveRawImage()) { - destroySavedRawImage() ; + destroySavedRawImage(); } } else if(needsToSaveRawImage() && mBoostLevel != LLGLTexture::BOOST_PREVIEW) { if(desired_raw_discard != INVALID_DISCARD_LEVEL) { - mDesiredSavedRawDiscardLevel = desired_raw_discard ; + mDesiredSavedRawDiscardLevel = desired_raw_discard; } else { - destroySavedRawImage() ; + destroySavedRawImage(); } } } @@ -2237,29 +2237,29 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry: { if(!callback_list) { - mPauseLoadedCallBacks = FALSE ; - return ; + mPauseLoadedCallBacks = FALSE; + return; } - BOOL need_raw = FALSE ; + BOOL need_raw = FALSE; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; if(entryp->mSourceCallbackList == callback_list) { - entryp->mPaused = FALSE ; + entryp->mPaused = FALSE; if(entryp->mNeedsImageRaw) { - need_raw = TRUE ; + need_raw = TRUE; } } } - mPauseLoadedCallBacks = FALSE ; - mLastCallBackActiveTime = sCurrentTime ; + mPauseLoadedCallBacks = FALSE; + mLastCallBackActiveTime = sCurrentTime; if(need_raw) { - mSaveRawImage = TRUE ; + mSaveRawImage = TRUE; } } @@ -2267,10 +2267,10 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s { if(!callback_list) { - return ; + return; } - bool paused = true ; + bool paused = true; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) @@ -2278,25 +2278,25 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s LLLoadedCallbackEntry *entryp = *iter++; if(entryp->mSourceCallbackList == callback_list) { - entryp->mPaused = TRUE ; + entryp->mPaused = TRUE; } else if(!entryp->mPaused) { - paused = false ; + paused = false; } } if(paused) { - mPauseLoadedCallBacks = TRUE ;//when set, loaded callback is paused. + mPauseLoadedCallBacks = TRUE;//when set, loaded callback is paused. resetTextureStats(); - mSaveRawImage = FALSE ; + mSaveRawImage = FALSE; } } bool LLViewerFetchedTexture::doLoadedCallbacks() { - static const F32 MAX_INACTIVE_TIME = 900.f ; //seconds + static const F32 MAX_INACTIVE_TIME = 900.f; //seconds if (mNeedsCreateTexture) { @@ -2309,8 +2309,8 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() } if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME && !mIsFetching) { - clearCallbackEntryList() ; //remove all callbacks. - return false ; + clearCallbackEntryList(); //remove all callbacks. + return false; } bool res = false; @@ -2330,7 +2330,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // Remove ourself from the global list of textures with callbacks gTextureList.mCallbackList.erase(this); - return false ; + return false; } S32 gl_discard = getDiscardLevel(); @@ -2451,7 +2451,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // to satisfy the interested party, then this is the last time that // we're going to call them. - mLastCallBackActiveTime = sCurrentTime ; + mLastCallBackActiveTime = sCurrentTime; //llassert_always(mRawImage.notNull()); if(mNeedsAux && mAuxRawImage.isNull()) { @@ -2487,7 +2487,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() LLLoadedCallbackEntry *entryp = *curiter; if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard)) { - mLastCallBackActiveTime = sCurrentTime ; + mLastCallBackActiveTime = sCurrentTime; BOOL final = gl_discard <= entryp->mDesiredDiscard ? TRUE : FALSE; entryp->mLastUsedDiscard = gl_discard; entryp->mCallback(TRUE, this, NULL, NULL, gl_discard, final, entryp->mUserData); @@ -2521,66 +2521,66 @@ void LLViewerFetchedTexture::forceImmediateUpdate() //only immediately update a deleted texture which is now being re-used. if(!isDeleted()) { - return ; + return; } //if already called forceImmediateUpdate() if(mInImageList && mDecodePriority == LLViewerFetchedTexture::maxDecodePriority()) { - return ; + return; } - gTextureList.forceImmediateUpdate(this) ; - return ; + gTextureList.forceImmediateUpdate(this); + return; } LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) { - llassert_always(mGLTexturep.notNull()) ; + llassert_always(mGLTexturep.notNull()); llassert_always(discard_level >= 0); llassert_always(mComponents > 0); if (mRawImage.notNull()) { //mRawImage is in use by somebody else, do not delete it. - return NULL ; + return NULL; } if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level) { if(mSavedRawDiscardLevel != discard_level) { - mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; - mRawImage->copy(getSavedRawImage()) ; + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()); + mRawImage->copy(getSavedRawImage()); } else { - mRawImage = getSavedRawImage() ; + mRawImage = getSavedRawImage(); } - mRawDiscardLevel = discard_level ; + mRawDiscardLevel = discard_level; } else { //force to fetch raw image again if cached raw image is not good enough. if(mCachedRawDiscardLevel > discard_level) { - mRawImage = mCachedRawImage ; + mRawImage = mCachedRawImage; mRawDiscardLevel = mCachedRawDiscardLevel; } else //cached raw image is good enough, copy it. { if(mCachedRawDiscardLevel != discard_level) { - mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; - mRawImage->copy(mCachedRawImage) ; + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()); + mRawImage->copy(mCachedRawImage); } else { - mRawImage = mCachedRawImage ; + mRawImage = mCachedRawImage; } - mRawDiscardLevel = discard_level ; + mRawDiscardLevel = discard_level; } } - mIsRawImageValid = TRUE ; + mIsRawImageValid = TRUE; sRawCount++; return mRawImage; @@ -2588,7 +2588,7 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) bool LLViewerFetchedTexture::needsToSaveRawImage() { - return mForceToSaveRawImage || mSaveRawImage ; + return mForceToSaveRawImage || mSaveRawImage; } void LLViewerFetchedTexture::destroyRawImage() @@ -2607,9 +2607,9 @@ void LLViewerFetchedTexture::destroyRawImage() { if(needsToSaveRawImage()) { - saveRawImage() ; + saveRawImage(); } - setCachedRawImage() ; + setCachedRawImage(); } mRawImage = NULL; @@ -2625,19 +2625,19 @@ void LLViewerFetchedTexture::switchToCachedImage() { if(mCachedRawImage.notNull()) { - mRawImage = mCachedRawImage ; + mRawImage = mCachedRawImage; if (getComponents() != mRawImage->getComponents()) { // We've changed the number of components, so we need to move any // objects using this pool to a different pool. mComponents = mRawImage->getComponents(); - mGLTexturep->setComponents(mComponents) ; + mGLTexturep->setComponents(mComponents); gTextureList.dirtyImage(this); } mIsRawImageValid = TRUE; - mRawDiscardLevel = mCachedRawDiscardLevel ; + mRawDiscardLevel = mCachedRawDiscardLevel; gTextureList.mCreateTextureList.insert(this); mNeedsCreateTexture = TRUE; } @@ -2649,9 +2649,9 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im { if(imageraw != mRawImage.get()) { - mCachedRawImage = imageraw ; - mCachedRawDiscardLevel = discard_level ; - mCachedRawImageReady = TRUE ; + mCachedRawImage = imageraw; + mCachedRawDiscardLevel = discard_level; + mCachedRawImageReady = TRUE; } } @@ -2659,56 +2659,56 @@ void LLViewerFetchedTexture::setCachedRawImage() { if(mRawImage == mCachedRawImage) { - return ; + return; } if(!mIsRawImageValid) { - return ; + return; } if(mCachedRawImageReady) { - return ; + return; } if(mCachedRawDiscardLevel < 0 || mCachedRawDiscardLevel > mRawDiscardLevel) { - S32 i = 0 ; - S32 w = mRawImage->getWidth() ; - S32 h = mRawImage->getHeight() ; + S32 i = 0; + S32 w = mRawImage->getWidth(); + S32 h = mRawImage->getHeight(); - S32 max_size = MAX_CACHED_RAW_IMAGE_AREA ; + S32 max_size = MAX_CACHED_RAW_IMAGE_AREA; if(LLGLTexture::BOOST_TERRAIN == mBoostLevel) { - max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA ; + max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA; } if(mForSculpt) { - max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA ; - mCachedRawImageReady = !mRawDiscardLevel ; + max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA; + mCachedRawImageReady = !mRawDiscardLevel; } else { - mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)) ; + mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)); } while(((w >> i) * (h >> i)) > max_size) { - ++i ; + ++i; } if(i) { if(!(w >> i) || !(h >> i)) { - --i ; + --i; } - mRawImage->scale(w >> i, h >> i) ; + mRawImage->scale(w >> i, h >> i); } - mCachedRawImage = mRawImage ; - mRawDiscardLevel += i ; - mCachedRawDiscardLevel = mRawDiscardLevel ; + mCachedRawImage = mRawImage; + mRawDiscardLevel += i; + mCachedRawDiscardLevel = mRawDiscardLevel; } } @@ -2718,11 +2718,11 @@ void LLViewerFetchedTexture::checkCachedRawSculptImage() { if(getDiscardLevel() != 0) { - mCachedRawImageReady = FALSE ; + mCachedRawImageReady = FALSE; } else if(isForSculptOnly()) { - resetTextureStats() ; //do not update this image any more. + resetTextureStats(); //do not update this image any more. } } } @@ -2731,45 +2731,45 @@ void LLViewerFetchedTexture::saveRawImage() { if(mRawImage.isNull() || mRawImage == mSavedRawImage || (mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= mRawDiscardLevel)) { - return ; + return; } - mSavedRawDiscardLevel = mRawDiscardLevel ; - mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents()) ; + mSavedRawDiscardLevel = mRawDiscardLevel; + mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents()); if(mForceToSaveRawImage && mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel) { - mForceToSaveRawImage = FALSE ; + mForceToSaveRawImage = FALSE; } - mLastReferencedSavedRawImageTime = sCurrentTime ; + mLastReferencedSavedRawImageTime = sCurrentTime; } void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_time) { - mKeptSavedRawImageTime = kept_time ; - mLastReferencedSavedRawImageTime = sCurrentTime ; + mKeptSavedRawImageTime = kept_time; + mLastReferencedSavedRawImageTime = sCurrentTime; if(mSavedRawDiscardLevel > -1 && mSavedRawDiscardLevel <= desired_discard) { - return ; //raw imge is ready. + return; //raw imge is ready. } if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard) { - mForceToSaveRawImage = TRUE ; - mDesiredSavedRawDiscardLevel = desired_discard ; + mForceToSaveRawImage = TRUE; + mDesiredSavedRawDiscardLevel = desired_discard; //copy from the cached raw image if exists. if(mCachedRawImage.notNull() && mRawImage.isNull() ) { - mRawImage = mCachedRawImage ; - mRawDiscardLevel = mCachedRawDiscardLevel ; + mRawImage = mCachedRawImage; + mRawDiscardLevel = mCachedRawDiscardLevel; - saveRawImage() ; + saveRawImage(); - mRawImage = NULL ; - mRawDiscardLevel = INVALID_DISCARD_LEVEL ; + mRawImage = NULL; + mRawDiscardLevel = INVALID_DISCARD_LEVEL; } } } @@ -2777,38 +2777,38 @@ void LLViewerFetchedTexture::destroySavedRawImage() { if(mLastReferencedSavedRawImageTime < mKeptSavedRawImageTime) { - return ; //keep the saved raw image. + return; //keep the saved raw image. } - mForceToSaveRawImage = FALSE ; - mSaveRawImage = FALSE ; + mForceToSaveRawImage = FALSE; + mSaveRawImage = FALSE; - clearCallbackEntryList() ; + clearCallbackEntryList(); - mSavedRawImage = NULL ; - mForceToSaveRawImage = FALSE ; - mSaveRawImage = FALSE ; - mSavedRawDiscardLevel = -1 ; - mDesiredSavedRawDiscardLevel = -1 ; - mLastReferencedSavedRawImageTime = 0.0f ; - mKeptSavedRawImageTime = 0.f ; + mSavedRawImage = NULL; + mForceToSaveRawImage = FALSE; + mSaveRawImage = FALSE; + mSavedRawDiscardLevel = -1; + mDesiredSavedRawDiscardLevel = -1; + mLastReferencedSavedRawImageTime = 0.0f; + mKeptSavedRawImageTime = 0.f; } LLImageRaw* LLViewerFetchedTexture::getSavedRawImage() { - mLastReferencedSavedRawImageTime = sCurrentTime ; + mLastReferencedSavedRawImageTime = sCurrentTime; - return mSavedRawImage ; + return mSavedRawImage; } BOOL LLViewerFetchedTexture::hasSavedRawImage() const { - return mSavedRawImage.notNull() ; + return mSavedRawImage.notNull(); } F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const { - return sCurrentTime - mLastReferencedSavedRawImageTime ; + return sCurrentTime - mLastReferencedSavedRawImageTime; } //---------------------------------------------------------------------------------------------- @@ -2821,13 +2821,13 @@ F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps) : LLViewerFetchedTexture(id, f_type, host, usemipmaps) { - init(TRUE) ; + init(TRUE); } LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps) : LLViewerFetchedTexture(url, f_type, id, usemipmaps) { - init(TRUE) ; + init(TRUE); } void LLViewerLODTexture::init(bool firstinit) @@ -2840,19 +2840,19 @@ void LLViewerLODTexture::init(bool firstinit) //virtual S8 LLViewerLODTexture::getType() const { - return LLViewerTexture::LOD_TEXTURE ; + return LLViewerTexture::LOD_TEXTURE; } BOOL LLViewerLODTexture::isUpdateFrozen() { - return LLViewerTexture::sFreezeImageScalingDown && !getDiscardLevel() ; + return LLViewerTexture::sFreezeImageScalingDown && !getDiscardLevel(); } // This is gauranteed to get called periodically for every texture //virtual void LLViewerLODTexture::processTextureStats() { - updateVirtualSize() ; + updateVirtualSize(); static LLCachedControl textures_fullres(gSavedSettings,"TextureLoadFullRes"); @@ -2874,7 +2874,7 @@ void LLViewerLODTexture::processTextureStats() } else if (!mFullWidth || !mFullHeight) { - mDesiredDiscardLevel = getMaxDiscardLevel() ; + mDesiredDiscardLevel = getMaxDiscardLevel(); } else { @@ -2900,7 +2900,7 @@ void LLViewerLODTexture::processTextureStats() if(isLargeImage() && !isJustBound() && mAdditionalDecodePriority < 0.3f) { //if is a big image and not being used recently, nor close to the view point, do not load hi-res data. - mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize) ; + mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize); } if ((mCalculatedDiscardLevel >= 0.f) && @@ -2921,7 +2921,7 @@ void LLViewerLODTexture::processTextureStats() { discard_level += sDesiredDiscardBias; discard_level *= sDesiredDiscardScale; // scale - discard_level += sCameraMovingDiscardBias ; + discard_level += sCameraMovingDiscardBias; } discard_level = floorf(discard_level); @@ -2948,19 +2948,19 @@ void LLViewerLODTexture::processTextureStats() if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage) { //needs to release texture memory urgently - scaleDown() ; + scaleDown(); } // Limit the amount of GL memory bound each frame else if ( sBoundTextureMemory > sMaxBoundTextureMem * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { - scaleDown() ; + scaleDown(); } // Only allow GL to have 2x the video card memory else if ( sTotalTextureMemory > sMaxTotalTextureMem * texmem_middle_bound_scale && (!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel)) { - scaleDown() ; + scaleDown(); } } @@ -2968,13 +2968,13 @@ void LLViewerLODTexture::processTextureStats() if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0) { - mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel); } else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions. { if(scaleDown()) { - mDesiredDiscardLevel = mCachedRawDiscardLevel ; + mDesiredDiscardLevel = mCachedRawDiscardLevel; } } } @@ -2983,17 +2983,17 @@ bool LLViewerLODTexture::scaleDown() { if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel()) { - switchToCachedImage() ; + switchToCachedImage(); LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - tester->setStablizingTime() ; + tester->setStablizingTime(); } - return true ; + return true; } - return false ; + return false; } //---------------------------------------------------------------------------------------------- //end of LLViewerLODTexture @@ -3005,14 +3005,14 @@ bool LLViewerLODTexture::scaleDown() //static void LLViewerMediaTexture::updateClass() { - static const F32 MAX_INACTIVE_TIME = 30.f ; + static const F32 MAX_INACTIVE_TIME = 30.f; #if 0 //force to play media. - gSavedSettings.setBOOL("AudioStreamingMedia", true) ; + gSavedSettings.setBOOL("AudioStreamingMedia", true); #endif - for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); ) + for(media_map_t::iterator iter = sMediaMap.begin(); iter != sMediaMap.end(); ) { LLViewerMediaTexture* mediap = iter->second; @@ -3023,29 +3023,29 @@ void LLViewerMediaTexture::updateClass() // if(mediap->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) { - media_map_t::iterator cur = iter++ ; - sMediaMap.erase(cur) ; - continue ; + media_map_t::iterator cur = iter++; + sMediaMap.erase(cur); + continue; } } - ++iter ; + ++iter; } } //static void LLViewerMediaTexture::removeMediaImplFromTexture(const LLUUID& media_id) { - LLViewerMediaTexture* media_tex = findMediaTexture(media_id) ; + LLViewerMediaTexture* media_tex = findMediaTexture(media_id); if(media_tex) { - media_tex->invalidateMediaImpl() ; + media_tex->invalidateMediaImpl(); } } //static void LLViewerMediaTexture::cleanUpClass() { - sMediaMap.clear() ; + sMediaMap.clear(); } //static @@ -3057,9 +3057,9 @@ LLViewerMediaTexture* LLViewerMediaTexture::findMediaTexture(const LLUUID& media return NULL; } - LLViewerMediaTexture* media_tex = iter->second ; - media_tex->setMediaImpl() ; - media_tex->getLastReferencedTimer()->reset() ; + LLViewerMediaTexture* media_tex = iter->second; + media_tex->setMediaImpl(); + media_tex->getLastReferencedTimer()->reset(); return media_tex; } @@ -3071,48 +3071,48 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL { sMediaMap.insert(std::make_pair(id, this)); - mGLTexturep = gl_image ; + mGLTexturep = gl_image; if(mGLTexturep.isNull()) { - generateGLTexture() ; + generateGLTexture(); } mGLTexturep->setAllowCompression(false); - mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ; + mGLTexturep->setNeedsAlphaAndPickMask(FALSE); - mIsPlaying = FALSE ; + mIsPlaying = FALSE; - setMediaImpl() ; + setMediaImpl(); - setCategory(LLGLTexture::MEDIA) ; + setCategory(LLGLTexture::MEDIA); - LLViewerTexture* tex = gTextureList.findImage(mID) ; + LLViewerTexture* tex = gTextureList.findImage(mID); if(tex) //this media is a parcel media for tex. { - tex->setParcelMedia(this) ; + tex->setParcelMedia(this); } } //virtual LLViewerMediaTexture::~LLViewerMediaTexture() { - LLViewerTexture* tex = gTextureList.findImage(mID) ; + LLViewerTexture* tex = gTextureList.findImage(mID); if(tex) //this media is a parcel media for tex. { - tex->setParcelMedia(NULL) ; + tex->setParcelMedia(NULL); } } void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */) { - llassert(mGLTexturep.notNull()) ; + llassert(mGLTexturep.notNull()); - mUseMipMaps = usemipmaps ; - getLastReferencedTimer()->reset() ; - mGLTexturep->setUseMipMaps(mUseMipMaps) ; - mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ; + mUseMipMaps = usemipmaps; + getLastReferencedTimer()->reset(); + mGLTexturep->setUseMipMaps(mUseMipMaps); + mGLTexturep->setNeedsAlphaAndPickMask(FALSE); } void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap) @@ -3121,26 +3121,26 @@ void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap) if(mGLTexturep.notNull()) { - mGLTexturep->setUseMipMaps(mipmap) ; + mGLTexturep->setUseMipMaps(mipmap); } } //virtual S8 LLViewerMediaTexture::getType() const { - return LLViewerTexture::MEDIA_TEXTURE ; + return LLViewerTexture::MEDIA_TEXTURE; } void LLViewerMediaTexture::invalidateMediaImpl() { - mMediaImplp = NULL ; + mMediaImplp = NULL; } void LLViewerMediaTexture::setMediaImpl() { if(!mMediaImplp) { - mMediaImplp = LLViewerMedia::getMediaImplFromTextureID(mID) ; + mMediaImplp = LLViewerMedia::getMediaImplFromTextureID(mID); } } @@ -3149,71 +3149,71 @@ void LLViewerMediaTexture::setMediaImpl() // because it does not check the face validity after the current frame. BOOL LLViewerMediaTexture::findFaces() { - mMediaFaceList.clear() ; + mMediaFaceList.clear(); - BOOL ret = TRUE ; + BOOL ret = TRUE; - LLViewerTexture* tex = gTextureList.findImage(mID) ; + LLViewerTexture* tex = gTextureList.findImage(mID); if(tex) //this media is a parcel media for tex. { for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) { - const ll_face_list_t* face_list = tex->getFaceList(ch) ; - U32 end = tex->getNumFaces(ch) ; - for(U32 i = 0 ; i < end ; i++) + const ll_face_list_t* face_list = tex->getFaceList(ch); + U32 end = tex->getNumFaces(ch); + for(U32 i = 0; i < end; i++) { - mMediaFaceList.push_back((*face_list)[i]) ; + mMediaFaceList.push_back((*face_list)[i]); } } } if(!mMediaImplp) { - return TRUE ; + return TRUE; } //for media on a face. - const std::list< LLVOVolume* >* obj_list = mMediaImplp->getObjectList() ; - std::list< LLVOVolume* >::const_iterator iter = obj_list->begin() ; + const std::list< LLVOVolume* >* obj_list = mMediaImplp->getObjectList(); + std::list< LLVOVolume* >::const_iterator iter = obj_list->begin(); for(; iter != obj_list->end(); ++iter) { - LLVOVolume* obj = *iter ; + LLVOVolume* obj = *iter; if(obj->mDrawable.isNull()) { - ret = FALSE ; - continue ; + ret = FALSE; + continue; } - S32 face_id = -1 ; - S32 num_faces = obj->mDrawable->getNumFaces() ; + S32 face_id = -1; + S32 num_faces = obj->mDrawable->getNumFaces(); while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1 && face_id < num_faces) { - LLFace* facep = obj->mDrawable->getFace(face_id) ; + LLFace* facep = obj->mDrawable->getFace(face_id); if(facep) { - mMediaFaceList.push_back(facep) ; + mMediaFaceList.push_back(facep); } else { - ret = FALSE ; + ret = FALSE; } } } - return ret ; + return ret; } void LLViewerMediaTexture::initVirtualSize() { if(mIsPlaying) { - return ; + return; } - findFaces() ; + findFaces(); for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter) { - addTextureStats((*iter)->getVirtualSize()) ; + addTextureStats((*iter)->getVirtualSize()); } } @@ -3221,77 +3221,77 @@ void LLViewerMediaTexture::addMediaToFace(LLFace* facep) { if(facep) { - facep->setHasMedia(true) ; + facep->setHasMedia(true); } if(!mIsPlaying) { - return ; //no need to add the face because the media is not in playing. + return; //no need to add the face because the media is not in playing. } - switchTexture(LLRender::DIFFUSE_MAP, facep) ; + switchTexture(LLRender::DIFFUSE_MAP, facep); } void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep) { if(!facep) { - return ; + return; } - facep->setHasMedia(false) ; + facep->setHasMedia(false); if(!mIsPlaying) { - return ; //no need to remove the face because the media is not in playing. + return; //no need to remove the face because the media is not in playing. } - mIsPlaying = FALSE ; //set to remove the media from the face. - switchTexture(LLRender::DIFFUSE_MAP, facep) ; - mIsPlaying = TRUE ; //set the flag back. + mIsPlaying = FALSE; //set to remove the media from the face. + switchTexture(LLRender::DIFFUSE_MAP, facep); + mIsPlaying = TRUE; //set the flag back. if(getTotalNumFaces() < 1) //no face referencing to this media { - stopPlaying() ; + stopPlaying(); } } //virtual void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) { - LLViewerTexture::addFace(ch, facep) ; + LLViewerTexture::addFace(ch, facep); - const LLTextureEntry* te = facep->getTextureEntry() ; + const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID()) ; + LLViewerTexture* tex = gTextureList.findImage(te->getID()); if(tex) { - mTextureList.push_back(tex) ;//increase the reference number by one for tex to avoid deleting it. - return ; + mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it. + return; } } //check if it is a parcel media if(facep->getTexture() && facep->getTexture() != this && facep->getTexture()->getID() == mID) { - mTextureList.push_back(facep->getTexture()) ; //a parcel media. - return ; + mTextureList.push_back(facep->getTexture()); //a parcel media. + return; } if(te && te->getID().notNull()) //should have a texture { - LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL ; + LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL; } } //virtual void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) { - LLViewerTexture::removeFace(ch, facep) ; + LLViewerTexture::removeFace(ch, facep); - const LLTextureEntry* te = facep->getTextureEntry() ; + const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID()) ; + LLViewerTexture* tex = gTextureList.findImage(te->getID()); if(tex) { for(std::list< LLPointer >::iterator iter = mTextureList.begin(); @@ -3299,8 +3299,8 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) { if(*iter == tex) { - mTextureList.erase(iter) ; //decrease the reference number for tex by one. - return ; + mTextureList.erase(iter); //decrease the reference number for tex by one. + return; } } @@ -3314,7 +3314,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) llassert(mNumFaces[ch] <= mFaceList[ch].size()); - for(U32 j = 0 ; j < mNumFaces[ch] ; j++) + for(U32 j = 0; j < mNumFaces[ch]; j++) { te_list.push_back(mFaceList[ch][j]->getTextureEntry());//all textures are in use. } @@ -3322,8 +3322,8 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) if (te_list.empty()) { - mTextureList.clear() ; - return ; + mTextureList.clear(); + return; } S32 end = te_list.size(); @@ -3333,18 +3333,18 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) { S32 i = 0; - for(i = 0 ; i < end ; i++) + for(i = 0; i < end; i++) { if(te_list[i] && te_list[i]->getID() == (*iter)->getID())//the texture is in use. { - te_list[i] = NULL ; - break ; + te_list[i] = NULL; + break; } } if(i == end) //no hit for this texture, remove it. { - mTextureList.erase(iter) ; //decrease the reference number for tex by one. - return ; + mTextureList.erase(iter); //decrease the reference number for tex by one. + return; } } } @@ -3356,14 +3356,14 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) { if((*iter)->getID() == mID) { - mTextureList.erase(iter) ; //decrease the reference number for tex by one. - return ; + mTextureList.erase(iter); //decrease the reference number for tex by one. + return; } } if(te && te->getID().notNull()) //should have a texture { - LL_ERRS() << "mTextureList texture reference number is corrupted." << LL_ENDL ; + LL_ERRS() << "mTextureList texture reference number is corrupted." << LL_ENDL; } } @@ -3372,9 +3372,9 @@ void LLViewerMediaTexture::stopPlaying() // Don't stop the media impl playing here -- this breaks non-inworld media (login screen, search, and media browser). // if(mMediaImplp) // { -// mMediaImplp->stop() ; +// mMediaImplp->stop(); // } - mIsPlaying = FALSE ; + mIsPlaying = FALSE; } void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) @@ -3387,29 +3387,29 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) { if(mID == facep->getTexture()->getID()) //this is a parcel media { - return ; //let the prim media win. + return; //let the prim media win. } } if(mIsPlaying) //old textures switch to the media texture { - facep->switchTexture(ch, this) ; + facep->switchTexture(ch, this); } else //switch to old textures. { - const LLTextureEntry* te = facep->getTextureEntry() ; + const LLTextureEntry* te = facep->getTextureEntry(); if(te) { - LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ; + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL; if(!tex && te->getID() != mID)//try parcel media. { - tex = gTextureList.findImage(mID) ; + tex = gTextureList.findImage(mID); } if(!tex) { - tex = LLViewerFetchedTexture::sDefaultImagep ; + tex = LLViewerFetchedTexture::sDefaultImagep; } - facep->switchTexture(ch, tex) ; + facep->switchTexture(ch, tex); } } } @@ -3419,36 +3419,36 @@ void LLViewerMediaTexture::setPlaying(BOOL playing) { if(!mMediaImplp) { - return ; + return; } if(!playing && !mIsPlaying) { - return ; //media is already off + return; //media is already off } if(playing == mIsPlaying && !mMediaImplp->isUpdated()) { - return ; //nothing has changed since last time. + return; //nothing has changed since last time. } - mIsPlaying = playing ; + mIsPlaying = playing; if(mIsPlaying) //is about to play this media { if(findFaces()) { //about to update all faces. - mMediaImplp->setUpdated(FALSE) ; + mMediaImplp->setUpdated(FALSE); } if(mMediaFaceList.empty())//no face pointing to this media { - stopPlaying() ; - return ; + stopPlaying(); + return; } for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter) { - switchTexture(LLRender::DIFFUSE_MAP, *iter) ; + switchTexture(LLRender::DIFFUSE_MAP, *iter); } } else //stop playing this media @@ -3456,12 +3456,12 @@ void LLViewerMediaTexture::setPlaying(BOOL playing) U32 ch = LLRender::DIFFUSE_MAP; llassert(mNumFaces[ch] <= mFaceList[ch].size()); - for(U32 i = mNumFaces[ch] ; i ; i--) + for(U32 i = mNumFaces[ch]; i; i--) { - switchTexture(ch, mFaceList[ch][i - 1]) ; //current face could be removed in this function. + switchTexture(ch, mFaceList[ch][i - 1]); //current face could be removed in this function. } } - return ; + return; } //virtual @@ -3469,13 +3469,13 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() { if(LLFrameTimer::getFrameCount() == mUpdateVirtualSizeTime) { - return mMaxVirtualSize ; + return mMaxVirtualSize; } - mUpdateVirtualSizeTime = LLFrameTimer::getFrameCount() ; + mUpdateVirtualSizeTime = LLFrameTimer::getFrameCount(); if(!mMaxVirtualSizeResetCounter) { - addTextureStats(0.f, FALSE) ;//reset + addTextureStats(0.f, FALSE);//reset } if(mIsPlaying) //media is playing @@ -3483,28 +3483,28 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) { llassert(mNumFaces[ch] <= mFaceList[ch].size()); - for(U32 i = 0 ; i < mNumFaces[ch] ; i++) + for(U32 i = 0; i < mNumFaces[ch]; i++) { - LLFace* facep = mFaceList[ch][i] ; + LLFace* facep = mFaceList[ch][i]; if(facep->getDrawable()->isRecentlyVisible()) { - addTextureStats(facep->getVirtualSize()) ; + addTextureStats(facep->getVirtualSize()); } } } } else //media is not in playing { - findFaces() ; + findFaces(); if(!mMediaFaceList.empty()) { for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter) { - LLFace* facep = *iter ; + LLFace* facep = *iter; if(facep->getDrawable()->isRecentlyVisible()) { - addTextureStats(facep->getVirtualSize()) ; + addTextureStats(facep->getVirtualSize()); } } } @@ -3514,10 +3514,10 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() { mMaxVirtualSizeResetCounter--; } - reorganizeFaceList() ; + reorganizeFaceList(); reorganizeVolumeList(); - return mMaxVirtualSize ; + return mMaxVirtualSize; } //---------------------------------------------------------------------------------------------- //end of LLViewerMediaTexture @@ -3528,27 +3528,27 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() //---------------------------------------------------------------------------------------------- LLTexturePipelineTester::LLTexturePipelineTester() : LLMetricPerformanceTesterWithSession(sTesterName) { - addMetric("TotalBytesLoaded") ; - addMetric("TotalBytesLoadedFromCache") ; - addMetric("TotalBytesLoadedForLargeImage") ; - addMetric("TotalBytesLoadedForSculpties") ; - addMetric("StartFetchingTime") ; - addMetric("TotalGrayTime") ; - addMetric("TotalStablizingTime") ; - addMetric("StartTimeLoadingSculpties") ; - addMetric("EndTimeLoadingSculpties") ; - - addMetric("Time") ; - addMetric("TotalBytesBound") ; - addMetric("TotalBytesBoundForLargeImage") ; - addMetric("PercentageBytesBound") ; + addMetric("TotalBytesLoaded"); + addMetric("TotalBytesLoadedFromCache"); + addMetric("TotalBytesLoadedForLargeImage"); + addMetric("TotalBytesLoadedForSculpties"); + addMetric("StartFetchingTime"); + addMetric("TotalGrayTime"); + addMetric("TotalStablizingTime"); + addMetric("StartTimeLoadingSculpties"); + addMetric("EndTimeLoadingSculpties"); + + addMetric("Time"); + addMetric("TotalBytesBound"); + addMetric("TotalBytesBoundForLargeImage"); + addMetric("PercentageBytesBound"); - mTotalBytesLoaded = 0 ; - mTotalBytesLoadedFromCache = 0 ; - mTotalBytesLoadedForLargeImage = 0 ; - mTotalBytesLoadedForSculpties = 0 ; + mTotalBytesLoaded = (S32Bytes)0; + mTotalBytesLoadedFromCache = (S32Bytes)0; + mTotalBytesLoadedForLargeImage = (S32Bytes)0; + mTotalBytesLoadedForSculpties = (S32Bytes)0; - reset() ; + reset(); } LLTexturePipelineTester::~LLTexturePipelineTester() @@ -3558,222 +3558,222 @@ LLTexturePipelineTester::~LLTexturePipelineTester() void LLTexturePipelineTester::update() { - mLastTotalBytesUsed = mTotalBytesUsed ; - mLastTotalBytesUsedForLargeImage = mTotalBytesUsedForLargeImage ; - mTotalBytesUsed = 0 ; - mTotalBytesUsedForLargeImage = 0 ; + mLastTotalBytesUsed = mTotalBytesUsed; + mLastTotalBytesUsedForLargeImage = mTotalBytesUsedForLargeImage; + mTotalBytesUsed = (S32Bytes)0; + mTotalBytesUsedForLargeImage = (S32Bytes)0; if(LLAppViewer::getTextureFetch()->getNumRequests() > 0) //fetching list is not empty { if(mPause) { //start a new fetching session - reset() ; - mStartFetchingTime = LLImageGL::sLastFrameTime ; - mPause = FALSE ; + reset(); + mStartFetchingTime = LLImageGL::sLastFrameTime; + mPause = FALSE; } //update total gray time if(mUsingDefaultTexture) { - mUsingDefaultTexture = FALSE ; - mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime ; + mUsingDefaultTexture = FALSE; + mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime; } //update the stablizing timer. - updateStablizingTime() ; + updateStablizingTime(); - outputTestResults() ; + outputTestResults(); } else if(!mPause) { //stop the current fetching session - mPause = TRUE ; - outputTestResults() ; - reset() ; + mPause = TRUE; + outputTestResults(); + reset(); } } void LLTexturePipelineTester::reset() { - mPause = TRUE ; + mPause = TRUE; - mUsingDefaultTexture = FALSE ; - mStartStablizingTime = 0.0f ; - mEndStablizingTime = 0.0f ; + mUsingDefaultTexture = FALSE; + mStartStablizingTime = 0.0f; + mEndStablizingTime = 0.0f; - mTotalBytesUsed = 0 ; - mTotalBytesUsedForLargeImage = 0 ; - mLastTotalBytesUsed = 0 ; - mLastTotalBytesUsedForLargeImage = 0 ; + mTotalBytesUsed = (S32Bytes)0; + mTotalBytesUsedForLargeImage = (S32Bytes)0; + mLastTotalBytesUsed = (S32Bytes)0; + mLastTotalBytesUsedForLargeImage = (S32Bytes)0; - mStartFetchingTime = 0.0f ; + mStartFetchingTime = 0.0f; - mTotalGrayTime = 0.0f ; - mTotalStablizingTime = 0.0f ; + mTotalGrayTime = 0.0f; + mTotalStablizingTime = 0.0f; - mStartTimeLoadingSculpties = 1.0f ; - mEndTimeLoadingSculpties = 0.0f ; + mStartTimeLoadingSculpties = 1.0f; + mEndTimeLoadingSculpties = 0.0f; } //virtual void LLTexturePipelineTester::outputTestRecord(LLSD *sd) { std::string currentLabel = getCurrentLabelName(); - (*sd)[currentLabel]["TotalBytesLoaded"] = (LLSD::Integer)mTotalBytesLoaded ; - (*sd)[currentLabel]["TotalBytesLoadedFromCache"] = (LLSD::Integer)mTotalBytesLoadedFromCache ; - (*sd)[currentLabel]["TotalBytesLoadedForLargeImage"] = (LLSD::Integer)mTotalBytesLoadedForLargeImage ; - (*sd)[currentLabel]["TotalBytesLoadedForSculpties"] = (LLSD::Integer)mTotalBytesLoadedForSculpties ; + (*sd)[currentLabel]["TotalBytesLoaded"] = (LLSD::Integer)mTotalBytesLoaded.value(); + (*sd)[currentLabel]["TotalBytesLoadedFromCache"] = (LLSD::Integer)mTotalBytesLoadedFromCache.value(); + (*sd)[currentLabel]["TotalBytesLoadedForLargeImage"] = (LLSD::Integer)mTotalBytesLoadedForLargeImage.value(); + (*sd)[currentLabel]["TotalBytesLoadedForSculpties"] = (LLSD::Integer)mTotalBytesLoadedForSculpties.value(); - (*sd)[currentLabel]["StartFetchingTime"] = (LLSD::Real)mStartFetchingTime ; - (*sd)[currentLabel]["TotalGrayTime"] = (LLSD::Real)mTotalGrayTime ; - (*sd)[currentLabel]["TotalStablizingTime"] = (LLSD::Real)mTotalStablizingTime ; + (*sd)[currentLabel]["StartFetchingTime"] = (LLSD::Real)mStartFetchingTime; + (*sd)[currentLabel]["TotalGrayTime"] = (LLSD::Real)mTotalGrayTime; + (*sd)[currentLabel]["TotalStablizingTime"] = (LLSD::Real)mTotalStablizingTime; - (*sd)[currentLabel]["StartTimeLoadingSculpties"] = (LLSD::Real)mStartTimeLoadingSculpties ; - (*sd)[currentLabel]["EndTimeLoadingSculpties"] = (LLSD::Real)mEndTimeLoadingSculpties ; + (*sd)[currentLabel]["StartTimeLoadingSculpties"] = (LLSD::Real)mStartTimeLoadingSculpties; + (*sd)[currentLabel]["EndTimeLoadingSculpties"] = (LLSD::Real)mEndTimeLoadingSculpties; - (*sd)[currentLabel]["Time"] = LLImageGL::sLastFrameTime ; - (*sd)[currentLabel]["TotalBytesBound"] = (LLSD::Integer)mLastTotalBytesUsed ; - (*sd)[currentLabel]["TotalBytesBoundForLargeImage"] = (LLSD::Integer)mLastTotalBytesUsedForLargeImage ; - (*sd)[currentLabel]["PercentageBytesBound"] = (LLSD::Real)(100.f * mLastTotalBytesUsed / mTotalBytesLoaded) ; + (*sd)[currentLabel]["Time"] = LLImageGL::sLastFrameTime; + (*sd)[currentLabel]["TotalBytesBound"] = (LLSD::Integer)mLastTotalBytesUsed.value(); + (*sd)[currentLabel]["TotalBytesBoundForLargeImage"] = (LLSD::Integer)mLastTotalBytesUsedForLargeImage.value(); + (*sd)[currentLabel]["PercentageBytesBound"] = (LLSD::Real)(100.f * mLastTotalBytesUsed / mTotalBytesLoaded); } void LLTexturePipelineTester::updateTextureBindingStats(const LLViewerTexture* imagep) { - U32 mem_size = (U32)imagep->getTextureMemory() ; - mTotalBytesUsed += mem_size ; + U32Bytes mem_size = imagep->getTextureMemory(); + mTotalBytesUsed += mem_size; - if(MIN_LARGE_IMAGE_AREA <= (U32)(mem_size / (U32)imagep->getComponents())) + if(MIN_LARGE_IMAGE_AREA <= (U32)(mem_size.value() / (U32)imagep->getComponents())) { - mTotalBytesUsedForLargeImage += mem_size ; + mTotalBytesUsedForLargeImage += mem_size; } } void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache) { - U32 data_size = (U32)raw_imagep->getDataSize() ; - mTotalBytesLoaded += data_size ; + U32Bytes data_size = (U32Bytes)raw_imagep->getDataSize(); + mTotalBytesLoaded += data_size; if(from_cache) { - mTotalBytesLoadedFromCache += data_size ; + mTotalBytesLoadedFromCache += data_size; } - if(MIN_LARGE_IMAGE_AREA <= (U32)(data_size / (U32)raw_imagep->getComponents())) + if(MIN_LARGE_IMAGE_AREA <= (U32)(data_size.value() / (U32)raw_imagep->getComponents())) { - mTotalBytesLoadedForLargeImage += data_size ; + mTotalBytesLoadedForLargeImage += data_size; } if(imagep->forSculpt()) { - mTotalBytesLoadedForSculpties += data_size ; + mTotalBytesLoadedForSculpties += data_size; if(mStartTimeLoadingSculpties > mEndTimeLoadingSculpties) { - mStartTimeLoadingSculpties = LLImageGL::sLastFrameTime ; + mStartTimeLoadingSculpties = LLImageGL::sLastFrameTime; } - mEndTimeLoadingSculpties = LLImageGL::sLastFrameTime ; + mEndTimeLoadingSculpties = LLImageGL::sLastFrameTime; } } void LLTexturePipelineTester::updateGrayTextureBinding() { - mUsingDefaultTexture = TRUE ; + mUsingDefaultTexture = TRUE; } void LLTexturePipelineTester::setStablizingTime() { if(mStartStablizingTime <= mStartFetchingTime) { - mStartStablizingTime = LLImageGL::sLastFrameTime ; + mStartStablizingTime = LLImageGL::sLastFrameTime; } - mEndStablizingTime = LLImageGL::sLastFrameTime ; + mEndStablizingTime = LLImageGL::sLastFrameTime; } void LLTexturePipelineTester::updateStablizingTime() { if(mStartStablizingTime > mStartFetchingTime) { - F32 t = mEndStablizingTime - mStartStablizingTime ; + F32 t = mEndStablizingTime - mStartStablizingTime; if(t > F_ALMOST_ZERO && (t - mTotalStablizingTime) < F_ALMOST_ZERO) { //already stablized - mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime ; + mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime; //cancel the timer - mStartStablizingTime = 0.f ; - mEndStablizingTime = 0.f ; + mStartStablizingTime = 0.f; + mEndStablizingTime = 0.f; } else { - mTotalStablizingTime = t ; + mTotalStablizingTime = t; } } - mTotalStablizingTime = 0.f ; + mTotalStablizingTime = 0.f; } //virtual void LLTexturePipelineTester::compareTestSessions(std::ofstream* os) { - LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast(mBaseSessionp) ; - LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast(mCurrentSessionp) ; + LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast(mBaseSessionp); + LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast(mCurrentSessionp); if(!base_sessionp || !current_sessionp) { - LL_ERRS() << "type of test session does not match!" << LL_ENDL ; + LL_ERRS() << "type of test session does not match!" << LL_ENDL; } //compare and output the comparison - *os << llformat("%s\n", getTesterName().c_str()) ; - *os << llformat("AggregateResults\n") ; + *os << llformat("%s\n", getTesterName().c_str()); + *os << llformat("AggregateResults\n"); - compareTestResults(os, "TotalFetchingTime", base_sessionp->mTotalFetchingTime, current_sessionp->mTotalFetchingTime) ; - compareTestResults(os, "TotalGrayTime", base_sessionp->mTotalGrayTime, current_sessionp->mTotalGrayTime) ; + compareTestResults(os, "TotalFetchingTime", base_sessionp->mTotalFetchingTime, current_sessionp->mTotalFetchingTime); + compareTestResults(os, "TotalGrayTime", base_sessionp->mTotalGrayTime, current_sessionp->mTotalGrayTime); compareTestResults(os, "TotalStablizingTime", base_sessionp->mTotalStablizingTime, current_sessionp->mTotalStablizingTime); - compareTestResults(os, "StartTimeLoadingSculpties", base_sessionp->mStartTimeLoadingSculpties, current_sessionp->mStartTimeLoadingSculpties) ; - compareTestResults(os, "TotalTimeLoadingSculpties", base_sessionp->mTotalTimeLoadingSculpties, current_sessionp->mTotalTimeLoadingSculpties) ; + compareTestResults(os, "StartTimeLoadingSculpties", base_sessionp->mStartTimeLoadingSculpties, current_sessionp->mStartTimeLoadingSculpties); + compareTestResults(os, "TotalTimeLoadingSculpties", base_sessionp->mTotalTimeLoadingSculpties, current_sessionp->mTotalTimeLoadingSculpties); - compareTestResults(os, "TotalBytesLoaded", base_sessionp->mTotalBytesLoaded, current_sessionp->mTotalBytesLoaded) ; - compareTestResults(os, "TotalBytesLoadedFromCache", base_sessionp->mTotalBytesLoadedFromCache, current_sessionp->mTotalBytesLoadedFromCache) ; - compareTestResults(os, "TotalBytesLoadedForLargeImage", base_sessionp->mTotalBytesLoadedForLargeImage, current_sessionp->mTotalBytesLoadedForLargeImage) ; - compareTestResults(os, "TotalBytesLoadedForSculpties", base_sessionp->mTotalBytesLoadedForSculpties, current_sessionp->mTotalBytesLoadedForSculpties) ; + compareTestResults(os, "TotalBytesLoaded", base_sessionp->mTotalBytesLoaded, current_sessionp->mTotalBytesLoaded); + compareTestResults(os, "TotalBytesLoadedFromCache", base_sessionp->mTotalBytesLoadedFromCache, current_sessionp->mTotalBytesLoadedFromCache); + compareTestResults(os, "TotalBytesLoadedForLargeImage", base_sessionp->mTotalBytesLoadedForLargeImage, current_sessionp->mTotalBytesLoadedForLargeImage); + compareTestResults(os, "TotalBytesLoadedForSculpties", base_sessionp->mTotalBytesLoadedForSculpties, current_sessionp->mTotalBytesLoadedForSculpties); - *os << llformat("InstantResults\n") ; - S32 size = llmin(base_sessionp->mInstantPerformanceListCounter, current_sessionp->mInstantPerformanceListCounter) ; - for(S32 i = 0 ; i < size ; i++) + *os << llformat("InstantResults\n"); + S32 size = llmin(base_sessionp->mInstantPerformanceListCounter, current_sessionp->mInstantPerformanceListCounter); + for(S32 i = 0; i < size; i++) { - *os << llformat("Time(B-T)-%.4f-%.4f\n", base_sessionp->mInstantPerformanceList[i].mTime, current_sessionp->mInstantPerformanceList[i].mTime) ; + *os << llformat("Time(B-T)-%.4f-%.4f\n", base_sessionp->mInstantPerformanceList[i].mTime, current_sessionp->mInstantPerformanceList[i].mTime); compareTestResults(os, "AverageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond, - current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ; + current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond); compareTestResults(os, "AverageBytesUsedForLargeImagePerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond, - current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ; + current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond); compareTestResults(os, "AveragePercentageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond, - current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ; + current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond); } if(size < base_sessionp->mInstantPerformanceListCounter) { - for(S32 i = size ; i < base_sessionp->mInstantPerformanceListCounter ; i++) + for(S32 i = size; i < base_sessionp->mInstantPerformanceListCounter; i++) { - *os << llformat("Time(B-T)-%.4f- \n", base_sessionp->mInstantPerformanceList[i].mTime) ; + *os << llformat("Time(B-T)-%.4f- \n", base_sessionp->mInstantPerformanceList[i].mTime); - *os << llformat(", AverageBytesUsedPerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ; - *os << llformat(", AverageBytesUsedForLargeImagePerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ; - *os << llformat(", AveragePercentageBytesUsedPerSecond, %.4f, N/A \n", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ; + *os << llformat(", AverageBytesUsedPerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond); + *os << llformat(", AverageBytesUsedForLargeImagePerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond); + *os << llformat(", AveragePercentageBytesUsedPerSecond, %.4f, N/A \n", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond); } } else if(size < current_sessionp->mInstantPerformanceListCounter) { - for(S32 i = size ; i < current_sessionp->mInstantPerformanceListCounter ; i++) + for(S32 i = size; i < current_sessionp->mInstantPerformanceListCounter; i++) { - *os << llformat("Time(B-T)- -%.4f\n", current_sessionp->mInstantPerformanceList[i].mTime) ; + *os << llformat("Time(B-T)- -%.4f\n", current_sessionp->mInstantPerformanceList[i].mTime); - *os << llformat(", AverageBytesUsedPerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ; - *os << llformat(", AverageBytesUsedForLargeImagePerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ; - *os << llformat(", AveragePercentageBytesUsedPerSecond, N/A, %.4f\n", current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ; + *os << llformat(", AverageBytesUsedPerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond); + *os << llformat(", AverageBytesUsedForLargeImagePerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond); + *os << llformat(", AveragePercentageBytesUsedPerSecond, N/A, %.4f\n", current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond); } } } @@ -3781,144 +3781,144 @@ void LLTexturePipelineTester::compareTestSessions(std::ofstream* os) //virtual LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::loadTestSession(LLSD* log) { - LLTexturePipelineTester::LLTextureTestSession* sessionp = new LLTexturePipelineTester::LLTextureTestSession() ; + LLTexturePipelineTester::LLTextureTestSession* sessionp = new LLTexturePipelineTester::LLTextureTestSession(); if(!sessionp) { - return NULL ; + return NULL; } - F32 total_fetching_time = 0.f ; - F32 total_gray_time = 0.f ; - F32 total_stablizing_time = 0.f ; - F32 total_loading_sculpties_time = 0.f ; - - F32 start_fetching_time = -1.f ; - F32 start_fetching_sculpties_time = 0.f ; - - F32 last_time = 0.0f ; - S32 frame_count = 0 ; - - sessionp->mInstantPerformanceListCounter = 0 ; - sessionp->mInstantPerformanceList.resize(128) ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ; + F32 total_fetching_time = 0.f; + F32 total_gray_time = 0.f; + F32 total_stablizing_time = 0.f; + F32 total_loading_sculpties_time = 0.f; + + F32 start_fetching_time = -1.f; + F32 start_fetching_sculpties_time = 0.f; + + F32 last_time = 0.0f; + S32 frame_count = 0; + + sessionp->mInstantPerformanceListCounter = 0; + sessionp->mInstantPerformanceList.resize(128); + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f; //load a session std::string currentLabel = getCurrentLabelName(); - BOOL in_log = (*log).has(currentLabel) ; + BOOL in_log = (*log).has(currentLabel); while (in_log) { - LLSD::String label = currentLabel ; + LLSD::String label = currentLabel; if(sessionp->mInstantPerformanceListCounter >= (S32)sessionp->mInstantPerformanceList.size()) { - sessionp->mInstantPerformanceList.resize(sessionp->mInstantPerformanceListCounter + 128) ; + sessionp->mInstantPerformanceList.resize(sessionp->mInstantPerformanceListCounter + 128); } //time - F32 start_time = (*log)[label]["StartFetchingTime"].asReal() ; - F32 cur_time = (*log)[label]["Time"].asReal() ; + F32 start_time = (*log)[label]["StartFetchingTime"].asReal(); + F32 cur_time = (*log)[label]["Time"].asReal(); if(start_time - start_fetching_time > F_ALMOST_ZERO) //fetching has paused for a while { - sessionp->mTotalFetchingTime += total_fetching_time ; - sessionp->mTotalGrayTime += total_gray_time ; - sessionp->mTotalStablizingTime += total_stablizing_time ; + sessionp->mTotalFetchingTime += total_fetching_time; + sessionp->mTotalGrayTime += total_gray_time; + sessionp->mTotalStablizingTime += total_stablizing_time; - sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ; - sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ; + sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time; + sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time; - start_fetching_time = start_time ; - total_fetching_time = 0.0f ; - total_gray_time = 0.f ; - total_stablizing_time = 0.f ; - total_loading_sculpties_time = 0.f ; + start_fetching_time = start_time; + total_fetching_time = 0.0f; + total_gray_time = 0.f; + total_stablizing_time = 0.f; + total_loading_sculpties_time = 0.f; } else { - total_fetching_time = cur_time - start_time ; - total_gray_time = (*log)[label]["TotalGrayTime"].asReal() ; - total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal() ; + total_fetching_time = cur_time - start_time; + total_gray_time = (*log)[label]["TotalGrayTime"].asReal(); + total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal(); - total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal() ; + total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal(); if(start_fetching_sculpties_time < 0.f && total_loading_sculpties_time > 0.f) { - start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal() ; + start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal(); } } //total loaded bytes - sessionp->mTotalBytesLoaded = (*log)[label]["TotalBytesLoaded"].asInteger() ; - sessionp->mTotalBytesLoadedFromCache = (*log)[label]["TotalBytesLoadedFromCache"].asInteger() ; - sessionp->mTotalBytesLoadedForLargeImage = (*log)[label]["TotalBytesLoadedForLargeImage"].asInteger() ; - sessionp->mTotalBytesLoadedForSculpties = (*log)[label]["TotalBytesLoadedForSculpties"].asInteger() ; + sessionp->mTotalBytesLoaded = (*log)[label]["TotalBytesLoaded"].asInteger(); + sessionp->mTotalBytesLoadedFromCache = (*log)[label]["TotalBytesLoadedFromCache"].asInteger(); + sessionp->mTotalBytesLoadedForLargeImage = (*log)[label]["TotalBytesLoadedForLargeImage"].asInteger(); + sessionp->mTotalBytesLoadedForSculpties = (*log)[label]["TotalBytesLoadedForSculpties"].asInteger(); //instant metrics sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond += - (*log)[label]["TotalBytesBound"].asInteger() ; + (*log)[label]["TotalBytesBound"].asInteger(); sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond += - (*log)[label]["TotalBytesBoundForLargeImage"].asInteger() ; + (*log)[label]["TotalBytesBoundForLargeImage"].asInteger(); sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond += - (*log)[label]["PercentageBytesBound"].asReal() ; - frame_count++ ; + (*log)[label]["PercentageBytesBound"].asReal(); + frame_count++; if(cur_time - last_time >= 1.0f) { - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond /= frame_count ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond /= frame_count ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond /= frame_count ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = last_time ; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond /= frame_count; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond /= frame_count; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond /= frame_count; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = last_time; - frame_count = 0 ; - last_time = cur_time ; - sessionp->mInstantPerformanceListCounter++ ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ; - sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ; + frame_count = 0; + last_time = cur_time; + sessionp->mInstantPerformanceListCounter++; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f; + sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f; } // Next label - incrementCurrentCount() ; + incrementCurrentCount(); currentLabel = getCurrentLabelName(); - in_log = (*log).has(currentLabel) ; + in_log = (*log).has(currentLabel); } - sessionp->mTotalFetchingTime += total_fetching_time ; - sessionp->mTotalGrayTime += total_gray_time ; - sessionp->mTotalStablizingTime += total_stablizing_time ; + sessionp->mTotalFetchingTime += total_fetching_time; + sessionp->mTotalGrayTime += total_gray_time; + sessionp->mTotalStablizingTime += total_stablizing_time; if(sessionp->mStartTimeLoadingSculpties < 0.f) { - sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ; + sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time; } - sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ; + sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time; return sessionp; } LLTexturePipelineTester::LLTextureTestSession::LLTextureTestSession() { - reset() ; + reset(); } LLTexturePipelineTester::LLTextureTestSession::~LLTextureTestSession() { } void LLTexturePipelineTester::LLTextureTestSession::reset() { - mTotalFetchingTime = 0.0f ; + mTotalFetchingTime = 0.0f; - mTotalGrayTime = 0.0f ; - mTotalStablizingTime = 0.0f ; + mTotalGrayTime = 0.0f; + mTotalStablizingTime = 0.0f; - mStartTimeLoadingSculpties = 0.0f ; - mTotalTimeLoadingSculpties = 0.0f ; + mStartTimeLoadingSculpties = 0.0f; + mTotalTimeLoadingSculpties = 0.0f; - mTotalBytesLoaded = 0 ; - mTotalBytesLoadedFromCache = 0 ; - mTotalBytesLoadedForLargeImage = 0 ; - mTotalBytesLoadedForSculpties = 0 ; + mTotalBytesLoaded = 0; + mTotalBytesLoadedFromCache = 0; + mTotalBytesLoadedForLargeImage = 0; + mTotalBytesLoadedForSculpties = 0; - mInstantPerformanceListCounter = 0 ; + mInstantPerformanceListCounter = 0; } //---------------------------------------------------------------------------------------------- //end of LLTexturePipelineTester diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 9a00ccd8c6..b12b988513 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -38,8 +38,8 @@ #include #include -extern const S32Mibibytes gMinVideoRam; -extern const S32Mibibytes gMaxVideoRam; +extern const S32Megabytes gMinVideoRam; +extern const S32Megabytes gMaxVideoRam; class LLImageGL ; class LLImageRaw; @@ -207,8 +207,8 @@ public: static F32 sDesiredDiscardScale; static S32Bytes sBoundTextureMemory; static S32Bytes sTotalTextureMemory; - static S32Mibibytes sMaxBoundTextureMem; - static S32Mibibytes sMaxTotalTextureMem; + static S32Megabytes sMaxBoundTextureMem; + static S32Megabytes sMaxTotalTextureMem; static S32Bytes sMaxDesiredTextureMem ; static S8 sCameraMovingDiscardBias; static F32 sCameraMovingBias; @@ -690,18 +690,18 @@ private: private: BOOL mUsingDefaultTexture; //if set, some textures are still gray. - U32 mTotalBytesUsed ; //total bytes of textures bound/used for the current frame. - U32 mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256. - U32 mLastTotalBytesUsed ; //total bytes of textures bound/used for the previous frame. - U32 mLastTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the previous frame for images larger than 256 * 256. + U32Bytes mTotalBytesUsed ; //total bytes of textures bound/used for the current frame. + U32Bytes mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256. + U32Bytes mLastTotalBytesUsed ; //total bytes of textures bound/used for the previous frame. + U32Bytes mLastTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the previous frame for images larger than 256 * 256. // //data size // - U32 mTotalBytesLoaded ; //total bytes fetched by texture pipeline - U32 mTotalBytesLoadedFromCache ; //total bytes fetched by texture pipeline from local cache - U32 mTotalBytesLoadedForLargeImage ; //total bytes fetched by texture pipeline for images larger than 256 * 256. - U32 mTotalBytesLoadedForSculpties ; //total bytes fetched by texture pipeline for sculpties + U32Bytes mTotalBytesLoaded ; //total bytes fetched by texture pipeline + U32Bytes mTotalBytesLoadedFromCache ; //total bytes fetched by texture pipeline from local cache + U32Bytes mTotalBytesLoadedForLargeImage ; //total bytes fetched by texture pipeline for images larger than 256 * 256. + U32Bytes mTotalBytesLoadedForSculpties ; //total bytes fetched by texture pipeline for sculpties // //time diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index f4dc04bd51..21da915f97 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -85,11 +85,11 @@ void LLViewerTextureList::init() mInitialized = TRUE ; sNumImages = 0; mUpdateStats = TRUE; - mMaxResidentTexMemInMegaBytes = 0; - mMaxTotalTextureMemInMegaBytes = 0 ; + mMaxResidentTexMemInMegaBytes = (U32Bytes)0; + mMaxTotalTextureMemInMegaBytes = (U32Bytes)0; // Update how much texture RAM we're allowed to use. - updateMaxResidentTexMem(S32Mibibytes(0)); // 0 = use current + updateMaxResidentTexMem(S32Megabytes(0)); // 0 = use current doPreloadImages(); } @@ -662,7 +662,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED)); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value()); { using namespace LLStatViewer; @@ -1231,23 +1231,23 @@ const S32 MIN_VIDEO_RAM = 32; const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons. // Returns min setting for TextureMemory (in MB) -S32Mibibytes LLViewerTextureList::getMinVideoRamSetting() +S32Megabytes LLViewerTextureList::getMinVideoRamSetting() { - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > S32Mibibytes(1500)) ? S32Mibibytes(64) : gMinVideoRam ; + return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; } //static // Returns max setting for TextureMemory (in MB) -S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) +S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) { - S32Mibibytes max_texmem; + S32Megabytes max_texmem; if (gGLManager.mVRAM != 0) { // Treat any card with < 32 MB (shudder) as having 32 MB // - it's going to be swapping constantly regardless - S32Mibibytes max_vram(gGLManager.mVRAM); + S32Megabytes max_vram(gGLManager.mVRAM); if(gGLManager.mIsATI) { @@ -1264,21 +1264,21 @@ S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) { if (!get_recommended) { - max_texmem = 512; + max_texmem = (S32Megabytes)512; } else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup { - max_texmem = 512; + max_texmem = (S32Megabytes)512; } else { - max_texmem = 128; + max_texmem = (S32Megabytes)128; } LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; if (get_recommended) max_texmem = llmin(max_texmem, system_ram/2); @@ -1290,25 +1290,25 @@ S32Mibibytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended) return max_texmem; } -const S32Mibibytes VIDEO_CARD_FRAMEBUFFER_MEM(12); -const S32Mibibytes MIN_MEM_FOR_NON_TEXTURE(512); -void LLViewerTextureList::updateMaxResidentTexMem(S32Mibibytes mem) +const S32Megabytes VIDEO_CARD_FRAMEBUFFER_MEM(12); +const S32Megabytes MIN_MEM_FOR_NON_TEXTURE(512); +void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) { // Initialize the image pipeline VRAM settings - S32Mibibytes cur_mem(gSavedSettings.getS32("TextureMemory")); + S32Megabytes cur_mem(gSavedSettings.getS32("TextureMemory")); F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); - S32Mibibytes default_mem(getMaxVideoRamSetting(true)); // recommended default - if (mem == 0) + S32Megabytes default_mem(getMaxVideoRamSetting(true)); // recommended default + if (mem == (S32Bytes)0) { - mem = cur_mem > 0 ? cur_mem : default_mem; + mem = cur_mem > (S32Bytes)0 ? cur_mem : default_mem; } - else if (mem < 0) + else if (mem < (S32Bytes)0) { mem = default_mem; } // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise - mem = llmin(mem, S32Mibibytes(mem_multiplier * (F32Mibibytes)default_mem)); + mem = llmin(mem, S32Megabytes(mem_multiplier * (F32Megabytes)default_mem)); mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting()); if (mem != cur_mem) @@ -1320,23 +1320,23 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Mibibytes mem) // TODO: set available resident texture mem based on use by other subsystems // currently max(12MB, VRAM/4) assumed... - S32Mibibytes vb_mem = mem; - S32Mibibytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); + S32Megabytes vb_mem = mem; + S32Megabytes fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4); mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2; - if (mMaxResidentTexMemInMegaBytes > 640) + if (mMaxResidentTexMemInMegaBytes > (S32Megabytes)640) { mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes / 4); } //system mem - S32Mibibytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); //minimum memory reserved for non-texture use. //if system_raw >= 1GB, reserve at least 512MB for non-texture use; //otherwise reserve half of the system_ram for non-texture use. - S32Mibibytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; + S32Megabytes min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ; if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem) { @@ -1364,16 +1364,16 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - U32 received_size ; + U32Bytes received_size ; if (msg->getReceiveCompressedSize()) { - received_size = msg->getReceiveCompressedSize() ; + received_size = (U32Bytes)msg->getReceiveCompressedSize() ; } else { - received_size = msg->getReceiveSize() ; + received_size = (U32Bytes)msg->getReceiveSize() ; } - add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); + add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, received_size); add(LLStatViewer::TEXTURE_PACKETS, 1); U8 codec; @@ -1437,14 +1437,14 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - U32 received_size ; + U32Bytes received_size ; if (msg->getReceiveCompressedSize()) { - received_size = msg->getReceiveCompressedSize() ; + received_size = (U32Bytes)msg->getReceiveCompressedSize() ; } else { - received_size = msg->getReceiveSize() ; + received_size = (U32Bytes)msg->getReceiveSize() ; } add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, F64Bytes(received_size)); @@ -1511,24 +1511,6 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** } } -/////////////////////////////////////////////////////////////////////////////// - -//static -const LLUnitImplicit SIXTEEN_MEG(16); -S32Bytes LLViewerTextureList::calcMaxTextureRAM() -{ - // Decide the maximum amount of RAM we should allow the user to allocate to texture cache - LLMemoryInfo memory_info; - LLUnitImplicit available_memory = memory_info.getPhysicalMemoryClamped(); - - // as originally written, this code was a no-op. Not sure of the side effect of making it actually work - /*clamp_rescale(available_memory.value(), - (SIXTEEN_MEG * 16), - (F32Mibibytes)U32_MAX, - (SIXTEEN_MEG * 4), - (F32Mibibytes)(U32_MAX >> 1));*/ - return available_memory; -} /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 9817fea811..835d750d94 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -71,7 +71,6 @@ public: static BOOL createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec); static LLPointer convertToUploadFile(LLPointer raw_image); static void processImageNotInDatabase( LLMessageSystem *msg, void **user_data ); - static S32Bytes calcMaxTextureRAM(); static void receiveImageHeader(LLMessageSystem *msg, void **user_data); static void receiveImagePacket(LLMessageSystem *msg, void **user_data); @@ -101,11 +100,11 @@ public: void setUpdateStats(BOOL b) { mUpdateStats = b; } - S32Mibibytes getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } - S32Mibibytes getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} + S32Megabytes getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; } + S32Megabytes getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;} S32 getNumImages() { return mImageList.size(); } - void updateMaxResidentTexMem(S32Mibibytes mem); + void updateMaxResidentTexMem(S32Megabytes mem); void doPreloadImages(); void doPrefetchImages(); @@ -113,8 +112,8 @@ public: void clearFetchingRequests(); void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level); - static S32Mibibytes getMinVideoRamSetting(); - static S32Mibibytes getMaxVideoRamSetting(bool get_recommended = false); + static S32Megabytes getMinVideoRamSetting(); + static S32Megabytes getMaxVideoRamSetting(bool get_recommended = false); private: void updateImagesDecodePriorities(); @@ -200,8 +199,8 @@ private: BOOL mInitialized ; BOOL mUpdateStats; - S32Mibibytes mMaxResidentTexMemInMegaBytes; - S32Mibibytes mMaxTotalTextureMemInMegaBytes; + S32Megabytes mMaxResidentTexMemInMegaBytes; + S32Megabytes mMaxTotalTextureMemInMegaBytes; LLFrameTimer mForceDecodeTimer; private: diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1e60b59932..5509c6e0e5 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -736,9 +736,9 @@ public: U32 old_y = ypos ; for(S32 i = LLViewerTexture::BOOST_NONE; i < LLViewerTexture::MAX_GL_IMAGE_CATEGORY; i++) { - if(gTotalTextureBytesPerBoostLevel[i] > 0) + if(gTotalTextureBytesPerBoostLevel[i] > (S32Bytes)0) { - addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, F32Mibibytes(gTotalTextureBytesPerBoostLevel[i]).value())); + addText(xpos, ypos, llformat("Boost_Level %d: %.3f MB", i, F32Megabytes(gTotalTextureBytesPerBoostLevel[i]).value())); ypos += y_inc; } } diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp index 9b55bbf277..895ceed880 100755 --- a/indra/newview/llvlmanager.cpp +++ b/indra/newview/llvlmanager.cpp @@ -52,19 +52,19 @@ LLVLManager::~LLVLManager() mPacketData.clear(); } -void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size) +void LLVLManager::addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size) { if (LAND_LAYER_CODE == vl_datap->mType) { - mLandBits += mesg_size * 8; + mLandBits += mesg_size; } else if (WIND_LAYER_CODE == vl_datap->mType) { - mWindBits += mesg_size * 8; + mWindBits += mesg_size; } else if (CLOUD_LAYER_CODE == vl_datap->mType) { - mCloudBits += mesg_size * 8; + mCloudBits += mesg_size; } else { @@ -112,25 +112,25 @@ void LLVLManager::unpackData(const S32 num_packets) void LLVLManager::resetBitCounts() { - mLandBits = mWindBits = mCloudBits = 0; + mLandBits = mWindBits = mCloudBits = (S32Bits)0; } -S32 LLVLManager::getLandBits() const +U32Bits LLVLManager::getLandBits() const { return mLandBits; } -S32 LLVLManager::getWindBits() const +U32Bits LLVLManager::getWindBits() const { return mWindBits; } -S32 LLVLManager::getCloudBits() const +U32Bits LLVLManager::getCloudBits() const { return mCloudBits; } -S32 LLVLManager::getTotalBytes() const +S32Bytes LLVLManager::getTotalBytes() const { return mLandBits + mWindBits + mCloudBits; } diff --git a/indra/newview/llvlmanager.h b/indra/newview/llvlmanager.h index 0733aebaae..5e7fadc522 100755 --- a/indra/newview/llvlmanager.h +++ b/indra/newview/llvlmanager.h @@ -39,15 +39,15 @@ class LLVLManager public: ~LLVLManager(); - void addLayerData(LLVLData *vl_datap, const S32 mesg_size); + void addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size); void unpackData(const S32 num_packets = 10); - S32 getTotalBytes() const; + S32Bytes getTotalBytes() const; - S32 getLandBits() const; - S32 getWindBits() const; - S32 getCloudBits() const; + U32Bits getLandBits() const; + U32Bits getWindBits() const; + U32Bits getCloudBits() const; void resetBitCounts(); @@ -55,9 +55,9 @@ public: protected: std::vector mPacketData; - U32 mLandBits; - U32 mWindBits; - U32 mCloudBits; + U32Bits mLandBits; + U32Bits mWindBits; + U32Bits mCloudBits; }; class LLVLData diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5971da95ce..724ba3c85e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4175,9 +4175,9 @@ std::string LLVOAvatar::bakedTextureOriginInfo() return result; } -S32 LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) +S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) { - S32 result = 0; + S32Bytes result(0); for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); @@ -4242,12 +4242,12 @@ void LLVOAvatar::collectTextureUUIDs(std::set& ids) void LLVOAvatar::releaseOldTextures() { - S32 current_texture_mem = 0; + S32Bytes current_texture_mem; // Any textures that we used to be using but are no longer using should no longer be flagged as "NO_DELETE" std::set baked_texture_ids; collectBakedTextureUUIDs(baked_texture_ids); - S32 new_baked_mem = totalTextureMemForUUIDS(baked_texture_ids); + S32Bytes new_baked_mem = totalTextureMemForUUIDS(baked_texture_ids); std::set local_texture_ids; collectLocalTextureUUIDs(local_texture_ids); @@ -4256,7 +4256,7 @@ void LLVOAvatar::releaseOldTextures() std::set new_texture_ids; new_texture_ids.insert(baked_texture_ids.begin(),baked_texture_ids.end()); new_texture_ids.insert(local_texture_ids.begin(),local_texture_ids.end()); - S32 new_total_mem = totalTextureMemForUUIDS(new_texture_ids); + S32Bytes new_total_mem = totalTextureMemForUUIDS(new_texture_ids); //S32 old_total_mem = totalTextureMemForUUIDS(mTextureIDs); //LL_DEBUGS("Avatar") << getFullname() << " old_total_mem: " << old_total_mem << " new_total_mem (L/B): " << new_total_mem << " (" << new_local_mem <<", " << new_baked_mem << ")" << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2c86ed63d1..b600d2a8f1 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -128,29 +128,29 @@ protected: public: /*virtual*/ void updateGL(); /*virtual*/ LLVOAvatar* asAvatar(); - virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, - void **user_data, - U32 block_num, - const EObjectUpdateType update_type, - LLDataPacker *dp); - virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); + virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, + void **user_data, + U32 block_num, + const EObjectUpdateType update_type, + LLDataPacker *dp); + virtual void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); /*virtual*/ BOOL updateLOD(); - BOOL updateJointLODs(); - void updateLODRiggedAttachments( void ); + BOOL updateJointLODs(); + void updateLODRiggedAttachments( void ); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - S32 totalTextureMemForUUIDS(std::set& ids); - bool allTexturesCompletelyDownloaded(std::set& ids) const; - bool allLocalTexturesCompletelyDownloaded() const; - bool allBakedTexturesCompletelyDownloaded() const; - void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count, - S32 &both_count, S32 &neither_count); - std::string bakedTextureOriginInfo(); - void collectLocalTextureUUIDs(std::set& ids) const; - void collectBakedTextureUUIDs(std::set& ids) const; - void collectTextureUUIDs(std::set& ids); - void releaseOldTextures(); + S32Bytes totalTextureMemForUUIDS(std::set& ids); + bool allTexturesCompletelyDownloaded(std::set& ids) const; + bool allLocalTexturesCompletelyDownloaded() const; + bool allBakedTexturesCompletelyDownloaded() const; + void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count, + S32 &both_count, S32 &neither_count); + std::string bakedTextureOriginInfo(); + void collectLocalTextureUUIDs(std::set& ids) const; + void collectBakedTextureUUIDs(std::set& ids) const; + void collectTextureUUIDs(std::set& ids); + void releaseOldTextures(); /*virtual*/ void updateTextures(); - LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid); + LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid); /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); // If setting a baked texture, need to request it from a non-local sim. /*virtual*/ void onShift(const LLVector4a& shift_vector); /*virtual*/ U32 getPartitionType() const; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index db6d2d6fe9..e36bed3e5b 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -142,7 +142,7 @@ struct LocalTextureData //----------------------------------------------------------------------------- // Static Data //----------------------------------------------------------------------------- -S32 LLVOAvatarSelf::sScratchTexBytes = 0; +S32Bytes LLVOAvatarSelf::sScratchTexBytes(0); std::map< LLGLenum, LLGLuint*> LLVOAvatarSelf::sScratchTexNames; @@ -3067,13 +3067,13 @@ void LLVOAvatarSelf::deleteScratchTextures() stop_glerror(); } - if( sScratchTexBytes ) + if( sScratchTexBytes.value() ) { - LL_DEBUGS() << "Clearing Scratch Textures " << (sScratchTexBytes/1024) << "KB" << LL_ENDL; + LL_DEBUGS() << "Clearing Scratch Textures " << (S32Kilobytes)sScratchTexBytes << LL_ENDL; delete_and_clear(sScratchTexNames); LLImageGL::sGlobalTextureMemory -= sScratchTexBytes; - sScratchTexBytes = 0; + sScratchTexBytes = S32Bytes(0); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index be98f8dfa9..9e9e2b61d7 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -276,7 +276,7 @@ public: public: static void deleteScratchTextures(); private: - static S32 sScratchTexBytes; + static S32Bytes sScratchTexBytes; static std::map< LLGLenum, LLGLuint*> sScratchTexNames; /** Textures diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 1f346b2928..e226583097 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -46,7 +46,7 @@ const F32 MAX_PART_LIFETIME = 120.f; -extern LLUnitImplicit gFrameTime; +extern U64MicrosecondsImplicit gFrameTime; LLPointer LLVOPartGroup::sVB = NULL; S32 LLVOPartGroup::sVBSlotFree[]; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9d727dafbe..2c160754a6 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -727,7 +727,7 @@ void LLWorld::updateNetStats() regionp->updateNetStats(); bits += regionp->mBitsReceived; packets += llfloor( regionp->mPacketsReceived ); - regionp->mBitsReceived = 0.f; + regionp->mBitsReceived = (F32Bits)0.f; regionp->mPacketsReceived = 0.f; } @@ -977,12 +977,12 @@ LLViewerTexture* LLWorld::getDefaultWaterTexture() return mDefaultWaterTexturep; } -void LLWorld::setSpaceTimeUSec(const LLUnitImplicit space_time_usec) +void LLWorld::setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec) { mSpaceTimeUSec = space_time_usec; } -LLUnitImplicit LLWorld::getSpaceTimeUSec() const +U64MicrosecondsImplicit LLWorld::getSpaceTimeUSec() const { return mSpaceTimeUSec; } diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index c74ac3fa6f..287e41d323 100755 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -141,8 +141,8 @@ public: void waterHeightRegionInfo(std::string const& sim_name, F32 water_height); void shiftRegions(const LLVector3& offset); - void setSpaceTimeUSec(const LLUnitImplicit space_time_usec); - LLUnitImplicit getSpaceTimeUSec() const; + void setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec); + U64MicrosecondsImplicit getSpaceTimeUSec() const; void getInfo(LLSD& info); U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;} @@ -189,7 +189,7 @@ private: S32 mLastPacketsOut; S32 mLastPacketsLost; U32 mNumOfActiveCachedObjects; - LLUnitImplicit mSpaceTimeUSec; + U64MicrosecondsImplicit mSpaceTimeUSec; BOOL mClassicCloudsEnabled; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6754918149..a64747742f 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3015,7 +3015,7 @@ void LLPipeline::updateGeom(F32 max_dtime) S32 count = 0; - max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, LLUnitImplicit(max_dtime)); + max_dtime = llmax(update_timer.getElapsedTimeF32()+0.001f, F32SecondsImplicit(max_dtime)); LLSpatialGroup* last_group = NULL; LLSpatialBridge* last_bridge = NULL; -- cgit v1.3 From 8535b87544cc2e71896716a4cd1c3c2445ff4af0 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 26 Aug 2013 18:00:24 -0700 Subject: removed some unecessary template parameters from LLUnit member functions forced unit conversion code to inline unit conversion now no longer converts all the way to base and back, but tries to find equivalent units as early as possible fixed another llinfos instance scene monitor now outputs n/a for invalid samples --- indra/llcommon/llmemory.cpp | 4 ++-- indra/llcommon/llunit.h | 40 +++++++++++++++-------------------- indra/llcommon/tests/llunits_test.cpp | 1 - indra/newview/llscenemonitor.cpp | 31 +++++++++++++++++++++------ indra/newview/llviewermessage.cpp | 4 ++-- 5 files changed, 46 insertions(+), 34 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 06334c012a..cb2f853070 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -206,8 +206,8 @@ bool LLMemory::isMemoryPoolLow() return true ; } - bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMORY_POOL_THRESHOLD || - sAllocatedPageSizeInKB + LOW_MEMORY_POOL_THRESHOLD > sMaxHeapSizeInKB) ; + bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMORY_POOL_THRESHOLD + || sAllocatedPageSizeInKB + LOW_MEMORY_POOL_THRESHOLD > sMaxHeapSizeInKB) ; //check the virtual address space fragmentation if(!is_low) diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index bfc011bb55..1ef4924578 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -82,24 +82,16 @@ struct LLUnit typedef STORAGE_TYPE storage_t; // value initialization - explicit LLUnit(storage_t value = storage_t()) + LL_FORCE_INLINE explicit LLUnit(storage_t value = storage_t()) : mValue(value) {} // unit initialization and conversion template - LLUnit(LLUnit other) + LL_FORCE_INLINE LLUnit(LLUnit other) : mValue(convert(other).mValue) {} - // unit assignment - template - self_t& operator = (LLUnit other) - { - mValue = convert(other).mValue; - return *this; - } - storage_t value() const { return mValue; @@ -122,14 +114,12 @@ struct LLUnit *this = LLUnit(value); } - template - void operator += (LLUnit other) + void operator += (self_t other) { mValue += convert(other).mValue; } - template - void operator -= (LLUnit other) + void operator -= (self_t other) { mValue -= convert(other).mValue; } @@ -139,8 +129,7 @@ struct LLUnit mValue *= multiplicand; } - template - void operator *= (LLUnit multiplicand) + void operator *= (self_t multiplicand) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template LL_BAD_TEMPLATE_INSTANTIATION(OTHER_UNIT, "Multiplication of unit types not supported."); @@ -151,15 +140,14 @@ struct LLUnit mValue /= divisor; } - template - void operator /= (LLUnit divisor) + void operator /= (self_t divisor) { // spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template LL_BAD_TEMPLATE_INSTANTIATION(OTHER_UNIT, "Illegal in-place division of unit types."); } template - static self_t convert(LLUnit v) + LL_FORCE_INLINE static self_t convert(LLUnit v) { typedef typename LLResultTypePromote::type_t result_storage_t; LLUnit result; @@ -258,7 +246,7 @@ std::istream& operator >>(std::istream& s, LLUnitImplicit -LL_FORCE_INLINE S2 ll_convert_units(LLUnit in, LLUnit& out, ...) +LL_FORCE_INLINE S2 ll_convert_units(LLUnit in, LLUnit& out) { S2 divisor(1); @@ -272,7 +260,7 @@ LL_FORCE_INLINE S2 ll_convert_units(LLUnit in, LLUnit& out, ...) // T1 and T2 same type, just assign out.value((S2)in.value()); } - else if (LLIsSameType::value) + else if (T1::sLevel > T2::sLevel) { // reduce T1 LLUnit new_in; @@ -301,6 +289,10 @@ struct LLStorageType > typedef STORAGE_TYPE type_t; }; +// all of these operators need to perform type promotion on the storage type of the units, so they +// cannot be expressed as operations on identical types with implicit unit conversion +// e.g. typeof(S32Bytes(x) + F32Megabytes(y)) <==> F32Bytes + // // operator + // @@ -677,6 +669,7 @@ struct LLUnitInverseLinearOps #define LL_DECLARE_BASE_UNIT(base_unit_name, unit_label) \ struct base_unit_name \ { \ + static const int sLevel = 0; \ typedef base_unit_name base_unit_t; \ static const char* getUnitLabel() { return unit_label; } \ template \ @@ -690,6 +683,7 @@ struct base_unit_name #define LL_DECLARE_DERIVED_UNIT(base_unit_name, conversion_operation, unit_name, unit_label) \ struct unit_name \ { \ + static const int sLevel = base_unit_name::sLevel + 1; \ typedef base_unit_name base_unit_t; \ static const char* getUnitLabel() { return unit_label; } \ template \ @@ -700,7 +694,7 @@ struct unit_name }; \ \ template \ -S2 ll_convert_units(LLUnit in, LLUnit& out) \ +LL_FORCE_INLINE S2 ll_convert_units(LLUnit in, LLUnit& out) \ { \ typedef typename LLResultTypePromote::type_t result_storage_t; \ LLUnitLinearOps op = \ @@ -710,7 +704,7 @@ S2 ll_convert_units(LLUnit in, LLUnit& out) } \ \ template \ -S2 ll_convert_units(LLUnit in, LLUnit& out) \ +LL_FORCE_INLINE S2 ll_convert_units(LLUnit in, LLUnit& out) \ { \ typedef typename LLResultTypePromote::type_t result_storage_t; \ LLUnitInverseLinearOps op = \ diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp index 292c6122af..31d4f86159 100644 --- a/indra/llcommon/tests/llunits_test.cpp +++ b/indra/llcommon/tests/llunits_test.cpp @@ -271,6 +271,5 @@ namespace tut mega_bytes = (U32Megabytes)5 + (S32Megabytes)-1; ensure("can mix unsigned and signed in units addition", mega_bytes == (S32Megabytes)4); - } } diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 7fafabb493..57d58a9d4e 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -565,8 +565,9 @@ void LLSceneMonitor::dumpToFile(std::string file_name) for (S32 frame = 1; frame <= frame_count; frame++) { - samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it); - row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getSum(*it); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + row << ", " << recording.getSum(*it); } row << '\n'; @@ -597,8 +598,17 @@ void LLSceneMonitor::dumpToFile(std::string file_name) for (S32 frame = 1; frame <= frame_count; frame++) { - samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it); - row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMean(*it); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + F64 mean = recording.getMean(*it); + if (llisnan(mean)) + { + row << ", n/a"; + } + else + { + row << ", " << mean; + } } row << '\n'; @@ -629,8 +639,17 @@ void LLSceneMonitor::dumpToFile(std::string file_name) for (S32 frame = 1; frame <= frame_count; frame++) { - samples += scene_load_recording.getPrevRecording(frame_count - frame).getSampleCount(*it); - row << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMean(*it); + Recording& recording = scene_load_recording.getPrevRecording(frame_count - frame); + samples += recording.getSampleCount(*it); + F64 mean = recording.getMean(*it); + if (llisnan(mean)) + { + row << ", n/a"; + } + else + { + row << ", " << mean; + } } row << '\n'; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b4ed2adb07..7de8e1ff12 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7219,10 +7219,10 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) { - llinfos << "Object named " << object_name + LL_INFOS() << "Object named " << object_name << " is offering TP to region " << sim_name << " position " << pos - << llendl; + << LL_ENDL; instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); LLFloaterReg::showInstance("world_map", "center"); -- cgit v1.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/llappearance/llavatarappearance.cpp | 2 +- indra/llappearance/llpolymorph.cpp | 4 +- indra/llappearance/llpolyskeletaldistortion.cpp | 4 +- indra/llappearance/lltexlayer.cpp | 28 +-- indra/llappearance/lltexlayerparams.cpp | 4 +- indra/llcharacter/llcharacter.cpp | 12 +- indra/llcharacter/llmotioncontroller.cpp | 4 +- indra/llcommon/lldate.cpp | 6 +- indra/llcommon/lldefs.h | 3 - indra/llcommon/llfasttimer.cpp | 6 +- indra/llcommon/llfasttimer.h | 32 ++- indra/llcommon/llpreprocessor.h | 7 +- indra/llcommon/llsdparam.cpp | 2 +- indra/llcommon/llsdparam.h | 4 +- indra/llcommon/llstring.cpp | 6 +- indra/llcommon/lltrace.h | 100 ++++++-- indra/llcommon/lltracethreadrecorder.cpp | 4 +- indra/llimage/llimage.cpp | 2 +- indra/llimage/llimage.h | 2 +- indra/llinventory/llinventory.cpp | 4 +- indra/llmessage/llfiltersd2xmlrpc.cpp | 16 +- indra/llmessage/lliohttpserver.cpp | 28 +-- indra/llmessage/lliosocket.cpp | 12 +- indra/llmessage/llioutil.cpp | 8 +- indra/llmessage/llpumpio.cpp | 12 +- indra/llmessage/llsdrpcclient.cpp | 8 +- indra/llmessage/llsdrpcserver.cpp | 4 +- indra/llmessage/lltemplatemessagereader.cpp | 4 +- indra/llmessage/llurlrequest.cpp | 32 +-- indra/llrender/llfontgl.cpp | 4 +- indra/llrender/llimagegl.cpp | 34 +-- indra/llrender/llrender2dutils.cpp | 8 +- indra/llrender/llvertexbuffer.cpp | 58 ++--- indra/llui/llfloater.cpp | 12 +- indra/llui/llfolderview.cpp | 16 +- indra/llui/llfolderviewitem.cpp | 4 +- indra/llui/llkeywords.cpp | 4 +- indra/llui/lllayoutstack.cpp | 4 +- indra/llui/llpanel.cpp | 22 +- indra/llui/llscrolllistctrl.cpp | 8 +- indra/llui/lltextbase.cpp | 18 +- indra/llui/lltextbase.h | 2 +- indra/llui/lltexteditor.cpp | 6 +- indra/llui/lltrans.cpp | 10 +- indra/llui/lluictrl.cpp | 4 +- indra/llui/lluictrlfactory.cpp | 18 +- indra/llui/lluictrlfactory.h | 12 +- indra/llui/lluistring.cpp | 6 +- indra/llui/llview.cpp | 6 +- indra/llui/llview.h | 2 +- indra/llui/llviewmodel.cpp | 2 +- indra/llui/llviewmodel.h | 2 +- indra/llui/llxuiparser.cpp | 6 +- indra/llvfs/llvfile.cpp | 6 +- indra/llwindow/llwindowwin32.cpp | 18 +- indra/newview/llagentcamera.cpp | 4 +- indra/newview/llappviewer.cpp | 140 +++++------ indra/newview/llappviewer.h | 2 +- indra/newview/llchathistory.cpp | 4 +- .../newview/lldonotdisturbnotificationstorage.cpp | 8 +- indra/newview/lldrawable.cpp | 24 +- indra/newview/lldrawable.h | 4 +- indra/newview/lldrawpoolalpha.cpp | 8 +- indra/newview/lldrawpoolavatar.cpp | 26 +- indra/newview/lldrawpoolbump.cpp | 74 +++--- indra/newview/lldrawpoolmaterials.cpp | 4 +- indra/newview/lldrawpoolsimple.cpp | 60 ++--- indra/newview/lldrawpoolterrain.cpp | 20 +- indra/newview/lldrawpooltree.cpp | 16 +- indra/newview/lldrawpoolwater.cpp | 4 +- indra/newview/lldrawpoolwlsky.cpp | 4 +- indra/newview/llface.cpp | 86 +++---- indra/newview/llfasttimerview.cpp | 14 +- indra/newview/llflexibleobject.cpp | 14 +- indra/newview/llfolderviewmodelinventory.cpp | 4 +- indra/newview/llhudmanager.cpp | 4 +- indra/newview/llhudobject.cpp | 4 +- indra/newview/llinventoryfilter.cpp | 4 +- indra/newview/llinventoryitemslist.cpp | 4 +- indra/newview/llinventorypanel.cpp | 8 +- indra/newview/llmaterialmgr.cpp | 4 +- indra/newview/llpersistentnotificationstorage.cpp | 8 +- indra/newview/llscenemonitor.cpp | 14 +- indra/newview/llscreenchannel.cpp | 4 +- indra/newview/llspatialpartition.cpp | 32 +-- indra/newview/llviewerdisplay.cpp | 68 ++--- indra/newview/llviewerjointmesh.cpp | 4 +- indra/newview/llviewermedia.cpp | 40 +-- indra/newview/llviewermessage.cpp | 8 +- indra/newview/llviewerobject.cpp | 10 +- indra/newview/llviewerobject.h | 2 +- indra/newview/llviewerobjectlist.cpp | 24 +- indra/newview/llvieweroctree.cpp | 46 ++-- indra/newview/llvieweroctree.h | 18 +- indra/newview/llviewerpartsim.cpp | 4 +- indra/newview/llviewertexture.cpp | 12 +- indra/newview/llviewertexturelist.cpp | 40 +-- indra/newview/llviewerwindow.cpp | 12 +- indra/newview/llvoavatar.cpp | 16 +- indra/newview/llvocache.cpp | 2 +- indra/newview/llvocache.h | 6 +- indra/newview/llvograss.cpp | 8 +- indra/newview/llvoicevivox.cpp | 4 +- indra/newview/llvopartgroup.cpp | 12 +- indra/newview/llvosky.cpp | 8 +- indra/newview/llvosurfacepatch.cpp | 8 +- indra/newview/llvotree.cpp | 4 +- indra/newview/llvovolume.cpp | 74 +++--- indra/newview/llvowater.cpp | 4 +- indra/newview/llvowlsky.cpp | 4 +- indra/newview/llwaterparammanager.cpp | 4 +- indra/newview/llwlparammanager.cpp | 6 +- indra/newview/llwlparamset.cpp | 4 +- indra/newview/llworld.cpp | 4 +- indra/newview/pipeline.cpp | 276 ++++++++++----------- indra/newview/pipeline.h | 40 +-- 116 files changed, 1062 insertions(+), 968 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 104594c554..4f0d0faa38 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -805,7 +805,7 @@ void LLAvatarAppearance::buildCharacter() BOOL LLAvatarAppearance::loadAvatar() { -// LLFastTimer t(FTM_LOAD_AVATAR); +// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR); // avatar_skeleton.xml if( !buildSkeleton(sAvatarSkeletonInfo) ) diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index e0790f8b5b..eb298db82a 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -525,7 +525,7 @@ F32 LLPolyMorphTarget::getMaxDistortion() //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_APPLY_MORPH_TARGET("Apply Morph"); +static LLTrace::TimeBlock FTM_APPLY_MORPH_TARGET("Apply Morph"); void LLPolyMorphTarget::apply( ESex avatar_sex ) { @@ -534,7 +534,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) return; } - LLFastTimer t(FTM_APPLY_MORPH_TARGET); + LL_RECORD_BLOCK_TIME(FTM_APPLY_MORPH_TARGET); mLastSex = avatar_sex; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 68119a8562..b778c15c22 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -179,11 +179,11 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion"); +static LLTrace::TimeBlock FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion"); void LLPolySkeletalDistortion::apply( ESex avatar_sex ) { - LLFastTimer t(FTM_POLYSKELETAL_DISTORTION_APPLY); + LL_RECORD_BLOCK_TIME(FTM_POLYSKELETAL_DISTORTION_APPLY); F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight(); diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 7521e74d7c..17199fdc4d 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -518,10 +518,10 @@ const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const return mComposite; } -static LLFastTimer::DeclareTimer FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha"); +static LLTrace::TimeBlock FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha"); void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height) { - LLFastTimer t(FTM_GATHER_MORPH_MASK_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_GATHER_MORPH_MASK_ALPHA); memset(data, 255, width * height); for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) @@ -534,10 +534,10 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S renderAlphaMaskTextures(origin_x, origin_y, width, height, true); } -static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures"); +static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures"); void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, bool forceClear) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK_TEXTURES); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_TEXTURES); const LLTexLayerSetInfo *info = getInfo(); bool use_shaders = LLGLSLShader::sNoFixedFunction; @@ -1424,7 +1424,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) addAlphaMask(data, originX, originY, width, height); } -static LLFastTimer::DeclareTimer FTM_RENDER_MORPH_MASKS("renderMorphMasks"); +static LLTrace::TimeBlock FTM_RENDER_MORPH_MASKS("renderMorphMasks"); void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render) { if (!force_render && !hasMorph()) @@ -1432,7 +1432,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL; return; } - LLFastTimer t(FTM_RENDER_MORPH_MASKS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_MORPH_MASKS); BOOL success = TRUE; llassert( !mParamAlphaList.empty() ); @@ -1575,10 +1575,10 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } } -static LLFastTimer::DeclareTimer FTM_ADD_ALPHA_MASK("addAlphaMask"); +static LLTrace::TimeBlock FTM_ADD_ALPHA_MASK("addAlphaMask"); void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height) { - LLFastTimer t(FTM_ADD_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_ADD_ALPHA_MASK); S32 size = width * height; const U8* alphaData = getAlphaData(); if (!alphaData && hasAlphaParams()) @@ -1921,10 +1921,10 @@ void LLTexLayerStaticImageList::deleteCachedImages() // Returns an LLImageTGA that contains the encoded data from a tga file named file_name. // Caches the result to speed identical subsequent requests. -static LLFastTimer::DeclareTimer FTM_LOAD_STATIC_TGA("getImageTGA"); +static LLTrace::TimeBlock FTM_LOAD_STATIC_TGA("getImageTGA"); LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name) { - LLFastTimer t(FTM_LOAD_STATIC_TGA); + LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TGA); const char *namekey = mImageNames.addString(file_name); image_tga_map_t::const_iterator iter = mStaticImageListTGA.find(namekey); if( iter != mStaticImageListTGA.end() ) @@ -1951,10 +1951,10 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name) // Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name. // Caches the result to speed identical subsequent requests. -static LLFastTimer::DeclareTimer FTM_LOAD_STATIC_TEXTURE("getTexture"); +static LLTrace::TimeBlock FTM_LOAD_STATIC_TEXTURE("getTexture"); LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask) { - LLFastTimer t(FTM_LOAD_STATIC_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TEXTURE); LLPointer tex; const char *namekey = mImageNames.addString(file_name); @@ -2001,10 +2001,10 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, // Reads a .tga file, decodes it, and puts the decoded data in image_raw. // Returns TRUE if successful. -static LLFastTimer::DeclareTimer FTM_LOAD_IMAGE_RAW("loadImageRaw"); +static LLTrace::TimeBlock FTM_LOAD_IMAGE_RAW("loadImageRaw"); BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw) { - LLFastTimer t(FTM_LOAD_IMAGE_RAW); + LL_RECORD_BLOCK_TIME(FTM_LOAD_IMAGE_RAW); BOOL success = FALSE; std::string path; path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name); diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index f800b31694..e1c4f11ada 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -239,10 +239,10 @@ BOOL LLTexLayerParamAlpha::getSkip() const } -static LLFastTimer::DeclareTimer FTM_TEX_LAYER_PARAM_ALPHA("alpha render"); +static LLTrace::TimeBlock FTM_TEX_LAYER_PARAM_ALPHA("alpha render"); BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) { - LLFastTimer t(FTM_TEX_LAYER_PARAM_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_TEX_LAYER_PARAM_ALPHA); BOOL success = TRUE; if (!mTexLayer) diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 0eed3356e4..9eb2f9399b 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -188,20 +188,20 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- // updateMotions() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation"); -static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); -static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions"); +static LLTrace::TimeBlock FTM_UPDATE_ANIMATION("Update Animation"); +static LLTrace::TimeBlock FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLTrace::TimeBlock FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { if (update_type == HIDDEN_UPDATE) { - LLFastTimer t(FTM_UPDATE_HIDDEN_ANIMATION); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_HIDDEN_ANIMATION); mMotionController.updateMotionsMinimal(); } else { - LLFastTimer t(FTM_UPDATE_ANIMATION); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_ANIMATION); // unpause if the number of outstanding pause requests has dropped to the initial one if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1) { @@ -209,7 +209,7 @@ void LLCharacter::updateMotions(e_update_t update_type) } bool force_update = (update_type == FORCE_UPDATE); { - LLFastTimer t(FTM_UPDATE_MOTIONS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOTIONS); mMotionController.updateMotions(force_update); } } diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index b5065c348b..24fa1c86e9 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -541,7 +541,7 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate"); +static LLTrace::TimeBlock FTM_MOTION_ON_UPDATE("Motion onUpdate"); void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { @@ -701,7 +701,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // perform motion update { - LLFastTimer t(FTM_MOTION_ON_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_MOTION_ON_UPDATE); update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature); } } diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 4f2e1304b2..b32c3f6830 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -86,11 +86,11 @@ std::string LLDate::asRFC1123() const return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT")); } -LLFastTimer::DeclareTimer FT_DATE_FORMAT("Date Format"); +LLTrace::TimeBlock FT_DATE_FORMAT("Date Format"); std::string LLDate::toHTTPDateString (std::string fmt) const { - LLFastTimer ft1(FT_DATE_FORMAT); + LL_RECORD_BLOCK_TIME(FT_DATE_FORMAT); time_t locSeconds = (time_t) mSecondsSinceEpoch; struct tm * gmt = gmtime (&locSeconds); @@ -99,7 +99,7 @@ std::string LLDate::toHTTPDateString (std::string fmt) const std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt) { - LLFastTimer ft1(FT_DATE_FORMAT); + LL_RECORD_BLOCK_TIME(FT_DATE_FORMAT); // avoid calling setlocale() unnecessarily - it's expensive. static std::string prev_locale = ""; diff --git a/indra/llcommon/lldefs.h b/indra/llcommon/lldefs.h index d57b9dccff..5a4b8325f4 100755 --- a/indra/llcommon/lldefs.h +++ b/indra/llcommon/lldefs.h @@ -244,8 +244,5 @@ inline void llswap(LLDATATYPE& lhs, LLDATATYPE& rhs) rhs = tmp; } -#define LL_GLUE_IMPL(x, y) x##y -#define LL_GLUE_TOKENS(x, y) LL_GLUE_IMPL(x, y) - #endif // LL_LLDEFS_H diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 2235eb1a08..be240c754a 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -276,13 +276,13 @@ void TimeBlock::updateTimes() } } -static LLFastTimer::DeclareTimer FTM_PROCESS_TIMES("Process FastTimer Times"); +static LLTrace::TimeBlock FTM_PROCESS_TIMES("Process FastTimer Times"); // not thread safe, so only call on main thread //static void TimeBlock::processTimes() { - LLFastTimer _(FTM_PROCESS_TIMES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_TIMES); get_clock_count(); // good place to calculate clock frequency // set up initial tree @@ -413,7 +413,7 @@ void TimeBlock::writeLog(std::ostream& os) LLSDSerialize::toXML(sd, os); LLMutexLock lock(sLogLock); sLogQueue.pop(); - } + } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 7bad6134c5..e6bf544b51 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -35,28 +35,56 @@ class LLMutex; +#define LL_RECORD_BLOCK_TIME(timer_stat) const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(timer_stat)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__); + namespace LLTrace { +class BlockTimer timeThisBlock(class TimeBlock& timer); + class BlockTimer { public: - friend class TimeBlock; typedef BlockTimer self_t; typedef class TimeBlock DeclareTimer; - BlockTimer(TimeBlock& timer); ~BlockTimer(); F64Seconds getElapsedTime(); private: + friend class TimeBlock; + // FIXME: this friendship exists so that each thread can instantiate a root timer, + // which could be a derived class with a public constructor instead, possibly + friend class ThreadRecorder; + friend BlockTimer timeThisBlock(TimeBlock&); + BlockTimer(TimeBlock& timer); +#if !defined(MSC_VER) || MSC_VER < 1700 + // Visual Studio 2010 has a bug where capturing an object returned by value + // into a local reference requires access to the copy constructor at the call site. + // This appears to be fixed in 2012. +public: +#endif + // no-copy + BlockTimer(const BlockTimer& other) {}; + +private: U64 mStartTime; U64 mBlockStartTotalTimeCounter; BlockTimerStackRecord mParentTimerData; }; +// this dummy function assists in allocating a block timer with stack-based lifetime. +// this is done by capturing the return value in a stack-allocated const reference variable. +// (This is most easily done using the macro LL_RECORD_BLOCK_TIME) +// Otherwise, it would be possible to store a BlockTimer on the heap, resulting in non-nested lifetimes, +// which would break the invariants of the timing hierarchy logic +LL_FORCE_INLINE class BlockTimer timeThisBlock(class TimeBlock& timer) +{ + return BlockTimer(timer); +} + // stores a "named" timer instance to be reused via multiple BlockTimer stack instances class TimeBlock : public TraceType, diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 0fcc872690..309165da7f 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -191,9 +191,12 @@ #define LL_TO_STRING_HELPER(x) #x #define LL_TO_STRING(x) LL_TO_STRING_HELPER(x) -#define LL_FILE_LINENO(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg +#define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg +#define LL_GLUE_IMPL(x, y) x##y +#define LL_GLUE_TOKENS(x, y) LL_GLUE_IMPL(x, y) + #if LL_WINDOWS -#define LL_COMPILE_TIME_MESSAGE(msg) __pragma(message(LL_FILE_LINENO(msg))) +#define LL_COMPILE_TIME_MESSAGE(msg) __pragma(message(LL_FILE_LINENO_MSG(msg))) #else // no way to get gcc 4.2 to print a user-defined diagnostic message only when a macro is used #define LL_COMPILE_TIME_MESSAGE(msg) diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index c1ba777543..371bd49c04 100755 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -37,7 +37,7 @@ static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs; static const LLSD NO_VALUE_MARKER; -LLFastTimer::DeclareTimer FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion"); +LLTrace::TimeBlock FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion"); // // LLParamSDParser diff --git a/indra/llcommon/llsdparam.h b/indra/llcommon/llsdparam.h index 7cfc265c62..47ec6414dd 100755 --- a/indra/llcommon/llsdparam.h +++ b/indra/llcommon/llsdparam.h @@ -110,7 +110,7 @@ private: }; -extern LL_COMMON_API LLFastTimer::DeclareTimer FTM_SD_PARAM_ADAPTOR; +extern LL_COMMON_API LLTrace::TimeBlock FTM_SD_PARAM_ADAPTOR; template class LLSDParamAdapter : public T { @@ -118,7 +118,7 @@ public: LLSDParamAdapter() {} LLSDParamAdapter(const LLSD& sd) { - LLFastTimer _(FTM_SD_PARAM_ADAPTOR); + LL_RECORD_BLOCK_TIME(FTM_SD_PARAM_ADAPTOR); LLParamSDParser parser; // don't spam for implicit parsing of LLSD, as we want to allow arbitrary freeform data and ignore most of it bool parse_silently = true; diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index e6e80fa279..a4b1d2ede3 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -36,7 +36,7 @@ #include // for WideCharToMultiByte #endif -LLFastTimer::DeclareTimer FT_STRING_FORMAT("String Format"); +LLTrace::TimeBlock FT_STRING_FORMAT("String Format"); std::string ll_safe_string(const char* in) @@ -1195,7 +1195,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, template<> S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions) { - LLFastTimer ft(FT_STRING_FORMAT); + LL_RECORD_BLOCK_TIME(FT_STRING_FORMAT); S32 res = 0; std::string output; @@ -1268,7 +1268,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions) template<> S32 LLStringUtil::format(std::string& s, const LLSD& substitutions) { - LLFastTimer ft(FT_STRING_FORMAT); + LL_RECORD_BLOCK_TIME(FT_STRING_FORMAT); S32 res = 0; if (!substitutions.isMap()) diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index bf8e950a8c..a465a7f426 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -38,8 +38,6 @@ #include -#define LL_RECORD_BLOCK_TIME(block_timer) LLTrace::TimeBlock::Recorder LL_GLUE_TOKENS(block_time_recorder, __COUNTER__)(block_timer); - namespace LLTrace { class Recording; @@ -89,7 +87,7 @@ public: size_t getIndex() const { return mAccumulatorIndex; } static size_t getNumIndices() { return AccumulatorBuffer::getNumIndices(); } -private: +protected: const size_t mAccumulatorIndex; }; @@ -329,7 +327,7 @@ class MemTrackable struct TrackMemImpl; typedef MemTrackable mem_trackable_t; - + static MemStatHandle sMemStat; public: typedef void mem_trackable_tag_t; @@ -340,38 +338,100 @@ public: void* operator new(size_t size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); accumulator.mAllocatedCount++; - return ::operator new(size); + if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) + { + return ::operator new(size); + } + else if (ALIGNMENT == 16) + { + return ll_aligned_malloc_16(size); + } + else if (ALIGNMENT == 32) + { + return ll_aligned_malloc_32(size); + } + else + { + return ll_aligned_malloc(size, ALIGNMENT); + } } void operator delete(void* ptr, size_t size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); accumulator.mAllocatedCount--; accumulator.mDeallocatedCount++; - ::operator delete(ptr); + + if (ALIGNMENT == LL_DEFAULT_HEAP_ALIGN) + { + ::operator delete(ptr); + } + else if (ALIGNMENT == 16) + { + ll_aligned_free_16(ptr); + } + else if (ALIGNMENT == 32) + { + return ll_aligned_free_32(ptr); + } + else + { + return ll_aligned_free(ptr); + } } void *operator new [](size_t size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); accumulator.mAllocatedCount++; - return ::operator new[](size); + if (alignment == LL_DEFAULT_HEAP_ALIGN) + { + return ::operator new[](size); + } + else if (ALIGNMENT == 16) + { + return ll_aligned_malloc_16(size); + } + else if (ALIGNMENT == 32) + { + return ll_aligned_malloc_32(size); + } + else + { + return ll_aligned_malloc(size, ALIGNMENT); + } } void operator delete[](void* ptr, size_t size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); accumulator.mAllocatedCount--; accumulator.mDeallocatedCount++; - ::operator delete[](ptr); + + if (alignment == LL_DEFAULT_HEAP_ALIGN) + { + ::operator delete[](ptr); + } + else if (ALIGNMENT == 16) + { + ll_aligned_free_16(ptr); + } + else if (ALIGNMENT == 32) + { + return ll_aligned_free_32(ptr); + } + else + { + return ll_aligned_free(ptr); + } } // claim memory associated with other objects/data as our own, adding to our calculated footprint @@ -393,7 +453,7 @@ public: template AMOUNT_T& memClaimAmount(AMOUNT_T& size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); mMemFootprint += (size_t)size; accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size); return size; @@ -417,7 +477,7 @@ public: template AMOUNT_T& memDisclaimAmount(AMOUNT_T& size) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size); return size; } @@ -430,7 +490,7 @@ private: { static void claim(mem_trackable_t& tracker, const TRACKED& tracked) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); size_t footprint = MemFootprint::measure(tracked); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)footprint : (F64)footprint); tracker.mMemFootprint += footprint; @@ -438,7 +498,7 @@ private: static void disclaim(mem_trackable_t& tracker, const TRACKED& tracked) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); size_t footprint = MemFootprint::measure(tracked); accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)footprint : -(F64)footprint); tracker.mMemFootprint -= footprint; @@ -450,17 +510,21 @@ private: { static void claim(mem_trackable_t& tracker, TRACKED& tracked) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mChildSize.sample(accumulator.mChildSize.hasValue() ? accumulator.mChildSize.getLastValue() + (F64)MemFootprint::measure(tracked) : (F64)MemFootprint::measure(tracked)); } static void disclaim(mem_trackable_t& tracker, TRACKED& tracked) { - MemStatAccumulator& accumulator = DERIVED::sMemStat.getPrimaryAccumulator(); + MemStatAccumulator& accumulator = sMemStat.getPrimaryAccumulator(); accumulator.mChildSize.sample(accumulator.mChildSize.hasValue() ? accumulator.mChildSize.getLastValue() - (F64)MemFootprint::measure(tracked) : -(F64)MemFootprint::measure(tracked)); } }; }; +// pretty sure typeid of containing class in static object constructor doesn't work in gcc +template +MemStatHandle MemTrackable::sMemStat(typeid(DERIVED).name()); + } #endif // LL_LLTRACE_H diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index 28470fb4c4..4129f1f889 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -249,11 +249,11 @@ void ThreadRecorder::pushToParent() } -static LLFastTimer::DeclareTimer FTM_PULL_TRACE_DATA_FROM_CHILDREN("Pull child thread trace data"); +static LLTrace::TimeBlock FTM_PULL_TRACE_DATA_FROM_CHILDREN("Pull child thread trace data"); void ThreadRecorder::pullFromChildren() { - LLFastTimer _(FTM_PULL_TRACE_DATA_FROM_CHILDREN); + LL_RECORD_BLOCK_TIME(FTM_PULL_TRACE_DATA_FROM_CHILDREN); if (mActiveRecordings.empty()) return; { LLMutexLock lock(&mChildListMutex); diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 7a46f47473..bb4253a9f5 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -50,7 +50,7 @@ LLMutex* LLImage::sMutex = NULL; bool LLImage::sUseNewByteRange = false; S32 LLImage::sMinimalReverseByteRangePercent = 75; LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ; -LLTrace::MemStatHandle LLImageBase::sMemStat("LLImage"); +//LLTrace::MemStatHandle LLImageBase::sMemStat("LLImage"); //static void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_percent) diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 08615dc8ea..bf441a008a 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -165,7 +165,7 @@ public: static void destroyPrivatePool() ; static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;} - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; private: U8 *mData; diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 38e01593ca..d2efda8612 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1049,11 +1049,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; } -LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); +LLTrace::TimeBlock FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); bool LLInventoryItem::fromLLSD(const LLSD& sd) { - LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE); + LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SD_DESERIALIZE); mInventoryType = LLInventoryType::IT_NONE; mAssetUUID.setNull(); std::string w; diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index d813a05963..b09c900ccb 100755 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -309,7 +309,7 @@ LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse() } -static LLFastTimer::DeclareTimer FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response"); +static LLTrace::TimeBlock FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response"); // virtual LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( const LLChannelDescriptors& channels, @@ -318,7 +318,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SD2XMLRPC_RESPONSE); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SD2XMLRPC_RESPONSE); PUMP_DEBUG; // This pipe does not work if it does not have everyting. This @@ -386,7 +386,7 @@ LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest() { } -static LLFastTimer::DeclareTimer FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request"); +static LLTrace::TimeBlock FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request"); // virtual LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( @@ -396,7 +396,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SD2XMLRPC_REQUEST); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SD2XMLRPC_REQUEST); // This pipe does not work if it does not have everyting. This // could be addressed by making a stream parser for llsd which // handled partial information. @@ -593,7 +593,7 @@ LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD() { } -static LLFastTimer::DeclareTimer FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response"); +static LLTrace::TimeBlock FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response"); LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( const LLChannelDescriptors& channels, @@ -602,7 +602,7 @@ LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_XMLRPC2LLSD_RESPONSE); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_XMLRPC2LLSD_RESPONSE); PUMP_DEBUG; if(!eos) return STATUS_BREAK; @@ -679,7 +679,7 @@ LLFilterXMLRPCRequest2LLSD::~LLFilterXMLRPCRequest2LLSD() { } -static LLFastTimer::DeclareTimer FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request"); +static LLTrace::TimeBlock FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request"); LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl( const LLChannelDescriptors& channels, buffer_ptr_t& buffer, @@ -687,7 +687,7 @@ LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_XMLRPC2LLSD_REQUEST); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_XMLRPC2LLSD_REQUEST); PUMP_DEBUG; if(!eos) return STATUS_BREAK; if(!buffer) return STATUS_ERROR; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 7b2fda52ec..9178fc6891 100755 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -139,11 +139,11 @@ private: LLSD mHeaders; }; -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_GET("HTTP Get"); -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PUT("HTTP Put"); -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_POST("HTTP Post"); -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_DELETE("HTTP Delete"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_GET("HTTP Get"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_PUT("HTTP Put"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_POST("HTTP Post"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_DELETE("HTTP Delete"); LLIOPipe::EStatus LLHTTPPipe::process_impl( const LLChannelDescriptors& channels, @@ -152,7 +152,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_HTTP_PIPE); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_PIPE); PUMP_DEBUG; LL_DEBUGS() << "LLSDHTTPServer::process_impl" << LL_ENDL; @@ -181,12 +181,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB]; if(verb == HTTP_VERB_GET) { - LLFastTimer _(FTM_PROCESS_HTTP_GET); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_GET); mNode.get(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_PUT) { - LLFastTimer _(FTM_PROCESS_HTTP_PUT); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_PUT); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -202,7 +202,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_POST) { - LLFastTimer _(FTM_PROCESS_HTTP_POST); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_POST); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -218,7 +218,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_DELETE) { - LLFastTimer _(FTM_PROCESS_HTTP_DELETE); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_DELETE); mNode.del(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_OPTIONS) @@ -435,7 +435,7 @@ protected: * LLHTTPResponseHeader */ -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_HEADER("HTTP Header"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_HEADER("HTTP Header"); // virtual LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( @@ -445,7 +445,7 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_HTTP_HEADER); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_HEADER); PUMP_DEBUG; if(eos) { @@ -635,7 +635,7 @@ void LLHTTPResponder::markBad( << "\n\n"; } -static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_RESPONDER("HTTP Responder"); +static LLTrace::TimeBlock FTM_PROCESS_HTTP_RESPONDER("HTTP Responder"); // virtual LLIOPipe::EStatus LLHTTPResponder::process_impl( @@ -645,7 +645,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_HTTP_RESPONDER); PUMP_DEBUG; LLIOPipe::EStatus status = STATUS_OK; diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index 35da391ca4..c81f0be865 100755 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -294,7 +294,7 @@ LLIOSocketReader::~LLIOSocketReader() //LL_DEBUGS() << "Destroying LLIOSocketReader" << LL_ENDL; } -static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_READER("Socket Reader"); +static LLTrace::TimeBlock FTM_PROCESS_SOCKET_READER("Socket Reader"); // virtual LLIOPipe::EStatus LLIOSocketReader::process_impl( @@ -304,7 +304,7 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SOCKET_READER); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SOCKET_READER); PUMP_DEBUG; if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) @@ -394,7 +394,7 @@ LLIOSocketWriter::~LLIOSocketWriter() //LL_DEBUGS() << "Destroying LLIOSocketWriter" << LL_ENDL; } -static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_WRITER("Socket Writer"); +static LLTrace::TimeBlock FTM_PROCESS_SOCKET_WRITER("Socket Writer"); // virtual LLIOPipe::EStatus LLIOSocketWriter::process_impl( const LLChannelDescriptors& channels, @@ -403,7 +403,7 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SOCKET_WRITER); PUMP_DEBUG; if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) @@ -550,7 +550,7 @@ void LLIOServerSocket::setResponseTimeout(F32 timeout_secs) mResponseTimeout = timeout_secs; } -static LLFastTimer::DeclareTimer FTM_PROCESS_SERVER_SOCKET("Server Socket"); +static LLTrace::TimeBlock FTM_PROCESS_SERVER_SOCKET("Server Socket"); // virtual LLIOPipe::EStatus LLIOServerSocket::process_impl( const LLChannelDescriptors& channels, @@ -559,7 +559,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SERVER_SOCKET); PUMP_DEBUG; if(!pump) { diff --git a/indra/llmessage/llioutil.cpp b/indra/llmessage/llioutil.cpp index 9fd49d23d4..8ec93af33f 100755 --- a/indra/llmessage/llioutil.cpp +++ b/indra/llmessage/llioutil.cpp @@ -45,7 +45,7 @@ LLIOPipe::EStatus LLIOFlush::process_impl( } -static LLFastTimer::DeclareTimer FTM_PROCESS_SLEEP("IO Sleep"); +static LLTrace::TimeBlock FTM_PROCESS_SLEEP("IO Sleep"); /** * @class LLIOSleep */ @@ -56,7 +56,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SLEEP); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SLEEP); if(mSeconds > 0.0) { if(pump) pump->sleepChain(mSeconds); @@ -66,7 +66,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl( return STATUS_DONE; } -static LLFastTimer::DeclareTimer FTM_PROCESS_ADD_CHAIN("Add Chain"); +static LLTrace::TimeBlock FTM_PROCESS_ADD_CHAIN("Add Chain"); /** * @class LLIOAddChain */ @@ -77,7 +77,7 @@ LLIOPipe::EStatus LLIOAddChain::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_ADD_CHAIN); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_ADD_CHAIN); pump->addChain(mChain, mTimeout); return STATUS_DONE; } diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index cbc09cacb7..2cd1063414 100755 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -431,8 +431,8 @@ void LLPumpIO::pump() pump(DEFAULT_POLL_TIMEOUT); } -static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO"); -static LLFastTimer::DeclareTimer FTM_PUMP_POLL("Pump Poll"); +static LLTrace::TimeBlock FTM_PUMP_IO("Pump IO"); +static LLTrace::TimeBlock FTM_PUMP_POLL("Pump Poll"); LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain) { @@ -446,7 +446,7 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { - LLFastTimer t1(FTM_PUMP_IO); + LL_RECORD_BLOCK_TIME(FTM_PUMP_IO); //LL_INFOS() << "LLPumpIO::pump()" << LL_ENDL; // Run any pending runners. @@ -527,7 +527,7 @@ void LLPumpIO::pump(const S32& poll_timeout) S32 count = 0; S32 client_id = 0; { - LLFastTimer _(FTM_PUMP_POLL); + LL_RECORD_BLOCK_TIME(FTM_PUMP_POLL); apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); } PUMP_DEBUG; @@ -774,7 +774,7 @@ bool LLPumpIO::respond( return true; } -static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); +static LLTrace::TimeBlock FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { @@ -796,7 +796,7 @@ void LLPumpIO::callback() callbacks_t::iterator end = mCallbacks.end(); for(; it != end; ++it) { - LLFastTimer t(FTM_PUMP_CALLBACK_CHAIN); + LL_RECORD_BLOCK_TIME(FTM_PUMP_CALLBACK_CHAIN); // it's always the first and last time for respone chains (*it).mHead = (*it).mChainLinks.begin(); (*it).mInit = true; diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 077a0f69a3..88f86c81b1 100755 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -79,7 +79,7 @@ bool LLSDRPCResponse::extractResponse(const LLSD& sd) return rv; } -static LLFastTimer::DeclareTimer FTM_SDRPC_RESPONSE("SDRPC Response"); +static LLTrace::TimeBlock FTM_SDRPC_RESPONSE("SDRPC Response"); // virtual LLIOPipe::EStatus LLSDRPCResponse::process_impl( @@ -89,7 +89,7 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_SDRPC_RESPONSE); + LL_RECORD_BLOCK_TIME(FTM_SDRPC_RESPONSE); PUMP_DEBUG; if(mIsError) { @@ -173,7 +173,7 @@ bool LLSDRPCClient::call( return true; } -static LLFastTimer::DeclareTimer FTM_PROCESS_SDRPC_CLIENT("SDRPC Client"); +static LLTrace::TimeBlock FTM_PROCESS_SDRPC_CLIENT("SDRPC Client"); // virtual LLIOPipe::EStatus LLSDRPCClient::process_impl( @@ -183,7 +183,7 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SDRPC_CLIENT); PUMP_DEBUG; if((STATE_NONE == mState) || (!pump)) { diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 296a65f8b0..a16115372b 100755 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -95,7 +95,7 @@ void LLSDRPCServer::clearLock() } } -static LLFastTimer::DeclareTimer FTM_PROCESS_SDRPC_SERVER("SDRPC Server"); +static LLTrace::TimeBlock FTM_PROCESS_SDRPC_SERVER("SDRPC Server"); // virtual LLIOPipe::EStatus LLSDRPCServer::process_impl( @@ -105,7 +105,7 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_SDRPC_SERVER); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_SDRPC_SERVER); PUMP_DEBUG; // LL_DEBUGS() << "LLSDRPCServer::process_impl" << LL_ENDL; // Once we have all the data, We need to read the sd on diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index f160f60f30..90263ff074 100755 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -525,7 +525,7 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3 gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET); } -static LLFastTimer::DeclareTimer FTM_PROCESS_MESSAGES("Process Messages"); +static LLTrace::TimeBlock FTM_PROCESS_MESSAGES("Process Messages"); // decode a given message BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) @@ -705,7 +705,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender } { - LLFastTimer t(FTM_PROCESS_MESSAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES); if( !mCurrentRMessageTemplate->callHandlerFunc(gMessageSystem) ) { LL_WARNS() << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << LL_ENDL; diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 898545bd86..70c0354d62 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -282,11 +282,11 @@ LLIOPipe::EStatus LLURLRequest::handleError( return status; } -static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request"); -static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); -static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform"); -static LLFastTimer::DeclareTimer FTM_PROCESS_URL_PUMP_RESPOND("Pump Respond"); -static LLFastTimer::DeclareTimer FTM_URL_ADJUST_TIMEOUT("Adjust Timeout"); +static LLTrace::TimeBlock FTM_PROCESS_URL_REQUEST("URL Request"); +static LLTrace::TimeBlock FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); +static LLTrace::TimeBlock FTM_URL_PERFORM("Perform"); +static LLTrace::TimeBlock FTM_PROCESS_URL_PUMP_RESPOND("Pump Respond"); +static LLTrace::TimeBlock FTM_URL_ADJUST_TIMEOUT("Adjust Timeout"); // virtual LLIOPipe::EStatus LLURLRequest::process_impl( @@ -296,7 +296,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_URL_REQUEST); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_URL_REQUEST); PUMP_DEBUG; //LL_INFOS() << "LLURLRequest::process_impl()" << LL_ENDL; if (!buffer) return STATUS_ERROR; @@ -306,7 +306,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( const S32 MIN_ACCUMULATION = 100000; if(pump && (mDetail->mByteAccumulator > MIN_ACCUMULATION)) { - LLFastTimer t(FTM_URL_ADJUST_TIMEOUT); + LL_RECORD_BLOCK_TIME(FTM_URL_ADJUST_TIMEOUT); // This is a pretty sloppy calculation, but this // tries to make the gross assumption that if data // is coming in at 56kb/s, then this transfer will @@ -355,7 +355,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( PUMP_DEBUG; LLIOPipe::EStatus status = STATUS_BREAK; { - LLFastTimer t(FTM_URL_PERFORM); + LL_RECORD_BLOCK_TIME(FTM_URL_PERFORM); if(!mDetail->mCurlRequest->wait()) { return status ; @@ -369,7 +369,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( bool newmsg = false; { - LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_URL_REQUEST_GET_RESULT); newmsg = mDetail->mCurlRequest->getResult(&result); } @@ -405,7 +405,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( channels); chain.push_back(link); { - LLFastTimer t(FTM_PROCESS_URL_PUMP_RESPOND); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_URL_PUMP_RESPOND); pump->respond(chain, buffer, context); } mCompletionCallback = NULL; @@ -466,10 +466,10 @@ void LLURLRequest::initialize() mResponseTransferedBytes = 0; } -static LLFastTimer::DeclareTimer FTM_URL_REQUEST_CONFIGURE("URL Configure"); +static LLTrace::TimeBlock FTM_URL_REQUEST_CONFIGURE("URL Configure"); bool LLURLRequest::configure() { - LLFastTimer t(FTM_URL_REQUEST_CONFIGURE); + LL_RECORD_BLOCK_TIME(FTM_URL_REQUEST_CONFIGURE); bool rv = false; S32 bytes = mDetail->mResponseBuffer->countAfter( @@ -668,7 +668,7 @@ static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) return header_len; } -static LLFastTimer::DeclareTimer FTM_PROCESS_URL_EXTRACTOR("URL Extractor"); +static LLTrace::TimeBlock FTM_PROCESS_URL_EXTRACTOR("URL Extractor"); /** * LLContextURLExtractor */ @@ -680,7 +680,7 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_URL_EXTRACTOR); PUMP_DEBUG; // The destination host is in the context. if(context.isUndefined() || !mRequest) @@ -755,7 +755,7 @@ void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) mRequestStatus = status; } -static LLFastTimer::DeclareTimer FTM_PROCESS_URL_COMPLETE("URL Complete"); +static LLTrace::TimeBlock FTM_PROCESS_URL_COMPLETE("URL Complete"); // virtual LLIOPipe::EStatus LLURLRequestComplete::process_impl( const LLChannelDescriptors& channels, @@ -764,7 +764,7 @@ LLIOPipe::EStatus LLURLRequestComplete::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_PROCESS_URL_COMPLETE); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_URL_COMPLETE); PUMP_DEBUG; complete(channels, buffer); return STATUS_OK; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index ce5757a6ae..b1ff2f7e07 100755 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -98,7 +98,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback); } -static LLFastTimer::DeclareTimer FTM_RENDER_FONTS("Fonts"); +static LLTrace::TimeBlock FTM_RENDER_FONTS("Fonts"); S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const @@ -129,7 +129,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const { - LLFastTimer _(FTM_RENDER_FONTS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FONTS); if(!sDisplayFont) //do not display texts { diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 5d46fb290c..d66b6d8432 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -242,11 +242,11 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) //---------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_STATS("Image Stats"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_STATS("Image Stats"); // static void LLImageGL::updateStats(F32 current_time) { - LLFastTimer t(FTM_IMAGE_UPDATE_STATS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_STATS); sLastFrameTime = current_time; sBoundTextureMemory = sCurBoundTextureMemory; sCurBoundTextureMemory = S32Bytes(0); @@ -616,10 +616,10 @@ void LLImageGL::setImage(const LLImageRaw* imageraw) setImage(rawdata, FALSE); } -static LLFastTimer::DeclareTimer FTM_SET_IMAGE("setImage"); +static LLTrace::TimeBlock FTM_SET_IMAGE("setImage"); void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) { - LLFastTimer t(FTM_SET_IMAGE); + LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE); bool is_compressed = false; if (mFormatPrimary >= GL_COMPRESSED_RGBA_S3TC_DXT1_EXT && mFormatPrimary <= GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) { @@ -671,7 +671,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) } else { -// LLFastTimer t2(FTM_TEMP4); +// LL_RECORD_BLOCK_TIME(FTM_TEMP4); if(mFormatSwapBytes) { @@ -703,7 +703,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) { stop_glerror(); { -// LLFastTimer t2(FTM_TEMP4); +// LL_RECORD_BLOCK_TIME(FTM_TEMP4); if(mFormatSwapBytes) { @@ -795,7 +795,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) llassert(w > 0 && h > 0 && cur_mip_data); (void)cur_mip_data; { -// LLFastTimer t1(FTM_TEMP4); +// LL_RECORD_BLOCK_TIME(FTM_TEMP4); if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); @@ -1084,10 +1084,10 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_ } // static -static LLFastTimer::DeclareTimer FTM_GENERATE_TEXTURES("generate textures"); +static LLTrace::TimeBlock FTM_GENERATE_TEXTURES("generate textures"); void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures) { - LLFastTimer t(FTM_GENERATE_TEXTURES); + LL_RECORD_BLOCK_TIME(FTM_GENERATE_TEXTURES); bool empty = true; dead_texturelist_t::iterator iter = sDeadTextureList[type].find(format); @@ -1167,10 +1167,10 @@ void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip } // static -static LLFastTimer::DeclareTimer FTM_SET_MANUAL_IMAGE("setManualImage"); +static LLTrace::TimeBlock FTM_SET_MANUAL_IMAGE("setManualImage"); void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression) { - LLFastTimer t(FTM_SET_MANUAL_IMAGE); + LL_RECORD_BLOCK_TIME(FTM_SET_MANUAL_IMAGE); bool use_scratch = false; U32* scratch = NULL; if (LLRender::sGLCoreProfile) @@ -1274,10 +1274,10 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt //create an empty GL texture: just create a texture name //the texture is assiciate with some image by calling glTexImage outside LLImageGL -static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE1("createGLTexture()"); +static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE1("createGLTexture()"); BOOL LLImageGL::createGLTexture() { - LLFastTimer t(FTM_CREATE_GL_TEXTURE1); + LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE1); if (gGLManager.mIsDisabled) { LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL; @@ -1305,10 +1305,10 @@ BOOL LLImageGL::createGLTexture() return TRUE ; } -static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)"); +static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)"); BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category) { - LLFastTimer t(FTM_CREATE_GL_TEXTURE2); + LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE2); if (gGLManager.mIsDisabled) { LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL; @@ -1380,10 +1380,10 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S return createGLTexture(discard_level, rawdata, FALSE, usename); } -static LLFastTimer::DeclareTimer FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)"); +static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)"); BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename) { - LLFastTimer t(FTM_CREATE_GL_TEXTURE3); + LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE3); llassert(data_in); stop_glerror(); diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 3ac2d0b809..14894c53b4 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1062,7 +1062,7 @@ void gl_rect_2d_simple( S32 width, S32 height ) gGL.end(); } -static LLFastTimer::DeclareTimer FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle"); +static LLTrace::TimeBlock FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle"); void gl_segmented_rect_2d_tex(const S32 left, const S32 top, @@ -1073,7 +1073,7 @@ void gl_segmented_rect_2d_tex(const S32 left, const S32 border_size, const U32 edges) { - LLFastTimer _(FTM_RENDER_SEGMENTED_RECT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT); S32 width = llabs(right - left); S32 height = llabs(top - bottom); @@ -1232,7 +1232,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect, const F32 end_fragment, const U32 edges) { - LLFastTimer _(FTM_RENDER_SEGMENTED_RECT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT); const S32 left = rect.mLeft; const S32 right = rect.mRight; const S32 top = rect.mTop; @@ -1419,7 +1419,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect, void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect, const LLVector3& width_vec, const LLVector3& height_vec) { - LLFastTimer _(FTM_RENDER_SEGMENTED_RECT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT); gGL.begin(LLRender::QUADS); { diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index ed2ed081e9..b1a5a194be 100755 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -564,10 +564,10 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } //static -static LLFastTimer::DeclareTimer FTM_VB_DRAW_ARRAYS("drawArrays"); +static LLTrace::TimeBlock FTM_VB_DRAW_ARRAYS("drawArrays"); void LLVertexBuffer::drawArrays(U32 mode, const std::vector& pos, const std::vector& norm) { - LLFastTimer t(FTM_VB_DRAW_ARRAYS); + LL_RECORD_BLOCK_TIME(FTM_VB_DRAW_ARRAYS); llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL); gGL.syncMatrices(); @@ -812,7 +812,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const placeFence(); } -static LLFastTimer::DeclareTimer FTM_GL_DRAW_ARRAYS("GL draw arrays"); +static LLTrace::TimeBlock FTM_GL_DRAW_ARRAYS("GL draw arrays"); void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const { llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL); @@ -848,7 +848,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const } { - LLFastTimer t2(FTM_GL_DRAW_ARRAYS); + LL_RECORD_BLOCK_TIME(FTM_GL_DRAW_ARRAYS); stop_glerror(); LLGLSLShader::startProfile(); glDrawArrays(sGLMode[mode], first, count); @@ -1329,7 +1329,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) } } -static LLFastTimer::DeclareTimer FTM_SETUP_VERTEX_ARRAY("Setup VAO"); +static LLTrace::TimeBlock FTM_SETUP_VERTEX_ARRAY("Setup VAO"); void LLVertexBuffer::setupVertexArray() { @@ -1338,7 +1338,7 @@ void LLVertexBuffer::setupVertexArray() return; } - LLFastTimer t(FTM_SETUP_VERTEX_ARRAY); + LL_RECORD_BLOCK_TIME(FTM_SETUP_VERTEX_ARRAY); #if GL_ARB_vertex_array_object glBindVertexArray(mGLArray); #endif @@ -1493,8 +1493,8 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count) return true; } -static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range"); -static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map"); +static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range"); +static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER("VBO Map"); // Map for data access volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) @@ -1565,7 +1565,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (map_range) { #ifdef GL_ARB_map_buffer_range - LLFastTimer t(FTM_VBO_MAP_BUFFER_RANGE); + LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER_RANGE); S32 offset = mOffsets[type] + sTypeSize[type]*index; S32 length = (sTypeSize[type]*count+0xF) & ~0xF; src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length, @@ -1589,7 +1589,7 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo } } - LLFastTimer t(FTM_VBO_MAP_BUFFER); + LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_BUFFER); src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT); @@ -1675,8 +1675,8 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo } -static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX_RANGE("IBO Map Range"); -static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map"); +static LLTrace::TimeBlock FTM_VBO_MAP_INDEX_RANGE("IBO Map Range"); +static LLTrace::TimeBlock FTM_VBO_MAP_INDEX("IBO Map"); volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { @@ -1754,7 +1754,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (map_range) { #ifdef GL_ARB_map_buffer_range - LLFastTimer t(FTM_VBO_MAP_INDEX_RANGE); + LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX_RANGE); S32 offset = sizeof(U16)*index; S32 length = sizeof(U16)*count; src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, @@ -1766,7 +1766,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range else { #ifdef GL_ARB_map_buffer_range - LLFastTimer t(FTM_VBO_MAP_INDEX); + LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX); src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT); @@ -1790,7 +1790,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range } else { - LLFastTimer t(FTM_VBO_MAP_INDEX); + LL_RECORD_BLOCK_TIME(FTM_VBO_MAP_INDEX); map_range = false; src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); } @@ -1841,12 +1841,12 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range } } -static LLFastTimer::DeclareTimer FTM_VBO_UNMAP("VBO Unmap"); -static LLFastTimer::DeclareTimer FTM_VBO_FLUSH_RANGE("Flush VBO Range"); +static LLTrace::TimeBlock FTM_VBO_UNMAP("VBO Unmap"); +static LLTrace::TimeBlock FTM_VBO_FLUSH_RANGE("Flush VBO Range"); -static LLFastTimer::DeclareTimer FTM_IBO_UNMAP("IBO Unmap"); -static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range"); +static LLTrace::TimeBlock FTM_IBO_UNMAP("IBO Unmap"); +static LLTrace::TimeBlock FTM_IBO_FLUSH_RANGE("Flush IBO Range"); void LLVertexBuffer::unmapBuffer() { @@ -1859,7 +1859,7 @@ void LLVertexBuffer::unmapBuffer() if (mMappedData && mVertexLocked) { - LLFastTimer t(FTM_VBO_UNMAP); + LL_RECORD_BLOCK_TIME(FTM_VBO_UNMAP); bindGLBuffer(true); updated_all = mIndexLocked; //both vertex and index buffers done updating @@ -1900,7 +1900,7 @@ void LLVertexBuffer::unmapBuffer() S32 length = sTypeSize[region.mType]*region.mCount; if (gGLManager.mHasMapBufferRange) { - LLFastTimer t(FTM_VBO_FLUSH_RANGE); + LL_RECORD_BLOCK_TIME(FTM_VBO_FLUSH_RANGE); #ifdef GL_ARB_map_buffer_range glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length); #endif @@ -1930,7 +1930,7 @@ void LLVertexBuffer::unmapBuffer() if (mMappedIndexData && mIndexLocked) { - LLFastTimer t(FTM_IBO_UNMAP); + LL_RECORD_BLOCK_TIME(FTM_IBO_UNMAP); bindGLIndices(); if(!mMappable) { @@ -1967,7 +1967,7 @@ void LLVertexBuffer::unmapBuffer() S32 length = sizeof(U16)*region.mCount; if (gGLManager.mHasMapBufferRange) { - LLFastTimer t(FTM_IBO_FLUSH_RANGE); + LL_RECORD_BLOCK_TIME(FTM_IBO_FLUSH_RANGE); #ifdef GL_ARB_map_buffer_range glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length); #endif @@ -2111,13 +2111,13 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider& strider, S32 in //---------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_BIND_GL_ARRAY("Bind Array"); +static LLTrace::TimeBlock FTM_BIND_GL_ARRAY("Bind Array"); bool LLVertexBuffer::bindGLArray() { if (mGLArray && sGLRenderArray != mGLArray) { { - LLFastTimer t(FTM_BIND_GL_ARRAY); + LL_RECORD_BLOCK_TIME(FTM_BIND_GL_ARRAY); #if GL_ARB_vertex_array_object glBindVertexArray(mGLArray); #endif @@ -2134,7 +2134,7 @@ bool LLVertexBuffer::bindGLArray() return false; } -static LLFastTimer::DeclareTimer FTM_BIND_GL_BUFFER("Bind Buffer"); +static LLTrace::TimeBlock FTM_BIND_GL_BUFFER("Bind Buffer"); bool LLVertexBuffer::bindGLBuffer(bool force_bind) { @@ -2144,7 +2144,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind) if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive)))) { - LLFastTimer t(FTM_BIND_GL_BUFFER); + LL_RECORD_BLOCK_TIME(FTM_BIND_GL_BUFFER); /*if (sMapped) { LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL; @@ -2166,7 +2166,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind) return ret; } -static LLFastTimer::DeclareTimer FTM_BIND_GL_INDICES("Bind Indices"); +static LLTrace::TimeBlock FTM_BIND_GL_INDICES("Bind Indices"); bool LLVertexBuffer::bindGLIndices(bool force_bind) { @@ -2175,7 +2175,7 @@ bool LLVertexBuffer::bindGLIndices(bool force_bind) bool ret = false; if (useVBOs() && (force_bind || (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive)))) { - LLFastTimer t(FTM_BIND_GL_INDICES); + LL_RECORD_BLOCK_TIME(FTM_BIND_GL_INDICES); /*if (sMapped) { LL_ERRS() << "VBO bound while another VBO mapped!" << LL_ENDL; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 7d0779d88d..7a71946290 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3124,8 +3124,8 @@ boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t:: return mCloseSignal.connect(cb); } -LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build"); -static LLFastTimer::DeclareTimer FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference"); +LLTrace::TimeBlock POST_BUILD("Floater Post Build"); +static LLTrace::TimeBlock FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference"); bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node) { @@ -3155,7 +3155,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str LLUICtrlFactory::instance().pushFileName(xml_filename); - LLFastTimer _(FTM_EXTERNAL_FLOATER_LOAD); + LL_RECORD_BLOCK_TIME(FTM_EXTERNAL_FLOATER_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; @@ -3232,7 +3232,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str BOOL result; { - LLFastTimer ft(POST_BUILD); + LL_RECORD_BLOCK_TIME(POST_BUILD); result = postBuild(); } @@ -3275,11 +3275,11 @@ bool LLFloater::isVisible(const LLFloater* floater) return floater && floater->getVisible(); } -static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters"); +static LLTrace::TimeBlock FTM_BUILD_FLOATERS("Build Floaters"); bool LLFloater::buildFromFile(const std::string& filename) { - LLFastTimer timer(FTM_BUILD_FLOATERS); + LL_RECORD_BLOCK_TIME(FTM_BUILD_FLOATERS); LLXMLNodePtr root; if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 5628baa4a1..419ad56e64 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -317,11 +317,11 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) return llround(mTargetHeight); } -static LLFastTimer::DeclareTimer FTM_FILTER("Filter Folder View"); +static LLTrace::TimeBlock FTM_FILTER("Filter Folder View"); void LLFolderView::filter( LLFolderViewFilter& filter ) { - LLFastTimer t2(FTM_FILTER); + LL_RECORD_BLOCK_TIME(FTM_FILTER); filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); getViewModelItem()->filter(filter); @@ -480,10 +480,10 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) return rv; } -static LLFastTimer::DeclareTimer FTM_SANITIZE_SELECTION("Sanitize Selection"); +static LLTrace::TimeBlock FTM_SANITIZE_SELECTION("Sanitize Selection"); void LLFolderView::sanitizeSelection() { - LLFastTimer _(FTM_SANITIZE_SELECTION); + LL_RECORD_BLOCK_TIME(FTM_SANITIZE_SELECTION); // store off current item in case it is automatically deselected // and we want to preserve context LLFolderViewItem* original_selected_item = getCurSelectedItem(); @@ -1586,15 +1586,15 @@ void LLFolderView::setShowSingleSelection(BOOL show) } } -static LLFastTimer::DeclareTimer FTM_AUTO_SELECT("Open and Select"); -static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory"); +static LLTrace::TimeBlock FTM_AUTO_SELECT("Open and Select"); +static LLTrace::TimeBlock FTM_INVENTORY("Inventory"); // Main idle routine void LLFolderView::update() { // If this is associated with the user's inventory, don't do anything // until that inventory is loaded up. - LLFastTimer t2(FTM_INVENTORY); + LL_RECORD_BLOCK_TIME(FTM_INVENTORY); if (getFolderViewModel()->getFilter().isModified() && getFolderViewModel()->getFilter().isNotDefault()) { @@ -1612,7 +1612,7 @@ void LLFolderView::update() // automatically show matching items, and select first one if we had a selection if (mNeedsAutoSelect) { - LLFastTimer t3(FTM_AUTO_SELECT); + LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT); // select new item only if a filtered item not currently selected LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->getViewModelItem()->potentiallyVisible())) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 92504ba8c2..aab9a4e84a 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -941,7 +941,7 @@ void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) folder->addFolder(this); } -static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); +static LLTrace::TimeBlock FTM_ARRANGE("Arrange"); // Finds width and height of this object and its children. Also // makes sure that this view and its children are the right size. @@ -950,7 +950,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height ) // sort before laying out contents getRoot()->getFolderViewModel()->sort(this); - LLFastTimer t2(FTM_ARRANGE); + LL_RECORD_BLOCK_TIME(FTM_ARRANGE); // evaluate mHasVisibleChildren mHasVisibleChildren = false; diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 0d232cc2cf..240a6fff81 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -347,13 +347,13 @@ LLColor3 LLKeywords::readColor( const std::string& s ) return LLColor3( r, g, b ); } -LLFastTimer::DeclareTimer FTM_SYNTAX_COLORING("Syntax Coloring"); +LLTrace::TimeBlock FTM_SYNTAX_COLORING("Syntax Coloring"); // Walk through a string, applying the rules specified by the keyword token list and // create a list of color segments. void LLKeywords::findSegments(std::vector* seg_list, const LLWString& wtext, const LLColor4 &defaultColor, LLTextEditor& editor) { - LLFastTimer ft(FTM_SYNTAX_COLORING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_COLORING); seg_list->clear(); if( wtext.empty() ) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index edb32954c6..e40dcb28ef 100755 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -316,11 +316,11 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed) mNeedsLayout = true; } -static LLFastTimer::DeclareTimer FTM_UPDATE_LAYOUT("Update LayoutStacks"); +static LLTrace::TimeBlock FTM_UPDATE_LAYOUT("Update LayoutStacks"); void LLLayoutStack::updateLayout() { - LLFastTimer ft(FTM_UPDATE_LAYOUT); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_LAYOUT); if (!mNeedsLayout) return; diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 389d18a350..f0157a2dec 100755 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -372,7 +372,7 @@ void LLPanel::setBorderVisible(BOOL b) } } -LLFastTimer::DeclareTimer FTM_PANEL_CONSTRUCTION("Panel Construction"); +LLTrace::TimeBlock FTM_PANEL_CONSTRUCTION("Panel Construction"); LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_node) { @@ -384,7 +384,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ LLPanel* panelp = NULL; - { LLFastTimer _(FTM_PANEL_CONSTRUCTION); + { LL_RECORD_BLOCK_TIME(FTM_PANEL_CONSTRUCTION); if(!class_attr.empty()) { @@ -488,15 +488,15 @@ void LLPanel::initFromParams(const LLPanel::Params& p) setAcceptsBadge(p.accepts_badge); } -static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup"); -static LLFastTimer::DeclareTimer FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference"); -static LLFastTimer::DeclareTimer FTM_PANEL_POSTBUILD("Panel PostBuild"); +static LLTrace::TimeBlock FTM_PANEL_SETUP("Panel Setup"); +static LLTrace::TimeBlock FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference"); +static LLTrace::TimeBlock FTM_PANEL_POSTBUILD("Panel PostBuild"); BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params) { Params params(default_params); { - LLFastTimer timer(FTM_PANEL_SETUP); + LL_RECORD_BLOCK_TIME(FTM_PANEL_SETUP); LLXMLNodePtr referenced_xml; std::string xml_filename = mXMLFilename; @@ -526,7 +526,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu LLUICtrlFactory::instance().pushFileName(xml_filename); - LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD); + LL_RECORD_BLOCK_TIME(FTM_EXTERNAL_PANEL_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; @@ -557,7 +557,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu params.from_xui = true; applyXUILayout(params, parent); { - LLFastTimer timer(FTM_PANEL_CONSTRUCTION); + LL_RECORD_BLOCK_TIME(FTM_PANEL_CONSTRUCTION); initFromParams(params); } @@ -574,7 +574,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu } { - LLFastTimer timer(FTM_PANEL_POSTBUILD); + LL_RECORD_BLOCK_TIME(FTM_PANEL_POSTBUILD); postBuild(); } } @@ -963,14 +963,14 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t:: return mVisibleSignal->connect(cb); } -static LLFastTimer::DeclareTimer FTM_BUILD_PANELS("Build Panels"); +static LLTrace::TimeBlock FTM_BUILD_PANELS("Build Panels"); //----------------------------------------------------------------------------- // buildPanel() //----------------------------------------------------------------------------- BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params) { - LLFastTimer timer(FTM_BUILD_PANELS); + LL_RECORD_BLOCK_TIME(FTM_BUILD_PANELS); BOOL didPost = FALSE; LLXMLNodePtr root; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f54fb36abe..79284c9528 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2840,10 +2840,10 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name) return NULL; } -LLFastTimer::DeclareTimer FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item"); +LLTrace::TimeBlock FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item"); LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata) { - LLFastTimer _(FTM_ADD_SCROLLLIST_ELEMENT); + LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT); LLScrollListItem::Params item_params; LLParamSDParser parser; parser.readSD(element, item_params); @@ -2853,14 +2853,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos) { - LLFastTimer _(FTM_ADD_SCROLLLIST_ELEMENT); + LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT); LLScrollListItem *new_item = new LLScrollListItem(item_p); return addRow(new_item, item_p, pos); } LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& item_p, EAddPosition pos) { - LLFastTimer _(FTM_ADD_SCROLLLIST_ELEMENT); + LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT); if (!item_p.validateBlock() || !new_item) return NULL; new_item->setNumColumns(mColumns.size()); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 94cf93bd3c..3f4dcb7579 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -48,7 +48,7 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. -LLTrace::MemStatHandle LLTextSegment::sMemStat("LLTextSegment"); +//LLTrace::MemStatHandle LLTextSegment::sMemStat("LLTextSegment"); LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), @@ -1442,10 +1442,10 @@ S32 LLTextBase::getLeftOffset(S32 width) } -static LLFastTimer::DeclareTimer FTM_TEXT_REFLOW ("Text Reflow"); +static LLTrace::TimeBlock FTM_TEXT_REFLOW ("Text Reflow"); void LLTextBase::reflow() { - LLFastTimer ft(FTM_TEXT_REFLOW); + LL_RECORD_BLOCK_TIME(FTM_TEXT_REFLOW); updateSegments(); @@ -1784,10 +1784,10 @@ void LLTextBase::removeDocumentChild(LLView* view) } -static LLFastTimer::DeclareTimer FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments"); +static LLTrace::TimeBlock FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments"); void LLTextBase::updateSegments() { - LLFastTimer ft(FTM_UPDATE_TEXT_SEGMENTS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS); createDefaultSegment(); } @@ -1990,7 +1990,7 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name) } } -static LLFastTimer::DeclareTimer FTM_PARSE_HTML("Parse HTML"); +static LLTrace::TimeBlock FTM_PARSE_HTML("Parse HTML"); void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params) { @@ -2000,7 +2000,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para S32 part = (S32)LLTextParser::WHOLE; if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358). { - LLFastTimer _(FTM_PARSE_HTML); + LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML); S32 start=0,end=0; LLUrlMatch match; std::string text = new_text; @@ -2067,11 +2067,11 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } } -static LLFastTimer::DeclareTimer FTM_APPEND_TEXT("Append Text"); +static LLTrace::TimeBlock FTM_APPEND_TEXT("Append Text"); void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params) { - LLFastTimer _(FTM_APPEND_TEXT); + LL_RECORD_BLOCK_TIME(FTM_APPEND_TEXT); if (new_text.empty()) return; diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 74dc7f9693..5b7f0a7fa4 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -100,7 +100,7 @@ public: S32 getEnd() const { return mEnd; } void setEnd( S32 end ) { mEnd = end; } - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; protected: S32 mStart; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 36431d3723..2ed9c58442 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2484,13 +2484,13 @@ BOOL LLTextEditor::tryToRevertToPristineState() } -static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); +static LLTrace::TimeBlock FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); void LLTextEditor::loadKeywords(const std::string& filename, const std::vector& funcs, const std::vector& tooltips, const LLColor3& color) { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); if(mKeywords.loadFromFile(filename)) { S32 count = llmin(funcs.size(), tooltips.size()); @@ -2515,7 +2515,7 @@ void LLTextEditor::updateSegments() { if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); // HACK: No non-ascii keywords for now segment_vec_t segment_list; mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp index 5131f6b704..ad7fb005f5 100755 --- a/indra/llui/lltrans.cpp +++ b/indra/llui/lltrans.cpp @@ -135,14 +135,14 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) -static LLFastTimer::DeclareTimer FTM_GET_TRANS("Translate string"); +static LLTrace::TimeBlock FTM_GET_TRANS("Translate string"); //static std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args) { // Don't care about time as much as call count. Make sure we're not // calling LLTrans::getString() in an inner loop. JC - LLFastTimer timer(FTM_GET_TRANS); + LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) @@ -166,7 +166,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args { // Don't care about time as much as call count. Make sure we're not // calling LLTrans::getString() in an inner loop. JC - LLFastTimer timer(FTM_GET_TRANS); + LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) @@ -185,7 +185,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args //static bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args) { - LLFastTimer timer(FTM_GET_TRANS); + LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) @@ -207,7 +207,7 @@ bool LLTrans::findString(std::string &result, const std::string &xml_desc, const //static bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLSD& msg_args) { - LLFastTimer timer(FTM_GET_TRANS); + LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index abcd5da6c4..9a1a0e0677 100755 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -737,11 +737,11 @@ public: } }; -LLFastTimer::DeclareTimer FTM_FOCUS_FIRST_ITEM("Focus First Item"); +LLTrace::TimeBlock FTM_FOCUS_FIRST_ITEM("Focus First Item"); BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) { - LLFastTimer _(FTM_FOCUS_FIRST_ITEM); + LL_RECORD_BLOCK_TIME(FTM_FOCUS_FIRST_ITEM); // try to select default tab group child LLCtrlQuery query = getTabOrderQuery(); // sort things such that the default tab group is at the front diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 291da2ce48..1f5d77a958 100755 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -44,9 +44,9 @@ // this library includes #include "llpanel.h" -LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION("Widget Construction"); -LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS("Widget InitFromParams"); -LLFastTimer::DeclareTimer FTM_WIDGET_SETUP("Widget Setup"); +LLTrace::TimeBlock FTM_WIDGET_CONSTRUCTION("Widget Construction"); +LLTrace::TimeBlock FTM_INIT_FROM_PARAMS("Widget InitFromParams"); +LLTrace::TimeBlock FTM_WIDGET_SETUP("Widget Setup"); //----------------------------------------------------------------------------- @@ -105,12 +105,12 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa } } -static LLFastTimer::DeclareTimer FTM_CREATE_CHILDREN("Create XUI Children"); +static LLTrace::TimeBlock FTM_CREATE_CHILDREN("Create XUI Children"); //static void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node) { - LLFastTimer ft(FTM_CREATE_CHILDREN); + LL_RECORD_BLOCK_TIME(FTM_CREATE_CHILDREN); if (node.isNull()) return; for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling()) @@ -147,14 +147,14 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid } -static LLFastTimer::DeclareTimer FTM_XML_PARSE("XML Reading/Parsing"); +static LLTrace::TimeBlock FTM_XML_PARSE("XML Reading/Parsing"); //----------------------------------------------------------------------------- // getLayeredXMLNode() //----------------------------------------------------------------------------- bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root, LLDir::ESkinConstraint constraint) { - LLFastTimer timer(FTM_XML_PARSE); + LL_RECORD_BLOCK_TIME(FTM_XML_PARSE); std::vector paths = gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint); @@ -179,11 +179,11 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename) //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_CREATE_FROM_XML("Create child widget"); +static LLTrace::TimeBlock FTM_CREATE_FROM_XML("Create child widget"); LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node) { - LLFastTimer timer(FTM_CREATE_FROM_XML); + LL_RECORD_BLOCK_TIME(FTM_CREATE_FROM_XML); std::string ctrl_type = node->getName()->mString; LLStringUtil::toLower(ctrl_type); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 87b3937417..678e837fa1 100755 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -74,9 +74,9 @@ class LLWidgetNameRegistry //: public LLRegistrySingleton //{}; -extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP; -extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION; -extern LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS; +extern LLTrace::TimeBlock FTM_WIDGET_SETUP; +extern LLTrace::TimeBlock FTM_WIDGET_CONSTRUCTION; +extern LLTrace::TimeBlock FTM_INIT_FROM_PARAMS; // Build time optimization, generate this once in .cpp file #ifndef LLUICTRLFACTORY_CPP @@ -229,10 +229,10 @@ private: //return NULL; } - { LLFastTimer _(FTM_WIDGET_CONSTRUCTION); + { LL_RECORD_BLOCK_TIME(FTM_WIDGET_CONSTRUCTION); widget = new T(params); } - { LLFastTimer _(FTM_INIT_FROM_PARAMS); + { LL_RECORD_BLOCK_TIME(FTM_INIT_FROM_PARAMS); widget->initFromParams(params); } @@ -247,7 +247,7 @@ private: template static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node) { - LLFastTimer timer(FTM_WIDGET_SETUP); + LL_RECORD_BLOCK_TIME(FTM_WIDGET_SETUP); typename T::Params params(getDefaultParams()); diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 23fc53ea88..9a6810947e 100755 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -31,7 +31,7 @@ #include "llsd.h" #include "lltrans.h" -LLFastTimer::DeclareTimer FTM_UI_STRING("UI String"); +LLTrace::TimeBlock FTM_UI_STRING("UI String"); LLUIString::LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args) @@ -56,7 +56,7 @@ void LLUIString::setArgList(const LLStringUtil::format_map_t& args) void LLUIString::setArgs(const LLSD& sd) { - LLFastTimer timer(FTM_UI_STRING); + LL_RECORD_BLOCK_TIME(FTM_UI_STRING); if (!sd.isMap()) return; for(LLSD::map_const_iterator sd_it = sd.beginMap(); @@ -119,7 +119,7 @@ void LLUIString::updateResult() const { mNeedsResult = false; - LLFastTimer timer(FTM_UI_STRING); + LL_RECORD_BLOCK_TIME(FTM_UI_STRING); // optimize for empty strings (don't attempt string replacement) if (mOrig.empty()) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index ae62d72f73..22461083a6 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -69,7 +69,7 @@ LLView* LLView::sPreviewClickedElement = NULL; BOOL LLView::sDrawPreviewHighlights = FALSE; S32 LLView::sLastLeftXML = S32_MIN; S32 LLView::sLastBottomXML = S32_MIN; -LLTrace::MemStatHandle LLView::sMemStat("LLView"); +//LLTrace::MemStatHandle LLView::sMemStat("LLView"); std::vector LLViewDrawContext::sDrawContextStack; LLView::DrilldownFunc LLView::sDrilldown = @@ -1504,11 +1504,11 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const return getChild(name, recurse); } -static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets"); +static LLTrace::TimeBlock FTM_FIND_VIEWS("Find Widgets"); LLView* LLView::findChildView(const std::string& name, BOOL recurse) const { - LLFastTimer ft(FTM_FIND_VIEWS); + LL_RECORD_BLOCK_TIME(FTM_FIND_VIEWS); //richard: should we allow empty names? //if(name.empty()) // return NULL; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index e224233c3c..f6799d8cd9 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -675,7 +675,7 @@ public: static S32 sLastLeftXML; static S32 sLastBottomXML; static BOOL sForceReshape; - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; }; namespace LLInitParam diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index 901260bec8..1b0ab6d92c 100755 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,7 +35,7 @@ // external library headers // other Linden headers -LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel"); +//LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel"); /// LLViewModel::LLViewModel() diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index a0a13267ac..f329201b9f 100755 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -83,7 +83,7 @@ public: // void setDirty() { mDirty = true; } - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; protected: LLSD mValue; diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 6a1f937340..46b089fd02 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -677,12 +677,12 @@ LLXUIParser::LLXUIParser() } } -static LLFastTimer::DeclareTimer FTM_PARSE_XUI("XUI Parsing"); +static LLTrace::TimeBlock FTM_PARSE_XUI("XUI Parsing"); const LLXMLNodePtr DUMMY_NODE = new LLXMLNode(); void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename, bool silent) { - LLFastTimer timer(FTM_PARSE_XUI); + LL_RECORD_BLOCK_TIME(FTM_PARSE_XUI); mNameStack.clear(); mRootNodeName = node->getName()->mString; mCurFileName = filename; @@ -1394,7 +1394,7 @@ LLSimpleXUIParser::~LLSimpleXUIParser() bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBlock& block, bool silent) { - LLFastTimer timer(FTM_PARSE_XUI); + LL_RECORD_BLOCK_TIME(FTM_PARSE_XUI); mParser = XML_ParserCreate(NULL); XML_SetUserData(mParser, this); diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index 2120812f91..2af7a7d35d 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -40,7 +40,7 @@ const S32 LLVFile::WRITE = 0x00000002; const S32 LLVFile::READ_WRITE = 0x00000003; // LLVFile::READ & LLVFile::WRITE const S32 LLVFile::APPEND = 0x00000006; // 0x00000004 & LLVFile::WRITE -static LLFastTimer::DeclareTimer FTM_VFILE_WAIT("VFile Wait"); +static LLTrace::TimeBlock FTM_VFILE_WAIT("VFile Wait"); //---------------------------------------------------------------------------- LLVFSThread* LLVFile::sVFSThread = NULL; @@ -316,7 +316,7 @@ BOOL LLVFile::setMaxSize(S32 size) if (!mVFS->checkAvailable(size)) { - //LLFastTimer t(FTM_VFILE_WAIT); + //LL_RECORD_BLOCK_TIME(FTM_VFILE_WAIT); S32 count = 0; while (sVFSThread->getPending() > 1000) { @@ -424,7 +424,7 @@ bool LLVFile::isLocked(EVFSLock lock) void LLVFile::waitForLock(EVFSLock lock) { - //LLFastTimer t(FTM_VFILE_WAIT); + //LL_RECORD_BLOCK_TIME(FTM_VFILE_WAIT); // spin until the lock clears while (isLocked(lock)) { diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 3ca659b78a..d19bcab183 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1824,8 +1824,8 @@ void LLWindowWin32::gatherInput() mMousePositionModified = FALSE; } -static LLFastTimer::DeclareTimer FTM_KEYHANDLER("Handle Keyboard"); -static LLFastTimer::DeclareTimer FTM_MOUSEHANDLER("Handle Mouse"); +static LLTrace::TimeBlock FTM_KEYHANDLER("Handle Keyboard"); +static LLTrace::TimeBlock FTM_MOUSEHANDLER("Handle Mouse"); LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param) { @@ -2071,7 +2071,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mKeyVirtualKey = w_param; window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_KEYUP"); - LLFastTimer t2(FTM_KEYHANDLER); + LL_RECORD_BLOCK_TIME(FTM_KEYHANDLER); if (gDebugWindowProc) { @@ -2190,7 +2190,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_LBUTTONDOWN: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDOWN"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); sHandleLeftMouseUp = true; if (LLWinImm::isAvailable() && window_imp->mPreeditor) @@ -2256,7 +2256,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_LBUTTONUP: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONUP"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); if (!sHandleLeftMouseUp) { @@ -2297,7 +2297,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_RBUTTONDOWN: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_RBUTTONDOWN"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); if (LLWinImm::isAvailable() && window_imp->mPreeditor) { window_imp->interruptLanguageTextInput(); @@ -2331,7 +2331,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_RBUTTONUP: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_RBUTTONUP"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); // Because we move the cursor position in the app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the @@ -2361,7 +2361,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // case WM_MBUTTONDBLCLK: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONDOWN"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); if (LLWinImm::isAvailable() && window_imp->mPreeditor) { window_imp->interruptLanguageTextInput(); @@ -2395,7 +2395,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_MBUTTONUP: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MBUTTONUP"); - LLFastTimer t2(FTM_MOUSEHANDLER); + LL_RECORD_BLOCK_TIME(FTM_MOUSEHANDLER); // Because we move the cursor position in the llviewer app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 93e0cddd64..5fec0d927f 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1126,14 +1126,14 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) } } -static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Camera"); +static LLTrace::TimeBlock FTM_UPDATE_CAMERA("Camera"); //----------------------------------------------------------------------------- // updateCamera() //----------------------------------------------------------------------------- void LLAgentCamera::updateCamera() { - LLFastTimer t(FTM_UPDATE_CAMERA); + LL_RECORD_BLOCK_TIME(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 7f37cee8b8..4f776aa15a 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1237,24 +1237,24 @@ void LLAppViewer::checkMemory() } } -static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages"); -static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep"); -static LLFastTimer::DeclareTimer FTM_YIELD("Yield"); - -static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); -static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode"); -static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread"); -static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); -static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); -static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); -static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); -static LLFastTimer::DeclareTimer FTM_PUMP_ARES("Ares"); -static LLFastTimer::DeclareTimer FTM_PUMP_SERVICE("Service"); -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"); +static LLTrace::TimeBlock FTM_MESSAGES("System Messages"); +static LLTrace::TimeBlock FTM_SLEEP("Sleep"); +static LLTrace::TimeBlock FTM_YIELD("Yield"); + +static LLTrace::TimeBlock FTM_TEXTURE_CACHE("Texture Cache"); +static LLTrace::TimeBlock FTM_DECODE("Image Decode"); +static LLTrace::TimeBlock FTM_VFS("VFS Thread"); +static LLTrace::TimeBlock FTM_LFS("LFS Thread"); +static LLTrace::TimeBlock FTM_PAUSE_THREADS("Pause Threads"); +static LLTrace::TimeBlock FTM_IDLE("Idle"); +static LLTrace::TimeBlock FTM_PUMP("Pump"); +static LLTrace::TimeBlock FTM_PUMP_ARES("Ares"); +static LLTrace::TimeBlock FTM_PUMP_SERVICE("Service"); +static LLTrace::TimeBlock FTM_SERVICE_CALLBACK("Callback"); +static LLTrace::TimeBlock FTM_AGENT_AUTOPILOT("Autopilot"); +static LLTrace::TimeBlock FTM_AGENT_UPDATE("Update"); + +LLTrace::TimeBlock FTM_FRAME("Frame"); bool LLAppViewer::mainLoop() { @@ -1295,7 +1295,7 @@ bool LLAppViewer::mainLoop() // Handle messages while (!LLApp::isExiting()) { - LLFastTimer _(FTM_FRAME); + LL_RECORD_BLOCK_TIME(FTM_FRAME); LLTrace::TimeBlock::processTimes(); LLTrace::get_frame_recording().nextPeriod(); LLTrace::TimeBlock::logStats(); @@ -1314,7 +1314,7 @@ bool LLAppViewer::mainLoop() if (gViewerWindow) { - LLFastTimer t2(FTM_MESSAGES); + LL_RECORD_BLOCK_TIME(FTM_MESSAGES); gViewerWindow->getWindow()->processMiscNativeEvents(); } @@ -1322,7 +1322,7 @@ bool LLAppViewer::mainLoop() if (gViewerWindow) { - LLFastTimer t2(FTM_MESSAGES); + LL_RECORD_BLOCK_TIME(FTM_MESSAGES); if (!restoreErrorTrap()) { LL_WARNS() << " Someone took over my signal/exception handler (post messagehandling)!" << LL_ENDL; @@ -1372,24 +1372,24 @@ bool LLAppViewer::mainLoop() { pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds! - LLFastTimer t3(FTM_IDLE); + LL_RECORD_BLOCK_TIME(FTM_IDLE); idle(); if (gAres != NULL && gAres->isInitialized()) { pingMainloopTimeout("Main:ServicePump"); - LLFastTimer t4(FTM_PUMP); + LL_RECORD_BLOCK_TIME(FTM_PUMP); { - LLFastTimer t(FTM_PUMP_ARES); + LL_RECORD_BLOCK_TIME(FTM_PUMP_ARES); gAres->process(); } { - LLFastTimer t(FTM_PUMP_SERVICE); + LL_RECORD_BLOCK_TIME(FTM_PUMP_SERVICE); // this pump is necessary to make the login screen show up gServicePump->pump(); { - LLFastTimer t(FTM_SERVICE_CALLBACK); + LL_RECORD_BLOCK_TIME(FTM_SERVICE_CALLBACK); gServicePump->callback(); } } @@ -1425,12 +1425,12 @@ bool LLAppViewer::mainLoop() // Sleep and run background threads { - LLFastTimer t2(FTM_SLEEP); + LL_RECORD_BLOCK_TIME(FTM_SLEEP); // yield some time to the os based on command line option if(mYieldTime >= 0) { - LLFastTimer t(FTM_YIELD); + LL_RECORD_BLOCK_TIME(FTM_YIELD); ms_sleep(mYieldTime); } @@ -1476,11 +1476,11 @@ bool LLAppViewer::mainLoop() work_pending += updateTextureThreads(max_time); { - LLFastTimer ftm(FTM_VFS); + LL_RECORD_BLOCK_TIME(FTM_VFS); io_pending += LLVFSThread::updateClass(1); } { - LLFastTimer ftm(FTM_LFS); + LL_RECORD_BLOCK_TIME(FTM_LFS); io_pending += LLLFSThread::updateClass(1); } @@ -1595,15 +1595,15 @@ S32 LLAppViewer::updateTextureThreads(F32 max_time) { S32 work_pending = 0; { - LLFastTimer ftm(FTM_TEXTURE_CACHE); + LL_RECORD_BLOCK_TIME(FTM_TEXTURE_CACHE); work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread } { - LLFastTimer ftm(FTM_DECODE); + LL_RECORD_BLOCK_TIME(FTM_DECODE); work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread } { - LLFastTimer ftm(FTM_DECODE); + LL_RECORD_BLOCK_TIME(FTM_DECODE); work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread } return work_pending; @@ -4467,20 +4467,20 @@ public: } }; -static LLFastTimer::DeclareTimer FTM_AUDIO_UPDATE("Update Audio"); -static LLFastTimer::DeclareTimer FTM_CLEANUP("Cleanup"); -static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLES("Drawables"); -static LLFastTimer::DeclareTimer FTM_CLEANUP_OBJECTS("Objects"); -static LLFastTimer::DeclareTimer FTM_IDLE_CB("Idle Callbacks"); -static LLFastTimer::DeclareTimer FTM_LOD_UPDATE("Update LOD"); -static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist"); -static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region"); -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"); +static LLTrace::TimeBlock FTM_AUDIO_UPDATE("Update Audio"); +static LLTrace::TimeBlock FTM_CLEANUP("Cleanup"); +static LLTrace::TimeBlock FTM_CLEANUP_DRAWABLES("Drawables"); +static LLTrace::TimeBlock FTM_CLEANUP_OBJECTS("Objects"); +static LLTrace::TimeBlock FTM_IDLE_CB("Idle Callbacks"); +static LLTrace::TimeBlock FTM_LOD_UPDATE("Update LOD"); +static LLTrace::TimeBlock FTM_OBJECTLIST_UPDATE("Update Objectlist"); +static LLTrace::TimeBlock FTM_REGION_UPDATE("Update Region"); +static LLTrace::TimeBlock FTM_WORLD_UPDATE("Update World"); +static LLTrace::TimeBlock FTM_NETWORK("Network"); +static LLTrace::TimeBlock FTM_AGENT_NETWORK("Agent Network"); +static LLTrace::TimeBlock FTM_VLMANAGER("VL Manager"); +static LLTrace::TimeBlock FTM_AGENT_POSITION("Agent Position"); +static LLTrace::TimeBlock FTM_HUD_EFFECTS("HUD Effects"); /////////////////////////////////////////////////////// // idle() @@ -4554,7 +4554,7 @@ void LLAppViewer::idle() if (!gDisconnected) { - LLFastTimer t(FTM_NETWORK); + LL_RECORD_BLOCK_TIME(FTM_NETWORK); // Update spaceserver timeinfo LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + LLUnits::Seconds::fromValue(dt_raw)); @@ -4570,7 +4570,7 @@ void LLAppViewer::idle() } { - LLFastTimer t(FTM_AGENT_AUTOPILOT); + LL_RECORD_BLOCK_TIME(FTM_AGENT_AUTOPILOT); // Handle automatic walking towards points gAgentPilot.updateTarget(); gAgent.autoPilot(&yaw); @@ -4585,7 +4585,7 @@ void LLAppViewer::idle() if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) { - LLFastTimer t(FTM_AGENT_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE); // Send avatar and camera info last_control_flags = gAgent.getControlFlags(); send_agent_update(TRUE); @@ -4634,7 +4634,7 @@ void LLAppViewer::idle() if (!gDisconnected) { - LLFastTimer t(FTM_NETWORK); + LL_RECORD_BLOCK_TIME(FTM_NETWORK); //////////////////////////////////////////////// // @@ -4662,7 +4662,7 @@ void LLAppViewer::idle() // { -// LLFastTimer t(FTM_IDLE_CB); +// LL_RECORD_BLOCK_TIME(FTM_IDLE_CB); // Do event notifications if necessary. Yes, we may want to move this elsewhere. gEventNotifier.update(); @@ -4709,14 +4709,14 @@ void LLAppViewer::idle() { // Handle pending gesture processing - LLFastTimer t(FTM_AGENT_POSITION); + LL_RECORD_BLOCK_TIME(FTM_AGENT_POSITION); LLGestureMgr::instance().update(); gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY); } { - LLFastTimer t(FTM_OBJECTLIST_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_OBJECTLIST_UPDATE); if (!(logoutRequestSent() && hasSavedFinalSnapshot())) { @@ -4731,13 +4731,13 @@ void LLAppViewer::idle() // { - LLFastTimer t(FTM_CLEANUP); + LL_RECORD_BLOCK_TIME(FTM_CLEANUP); { - LLFastTimer t(FTM_CLEANUP_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_CLEANUP_OBJECTS); gObjectList.cleanDeadObjects(); } { - LLFastTimer t(FTM_CLEANUP_DRAWABLES); + LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLES); LLDrawable::cleanupDeadDrawables(); } } @@ -4756,7 +4756,7 @@ void LLAppViewer::idle() // { - LLFastTimer t(FTM_HUD_EFFECTS); + LL_RECORD_BLOCK_TIME(FTM_HUD_EFFECTS); LLSelectMgr::getInstance()->updateEffects(); LLHUDManager::getInstance()->cleanupEffects(); LLHUDManager::getInstance()->sendEffects(); @@ -4768,7 +4768,7 @@ void LLAppViewer::idle() // { - LLFastTimer t(FTM_NETWORK); + LL_RECORD_BLOCK_TIME(FTM_NETWORK); gVLManager.unpackData(); } @@ -4780,7 +4780,7 @@ void LLAppViewer::idle() LLWorld::getInstance()->updateVisibilities(); { const F32 max_region_update_time = .001f; // 1ms - LLFastTimer t(FTM_REGION_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_REGION_UPDATE); LLWorld::getInstance()->updateRegions(max_region_update_time); } @@ -4817,7 +4817,7 @@ void LLAppViewer::idle() // Here, particles are updated and drawables are moved. // - LLFastTimer t(FTM_WORLD_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_WORLD_UPDATE); gPipeline.updateMove(); LLWorld::getInstance()->updateParticles(); @@ -4849,12 +4849,12 @@ void LLAppViewer::idle() // objects and camera should be in sync, do LOD calculations now { - LLFastTimer t(FTM_LOD_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_LOD_UPDATE); gObjectList.updateApparentAngles(gAgent); } { - LLFastTimer t(FTM_AUDIO_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_AUDIO_UPDATE); if (gAudiop) { @@ -5073,12 +5073,12 @@ void LLAppViewer::idleNameCache() static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; #endif -static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network"); -static LLFastTimer::DeclareTimer FTM_MESSAGE_ACKS("Message Acks"); -static LLFastTimer::DeclareTimer FTM_RETRANSMIT("Retransmit"); -static LLFastTimer::DeclareTimer FTM_TIMEOUT_CHECK("Timeout Check"); -static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); -static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"); +static LLTrace::TimeBlock FTM_IDLE_NETWORK("Idle Network"); +static LLTrace::TimeBlock FTM_MESSAGE_ACKS("Message Acks"); +static LLTrace::TimeBlock FTM_RETRANSMIT("Retransmit"); +static LLTrace::TimeBlock FTM_TIMEOUT_CHECK("Timeout Check"); +static LLTrace::TimeBlock FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); +static LLTrace::TimeBlock FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"); void LLAppViewer::idleNetwork() { @@ -5089,7 +5089,7 @@ void LLAppViewer::idleNetwork() if (!gSavedSettings.getBOOL("SpeedTest")) { - LLFastTimer t(FTM_IDLE_NETWORK); // decode + LL_RECORD_BLOCK_TIME(FTM_IDLE_NETWORK); // decode LLTimer check_message_timer; // Read all available packets from network diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index d642d55b14..a258e24536 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -43,7 +43,7 @@ class LLTextureFetch; class LLWatchdogTimeout; class LLUpdaterService; -extern LLFastTimer::DeclareTimer FTM_FRAME; +extern LLTrace::TimeBlock FTM_FRAME; class LLAppViewer : public LLApp diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0f138873ac..5c3dd4ebe0 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -733,11 +733,11 @@ void LLChatHistory::clear() mLastFromID = LLUUID::null; } -static LLFastTimer::DeclareTimer FTM_APPEND_MESSAGE("Append Chat Message"); +static LLTrace::TimeBlock FTM_APPEND_MESSAGE("Append Chat Message"); void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params) { - LLFastTimer _(FTM_APPEND_MESSAGE); + LL_RECORD_BLOCK_TIME(FTM_APPEND_MESSAGE); bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); bool square_brackets = false; // square brackets necessary for a system messages diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 82affcf068..5bdf9c612a 100755 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -96,11 +96,11 @@ void LLDoNotDisturbNotificationStorage::resetDirty() mDirty = false; } -static LLFastTimer::DeclareTimer FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications"); +static LLTrace::TimeBlock FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications"); void LLDoNotDisturbNotificationStorage::saveNotifications() { - LLFastTimer _(FTM_SAVE_DND_NOTIFICATIONS); + LL_RECORD_BLOCK_TIME(FTM_SAVE_DND_NOTIFICATIONS); LLNotificationChannelPtr channelPtr = getCommunicationChannel(); const LLCommunicationChannel *commChannel = dynamic_cast(channelPtr.get()); @@ -126,11 +126,11 @@ void LLDoNotDisturbNotificationStorage::saveNotifications() resetDirty(); } -static LLFastTimer::DeclareTimer FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications"); +static LLTrace::TimeBlock FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications"); void LLDoNotDisturbNotificationStorage::loadNotifications() { - LLFastTimer _(FTM_LOAD_DND_NOTIFICATIONS); + LL_RECORD_BLOCK_TIME(FTM_LOAD_DND_NOTIFICATIONS); LL_INFOS("LLDoNotDisturbNotificationStorage") << "start loading notifications" << LL_ENDL; diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index a480eed2e7..1837974604 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -56,10 +56,10 @@ const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLTrace::TimeBlock FTM_CULL_REBOUND("Cull Rebound"); extern bool gShiftFrame; -LLTrace::MemStatHandle LLDrawable::sMemStat("LLDrawable"); +//LLTrace::MemStatHandle LLDrawable::sMemStat("LLDrawable"); //////////////////////// @@ -230,16 +230,16 @@ BOOL LLDrawable::isLight() const } } -static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); -static LLFastTimer::DeclareTimer FTM_DEREF_DRAWABLE("Deref"); -static LLFastTimer::DeclareTimer FTM_DELETE_FACES("Faces"); +static LLTrace::TimeBlock FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); +static LLTrace::TimeBlock FTM_DEREF_DRAWABLE("Deref"); +static LLTrace::TimeBlock FTM_DELETE_FACES("Faces"); void LLDrawable::cleanupReferences() { - LLFastTimer t(FTM_CLEANUP_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLE); { - LLFastTimer t(FTM_DELETE_FACES); + LL_RECORD_BLOCK_TIME(FTM_DELETE_FACES); std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); mFaces.clear(); } @@ -251,7 +251,7 @@ void LLDrawable::cleanupReferences() removeFromOctree(); { - LLFastTimer t(FTM_DEREF_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_DEREF_DRAWABLE); // Cleanup references to other objects mVObjp = NULL; mParent = NULL; @@ -300,14 +300,14 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) return count; } -static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face"); +static LLTrace::TimeBlock FTM_ALLOCATE_FACE("Allocate Face"); LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) { LLFace *face; { - LLFastTimer t(FTM_ALLOCATE_FACE); + LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE); face = new LLFace(this, mVObjp); } @@ -335,7 +335,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep) LLFace *face; { - LLFastTimer t(FTM_ALLOCATE_FACE); + LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE); face = new LLFace(this, mVObjp); } @@ -1192,7 +1192,7 @@ void LLSpatialBridge::updateSpatialExtents() LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0); { - LLFastTimer ftm(FTM_CULL_REBOUND); + LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND); root->rebound(); } diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index b94f663f21..3dab496a20 100755 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -61,7 +61,7 @@ const U32 SILHOUETTE_HIGHLIGHT = 0; LL_ALIGN_PREFIX(16) class LLDrawable : public LLViewerOctreeEntryData, - public LLTrace::MemTrackable + public LLTrace::MemTrackable { public: LLDrawable(const LLDrawable& rhs) : LLViewerOctreeEntryData(rhs) @@ -291,7 +291,7 @@ public: F32 mDistanceWRTCamera; static F32 sCurPixelAngle; //current pixels per radian - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; private: typedef std::vector face_list_t; diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 604a9b1530..ef329ea8ff 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -89,7 +89,7 @@ S32 LLDrawPoolAlpha::getNumPostDeferredPasses() void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); if (pass == 0) { @@ -142,7 +142,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass) void LLDrawPoolAlpha::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); if (LLPipeline::sUnderWaterRender) { @@ -168,7 +168,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass) void LLDrawPoolAlpha::endRenderPass( S32 pass ) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); LLRenderPass::endRenderPass(pass); if(gPipeline.canUseWindLightShaders()) @@ -179,7 +179,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass ) void LLDrawPoolAlpha::render(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA); LLGLSPipelineAlpha gls_pipeline_alpha; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index e366de9b13..168f82e013 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -100,7 +100,7 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 cube_channel = -1; -static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_AVATAR("Avatar Shadow"); LLDrawPoolAvatar::LLDrawPoolAvatar() : LLFacePool(POOL_AVATAR) @@ -167,7 +167,7 @@ LLMatrix4& LLDrawPoolAvatar::getModelView() void LLDrawPoolAvatar::beginDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_CHARACTERS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS); sSkipTransparent = TRUE; is_deferred_render = true; @@ -202,7 +202,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass) void LLDrawPoolAvatar::endDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_CHARACTERS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS); sSkipTransparent = FALSE; is_deferred_render = false; @@ -401,7 +401,7 @@ S32 LLDrawPoolAvatar::getNumShadowPasses() void LLDrawPoolAvatar::beginShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_AVATAR); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR); if (pass == 0) { @@ -427,7 +427,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass) void LLDrawPoolAvatar::endShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_AVATAR); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR); if (pass == 0) { if (sShaderLevel > 0) @@ -446,7 +446,7 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass) void LLDrawPoolAvatar::renderShadow(S32 pass) { - LLFastTimer t(FTM_SHADOW_AVATAR); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_AVATAR); if (mDrawFace.empty()) { @@ -512,7 +512,7 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses() void LLDrawPoolAvatar::render(S32 pass) { - LLFastTimer t(FTM_RENDER_CHARACTERS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS); if (LLPipeline::sImpostorRender) { renderAvatars(NULL, pass+2); @@ -524,7 +524,7 @@ void LLDrawPoolAvatar::render(S32 pass) void LLDrawPoolAvatar::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_CHARACTERS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS); //reset vertex buffer mappings LLVertexBuffer::unbind(); @@ -575,7 +575,7 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass) void LLDrawPoolAvatar::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_CHARACTERS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_CHARACTERS); if (LLPipeline::sImpostorRender) { @@ -1155,12 +1155,12 @@ void LLDrawPoolAvatar::endDeferredSkinned() gGL.getTexUnit(0)->activate(); } -static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars"); +static LLTrace::TimeBlock FTM_RENDER_AVATARS("renderAvatars"); void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) { - LLFastTimer t(FTM_RENDER_AVATARS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_AVATARS); if (pass == -1) { @@ -1815,11 +1815,11 @@ void LLDrawPoolAvatar::renderDeferredRiggedMaterial(LLVOAvatar* avatar, S32 pass renderRigged(avatar, pass); } -static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO"); +static LLTrace::TimeBlock FTM_RIGGED_VBO("Rigged VBO"); void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) { - LLFastTimer t(FTM_RIGGED_VBO); + LL_RECORD_BLOCK_TIME(FTM_RIGGED_VBO); //update rigged vertex buffers for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type) diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 6c4226a9a6..010e718689 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -234,7 +234,7 @@ S32 LLDrawPoolBump::getNumPasses() void LLDrawPoolBump::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); switch( pass ) { case 0: @@ -261,7 +261,7 @@ void LLDrawPoolBump::beginRenderPass(S32 pass) void LLDrawPoolBump::render(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); if (!gPipeline.hasRenderType(LLDrawPool::POOL_SIMPLE)) { @@ -294,7 +294,7 @@ void LLDrawPoolBump::render(S32 pass) void LLDrawPoolBump::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); switch( pass ) { case 0: @@ -325,7 +325,7 @@ void LLDrawPoolBump::endRenderPass(S32 pass) //static void LLDrawPoolBump::beginShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -418,7 +418,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di void LLDrawPoolBump::renderShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -477,7 +477,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& void LLDrawPoolBump::endShiny(bool invisible) { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { @@ -497,7 +497,7 @@ void LLDrawPoolBump::endShiny(bool invisible) void LLDrawPoolBump::beginFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -559,7 +559,7 @@ void LLDrawPoolBump::beginFullbrightShiny() void LLDrawPoolBump::renderFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -582,7 +582,7 @@ void LLDrawPoolBump::renderFullbrightShiny() void LLDrawPoolBump::endFullbrightShiny() { - LLFastTimer t(FTM_RENDER_SHINY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; @@ -713,7 +713,7 @@ void LLDrawPoolBump::beginBump(U32 pass) } sVertexMask = VERTEX_MASK_BUMP; - LLFastTimer t(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); // Optional second pass: emboss bump map stop_glerror(); @@ -765,7 +765,7 @@ void LLDrawPoolBump::renderBump(U32 pass) return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); LLGLDisable fog(GL_FOG); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL); LLGLEnable blend(GL_BLEND); @@ -821,7 +821,7 @@ void LLDrawPoolBump::beginDeferredPass(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); mShiny = TRUE; gDeferredBumpProgram.bind(); diffuse_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); @@ -836,7 +836,7 @@ void LLDrawPoolBump::endDeferredPass(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); mShiny = FALSE; gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::BUMP_MAP); @@ -850,7 +850,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_BUMP); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); U32 type = LLRenderPass::PASS_BUMP; LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type); @@ -1093,7 +1093,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText } -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); // static void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) @@ -1117,22 +1117,22 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu } } -static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map"); -static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); +static LLTrace::TimeBlock FTM_BUMP_GEN_NORMAL("Generate Normal Map"); +static LLTrace::TimeBlock FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { if (success && LLPipeline::sRenderDeferred) { - LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_STANDARD_LOADED); LLPointer nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4); { - LLFastTimer t(FTM_BUMP_GEN_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_BUMP_GEN_NORMAL); generateNormalMapFromAlpha(src, nrm_image); } src_vi->setExplicitFormat(GL_RGBA, GL_RGBA); { - LLFastTimer t(FTM_BUMP_CREATE_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_CREATE_TEXTURE); src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image); } } @@ -1194,27 +1194,27 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr } -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); -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("Bump Source Create"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_RESCALE("Rescale"); +static LLTrace::TimeBlock FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); +static LLTrace::TimeBlock 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 ) { if( success ) { - LLFastTimer t(FTM_BUMP_SOURCE_LOADED); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_LOADED); bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries ); bump_image_map_t::iterator iter = entries_list.find(source_asset_id); { - LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_ENTRIES_UPDATE); if (iter == entries_list.end() || iter->second.isNull() || iter->second->getWidth() != src->getWidth() || @@ -1257,7 +1257,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI case 1: case 2: { - LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_MIN_MAX); if( src_data_size == dst_data_size * src_components ) { for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components ) @@ -1283,7 +1283,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI case 3: case 4: { - LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RGB2LUM); if( src_data_size == dst_data_size * src_components ) { for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components ) @@ -1316,7 +1316,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if( maximum > minimum ) { - LLFastTimer t(FTM_BUMP_SOURCE_RESCALE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_RESCALE); U8 bias_and_scale_lut[256]; F32 twice_one_over_range = 2.f / (maximum - minimum); S32 i; @@ -1352,7 +1352,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if (!LLPipeline::sRenderDeferred) { - LLFastTimer t(FTM_BUMP_SOURCE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE); bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); bump->createGLTexture(0, dst_image); } @@ -1363,13 +1363,13 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI bump->getGLTexture()->setAllowCompression(false); { - LLFastTimer t(FTM_BUMP_SOURCE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_CREATE); bump->setExplicitFormat(GL_RGBA8, GL_ALPHA); bump->createGLTexture(0, dst_image); } { - LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_BUMP_SOURCE_GEN_NORMAL); gPipeline.mScreen.bindTarget(); LLGLDepthTest depth(GL_FALSE); @@ -1561,7 +1561,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL void LLDrawPoolInvisible::render(S32 pass) { //render invisiprims - LLFastTimer t(FTM_RENDER_INVISIBLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE); if (gPipeline.canUseVertexShaders()) { @@ -1601,7 +1601,7 @@ void LLDrawPoolInvisible::endDeferredPass( S32 pass ) void LLDrawPoolInvisible::renderDeferred( S32 pass ) { //render invisiprims; this doesn't work becaue it also blocks all the post-deferred stuff #if 0 - LLFastTimer t(FTM_RENDER_INVISIBLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_INVISIBLE); U32 invisi_mask = LLVertexBuffer::MAP_VERTEX; glStencilMask(0); diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 08a36bddf1..eea0f370ca 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -76,12 +76,12 @@ void LLDrawPoolMaterials::beginDeferredPass(S32 pass) diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP); - LLFastTimer t(FTM_RENDER_MATERIALS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS); } void LLDrawPoolMaterials::endDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_MATERIALS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_MATERIALS); mShader->unbind(); diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index 2cf9d833c6..bbd80304f8 100755 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -41,8 +41,8 @@ static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; -static LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); -static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); +static LLTrace::TimeBlock FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); +static LLTrace::TimeBlock FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); void LLDrawPoolGlow::beginPostDeferredPass(S32 pass) { @@ -50,11 +50,11 @@ void LLDrawPoolGlow::beginPostDeferredPass(S32 pass) gDeferredEmissiveProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); } -static LLFastTimer::DeclareTimer FTM_RENDER_GLOW_PUSH("Glow Push"); +static LLTrace::TimeBlock FTM_RENDER_GLOW_PUSH("Glow Push"); void LLDrawPoolGlow::renderPostDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_GLOW); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW); LLGLEnable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); gGL.flush(); @@ -67,7 +67,7 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass) gGL.setColorMask(false, true); { - LLFastTimer t(FTM_RENDER_GLOW_PUSH); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW_PUSH); pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); } @@ -95,7 +95,7 @@ S32 LLDrawPoolGlow::getNumPasses() void LLDrawPoolGlow::render(S32 pass) { - LLFastTimer t(FTM_RENDER_GLOW); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW); LLGLEnable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); gGL.flush(); @@ -146,7 +146,7 @@ void LLDrawPoolSimple::prerender() void LLDrawPoolSimple::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_SIMPLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE); if (LLPipeline::sUnderWaterRender) { @@ -173,7 +173,7 @@ void LLDrawPoolSimple::beginRenderPass(S32 pass) void LLDrawPoolSimple::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_SIMPLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE); stop_glerror(); LLRenderPass::endRenderPass(pass); stop_glerror(); @@ -188,7 +188,7 @@ void LLDrawPoolSimple::render(S32 pass) LLGLDisable blend(GL_BLEND); { //render simple - LLFastTimer t(FTM_RENDER_SIMPLE); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE); gPipeline.enableLightsDynamic(); if (mVertexShaderLevel > 0) @@ -225,7 +225,7 @@ void LLDrawPoolSimple::render(S32 pass) -static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK("Alpha Mask"); +static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK("Alpha Mask"); LLDrawPoolAlphaMask::LLDrawPoolAlphaMask() : LLRenderPass(POOL_ALPHA_MASK) @@ -239,7 +239,7 @@ void LLDrawPoolAlphaMask::prerender() void LLDrawPoolAlphaMask::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); if (LLPipeline::sUnderWaterRender) { @@ -266,7 +266,7 @@ void LLDrawPoolAlphaMask::beginRenderPass(S32 pass) void LLDrawPoolAlphaMask::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); stop_glerror(); LLRenderPass::endRenderPass(pass); stop_glerror(); @@ -279,7 +279,7 @@ void LLDrawPoolAlphaMask::endRenderPass(S32 pass) void LLDrawPoolAlphaMask::render(S32 pass) { LLGLDisable blend(GL_BLEND); - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); if (mVertexShaderLevel > 0) { @@ -312,7 +312,7 @@ void LLDrawPoolFullbrightAlphaMask::prerender() void LLDrawPoolFullbrightAlphaMask::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); if (LLPipeline::sUnderWaterRender) { @@ -339,7 +339,7 @@ void LLDrawPoolFullbrightAlphaMask::beginRenderPass(S32 pass) void LLDrawPoolFullbrightAlphaMask::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); stop_glerror(); LLRenderPass::endRenderPass(pass); stop_glerror(); @@ -351,7 +351,7 @@ void LLDrawPoolFullbrightAlphaMask::endRenderPass(S32 pass) void LLDrawPoolFullbrightAlphaMask::render(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK); if (mVertexShaderLevel > 0) { @@ -385,13 +385,13 @@ void LLDrawPoolFullbrightAlphaMask::render(S32 pass) void LLDrawPoolSimple::beginDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED); gDeferredDiffuseProgram.bind(); } void LLDrawPoolSimple::endDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED); LLRenderPass::endRenderPass(pass); gDeferredDiffuseProgram.unbind(); @@ -403,12 +403,12 @@ void LLDrawPoolSimple::renderDeferred(S32 pass) LLGLDisable alpha_test(GL_ALPHA_TEST); { //render simple - LLFastTimer t(FTM_RENDER_SIMPLE_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED); pushBatches(LLRenderPass::PASS_SIMPLE, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); } } -static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask"); +static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask"); void LLDrawPoolAlphaMask::beginDeferredPass(S32 pass) { @@ -422,7 +422,7 @@ void LLDrawPoolAlphaMask::endDeferredPass(S32 pass) void LLDrawPoolAlphaMask::renderDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_ALPHA_MASK_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_DEFERRED); gDeferredDiffuseAlphaMaskProgram.bind(); gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f); pushMaskBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); @@ -445,7 +445,7 @@ void LLDrawPoolGrass::prerender() void LLDrawPoolGrass::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_GRASS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS); stop_glerror(); if (LLPipeline::sUnderWaterRender) @@ -475,7 +475,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass) void LLDrawPoolGrass::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_GRASS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS); LLRenderPass::endRenderPass(pass); if (mVertexShaderLevel > 0) @@ -493,7 +493,7 @@ void LLDrawPoolGrass::render(S32 pass) LLGLDisable blend(GL_BLEND); { - LLFastTimer t(FTM_RENDER_GRASS); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS); LLGLEnable test(GL_ALPHA_TEST); gGL.setSceneBlendType(LLRender::BT_ALPHA); //render grass @@ -514,7 +514,7 @@ void LLDrawPoolGrass::endDeferredPass(S32 pass) void LLDrawPoolGrass::renderDeferred(S32 pass) { { - LLFastTimer t(FTM_RENDER_GRASS_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GRASS_DEFERRED); gDeferredNonIndexedDiffuseAlphaMaskProgram.bind(); gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f); //render grass @@ -541,7 +541,7 @@ void LLDrawPoolFullbright::beginPostDeferredPass(S32 pass) void LLDrawPoolFullbright::renderPostDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_FULLBRIGHT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT); gGL.setSceneBlendType(LLRender::BT_ALPHA); U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX; @@ -556,7 +556,7 @@ void LLDrawPoolFullbright::endPostDeferredPass(S32 pass) void LLDrawPoolFullbright::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_FULLBRIGHT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT); if (LLPipeline::sUnderWaterRender) { @@ -570,7 +570,7 @@ void LLDrawPoolFullbright::beginRenderPass(S32 pass) void LLDrawPoolFullbright::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_FULLBRIGHT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT); LLRenderPass::endRenderPass(pass); stop_glerror(); @@ -585,7 +585,7 @@ void LLDrawPoolFullbright::endRenderPass(S32 pass) void LLDrawPoolFullbright::render(S32 pass) { //render fullbright - LLFastTimer t(FTM_RENDER_FULLBRIGHT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT); gGL.setSceneBlendType(LLRender::BT_ALPHA); stop_glerror(); @@ -638,7 +638,7 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass) void LLDrawPoolFullbrightAlphaMask::renderPostDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_FULLBRIGHT); + LL_RECORD_BLOCK_TIME(FTM_RENDER_FULLBRIGHT); LLGLDisable blend(GL_BLEND); U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXTURE_INDEX; pushMaskBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, fullbright_mask, TRUE, TRUE); diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 0adb42428d..58a2cae6e4 100755 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -55,7 +55,7 @@ int DebugDetailMap = 0; S32 LLDrawPoolTerrain::sDetailMode = 1; F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE; static LLGLSLShader* sShader = NULL; -static LLFastTimer::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_TERRAIN("Terrain Shadow"); LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : @@ -129,7 +129,7 @@ void LLDrawPoolTerrain::prerender() void LLDrawPoolTerrain::beginRenderPass( S32 pass ) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); LLFacePool::beginRenderPass(pass); sShader = LLPipeline::sUnderWaterRender ? @@ -144,7 +144,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass ) void LLDrawPoolTerrain::endRenderPass( S32 pass ) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); //LLFacePool::endRenderPass(pass); if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0) { @@ -160,7 +160,7 @@ S32 LLDrawPoolTerrain::getDetailMode() void LLDrawPoolTerrain::render(S32 pass) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); if (mDrawFace.empty()) { @@ -243,7 +243,7 @@ void LLDrawPoolTerrain::render(S32 pass) void LLDrawPoolTerrain::beginDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); LLFacePool::beginRenderPass(pass); sShader = &gDeferredTerrainProgram; @@ -253,14 +253,14 @@ void LLDrawPoolTerrain::beginDeferredPass(S32 pass) void LLDrawPoolTerrain::endDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); LLFacePool::endRenderPass(pass); sShader->unbind(); } void LLDrawPoolTerrain::renderDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TERRAIN); if (mDrawFace.empty()) { return; @@ -270,7 +270,7 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass) void LLDrawPoolTerrain::beginShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN); LLFacePool::beginRenderPass(pass); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gDeferredShadowProgram.bind(); @@ -278,14 +278,14 @@ void LLDrawPoolTerrain::beginShadowPass(S32 pass) void LLDrawPoolTerrain::endShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN); LLFacePool::endRenderPass(pass); gDeferredShadowProgram.unbind(); } void LLDrawPoolTerrain::renderShadow(S32 pass) { - LLFastTimer t(FTM_SHADOW_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_TERRAIN); if (mDrawFace.empty()) { return; diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index fedbd782dc..187a2045dd 100755 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -41,7 +41,7 @@ S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; -static LLFastTimer::DeclareTimer FTM_SHADOW_TREE("Tree Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_TREE("Tree Shadow"); LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) : LLFacePool(POOL_TREE), @@ -62,7 +62,7 @@ void LLDrawPoolTree::prerender() void LLDrawPoolTree::beginRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TREES); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES); if (LLPipeline::sUnderWaterRender) { @@ -88,7 +88,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass) void LLDrawPoolTree::render(S32 pass) { - LLFastTimer t(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES); + LL_RECORD_BLOCK_TIME(LLPipeline::sShadowRender ? FTM_SHADOW_TREE : FTM_RENDER_TREES); if (mDrawFace.empty()) { @@ -131,7 +131,7 @@ void LLDrawPoolTree::render(S32 pass) void LLDrawPoolTree::endRenderPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TREES); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES); if (gPipeline.canUseWindLightShadersOnObjects()) { @@ -149,7 +149,7 @@ void LLDrawPoolTree::endRenderPass(S32 pass) //============================================ void LLDrawPoolTree::beginDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TREES); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES); shader = &gDeferredTreeProgram; shader->bind(); @@ -163,7 +163,7 @@ void LLDrawPoolTree::renderDeferred(S32 pass) void LLDrawPoolTree::endDeferredPass(S32 pass) { - LLFastTimer t(FTM_RENDER_TREES); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TREES); shader->unbind(); } @@ -173,7 +173,7 @@ void LLDrawPoolTree::endDeferredPass(S32 pass) //============================================ void LLDrawPoolTree::beginShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_TREE); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE); glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"), gSavedSettings.getF32("RenderDeferredTreeShadowBias")); @@ -189,7 +189,7 @@ void LLDrawPoolTree::renderShadow(S32 pass) void LLDrawPoolTree::endShadowPass(S32 pass) { - LLFastTimer t(FTM_SHADOW_TREE); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_TREE); glPolygonOffset(gSavedSettings.getF32("RenderDeferredSpotShadowOffset"), gSavedSettings.getF32("RenderDeferredSpotShadowBias")); diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 0e118c7420..b33a4487b6 100755 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -142,7 +142,7 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass) //=============================== void LLDrawPoolWater::renderDeferred(S32 pass) { - LLFastTimer t(FTM_RENDER_WATER); + LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER); deferred_render = TRUE; shade(); deferred_render = FALSE; @@ -152,7 +152,7 @@ void LLDrawPoolWater::renderDeferred(S32 pass) void LLDrawPoolWater::render(S32 pass) { - LLFastTimer ftm(FTM_RENDER_WATER); + LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER); if (mDrawFace.empty() || LLDrawable::getCurrentFrame() <= 1) { return; diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c3ba6c672d..a458fa23a2 100755 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -306,7 +306,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_WL_SKY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY); const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius(); @@ -353,7 +353,7 @@ void LLDrawPoolWLSky::render(S32 pass) { return; } - LLFastTimer ftm(FTM_RENDER_WL_SKY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY); const F32 camHeightLocal = LLWLParamManager::getInstance()->getDomeOffset() * LLWLParamManager::getInstance()->getDomeRadius(); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ef816ddaf6..16b1b8f10c 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1064,12 +1064,12 @@ bool LLFace::canRenderAsMask() } -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_VOLUME("Volume VB Cache"); +static LLTrace::TimeBlock FTM_FACE_GEOM_VOLUME("Volume VB Cache"); //static void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf) { - LLFastTimer t(FTM_FACE_GEOM_VOLUME); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_VOLUME); U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_NORMAL; @@ -1131,24 +1131,24 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count) } } -static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_POSITION("Position"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_NORMAL("Normal"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TEXTURE("Texture"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_COLOR("Color"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_EMISSIVE("Emissive"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_WEIGHTS("Weights"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TANGENT("Binormal"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX("Index"); -static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX_TAIL("Tail"); -static LLFastTimer::DeclareTimer FTM_FACE_POSITION_STORE("Pos"); -static LLFastTimer::DeclareTimer FTM_FACE_TEXTURE_INDEX_STORE("TexIdx"); -static LLFastTimer::DeclareTimer FTM_FACE_POSITION_PAD("Pad"); -static LLFastTimer::DeclareTimer FTM_FACE_TEX_DEFAULT("Default"); -static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK("Quick"); -static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_NO_XFORM("No Xform"); -static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_XFORM("Xform"); -static LLFastTimer::DeclareTimer FTM_FACE_TEX_QUICK_PLANAR("Quick Planar"); +static LLTrace::TimeBlock FTM_FACE_GET_GEOM("Face Geom"); +static LLTrace::TimeBlock FTM_FACE_GEOM_POSITION("Position"); +static LLTrace::TimeBlock FTM_FACE_GEOM_NORMAL("Normal"); +static LLTrace::TimeBlock FTM_FACE_GEOM_TEXTURE("Texture"); +static LLTrace::TimeBlock FTM_FACE_GEOM_COLOR("Color"); +static LLTrace::TimeBlock FTM_FACE_GEOM_EMISSIVE("Emissive"); +static LLTrace::TimeBlock FTM_FACE_GEOM_WEIGHTS("Weights"); +static LLTrace::TimeBlock FTM_FACE_GEOM_TANGENT("Binormal"); +static LLTrace::TimeBlock FTM_FACE_GEOM_INDEX("Index"); +static LLTrace::TimeBlock FTM_FACE_GEOM_INDEX_TAIL("Tail"); +static LLTrace::TimeBlock FTM_FACE_POSITION_STORE("Pos"); +static LLTrace::TimeBlock FTM_FACE_TEXTURE_INDEX_STORE("TexIdx"); +static LLTrace::TimeBlock FTM_FACE_POSITION_PAD("Pad"); +static LLTrace::TimeBlock FTM_FACE_TEX_DEFAULT("Default"); +static LLTrace::TimeBlock FTM_FACE_TEX_QUICK("Quick"); +static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_NO_XFORM("No Xform"); +static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_XFORM("Xform"); +static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_PLANAR("Quick Planar"); BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, @@ -1156,7 +1156,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, const U16 &index_offset, bool force_rebuild) { - LLFastTimer t(FTM_FACE_GET_GEOM); + LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM); llassert(verify()); const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mNumVertices; @@ -1292,7 +1292,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, // INDICES if (full_rebuild) { - LLFastTimer t(FTM_FACE_GEOM_INDEX); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX); mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, map_range); volatile __m128i* dst = (__m128i*) indicesp.get(); @@ -1308,7 +1308,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } { - LLFastTimer t(FTM_FACE_GEOM_INDEX_TAIL); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_INDEX_TAIL); U16* idx = (U16*) dst; for (S32 i = end*8; i < num_indices; ++i) @@ -1386,7 +1386,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_pos) { - LLFastTimer t(FTM_FACE_GEOM_POSITION); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_POSITION); gTransformPositionProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_VERTEX, mGeomIndex, mGeomCount); @@ -1411,7 +1411,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_color) { - LLFastTimer t(FTM_FACE_GEOM_COLOR); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_COLOR); gTransformColorProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_COLOR, mGeomIndex, mGeomCount); @@ -1427,7 +1427,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_emissive) { - LLFastTimer t(FTM_FACE_GEOM_EMISSIVE); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_EMISSIVE); gTransformColorProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_EMISSIVE, mGeomIndex, mGeomCount); @@ -1448,7 +1448,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_normal) { - LLFastTimer t(FTM_FACE_GEOM_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_NORMAL); gTransformNormalProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_NORMAL, mGeomIndex, mGeomCount); @@ -1461,7 +1461,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_tangent) { - LLFastTimer t(FTM_FACE_GEOM_TANGENT); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT); gTransformTangentProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TANGENT, mGeomIndex, mGeomCount); @@ -1474,7 +1474,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_tcoord) { - LLFastTimer t(FTM_FACE_GEOM_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TEXTURE); gTransformTexCoordProgram.bind(); mVertexBuffer->bindForFeedback(0, LLVertexBuffer::TYPE_TEXCOORD0, mGeomIndex, mGeomCount); @@ -1514,7 +1514,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_tcoord) { - LLFastTimer t(FTM_FACE_GEOM_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TEXTURE); //bump setup LLVector4a binormal_dir( -sin_ang, cos_ang, 0.f ); @@ -1637,18 +1637,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (texgen != LLTextureEntry::TEX_GEN_PLANAR) { - LLFastTimer t(FTM_FACE_TEX_QUICK); + LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK); if (!do_tex_mat) { if (!do_xform) { - LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); + LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_NO_XFORM); S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; LLVector4a::memcpyNonAliased16((F32*) tex_coords0.get(), (F32*) vf.mTexCoords, tc_size); } else { - LLFastTimer t(FTM_FACE_TEX_QUICK_XFORM); + LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_XFORM); F32* dst = (F32*) tex_coords0.get(); LLVector4a* src = (LLVector4a*) vf.mTexCoords; @@ -1701,7 +1701,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } else { //no bump, tex gen planar - LLFastTimer t(FTM_FACE_TEX_QUICK_PLANAR); + LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_QUICK_PLANAR); if (do_tex_mat) { for (S32 i = 0; i < num_vertices; i++) @@ -1746,7 +1746,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } else { //bump mapped or has material, just do the whole expensive loop - LLFastTimer t(FTM_FACE_TEX_DEFAULT); + LL_RECORD_BLOCK_TIME(FTM_FACE_TEX_DEFAULT); std::vector bump_tc; @@ -1897,7 +1897,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_pos) { - LLFastTimer t(FTM_FACE_GEOM_POSITION); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_POSITION); llassert(num_vertices > 0); mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, map_range); @@ -1929,7 +1929,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, texIdx.set(0,0,0,val); { - LLFastTimer t(FTM_FACE_POSITION_STORE); + LL_RECORD_BLOCK_TIME(FTM_FACE_POSITION_STORE); LLVector4a tmp; do @@ -1943,7 +1943,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } { - LLFastTimer t(FTM_FACE_POSITION_PAD); + LL_RECORD_BLOCK_TIME(FTM_FACE_POSITION_PAD); S32 aligned_pad_vertices = mGeomCount - num_vertices; res.set(res[0], res[1], res[2], 0.f); @@ -1964,7 +1964,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_normal) { - LLFastTimer t(FTM_FACE_GEOM_NORMAL); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_NORMAL); mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, map_range); F32* normals = (F32*) norm.get(); for (S32 i = 0; i < num_vertices; i++) @@ -1984,7 +1984,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_tangent) { - LLFastTimer t(FTM_FACE_GEOM_TANGENT); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_TANGENT); mVertexBuffer->getTangentStrider(tangent, mGeomIndex, mGeomCount, map_range); F32* tangents = (F32*) tangent.get(); @@ -2013,7 +2013,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_weights && vf.mWeights) { - LLFastTimer t(FTM_FACE_GEOM_WEIGHTS); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_WEIGHTS); mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range); F32* weights = (F32*) wght.get(); LLVector4a::memcpyNonAliased16(weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32)); @@ -2025,7 +2025,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) ) { - LLFastTimer t(FTM_FACE_GEOM_COLOR); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_COLOR); mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range); LLVector4a src; @@ -2056,7 +2056,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_emissive) { - LLFastTimer t(FTM_FACE_GEOM_EMISSIVE); + LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_EMISSIVE); LLStrider emissive; mVertexBuffer->getEmissiveStrider(emissive, mGeomIndex, mGeomCount, map_range); diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index e8db263fae..bbd8f0792a 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -381,7 +381,7 @@ static std::vector sTimerColors; void LLFastTimerView::draw() { - LLFastTimer t(FTM_RENDER_TIMER); + LL_RECORD_BLOCK_TIME(FTM_RENDER_TIMER); if (!mPauseHistory) { @@ -1019,11 +1019,11 @@ void LLFastTimerView::printLineStats() } } -static LLFastTimer::DeclareTimer FTM_DRAW_LINE_GRAPH("Draw line graph"); +static LLTrace::TimeBlock FTM_DRAW_LINE_GRAPH("Draw line graph"); void LLFastTimerView::drawLineGraph() { - LLFastTimer _(FTM_DRAW_LINE_GRAPH); + LL_RECORD_BLOCK_TIME(FTM_DRAW_LINE_GRAPH); //draw line graph history gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLLocalClipRect clip(mGraphRect); @@ -1509,11 +1509,11 @@ void LLFastTimerView::drawBars() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } -static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); +static LLTrace::TimeBlock FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) { - LLFastTimer _(FTM_UPDATE_TIMER_BAR_WIDTHS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_WIDTHS); const F32Seconds self_time = history_index == -1 ? mRecording.getPeriodMean(time_block->selfTime(), RUNNING_AVERAGE_WIDTH) : mRecording.getPrevRecording(history_index).getSum(time_block->selfTime()); @@ -1537,11 +1537,11 @@ F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, return full_time; } -static LLFastTimer::DeclareTimer FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions"); +static LLTrace::TimeBlock FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions"); S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index) { - LLFastTimer _(FTM_UPDATE_TIMER_BAR_FRACTIONS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_FRACTIONS); TimerBar& timer_bar = row.mBars[timer_bar_index]; const F32Seconds bar_time = timer_bar.mTotalTime - timer_bar.mSelfTime; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index caad0afec0..817a853190 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -47,8 +47,8 @@ std::vector LLVolumeImplFlexible::sInstanceList; std::vector LLVolumeImplFlexible::sUpdateDelay; -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); +static LLTrace::TimeBlock FTM_FLEXIBLE_REBUILD("Rebuild"); +static LLTrace::TimeBlock FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -331,14 +331,14 @@ void LLVolumeImplFlexible::updateRenderRes() // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLTrace::TimeBlock FTM_FLEXIBLE_UPDATE("Update Flexies"); void LLVolumeImplFlexible::doIdleUpdate() { LLDrawable* drawablep = mVO->mDrawable; if (drawablep) { - //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE); + //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE); //ensure drawable is active drawablep->makeActive(); @@ -421,7 +421,7 @@ inline S32 log2(S32 x) void LLVolumeImplFlexible::doFlexibleUpdate() { - LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE); LLVolume* volume = mVO->getVolume(); LLPath *path = &volume->getPath(); if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) @@ -771,7 +771,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) if (mRenderRes > -1) { - LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE); doFlexibleUpdate(); } @@ -791,7 +791,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); volume->dirtySpatialGroup(); { - LLFastTimer t(FTM_FLEXIBLE_REBUILD); + LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD); doFlexibleRebuild(); } volume->genBBoxes(isVolumeGlobal()); diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index 586965e5a0..52f4dd57e5 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -34,7 +34,7 @@ // // class LLFolderViewModelInventory // -static LLFastTimer::DeclareTimer FTM_INVENTORY_SORT("Sort"); +static LLTrace::TimeBlock FTM_INVENTORY_SORT("Sort"); bool LLFolderViewModelInventory::startDrag(std::vector& items) { @@ -63,7 +63,7 @@ bool LLFolderViewModelInventory::startDrag(std::vector& void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder ) { - LLFastTimer _(FTM_INVENTORY_SORT); + LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SORT); if (!needsSort(folder->getViewModelItem())) return; diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index fd28fdeab9..9d7b8b13e3 100755 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -54,11 +54,11 @@ LLHUDManager::~LLHUDManager() { } -static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("Hud Effects"); +static LLTrace::TimeBlock FTM_HUD_EFFECTS("Hud Effects"); void LLHUDManager::updateEffects() { - LLFastTimer ftm(FTM_HUD_EFFECTS); + LL_RECORD_BLOCK_TIME(FTM_HUD_EFFECTS); S32 i; for (i = 0; i < mHUDEffects.size(); i++) { diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 165201c8a1..4b0dadec38 100755 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -252,12 +252,12 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type) return hud_objectp; } -static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("Update Hud"); +static LLTrace::TimeBlock FTM_HUD_UPDATE("Update Hud"); // static void LLHUDObject::updateAll() { - LLFastTimer ftm(FTM_HUD_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_HUD_UPDATE); LLHUDText::updateAll(); LLHUDIcon::updateAll(); LLHUDNameTag::updateAll(); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index baf93a0469..3265676f9b 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -42,7 +42,7 @@ #include "llclipboard.h" #include "lltrans.h" -LLFastTimer::DeclareTimer FT_FILTER_CLIPBOARD("Filter Clipboard"); +LLTrace::TimeBlock FT_FILTER_CLIPBOARD("Filter Clipboard"); LLInventoryFilter::FilterOps::FilterOps(const Params& p) : mFilterObjectTypes(p.object_types), @@ -313,7 +313,7 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const { if (LLClipboard::instance().isCutMode()) { - LLFastTimer ft(FT_FILTER_CLIPBOARD); + LL_RECORD_BLOCK_TIME(FT_FILTER_CLIPBOARD); LLUUID current_id = object_id; LLInventoryObject *current_object = gInventory.getObject(object_id); while (current_id.notNull() && current_object) diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index a84aa452dc..f6d0ecc5bf 100755 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -133,11 +133,11 @@ void LLInventoryItemsList::idle(void* user_data) } } -LLFastTimer::DeclareTimer FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); +LLTrace::TimeBlock FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); void LLInventoryItemsList::refresh() { - LLFastTimer _(FTM_INVENTORY_ITEMS_REFRESH); + LL_RECORD_BLOCK_TIME(FTM_INVENTORY_ITEMS_REFRESH); static const unsigned ADD_LIMIT = 20; uuid_vec_t added_items; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7239a7e850..2a7ae017fb 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -396,11 +396,11 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() return getFilter().getShowFolderState(); } -static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh"); +static LLTrace::TimeBlock FTM_REFRESH("Inventory Refresh"); void LLInventoryPanel::modelChanged(U32 mask) { - LLFastTimer t2(FTM_REFRESH); + LL_RECORD_BLOCK_TIME(FTM_REFRESH); if (!mViewsInitialized) return; @@ -1295,10 +1295,10 @@ void LLInventoryPanel::removeItemID(const LLUUID& id) } } -LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); +LLTrace::TimeBlock FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); LLFolderViewItem* LLInventoryPanel::getItemByID(const LLUUID& id) { - LLFastTimer _(FTM_GET_ITEM_BY_ID); + LL_RECORD_BLOCK_TIME(FTM_GET_ITEM_BY_ID); std::map::iterator map_it; map_it = mItemMap.find(id); diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 16871adc4d..c5b4aac2f0 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -526,11 +526,11 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) } } -static LLFastTimer::DeclareTimer FTM_MATERIALS_IDLE("Materials"); +static LLTrace::TimeBlock FTM_MATERIALS_IDLE("Materials"); void LLMaterialMgr::onIdle(void*) { - LLFastTimer t(FTM_MATERIALS_IDLE); + LL_RECORD_BLOCK_TIME(FTM_MATERIALS_IDLE); LLMaterialMgr* instancep = LLMaterialMgr::getInstance(); diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index 666f10df96..bd4b0a0b08 100755 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -46,11 +46,11 @@ LLPersistentNotificationStorage::~LLPersistentNotificationStorage() { } -static LLFastTimer::DeclareTimer FTM_SAVE_NOTIFICATIONS("Save Notifications"); +static LLTrace::TimeBlock FTM_SAVE_NOTIFICATIONS("Save Notifications"); void LLPersistentNotificationStorage::saveNotifications() { - LLFastTimer _(FTM_SAVE_NOTIFICATIONS); + LL_RECORD_BLOCK_TIME(FTM_SAVE_NOTIFICATIONS); boost::intrusive_ptr history_channel = boost::dynamic_pointer_cast(LLNotifications::instance().getChannel("Persistent")); if (!history_channel) @@ -81,11 +81,11 @@ void LLPersistentNotificationStorage::saveNotifications() writeNotifications(output); } -static LLFastTimer::DeclareTimer FTM_LOAD_NOTIFICATIONS("Load Notifications"); +static LLTrace::TimeBlock FTM_LOAD_NOTIFICATIONS("Load Notifications"); void LLPersistentNotificationStorage::loadNotifications() { - LLFastTimer _(FTM_LOAD_NOTIFICATIONS); + LL_RECORD_BLOCK_TIME(FTM_LOAD_NOTIFICATIONS); LL_INFOS("LLPersistentNotificationStorage") << "start loading notifications" << LL_ENDL; diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 666fb1a0e5..429d6a9258 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -331,8 +331,8 @@ bool LLSceneMonitor::needsUpdate() const return mDiffState == NEED_DIFF; } -static LLFastTimer::DeclareTimer FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE("Generate Scene Load Dither Texture"); -static LLFastTimer::DeclareTimer FTM_SCENE_LOAD_IMAGE_DIFF("Scene Load Image Diff"); +static LLTrace::TimeBlock FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE("Generate Scene Load Dither Texture"); +static LLTrace::TimeBlock FTM_SCENE_LOAD_IMAGE_DIFF("Scene Load Image Diff"); void LLSceneMonitor::compare() { @@ -350,14 +350,14 @@ void LLSceneMonitor::compare() return; } - LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF); + LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF); mDiffState = EXECUTE_DIFF; S32 width = gViewerWindow->getWindowWidthRaw(); S32 height = gViewerWindow->getWindowHeightRaw(); if(!mDiff) { - LLFastTimer _(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE); mDiff = new LLRenderTarget(); mDiff->allocate(width, height, GL_RGBA, false, false, LLTexUnit::TT_TEXTURE, true); @@ -365,7 +365,7 @@ void LLSceneMonitor::compare() } else if(mDiff->getWidth() != width || mDiff->getHeight() != height) { - LLFastTimer _(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE); mDiff->resize(width, height, GL_RGBA); generateDitheringTexture(width, height); } @@ -416,7 +416,7 @@ void LLSceneMonitor::compare() //calculate Diff aggregate information in GPU, and enable gl occlusion query to capture it. void LLSceneMonitor::calcDiffAggregate() { - LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF); + LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF); if(mDiffState != EXECUTE_DIFF && !mDebugViewerVisible) { @@ -469,7 +469,7 @@ void LLSceneMonitor::calcDiffAggregate() static LLTrace::EventStatHandle<> sFramePixelDiff("FramePixelDifference"); void LLSceneMonitor::fetchQueryResult() { - LLFastTimer _(FTM_SCENE_LOAD_IMAGE_DIFF); + LL_RECORD_BLOCK_TIME(FTM_SCENE_LOAD_IMAGE_DIFF); // also throttle timing here, to avoid going below sample time due to phasing with frame capture static LLCachedControl scene_load_sample_time_control(gSavedSettings, "SceneLoadingMonitorSampleTime"); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 0ed6a840e0..fbf3c8c401 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -49,10 +49,10 @@ using namespace LLNotificationsUI; bool LLScreenChannel::mWasStartUpToastShown = false; -LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); +LLTrace::TimeBlock FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); LLRect LLScreenChannelBase::getChannelRect() { - LLFastTimer _(FTM_GET_CHANNEL_RECT); + LL_RECORD_BLOCK_TIME(FTM_GET_CHANNEL_RECT); if (mFloaterSnapRegion == NULL) { diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 725afb9014..6bd10ecd0d 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -53,8 +53,8 @@ #include "lltextureatlas.h" #include "llviewershadermgr.h" -static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition"); +static LLTrace::TimeBlock FTM_FRUSTUM_CULL("Frustum Culling"); +static LLTrace::TimeBlock FTM_CULL_REBOUND("Cull Rebound Partition"); extern bool gShiftFrame; @@ -408,10 +408,10 @@ void LLSpatialGroup::rebuildMesh() } } -static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); -static LLFastTimer::DeclareTimer FTM_ADD_GEOMETRY_COUNT("Add Geometry"); -static LLFastTimer::DeclareTimer FTM_CREATE_VB("Create VB"); -static LLFastTimer::DeclareTimer FTM_GET_GEOMETRY("Get Geometry"); +static LLTrace::TimeBlock FTM_REBUILD_VBO("VBO Rebuilt"); +static LLTrace::TimeBlock FTM_ADD_GEOMETRY_COUNT("Add Geometry"); +static LLTrace::TimeBlock FTM_CREATE_VB("Create VB"); +static LLTrace::TimeBlock FTM_GET_GEOMETRY("Get Geometry"); void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) { @@ -426,7 +426,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) group->mLastUpdateViewAngle = group->mViewAngle; } - LLFastTimer ftm(FTM_REBUILD_VBO); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VBO); group->clearDrawMap(); @@ -435,14 +435,14 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) U32 vertex_count = 0; { - LLFastTimer t(FTM_ADD_GEOMETRY_COUNT); + LL_RECORD_BLOCK_TIME(FTM_ADD_GEOMETRY_COUNT); addGeometryCount(group, vertex_count, index_count); } if (vertex_count > 0 && index_count > 0) { //create vertex buffer containing volume geometry for this node { - LLFastTimer t(FTM_CREATE_VB); + LL_RECORD_BLOCK_TIME(FTM_CREATE_VB); group->mBuilt = 1.f; if (group->mVertexBuffer.isNull() || !group->mVertexBuffer->isWriteable() || @@ -460,7 +460,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) } { - LLFastTimer t(FTM_GET_GEOMETRY); + LL_RECORD_BLOCK_TIME(FTM_GET_GEOMETRY); getGeometry(group); } } @@ -1435,7 +1435,7 @@ BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, visMaxa.load3(visMax.mV); { - LLFastTimer ftm(FTM_CULL_REBOUND); + LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND); LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0); group->rebound(); } @@ -1461,7 +1461,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* result ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif { - LLFastTimer ftm(FTM_CULL_REBOUND); + LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND); LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0); group->rebound(); } @@ -1482,7 +1482,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion) ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif { - LLFastTimer ftm(FTM_CULL_REBOUND); + LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND); LLSpatialGroup* group = (LLSpatialGroup*) mOctree->getListener(0); group->rebound(); } @@ -1493,19 +1493,19 @@ S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion) if (LLPipeline::sShadowRender) { - LLFastTimer ftm(FTM_FRUSTUM_CULL); + LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL); LLOctreeCullShadow culler(&camera); culler.traverse(mOctree); } else if (mInfiniteFarClip || !LLPipeline::sUseFarClip) { - LLFastTimer ftm(FTM_FRUSTUM_CULL); + LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL); LLOctreeCullNoFarClip culler(&camera); culler.traverse(mOctree); } else { - LLFastTimer ftm(FTM_FRUSTUM_CULL); + LL_RECORD_BLOCK_TIME(FTM_FRUSTUM_CULL); LLOctreeCull culler(&camera); culler.traverse(mOctree); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 92bb5a8beb..b6f6ed811e 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -180,11 +180,11 @@ void display_startup() glClear(GL_DEPTH_BUFFER_BIT); } -static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera"); +static LLTrace::TimeBlock FTM_UPDATE_CAMERA("Update Camera"); void display_update_camera() { - LLFastTimer t(FTM_UPDATE_CAMERA); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_CAMERA); // TODO: cut draw distance down if customizing avatar? // TODO: cut draw distance on per-parcel basis? @@ -228,29 +228,29 @@ void display_stats() } } -static LLFastTimer::DeclareTimer FTM_PICK("Picking"); -static LLFastTimer::DeclareTimer FTM_RENDER("Render"); -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("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"); -static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("HUD Update"); -static LLFastTimer::DeclareTimer FTM_DISPLAY_UPDATE_GEOM("Update Geom"); -static LLFastTimer::DeclareTimer FTM_TEXTURE_UNBIND("Texture Unbind"); -static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display"); +static LLTrace::TimeBlock FTM_PICK("Picking"); +static LLTrace::TimeBlock FTM_RENDER("Render"); +static LLTrace::TimeBlock FTM_UPDATE_SKY("Update Sky"); +static LLTrace::TimeBlock FTM_UPDATE_TEXTURES("Update Textures"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE("Update Images"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_CLASS("Class"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_BUMP("Image Update Bump"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_LIST("List"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_DELETE("Delete"); +static LLTrace::TimeBlock FTM_RESIZE_WINDOW("Resize Window"); +static LLTrace::TimeBlock FTM_HUD_UPDATE("HUD Update"); +static LLTrace::TimeBlock FTM_DISPLAY_UPDATE_GEOM("Update Geom"); +static LLTrace::TimeBlock FTM_TEXTURE_UNBIND("Texture Unbind"); +static LLTrace::TimeBlock FTM_TELEPORT_DISPLAY("Teleport Display"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { - LLFastTimer t(FTM_RENDER); + LL_RECORD_BLOCK_TIME(FTM_RENDER); if (gWindowResized) { //skip render on frames where window has been resized - LLFastTimer t(FTM_RESIZE_WINDOW); + LL_RECORD_BLOCK_TIME(FTM_RESIZE_WINDOW); gGL.flush(); glClear(GL_COLOR_BUFFER_BIT); gViewerWindow->getWindow()->swapBuffers(); @@ -314,7 +314,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->checkSettings(); { - LLFastTimer ftm(FTM_PICK); + LL_RECORD_BLOCK_TIME(FTM_PICK); LLAppViewer::instance()->pingMainloopTimeout("Display:Pick"); gViewerWindow->performPick(); } @@ -393,7 +393,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gTeleportDisplay) { - LLFastTimer t(FTM_TELEPORT_DISPLAY); + LL_RECORD_BLOCK_TIME(FTM_TELEPORT_DISPLAY); LLAppViewer::instance()->pingMainloopTimeout("Display:Teleport"); static LLCachedControl teleport_arrival_delay(gSavedSettings, "TeleportArrivalDelay"); static LLCachedControl teleport_local_delay(gSavedSettings, "TeleportLocalDelay"); @@ -590,7 +590,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES)) { LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures"); - LLFastTimer t(FTM_UPDATE_TEXTURES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXTURES); if (LLViewerDynamicTexture::updateAllInstances()) { gGL.setColorMask(true, true); @@ -624,14 +624,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // *TODO: merge these two methods { - LLFastTimer t(FTM_HUD_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_HUD_UPDATE); LLHUDManager::getInstance()->updateEffects(); LLHUDObject::updateAll(); stop_glerror(); } { - LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM); + LL_RECORD_BLOCK_TIME(FTM_DISPLAY_UPDATE_GEOM); 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(); @@ -770,10 +770,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages"); { - LLFastTimer t(FTM_IMAGE_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE); { - LLFastTimer t(FTM_IMAGE_UPDATE_CLASS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_CLASS); LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat(); LLTrace::CountStatHandle<>* angular_velocity_stat = LLViewerCamera::getAngularVelocityStat(); LLViewerTexture::updateClass(LLTrace::get_frame_recording().getPeriodMeanPerSec(*velocity_stat), @@ -782,19 +782,19 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { - LLFastTimer t(FTM_IMAGE_UPDATE_BUMP); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_BUMP); gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first. } { - LLFastTimer t(FTM_IMAGE_UPDATE_LIST); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_LIST); 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); } /*{ - LLFastTimer t(FTM_IMAGE_UPDATE_DELETE); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_DELETE); //remove dead textures from GL LLImageGL::deleteDeadTextures(); stop_glerror(); @@ -839,7 +839,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLAppViewer::instance()->pingMainloopTimeout("Display:Sky"); - LLFastTimer t(FTM_UPDATE_SKY); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_SKY); gSky.updateSky(); } @@ -971,7 +971,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } { - LLFastTimer t(FTM_TEXTURE_UNBIND); + LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UNBIND); for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++) { //dummy cleanup of any currently bound textures if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE) @@ -1027,7 +1027,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI"); if (!for_snapshot) { - LLFastTimer t(FTM_RENDER_UI); + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); render_ui(); swap(); } @@ -1298,7 +1298,7 @@ void render_ui(F32 zoom_factor, int subfield) gGL.color4f(1,1,1,1); if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLFastTimer t(FTM_RENDER_UI); + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); if (!gDisconnected) { @@ -1331,11 +1331,11 @@ void render_ui(F32 zoom_factor, int subfield) } } -static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); +static LLTrace::TimeBlock FTM_SWAP("Swap"); void swap() { - LLFastTimer t(FTM_SWAP); + LL_RECORD_BLOCK_TIME(FTM_SWAP); if (gDisplaySwapBuffers) { diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 76fb58b87b..deabc9c8b3 100755 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -376,7 +376,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 //----------------------------------------------------------------------------- // updateFaceData() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_AVATAR_FACE("Avatar Face"); +static LLTrace::TimeBlock FTM_AVATAR_FACE("Avatar Face"); void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) { @@ -399,7 +399,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w } - LLFastTimer t(FTM_AVATAR_FACE); + LL_RECORD_BLOCK_TIME(FTM_AVATAR_FACE); LLStrider verticesp; LLStrider normalsp; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ba7fb4f985..868cb740dc 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -776,19 +776,19 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi } } -static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media"); -static LLFastTimer::DeclareTimer FTM_MEDIA_SPARE_IDLE("Spare Idle"); -static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE_INTEREST("Update/Interest"); -static LLFastTimer::DeclareTimer FTM_MEDIA_SORT("Sort"); -static LLFastTimer::DeclareTimer FTM_MEDIA_SORT2("Sort 2"); -static LLFastTimer::DeclareTimer FTM_MEDIA_MISC("Misc"); +static LLTrace::TimeBlock FTM_MEDIA_UPDATE("Update Media"); +static LLTrace::TimeBlock FTM_MEDIA_SPARE_IDLE("Spare Idle"); +static LLTrace::TimeBlock FTM_MEDIA_UPDATE_INTEREST("Update/Interest"); +static LLTrace::TimeBlock FTM_MEDIA_SORT("Sort"); +static LLTrace::TimeBlock FTM_MEDIA_SORT2("Sort 2"); +static LLTrace::TimeBlock FTM_MEDIA_MISC("Misc"); ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerMedia::updateMedia(void *dummy_arg) { - LLFastTimer t1(FTM_MEDIA_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE); // Enable/disable the plugin read thread LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); @@ -808,7 +808,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) impl_list::iterator end = sViewerMediaImplList.end(); { - LLFastTimer t(FTM_MEDIA_UPDATE_INTEREST); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE_INTEREST); for(; iter != end;) { LLViewerMediaImpl* pimpl = *iter++; @@ -820,12 +820,12 @@ void LLViewerMedia::updateMedia(void *dummy_arg) // Let the spare media source actually launch if(sSpareBrowserMediaSource) { - LLFastTimer t(FTM_MEDIA_SPARE_IDLE); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_SPARE_IDLE); sSpareBrowserMediaSource->idle(); } { - LLFastTimer t(FTM_MEDIA_SORT); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT); // Sort the static instance list using our interest criteria sViewerMediaImplList.sort(priorityComparitor); } @@ -857,7 +857,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) // If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow. { - LLFastTimer t(FTM_MEDIA_MISC); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_MISC); for(; iter != end; iter++) { LLViewerMediaImpl* pimpl = *iter; @@ -1025,7 +1025,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) } else { - LLFastTimer t(FTM_MEDIA_SORT2); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_SORT2); // Use a distance-based sort for proximity values. std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor); } @@ -2746,14 +2746,14 @@ bool LLViewerMediaImpl::canNavigateBack() } ////////////////////////////////////////////////////////////////////////////////////////// -static LLFastTimer::DeclareTimer FTM_MEDIA_DO_UPDATE("Do Update"); -static LLFastTimer::DeclareTimer FTM_MEDIA_GET_DATA("Get Data"); -static LLFastTimer::DeclareTimer FTM_MEDIA_SET_SUBIMAGE("Set Subimage"); +static LLTrace::TimeBlock FTM_MEDIA_DO_UPDATE("Do Update"); +static LLTrace::TimeBlock FTM_MEDIA_GET_DATA("Get Data"); +static LLTrace::TimeBlock FTM_MEDIA_SET_SUBIMAGE("Set Subimage"); void LLViewerMediaImpl::update() { - LLFastTimer t(FTM_MEDIA_DO_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_DO_UPDATE); if(mMediaSource == NULL) { if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) @@ -2855,7 +2855,7 @@ void LLViewerMediaImpl::update() U8* data = NULL; { - LLFastTimer t(FTM_MEDIA_GET_DATA); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_GET_DATA); data = mMediaSource->getBitsData(); } @@ -2864,7 +2864,7 @@ void LLViewerMediaImpl::update() data += ( y_pos * mMediaSource->getTextureDepth() ); { - LLFastTimer t(FTM_MEDIA_SET_SUBIMAGE); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE); placeholder_image->setSubImage( data, mMediaSource->getBitsWidth(), @@ -3435,11 +3435,11 @@ BOOL LLViewerMediaImpl::isUpdated() return mIsUpdated ; } -static LLFastTimer::DeclareTimer FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest"); +static LLTrace::TimeBlock FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest"); void LLViewerMediaImpl::calculateInterest() { - LLFastTimer t(FTM_MEDIA_CALCULATE_INTEREST); + LL_RECORD_BLOCK_TIME(FTM_MEDIA_CALCULATE_INTEREST); LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId ); if(texture != NULL) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7de8e1ff12..c70efd9dfa 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4237,7 +4237,7 @@ const F32 THRESHOLD_HEAD_ROT_QDOT = 0.9997f; // ~= 2.5 degrees -- if its less th const F32 MAX_HEAD_ROT_QDOT = 0.99999f; // ~= 0.5 degrees -- if its greater than this then no need to update head_rot // between these values we delay the updates (but no more than one second) -static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE_SEND("Send Message"); +static LLTrace::TimeBlock FTM_AGENT_UPDATE_SEND("Send Message"); void send_agent_update(BOOL force_send, BOOL send_reliable) { @@ -4421,7 +4421,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) } */ - LLFastTimer t(FTM_AGENT_UPDATE_SEND); + LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE_SEND); // Build the message msg->newMessageFast(_PREHASH_AgentUpdate); msg->nextBlockFast(_PREHASH_AgentData); @@ -4552,14 +4552,14 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects"); +static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Kill Objects"); const U32 KILLOBJECT_DELETE_OPCODE = 0; void process_kill_object(LLMessageSystem *mesgsys, void **user_data) { - LLFastTimer t(FTM_PROCESS_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS); LLUUID id; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9235f23a8c..2c1ab3a73b 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -112,7 +112,7 @@ BOOL LLViewerObject::sMapDebug = TRUE; LLColor4 LLViewerObject::sEditSelectColor( 1.0f, 1.f, 0.f, 0.3f); // Edit OK LLColor4 LLViewerObject::sNoEditSelectColor( 1.0f, 0.f, 0.f, 0.3f); // Can't edit S32 LLViewerObject::sAxisArrowLength(50); -LLTrace::MemStatHandle LLViewerObject::sMemStat("LLViewerObject"); +//LLTrace::MemStatHandle LLViewerObject::sMemStat("LLViewerObject"); BOOL LLViewerObject::sPulseEnabled(FALSE); @@ -133,13 +133,13 @@ std::map LLViewerObject::sObjectDataMap; const F32 PHYSICS_TIMESTEP = 1.f / 45.f; -static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); +static LLTrace::TimeBlock FTM_CREATE_OBJECT("Create Object"); // static LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) { LLViewerObject *res = NULL; - LLFastTimer t1(FTM_CREATE_OBJECT); + LL_RECORD_BLOCK_TIME(FTM_CREATE_OBJECT); switch (pcode) { @@ -2407,8 +2407,8 @@ void LLViewerObject::loadFlags(U32 flags) void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - //static LLFastTimer::DeclareTimer ftm("Viewer Object"); - //LLFastTimer t(ftm); + //static LLTrace::TimeBlock ftm("Viewer Object"); + //LL_RECORD_BLOCK_TIME(ftm); if (!mDead) { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 24dff45ae8..e3972ccae8 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -661,7 +661,7 @@ public: LLPointer mIcon; static BOOL sUseSharedDrawables; - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; protected: // delete an item in the inventory, but don't tell the diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 897da7f0b3..686eff8426 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -289,7 +289,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { @@ -386,7 +386,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, bool compressed) { - LLFastTimer t(FTM_PROCESS_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS); LLViewerObject *objectp; S32 num_objects; @@ -978,7 +978,7 @@ private: LLSD mObjectIDs; }; -static LLFastTimer::DeclareTimer FTM_IDLE_COPY("Idle Copy"); +static LLTrace::TimeBlock FTM_IDLE_COPY("Idle Copy"); void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { @@ -1031,7 +1031,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) U32 idle_count = 0; { - LLFastTimer t(FTM_IDLE_COPY); + LL_RECORD_BLOCK_TIME(FTM_IDLE_COPY); for (std::vector >::iterator active_iter = mActiveObjects.begin(); active_iter != mActiveObjects.end(); active_iter++) @@ -1328,11 +1328,11 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) mNumDeadObjects++; } -static LLFastTimer::DeclareTimer FTM_REMOVE_DRAWABLE("Remove Drawable"); +static LLTrace::TimeBlock FTM_REMOVE_DRAWABLE("Remove Drawable"); void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) { - LLFastTimer t(FTM_REMOVE_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_DRAWABLE); if (!drawablep) { @@ -1617,9 +1617,9 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) mPendingPhysicsFlags.erase(object_id); } -static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects"); -static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift"); -static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift"); +static LLTrace::TimeBlock FTM_SHIFT_OBJECTS("Shift Objects"); +static LLTrace::TimeBlock FTM_PIPELINE_SHIFT("Pipeline Shift"); +static LLTrace::TimeBlock FTM_REGION_SHIFT("Region Shift"); void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { @@ -1632,7 +1632,7 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) return; } - LLFastTimer t(FTM_SHIFT_OBJECTS); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_OBJECTS); LLViewerObject *objectp; for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) @@ -1651,12 +1651,12 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) } { - LLFastTimer t(FTM_PIPELINE_SHIFT); + LL_RECORD_BLOCK_TIME(FTM_PIPELINE_SHIFT); gPipeline.shiftObjects(offset); } { - LLFastTimer t(FTM_REGION_SHIFT); + LL_RECORD_BLOCK_TIME(FTM_REGION_SHIFT); LLWorld::getInstance()->shiftRegions(offset); } } diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 481befdb44..1e01c0fdef 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -983,8 +983,8 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode) } } -static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_WAIT("Occlusion Wait"); +static LLTrace::TimeBlock FTM_OCCLUSION_READBACK("Readback Occlusion"); +static LLTrace::TimeBlock FTM_OCCLUSION_WAIT("Occlusion Wait"); BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds) { @@ -1038,7 +1038,7 @@ void LLOcclusionCullingGroup::checkOcclusion() { if (LLPipeline::sUseOcclusion > 1) { - LLFastTimer t(FTM_OCCLUSION_READBACK); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_READBACK); LLOcclusionCullingGroup* parent = (LLOcclusionCullingGroup*)getParent(); if (parent && parent->isOcclusionState(LLOcclusionCullingGroup::OCCLUDED)) { //if the parent has been marked as occluded, the child is implicitly occluded @@ -1057,7 +1057,7 @@ void LLOcclusionCullingGroup::checkOcclusion() if (wait_for_query && mOcclusionIssued[LLViewerCamera::sCurCameraID] < gFrameCount) { //query was issued last frame, wait until it's available S32 max_loop = 1024; - LLFastTimer t(FTM_OCCLUSION_WAIT); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_WAIT); while (!available && max_loop-- > 0) { //do some usefu work while we wait @@ -1121,16 +1121,16 @@ void LLOcclusionCullingGroup::checkOcclusion() } } -static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); -static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_END_QUERY("End Query"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_SET_BUFFER("Set Buffer"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW_WATER("Draw Water"); -static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW("Draw"); +static LLTrace::TimeBlock FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); +static LLTrace::TimeBlock FTM_SET_OCCLUSION_STATE("Occlusion State"); +static LLTrace::TimeBlock FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); +static LLTrace::TimeBlock FTM_OCCLUSION_ALLOCATE("Allocate"); +static LLTrace::TimeBlock FTM_OCCLUSION_BUILD("Build"); +static LLTrace::TimeBlock FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); +static LLTrace::TimeBlock FTM_OCCLUSION_END_QUERY("End Query"); +static LLTrace::TimeBlock FTM_OCCLUSION_SET_BUFFER("Set Buffer"); +static LLTrace::TimeBlock FTM_OCCLUSION_DRAW_WATER("Draw Water"); +static LLTrace::TimeBlock FTM_OCCLUSION_DRAW("Draw"); void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* region_agent) { @@ -1150,7 +1150,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension if (earlyFail(camera, bounds)) { - LLFastTimer t(FTM_OCCLUSION_EARLY_FAIL); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_EARLY_FAIL); setOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY); assert_states_valid(this); clearOcclusionState(LLOcclusionCullingGroup::OCCLUDED, LLOcclusionCullingGroup::STATE_MODE_DIFF); @@ -1161,11 +1161,11 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY)) { { //no query pending, or previous query to be discarded - LLFastTimer t(FTM_RENDER_OCCLUSION); + LL_RECORD_BLOCK_TIME(FTM_RENDER_OCCLUSION); if (!mOcclusionQuery[LLViewerCamera::sCurCameraID]) { - LLFastTimer t(FTM_OCCLUSION_ALLOCATE); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_ALLOCATE); mOcclusionQuery[LLViewerCamera::sCurCameraID] = getNewOcclusionQueryObjectName(); } @@ -1189,13 +1189,13 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg #endif { - LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS); + LL_RECORD_BLOCK_TIME(FTM_PUSH_OCCLUSION_VERTS); //store which frame this query was issued on mOcclusionIssued[LLViewerCamera::sCurCameraID] = gFrameCount; { - LLFastTimer t(FTM_OCCLUSION_BEGIN_QUERY); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_BEGIN_QUERY); glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]); } @@ -1209,7 +1209,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER) { - LLFastTimer t(FTM_OCCLUSION_DRAW_WATER); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW_WATER); LLGLSquashToFarClip squash(glh_get_current_projection(), 1); if (camera->getOrigin().isExactlyZero()) @@ -1224,7 +1224,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg } else { - LLFastTimer t(FTM_OCCLUSION_DRAW); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_DRAW); if (camera->getOrigin().isExactlyZero()) { //origin is invalid, draw entire box gPipeline.mCubeVB->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0); @@ -1238,14 +1238,14 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector3* reg { - LLFastTimer t(FTM_OCCLUSION_END_QUERY); + LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_END_QUERY); glEndQueryARB(mode); } } } { - LLFastTimer t(FTM_SET_OCCLUSION_STATE); + LL_RECORD_BLOCK_TIME(FTM_SET_OCCLUSION_STATE); setOcclusionState(LLOcclusionCullingGroup::QUERY_PENDING); clearOcclusionState(LLOcclusionCullingGroup::DISCARD_QUERY); } diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index e610db96eb..342d149491 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -210,15 +210,15 @@ public: *this = rhs; } - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } + //void* operator new(size_t size) + //{ + // return ll_aligned_malloc_16(size); + //} + + //void operator delete(void* ptr) + //{ + // ll_aligned_free_16(ptr); + //} bool removeFromGroup(LLViewerOctreeEntryData* data); bool removeFromGroup(LLViewerOctreeEntry* entry); diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 09b6b8eb4b..eb89a887ac 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -631,7 +631,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLTrace::TimeBlock FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { @@ -644,7 +644,7 @@ void LLViewerPartSim::updateSimulation() return; } - LLFastTimer ftm(FTM_SIMULATE_PARTICLES); + LL_RECORD_BLOCK_TIME(FTM_SIMULATE_PARTICLES); // Start at a random particle system so the same // particle system doesn't always get first pick at the diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 8cb35cd30b..09bf022008 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -455,7 +455,7 @@ const S32 min_non_tex_system_mem = (128<<20); // 128 MB F32 texmem_lower_bound_scale = 0.85f; F32 texmem_middle_bound_scale = 0.925f; -static LLFastTimer::DeclareTimer FTM_TEXTURE_MEMORY_CHECK("Memory Check"); +static LLTrace::TimeBlock FTM_TEXTURE_MEMORY_CHECK("Memory Check"); //static bool LLViewerTexture::isMemoryForTextureLow() @@ -469,7 +469,7 @@ bool LLViewerTexture::isMemoryForTextureLow() } timer.reset(); - LLFastTimer t(FTM_TEXTURE_MEMORY_CHECK); + LL_RECORD_BLOCK_TIME(FTM_TEXTURE_MEMORY_CHECK); const S32Megabytes MIN_FREE_TEXTURE_MEMORY(5); //MB const S32Megabytes MIN_FREE_MAIN_MEMORY(100); //MB @@ -510,8 +510,8 @@ bool LLViewerTexture::isMemoryForTextureLow() return low_mem; } -static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_MEDIA("Media"); -static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE_TEST("Test"); +static LLTrace::TimeBlock FTM_TEXTURE_UPDATE_MEDIA("Media"); +static LLTrace::TimeBlock FTM_TEXTURE_UPDATE_TEST("Test"); //static void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity) @@ -521,12 +521,12 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - LLFastTimer t(FTM_TEXTURE_UPDATE_TEST); + LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UPDATE_TEST); tester->update(); } { - LLFastTimer t(FTM_TEXTURE_UPDATE_MEDIA); + LL_RECORD_BLOCK_TIME(FTM_TEXTURE_UPDATE_MEDIA); LLViewerMediaTexture::updateClass(); } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index cb7ea1f637..4958c38c4e 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -68,7 +68,7 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; LLViewerTextureList gTextureList; -static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +static LLTrace::TimeBlock FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -638,18 +638,18 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); -static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks"); -static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch"); -static LLFastTimer::DeclareTimer FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); -static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create"); -static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); -static LLFastTimer::DeclareTimer FTM_UPDATE_IMAGES("Update Images"); +static LLTrace::TimeBlock FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLTrace::TimeBlock FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); +static LLTrace::TimeBlock FTM_IMAGE_CALLBACKS("Callbacks"); +static LLTrace::TimeBlock FTM_IMAGE_FETCH("Fetch"); +static LLTrace::TimeBlock FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); +static LLTrace::TimeBlock FTM_IMAGE_CREATE("Create"); +static LLTrace::TimeBlock FTM_IMAGE_STATS("Stats"); +static LLTrace::TimeBlock FTM_UPDATE_IMAGES("Update Images"); void LLViewerTextureList::updateImages(F32 max_time) { - LLFastTimer _(FTM_UPDATE_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_IMAGES); static BOOL cleared = FALSE; if(gTeleportDisplay) { @@ -677,37 +677,37 @@ void LLViewerTextureList::updateImages(F32 max_time) { //loading from fast cache - LLFastTimer t(FTM_FAST_CACHE_IMAGE_FETCH); + LL_RECORD_BLOCK_TIME(FTM_FAST_CACHE_IMAGE_FETCH); max_time -= updateImagesLoadingFastCache(max_time); } { - LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_UPDATE_PRIORITIES); updateImagesDecodePriorities(); } F32 total_max_time = max_time; { - LLFastTimer t(FTM_IMAGE_FETCH); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_FETCH); max_time -= updateImagesFetchTextures(max_time); } { - LLFastTimer t(FTM_IMAGE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_CREATE); max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time max_time -= updateImagesCreateTextures(max_time); } if (!mDirtyTextureList.empty()) { - LLFastTimer t(FTM_IMAGE_MARK_DIRTY); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_MARK_DIRTY); gPipeline.dirtyPoolObjectTextures(mDirtyTextureList); mDirtyTextureList.clear(); } { - LLFastTimer t(FTM_IMAGE_CALLBACKS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_CALLBACKS); bool didone = false; for (image_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) @@ -728,7 +728,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } { - LLFastTimer t(FTM_IMAGE_STATS); + LL_RECORD_BLOCK_TIME(FTM_IMAGE_STATS); updateImagesUpdateStats(); } } @@ -1360,7 +1360,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); // Receive image header, copy into image object and decompresses // if this is a one-packet image. @@ -1432,7 +1432,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); // Receives image packet, copy into image object, // checks if all packets received, decompresses if so. @@ -1505,7 +1505,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d // static void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data) { - LLFastTimer t(FTM_PROCESS_IMAGES); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_IMAGES); LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3a62ab68a0..ee4972e13b 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2796,13 +2796,13 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params) } } -static LLFastTimer::DeclareTimer ftm("Update UI"); +static LLTrace::TimeBlock ftm("Update UI"); // Update UI based on stored mouse position from mouse-move // event processing. void LLViewerWindow::updateUI() { - LLFastTimer t(ftm); + LL_RECORD_BLOCK_TIME(ftm); static std::string last_handle_msg; @@ -3374,10 +3374,10 @@ void LLViewerWindow::updateKeyboardFocus() } } -static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); +static LLTrace::TimeBlock FTM_UPDATE_WORLD_VIEW("Update World View"); void LLViewerWindow::updateWorldViewRect(bool use_full_window) { - LLFastTimer ft(FTM_UPDATE_WORLD_VIEW); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_WORLD_VIEW); // start off using whole window to render world LLRect new_world_rect = mWindowRectRaw; @@ -4871,11 +4871,11 @@ void LLViewerWindow::requestResolutionUpdate() mResDirty = true; } -static LLFastTimer::DeclareTimer FTM_WINDOW_CHECK_SETTINGS("Window Settings"); +static LLTrace::TimeBlock FTM_WINDOW_CHECK_SETTINGS("Window Settings"); void LLViewerWindow::checkSettings() { - LLFastTimer t(FTM_WINDOW_CHECK_SETTINGS); + LL_RECORD_BLOCK_TIME(FTM_WINDOW_CHECK_SETTINGS); if (mStatesDirty) { gGL.refreshState(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 724ba3c85e..1b5b83aa39 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1918,8 +1918,8 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) return setTETextureCore(te, image); } -static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Avatar Update"); -static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); +static LLTrace::TimeBlock FTM_AVATAR_UPDATE("Avatar Update"); +static LLTrace::TimeBlock FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ // LLVOAvatar::dumpAnimationState() @@ -1953,7 +1953,7 @@ void LLVOAvatar::dumpAnimationState() //------------------------------------------------------------------------ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - LLFastTimer t(FTM_AVATAR_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_AVATAR_UPDATE); if (isDead()) { @@ -1975,7 +1975,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) // force asynchronous drawable update if(mDrawable.notNull()) { - LLFastTimer t(FTM_JOINT_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_JOINT_UPDATE); if (mIsSitting && getParent()) { @@ -2158,7 +2158,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) }//if ( voiceEnabled ) } -static LLFastTimer::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments"); +static LLTrace::TimeBlock FTM_ATTACHMENT_UPDATE("Update Attachments"); void LLVOAvatar::idleUpdateMisc(bool detailed_update) { @@ -2175,7 +2175,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) // update attachments positions if (detailed_update || !sUseImpostors) { - LLFastTimer t(FTM_ATTACHMENT_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE); for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter) @@ -5334,10 +5334,10 @@ void LLVOAvatar::updateGL() //----------------------------------------------------------------------------- // updateGeometry() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar"); +static LLTrace::TimeBlock FTM_UPDATE_AVATAR("Update Avatar"); BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_AVATAR); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_AVATAR); if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))) { return TRUE; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 1cfda038a8..3c09981f7d 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -38,7 +38,7 @@ F32 LLVOCacheEntry::sBackDistanceSquared = 0.f; F32 LLVOCacheEntry::sBackAngleTanSquared = 0.f; BOOL LLVOCachePartition::sNeedsOcclusionCheck = FALSE; -LLTrace::MemStatHandle LLVOCachePartition::sMemStat("LLVOCachePartition"); +//LLTrace::MemStatHandle LLVOCachePartition::sMemStat("LLVOCachePartition"); BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) { diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 52b25b7f91..1fa019cfa6 100755 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -37,7 +37,9 @@ // Cache entries class LLCamera; -class LLVOCacheEntry : public LLViewerOctreeEntryData +class LLVOCacheEntry +: public LLViewerOctreeEntryData, + public LLTrace::MemTrackable { public: enum //low 16-bit state @@ -174,7 +176,7 @@ public: public: static BOOL sNeedsOcclusionCheck; - static LLTrace::MemStatHandle sMemStat; + //static LLTrace::MemStatHandle sMemStat; private: BOOL mDirty; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index a60d8a2284..1abb081e73 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -412,11 +412,11 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); +static LLTrace::TimeBlock FTM_UPDATE_GRASS("Update Grass"); BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_GRASS); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_GRASS); dirtySpatialGroup(); @@ -670,11 +670,11 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count } } -static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); +static LLTrace::TimeBlock FTM_REBUILD_GRASS_VB("Grass VB"); void LLGrassPartition::getGeometry(LLSpatialGroup* group) { - LLFastTimer ftm(FTM_REBUILD_GRASS_VB); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_GRASS_VB); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 6ff849cfd2..f7224684bb 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6314,7 +6314,7 @@ LLVivoxProtocolParser::~LLVivoxProtocolParser() XML_ParserFree(parser); } -static LLFastTimer::DeclareTimer FTM_VIVOX_PROCESS("Vivox Process"); +static LLTrace::TimeBlock FTM_VIVOX_PROCESS("Vivox Process"); // virtual LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( @@ -6324,7 +6324,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( LLSD& context, LLPumpIO* pump) { - LLFastTimer t(FTM_VIVOX_PROCESS); + LL_RECORD_BLOCK_TIME(FTM_VIVOX_PROCESS); LLBufferStream istr(channels, buffer.get()); std::ostringstream ostr; while (istr.good()) diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 6402a484ec..3c93460d33 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -286,10 +286,10 @@ LLVector3 LLVOPartGroup::getCameraPosition() const return gAgentCamera.getCameraPositionAgent(); } -static LLFastTimer::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); +static LLTrace::TimeBlock FTM_UPDATE_PARTICLES("Update Particles"); BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_PARTICLES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_PARTICLES); dirtySpatialGroup(); @@ -611,7 +611,7 @@ LLHUDParticlePartition::LLHUDParticlePartition(LLViewerRegion* regionp) : mPartitionType = LLViewerRegion::PARTITION_HUD_PARTICLE; } -static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_VBO("Particle VBO"); +static LLTrace::TimeBlock FTM_REBUILD_PARTICLE_VBO("Particle VBO"); void LLParticlePartition::rebuildGeom(LLSpatialGroup* group) { @@ -626,7 +626,7 @@ void LLParticlePartition::rebuildGeom(LLSpatialGroup* group) group->mLastUpdateViewAngle = group->mViewAngle; } - LLFastTimer ftm(FTM_REBUILD_PARTICLE_VBO); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_PARTICLE_VBO); group->clearDrawMap(); @@ -700,11 +700,11 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co } -static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); +static LLTrace::TimeBlock FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { - LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_PARTICLE_GEOM); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 85e8fd8bf4..00e52531d6 100755 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1243,7 +1243,7 @@ void LLVOSky::createDummyVertexBuffer() } } -static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); +static LLTrace::TimeBlock FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); void LLVOSky::updateDummyVertexBuffer() { @@ -1256,7 +1256,7 @@ void LLVOSky::updateDummyVertexBuffer() return ; } - LLFastTimer t(FTM_RENDER_FAKE_VBO_UPDATE) ; + LL_RECORD_BLOCK_TIME(FTM_RENDER_FAKE_VBO_UPDATE) ; if(!mFace[FACE_DUMMY] || !mFace[FACE_DUMMY]->getVertexBuffer()) createDummyVertexBuffer() ; @@ -1269,11 +1269,11 @@ void LLVOSky::updateDummyVertexBuffer() //---------------------------------- //end of fake vertex buffer updating //---------------------------------- -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLTrace::TimeBlock FTM_GEO_SKY("Sky Geometry"); BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_GEO_SKY); + LL_RECORD_BLOCK_TIME(FTM_GEO_SKY); if (mFace[FACE_REFLECTION] == NULL) { LLDrawPoolWater *poolp = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 178542cc88..c77ba26ba3 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -212,7 +212,7 @@ LLDrawable *LLVOSurfacePatch::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain"); +static LLTrace::TimeBlock FTM_UPDATE_TERRAIN("Update Terrain"); void LLVOSurfacePatch::updateGL() { @@ -224,7 +224,7 @@ void LLVOSurfacePatch::updateGL() BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_TERRAIN); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TERRAIN); dirtySpatialGroup(TRUE); @@ -1070,10 +1070,10 @@ LLVertexBuffer* LLTerrainPartition::createVertexBuffer(U32 type_mask, U32 usage) return new LLVertexBufferTerrain(); } -static LLFastTimer::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB"); +static LLTrace::TimeBlock FTM_REBUILD_TERRAIN_VB("Terrain VB"); void LLTerrainPartition::getGeometry(LLSpatialGroup* group) { - LLFastTimer ftm(FTM_REBUILD_TERRAIN_VB); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_TERRAIN_VB); LLVertexBuffer* buffer = group->mVertexBuffer; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index f5206b74ea..dad8ba09fe 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -479,11 +479,11 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -static LLFastTimer::DeclareTimer FTM_UPDATE_TREE("Update Tree"); +static LLTrace::TimeBlock FTM_UPDATE_TREE("Update Tree"); BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_TREE); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_TREE); if(mTrunkLOD >= sMAX_NUM_TREE_LOD_LEVELS) //do not display the tree. { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4ff9bc6981..c6ad6234e5 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -96,9 +96,9 @@ S32 LLVOVolume::mRenderComplexity_current = 0; LLPointer LLVOVolume::sObjectMediaClient = NULL; LLPointer LLVOVolume::sObjectMediaNavigateClient = NULL; -static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles"); -static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes"); -static LLFastTimer::DeclareTimer FTM_VOLUME_TEXTURES("Volume Textures"); +static LLTrace::TimeBlock FTM_GEN_TRIANGLES("Generate Triangles"); +static LLTrace::TimeBlock FTM_GEN_VOLUME("Generate Volumes"); +static LLTrace::TimeBlock FTM_VOLUME_TEXTURES("Volume Textures"); // Implementation class of LLMediaDataClientObject. See llmediadataclient.h class LLMediaDataClientObjectImpl : public LLMediaDataClientObject @@ -659,7 +659,7 @@ BOOL LLVOVolume::isVisible() const void LLVOVolume::updateTextureVirtualSize(bool forced) { - LLFastTimer ftm(FTM_VOLUME_TEXTURES); + LL_RECORD_BLOCK_TIME(FTM_VOLUME_TEXTURES); // Update the pixel area of all faces if(!forced) @@ -1602,18 +1602,18 @@ void LLVOVolume::updateRelativeXform(bool force_identity) } } -static LLFastTimer::DeclareTimer FTM_GEN_FLEX("Generate Flexies"); -static LLFastTimer::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives"); -static LLFastTimer::DeclareTimer FTM_UPDATE_RIGGED_VOLUME("Update Rigged"); +static LLTrace::TimeBlock FTM_GEN_FLEX("Generate Flexies"); +static LLTrace::TimeBlock FTM_UPDATE_PRIMITIVES("Update Primitives"); +static LLTrace::TimeBlock FTM_UPDATE_RIGGED_VOLUME("Update Rigged"); BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { - LLFastTimer t(FTM_UPDATE_PRIMITIVES); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_PRIMITIVES); if (mDrawable->isState(LLDrawable::REBUILD_RIGGED)) { { - LLFastTimer t(FTM_UPDATE_RIGGED_VOLUME); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_RIGGED_VOLUME); updateRiggedVolume(); } genBBoxes(FALSE); @@ -1624,7 +1624,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { BOOL res; { - LLFastTimer t(FTM_GEN_FLEX); + LL_RECORD_BLOCK_TIME(FTM_GEN_FLEX); res = mVolumeImpl->doUpdateGeometry(drawable); } updateFaceFlags(); @@ -1654,14 +1654,14 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) if (mVolumeChanged) { - LLFastTimer ftm(FTM_GEN_VOLUME); + LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); LLVolumeParams volume_params = getVolume()->getParams(); setVolume(volume_params, 0); drawable->setState(LLDrawable::REBUILD_VOLUME); } { - LLFastTimer t(FTM_GEN_TRIANGLES); + LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); regenFaces(); genBBoxes(FALSE); } @@ -1680,7 +1680,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) old_volumep = NULL ; { - LLFastTimer ftm(FTM_GEN_VOLUME); + LL_RECORD_BLOCK_TIME(FTM_GEN_VOLUME); LLVolumeParams volume_params = getVolume()->getParams(); setVolume(volume_params, 0); } @@ -1703,7 +1703,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles() { - LLFastTimer t(FTM_GEN_TRIANGLES); + LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs()) { regenFaces(); @@ -1728,7 +1728,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { compiled = TRUE; // All it did was move or we changed the texture coordinate offset - LLFastTimer t(FTM_GEN_TRIANGLES); + LL_RECORD_BLOCK_TIME(FTM_GEN_TRIANGLES); genBBoxes(FALSE); } @@ -3865,8 +3865,8 @@ void LLVOVolume::updateRiggedVolume() } -static LLFastTimer::DeclareTimer FTM_SKIN_RIGGED("Skin"); -static LLFastTimer::DeclareTimer FTM_RIGGED_OCTREE("Octree"); +static LLTrace::TimeBlock FTM_SKIN_RIGGED("Skin"); +static LLTrace::TimeBlock FTM_RIGGED_OCTREE("Octree"); void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* volume) { @@ -3924,7 +3924,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons if( pos && weight && dst_face.mExtents ) { - LLFastTimer t(FTM_SKIN_RIGGED); + LL_RECORD_BLOCK_TIME(FTM_SKIN_RIGGED); for (U32 j = 0; j < dst_face.mNumVertices; ++j) { @@ -3985,7 +3985,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons } { - LLFastTimer t(FTM_RIGGED_OCTREE); + LL_RECORD_BLOCK_TIME(FTM_RIGGED_OCTREE); delete dst_face.mOctree; dst_face.mOctree = NULL; @@ -4058,11 +4058,11 @@ bool can_batch_texture(LLFace* facep) return true; } -static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face"); +static LLTrace::TimeBlock FTM_REGISTER_FACE("Register Face"); void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type) { - LLFastTimer t(FTM_REGISTER_FACE); + LL_RECORD_BLOCK_TIME(FTM_REGISTER_FACE); if (type == LLRenderPass::PASS_ALPHA && facep->getTextureEntry()->getMaterialParams().notNull() && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_TANGENT)) { LL_WARNS("RenderMaterials") << "Oh no! No binormals for this alpha blended face!" << LL_ENDL; @@ -4289,9 +4289,9 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume VB"); -static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_FACE_LIST("Build Face List"); -static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info"); +static LLTrace::TimeBlock FTM_REBUILD_VOLUME_VB("Volume VB"); +static LLTrace::TimeBlock FTM_REBUILD_VOLUME_FACE_LIST("Build Face List"); +static LLTrace::TimeBlock FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info"); static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj) { @@ -4340,7 +4340,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) return; } - LLFastTimer ftm(FTM_REBUILD_VOLUME_VB); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB); group->mBuilt = 1.f; @@ -4397,7 +4397,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) bool emissive = false; { - LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_FACE_LIST); //get all the faces into a list for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) @@ -4933,8 +4933,8 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) llassert(group); if (group && group->hasState(LLSpatialGroup::MESH_DIRTY) && !group->hasState(LLSpatialGroup::GEOM_DIRTY)) { - LLFastTimer ftm(FTM_REBUILD_VOLUME_VB); - LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_VB); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); //make sure getgeometryvolume shows up in the right place in timers S32 num_mapped_veretx_buffer = LLVertexBuffer::sMappedCount ; @@ -5068,11 +5068,11 @@ struct CompareBatchBreakerModified } }; -static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort"); -static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing"); -static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB"); -static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_FIND_VB("Find VB"); -static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB"); +static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort"); +static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing"); +static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB"); +static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_FIND_VB("Find VB"); +static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB"); @@ -5080,7 +5080,7 @@ static LLFastTimer::DeclareTimer FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB"); void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector& faces, BOOL distance_sort, BOOL batch_textures, BOOL no_materials) { - LLFastTimer t(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_GEN_DRAW_INFO); U32 buffer_usage = group->mBufferUsage; @@ -5100,7 +5100,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: max_vertices = llmin(max_vertices, (U32) 65535); { - LLFastTimer t(FTM_GEN_DRAW_INFO_SORT); + LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_SORT); if (!distance_sort) { //sort faces by things that break batches @@ -5177,7 +5177,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: std::vector texture_list; { - LLFastTimer t(FTM_GEN_DRAW_INFO_FACE_SIZE); + LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_FACE_SIZE); if (batch_textures) { U8 cur_tex = 0; @@ -5283,7 +5283,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: LLVertexBuffer* buffer = NULL; { - LLFastTimer t(FTM_GEN_DRAW_INFO_ALLOCATE); + LL_RECORD_BLOCK_TIME(FTM_GEN_DRAW_INFO_ALLOCATE); buffer = createVertexBuffer(mask, buffer_usage); buffer->allocateBuffer(geom_count, index_count, TRUE); } diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index fc85a670b5..9f01e56284 100755 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -123,11 +123,11 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water"); +static LLTrace::TimeBlock FTM_UPDATE_WATER("Update Water"); BOOL LLVOWater::updateGeometry(LLDrawable *drawable) { - LLFastTimer ftm(FTM_UPDATE_WATER); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_WATER); LLFace *face; if (drawable->getNumFaces() < 1) diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 96a94e0af4..e798a6eb51 100755 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -301,11 +301,11 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry"); +static LLTrace::TimeBlock FTM_GEO_SKY("Windlight Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { - LLFastTimer ftm(FTM_GEO_SKY); + LL_RECORD_BLOCK_TIME(FTM_GEO_SKY); LLStrider vertices; LLStrider texCoords; LLStrider indices; diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 74100910f5..a11ba1720e 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -216,11 +216,11 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate) } } -static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params"); +static LLTrace::TimeBlock FTM_UPDATE_WATERPARAM("Update Water Params"); void LLWaterParamManager::update(LLViewerCamera * cam) { - LLFastTimer ftm(FTM_UPDATE_WATERPARAM); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_WATERPARAM); // update the shaders and the menu propagateParameters(); diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 6e6510d9c9..dabf39b2a8 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -364,11 +364,11 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader) } -static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLTrace::TimeBlock FTM_UPDATE_WLPARAM("Update Windlight Params"); void LLWLParamManager::propagateParameters(void) { - LLFastTimer ftm(FTM_UPDATE_WLPARAM); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_WLPARAM); LLVector4 sunDir; LLVector4 moonDir; @@ -439,7 +439,7 @@ void LLWLParamManager::propagateParameters(void) void LLWLParamManager::update(LLViewerCamera * cam) { - LLFastTimer ftm(FTM_UPDATE_WLPARAM); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_WLPARAM); // update clouds, sun, and general mCurParams.updateCloudScrolling(); diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index dba3970635..7da0a0ad9e 100755 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -44,11 +44,11 @@ LLWLParamSet::LLWLParamSet(void) : mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f) {} -static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update"); +static LLTrace::TimeBlock FTM_WL_PARAM_UPDATE("WL Param Update"); void LLWLParamSet::update(LLGLSLShader * shader) const { - LLFastTimer t(FTM_WL_PARAM_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_WL_PARAM_UPDATE); for(LLSD::map_const_iterator i = mParamValues.beginMap(); i != mParamValues.endMap(); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 2c160754a6..6a2653bc88 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1033,11 +1033,11 @@ void LLWorld::disconnectRegions() } } -static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim"); +static LLTrace::TimeBlock FTM_ENABLE_SIMULATOR("Enable Sim"); void process_enable_simulator(LLMessageSystem *msg, void **user_data) { - LLFastTimer t(FTM_ENABLE_SIMULATOR); + LL_RECORD_BLOCK_TIME(FTM_ENABLE_SIMULATOR); // enable the appropriate circuit for this simulator and // add its values into the gSimulator structure U64 handle; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index af44acc64c..bc691d50d2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -222,40 +222,40 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Render Geometry"); -LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass"); -LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); -LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); -LLFastTimer::DeclareTimer FTM_RENDER_SHINY("Shiny"); -LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE("Simple"); -LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); -LLFastTimer::DeclareTimer FTM_RENDER_TREES("Trees"); -LLFastTimer::DeclareTimer FTM_RENDER_UI("UI"); -LLFastTimer::DeclareTimer FTM_RENDER_WATER("Water"); -LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); -LLFastTimer::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); -LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); -LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump"); -LLFastTimer::DeclareTimer FTM_RENDER_MATERIALS("Materials"); -LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); -LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow"); -LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update"); -LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create"); -LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool"); -LLFastTimer::DeclareTimer FTM_POOLS("Pools"); -LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); -LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)"); -LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); -LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)"); -LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); -LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State"); -LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline"); -LLFastTimer::DeclareTimer FTM_CLIENT_COPY("Client Copy"); -LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); +LLTrace::TimeBlock FTM_RENDER_GEOMETRY("Render Geometry"); +LLTrace::TimeBlock FTM_RENDER_GRASS("Grass"); +LLTrace::TimeBlock FTM_RENDER_INVISIBLE("Invisible"); +LLTrace::TimeBlock FTM_RENDER_OCCLUSION("Occlusion"); +LLTrace::TimeBlock FTM_RENDER_SHINY("Shiny"); +LLTrace::TimeBlock FTM_RENDER_SIMPLE("Simple"); +LLTrace::TimeBlock FTM_RENDER_TERRAIN("Terrain"); +LLTrace::TimeBlock FTM_RENDER_TREES("Trees"); +LLTrace::TimeBlock FTM_RENDER_UI("UI"); +LLTrace::TimeBlock FTM_RENDER_WATER("Water"); +LLTrace::TimeBlock FTM_RENDER_WL_SKY("Windlight Sky"); +LLTrace::TimeBlock FTM_RENDER_ALPHA("Alpha Objects"); +LLTrace::TimeBlock FTM_RENDER_CHARACTERS("Avatars"); +LLTrace::TimeBlock FTM_RENDER_BUMP("Bump"); +LLTrace::TimeBlock FTM_RENDER_MATERIALS("Materials"); +LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT("Fullbright"); +LLTrace::TimeBlock FTM_RENDER_GLOW("Glow"); +LLTrace::TimeBlock FTM_GEO_UPDATE("Geo Update"); +LLTrace::TimeBlock FTM_PIPELINE_CREATE("Pipeline Create"); +LLTrace::TimeBlock FTM_POOLRENDER("RenderPool"); +LLTrace::TimeBlock FTM_POOLS("Pools"); +LLTrace::TimeBlock FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); +LLTrace::TimeBlock FTM_DEFERRED_POOLS("Pools (Deferred)"); +LLTrace::TimeBlock FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); +LLTrace::TimeBlock FTM_POST_DEFERRED_POOLS("Pools (Post)"); +LLTrace::TimeBlock FTM_RENDER_BLOOM_FBO("First FBO"); +LLTrace::TimeBlock FTM_STATESORT("Sort Draw State"); +LLTrace::TimeBlock FTM_PIPELINE("Pipeline"); +LLTrace::TimeBlock FTM_CLIENT_COPY("Client Copy"); +LLTrace::TimeBlock FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLTrace::TimeBlock FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLTrace::TimeBlock FTM_STATESORT_POSTSORT("Post Sort"); //---------------------------------------- std::string gPoolNames[] = @@ -754,7 +754,7 @@ void LLPipeline::destroyGL() } } -static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLTrace::TimeBlock FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static void LLPipeline::throttleNewMemoryAllocation(BOOL disable) @@ -776,7 +776,7 @@ void LLPipeline::throttleNewMemoryAllocation(BOOL disable) void LLPipeline::resizeScreenTexture() { - LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); + LL_RECORD_BLOCK_TIME(FTM_RESIZE_SCREEN_TEXTURE); if (gPipeline.canUseVertexShaders() && assertInitialized()) { GLuint resX = gViewerWindow->getWorldViewWidthRaw(); @@ -1771,15 +1771,15 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) } -static LLFastTimer::DeclareTimer FTM_UNLINK("Unlink"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_MOVE_LIST("Movelist"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_LIGHT_SET("Light Set"); -static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); +static LLTrace::TimeBlock FTM_UNLINK("Unlink"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_MOVE_LIST("Movelist"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_LIGHT_SET("Light Set"); +static LLTrace::TimeBlock FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); void LLPipeline::unlinkDrawable(LLDrawable *drawable) { - LLFastTimer t(FTM_UNLINK); + LL_RECORD_BLOCK_TIME(FTM_UNLINK); assertInitialized(); @@ -1788,7 +1788,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) // Based on flags, remove the drawable from the queues that it's on. if (drawablep->isState(LLDrawable::ON_MOVE_LIST)) { - LLFastTimer t(FTM_REMOVE_FROM_MOVE_LIST); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_MOVE_LIST); LLDrawable::drawable_vector_t::iterator iter = std::find(mMovedList.begin(), mMovedList.end(), drawablep); if (iter != mMovedList.end()) { @@ -1798,7 +1798,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) if (drawablep->getSpatialGroup()) { - LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_SPATIAL_PARTITION); if (!drawablep->getSpatialGroup()->getSpatialPartition()->remove(drawablep, drawablep->getSpatialGroup())) { #ifdef LL_RELEASE_FOR_DOWNLOAD @@ -1810,7 +1810,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) } { - LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET); mLights.erase(drawablep); for (light_set_t::iterator iter = mNearbyLights.begin(); @@ -1825,7 +1825,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) } { - LLFastTimer t(FTM_REMOVE_FROM_HIGHLIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_HIGHLIGHT_SET); HighlightItem item(drawablep); mHighlightSet.erase(item); @@ -1854,7 +1854,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable) //static void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) { - LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); + LL_RECORD_BLOCK_TIME(FTM_REMOVE_FROM_LIGHT_SET); for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); iter != gPipeline.mNearbyLights.end(); iter++) { @@ -1882,7 +1882,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) void LLPipeline::createObjects(F32 max_dtime) { - LLFastTimer ftm(FTM_PIPELINE_CREATE); + LL_RECORD_BLOCK_TIME(FTM_PIPELINE_CREATE); LLTimer update_timer; @@ -2051,14 +2051,14 @@ 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"); +static LLTrace::TimeBlock FTM_OCTREE_BALANCE("Balance Octree"); +static LLTrace::TimeBlock FTM_UPDATE_MOVE("Update Move"); +static LLTrace::TimeBlock FTM_RETEXTURE("Retexture"); +static LLTrace::TimeBlock FTM_MOVED_LIST("Moved List"); void LLPipeline::updateMove() { - LLFastTimer t(FTM_UPDATE_MOVE); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_MOVE); if (FreezeTime) { @@ -2068,7 +2068,7 @@ void LLPipeline::updateMove() assertInitialized(); { - LLFastTimer t(FTM_RETEXTURE); + LL_RECORD_BLOCK_TIME(FTM_RETEXTURE); for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); iter != mRetexturedList.end(); ++iter) @@ -2083,13 +2083,13 @@ void LLPipeline::updateMove() } { - LLFastTimer t(FTM_MOVED_LIST); + LL_RECORD_BLOCK_TIME(FTM_MOVED_LIST); updateMovedList(mMovedList); } //balance octrees { - LLFastTimer ot(FTM_OCTREE_BALANCE); + LL_RECORD_BLOCK_TIME(FTM_OCTREE_BALANCE); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2408,7 +2408,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); +static LLTrace::TimeBlock FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { @@ -2417,7 +2417,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") && gGLManager.mHasOcclusionQuery; - LLFastTimer t(FTM_CULL); + LL_RECORD_BLOCK_TIME(FTM_CULL); grabReferences(result); @@ -2812,14 +2812,14 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) return update_complete; } -static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool"); +static LLTrace::TimeBlock FTM_SEED_VBO_POOLS("Seed VBO Pool"); -static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL"); +static LLTrace::TimeBlock FTM_UPDATE_GL("Update GL"); void LLPipeline::updateGL() { { - LLFastTimer t(FTM_UPDATE_GL); + LL_RECORD_BLOCK_TIME(FTM_UPDATE_GL); while (!LLGLUpdate::sGLQ.empty()) { LLGLUpdate* glu = LLGLUpdate::sGLQ.front(); @@ -2830,12 +2830,12 @@ void LLPipeline::updateGL() } { //seed VBO Pools - LLFastTimer t(FTM_SEED_VBO_POOLS); + LL_RECORD_BLOCK_TIME(FTM_SEED_VBO_POOLS); LLVertexBuffer::seedPools(); } } -static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); +static LLTrace::TimeBlock FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); void LLPipeline::clearRebuildGroups() { @@ -2897,7 +2897,7 @@ void LLPipeline::clearRebuildGroups() void LLPipeline::rebuildPriorityGroups() { - LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_PRIORITY_GROUPS); LLTimer update_timer; assertInitialized(); @@ -2919,7 +2919,7 @@ void LLPipeline::rebuildPriorityGroups() } -static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups"); +static LLTrace::TimeBlock FTM_REBUILD_GROUPS("Rebuild Groups"); void LLPipeline::rebuildGroups() { @@ -2928,7 +2928,7 @@ void LLPipeline::rebuildGroups() return; } - LLFastTimer t(FTM_REBUILD_GROUPS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_GROUPS); mGroupQ2Locked = true; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); @@ -2972,7 +2972,7 @@ void LLPipeline::updateGeom(F32 max_dtime) LLTimer update_timer; LLPointer drawablep; - LLFastTimer t(FTM_GEO_UPDATE); + LL_RECORD_BLOCK_TIME(FTM_GEO_UPDATE); assertInitialized(); @@ -3165,9 +3165,9 @@ void LLPipeline::markShift(LLDrawable *drawablep) } } -static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable"); -static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree"); -static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD"); +static LLTrace::TimeBlock FTM_SHIFT_DRAWABLE("Shift Drawable"); +static LLTrace::TimeBlock FTM_SHIFT_OCTREE("Shift Octree"); +static LLTrace::TimeBlock FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { @@ -3180,7 +3180,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) offseta.load3(offset.mV); { - LLFastTimer t(FTM_SHIFT_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_DRAWABLE); for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); iter != mShiftList.end(); iter++) @@ -3198,7 +3198,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) { - LLFastTimer t(FTM_SHIFT_OCTREE); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_OCTREE); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -3215,7 +3215,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) } { - LLFastTimer t(FTM_SHIFT_HUD); + LL_RECORD_BLOCK_TIME(FTM_SHIFT_HUD); LLHUDText::shiftAll(offset); LLHUDNameTag::shiftAll(offset); } @@ -3249,10 +3249,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable) } } -static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ"); +static LLTrace::TimeBlock FTM_PROCESS_PARTITIONQ("PartitionQ"); void LLPipeline::processPartitionQ() { - LLFastTimer t(FTM_PROCESS_PARTITIONQ); + LL_RECORD_BLOCK_TIME(FTM_PROCESS_PARTITIONQ); for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter) { LLDrawable* drawable = *iter; @@ -3340,7 +3340,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLFastTimer::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLTrace::TimeBlock FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -3354,11 +3354,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) LLPipeline::END_RENDER_TYPES)) { //clear faces from face pools - LLFastTimer t(FTM_RESET_DRAWORDER); + LL_RECORD_BLOCK_TIME(FTM_RESET_DRAWORDER); gPipeline.resetDrawOrders(); } - LLFastTimer ftm(FTM_STATESORT); + LL_RECORD_BLOCK_TIME(FTM_STATESORT); //LLVertexBuffer::unbind(); @@ -3442,7 +3442,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } { - LLFastTimer ftm(FTM_STATESORT_DRAWABLE); + LL_RECORD_BLOCK_TIME(FTM_STATESORT_DRAWABLE); for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList(); iter != sCull->endVisibleList(); ++iter) { @@ -3772,7 +3772,7 @@ void renderSoundHighlights(LLDrawable* drawablep) void LLPipeline::postSort(LLCamera& camera) { - LLFastTimer ftm(FTM_STATESORT_POSTSORT); + LL_RECORD_BLOCK_TIME(FTM_STATESORT_POSTSORT); assertInitialized(); @@ -3998,7 +3998,7 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LLFastTimer t(FTM_RENDER_UI); + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); gPipeline.disableLights(); LLGLDisable fog(GL_FOG); @@ -4277,7 +4277,7 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - LLFastTimer t(FTM_RENDER_GEOMETRY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); assertInitialized(); @@ -4364,7 +4364,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) } { - LLFastTimer t(FTM_POOLS); + LL_RECORD_BLOCK_TIME(FTM_POOLS); // HACK: don't calculate local lights if we're rendering the HUD! // Removing this check will cause bad flickering when there are @@ -4400,7 +4400,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumPasses() > 0) { - LLFastTimer t(FTM_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4529,9 +4529,9 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) { LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred"); - LLFastTimer t(FTM_RENDER_GEOMETRY); + LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); - LLFastTimer t2(FTM_DEFERRED_POOLS); + LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLS); LLGLEnable cull(GL_CULL_FACE); @@ -4573,7 +4573,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0) { - LLFastTimer t(FTM_DEFERRED_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -4625,7 +4625,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) { - LLFastTimer t(FTM_POST_DEFERRED_POOLS); + LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLS); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4659,7 +4659,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) pool_set_t::iterator iter2 = iter1; if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0) { - LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER); + LL_RECORD_BLOCK_TIME(FTM_POST_DEFERRED_POOLRENDER); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); @@ -5565,11 +5565,11 @@ void LLPipeline::renderDebug() } } -static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools"); +static LLTrace::TimeBlock FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { - LLFastTimer t(FTM_REBUILD_POOLS); + LL_RECORD_BLOCK_TIME(FTM_REBUILD_POOLS); assertInitialized(); @@ -7287,7 +7287,7 @@ void LLPipeline::resetVertexBuffers() mResetVertexBuffers = true; } -static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB"); +static LLTrace::TimeBlock FTM_RESET_VB("Reset VB"); void LLPipeline::doResetVertexBuffers() { @@ -7296,7 +7296,7 @@ void LLPipeline::doResetVertexBuffers() return; } - LLFastTimer t(FTM_RESET_VB); + LL_RECORD_BLOCK_TIME(FTM_RESET_VB); mResetVertexBuffers = false; mCubeVB = NULL; @@ -7440,7 +7440,7 @@ void LLPipeline::bindScreenToTexture() } -static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); +static LLTrace::TimeBlock FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { @@ -7465,7 +7465,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVector2 tc2((F32) mScreen.getWidth()*2, (F32) mScreen.getHeight()*2); - LLFastTimer ftm(FTM_RENDER_BLOOM); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM); gGL.color4f(1,1,1,1); LLGLDepthTest depth(GL_FALSE); LLGLDisable blend(GL_BLEND); @@ -7487,7 +7487,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); mGlow[2].bindTarget(); mGlow[2].clear(); } @@ -7555,7 +7555,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) for (S32 i = 0; i < kernel; i++) { { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); mGlow[i%2].bindTarget(); mGlow[i%2].clear(); } @@ -7597,7 +7597,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) /*if (LLRenderTarget::sUseFBO) { - LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); + LL_RECORD_BLOCK_TIME(FTM_RENDER_BLOOM_FBO); glBindFramebuffer(GL_FRAMEBUFFER, 0); }*/ @@ -8093,11 +8093,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } -static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred"); +static LLTrace::TimeBlock FTM_BIND_DEFERRED("Bind Deferred"); void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map) { - LLFastTimer t(FTM_BIND_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_BIND_DEFERRED); if (noise_map == 0xFFFFFFFF) { @@ -8318,16 +8318,16 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f) return v; } -static LLFastTimer::DeclareTimer FTM_GI_TRACE("Trace"); -static LLFastTimer::DeclareTimer FTM_GI_GATHER("Gather"); -static LLFastTimer::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); -static LLFastTimer::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLFastTimer::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); -static LLFastTimer::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); -static LLFastTimer::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); -static LLFastTimer::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLFastTimer::DeclareTimer FTM_PROJECTORS("Projectors"); -static LLFastTimer::DeclareTimer FTM_POST("Post"); +static LLTrace::TimeBlock FTM_GI_TRACE("Trace"); +static LLTrace::TimeBlock FTM_GI_GATHER("Gather"); +static LLTrace::TimeBlock FTM_SUN_SHADOW("Shadow Map"); +static LLTrace::TimeBlock FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLTrace::TimeBlock FTM_EDGE_DETECTION("Find Edges"); +static LLTrace::TimeBlock FTM_LOCAL_LIGHTS("Local Lights"); +static LLTrace::TimeBlock FTM_ATMOSPHERICS("Atmospherics"); +static LLTrace::TimeBlock FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLTrace::TimeBlock FTM_PROJECTORS("Projectors"); +static LLTrace::TimeBlock FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -8338,7 +8338,7 @@ void LLPipeline::renderDeferredLighting() } { - LLFastTimer ftm(FTM_RENDER_DEFERRED); + LL_RECORD_BLOCK_TIME(FTM_RENDER_DEFERRED); LLViewerCamera* camera = LLViewerCamera::getInstance(); { @@ -8394,7 +8394,7 @@ void LLPipeline::renderDeferredLighting() { mDeferredLight.bindTarget(); { //paint shadow/SSAO light map (direct lighting lightmap) - LLFastTimer ftm(FTM_SUN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_SUN_SHADOW); bindDeferredShader(gDeferredSunProgram, 0); mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX); glClearColor(1,1,1,1); @@ -8438,7 +8438,7 @@ void LLPipeline::renderDeferredLighting() if (RenderDeferredSSAO) { //soften direct lighting lightmap - LLFastTimer ftm(FTM_SOFTEN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_SOFTEN_SHADOW); //blur lightmap mScreen.bindTarget(); glClearColor(1,1,1,1); @@ -8513,7 +8513,7 @@ void LLPipeline::renderDeferredLighting() if (RenderDeferredAtmospheric) { //apply sunlight contribution - LLFastTimer ftm(FTM_ATMOSPHERICS); + LL_RECORD_BLOCK_TIME(FTM_ATMOSPHERICS); bindDeferredShader(gDeferredSoftenProgram); { LLGLDepthTest depth(GL_FALSE); @@ -8650,7 +8650,7 @@ void LLPipeline::renderDeferredLighting() col.mV[1] = powf(col.mV[1], 2.2f); col.mV[2] = powf(col.mV[2], 2.2f);*/ - LLFastTimer ftm(FTM_LOCAL_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_LOCAL_LIGHTS); gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV); @@ -8691,7 +8691,7 @@ void LLPipeline::renderDeferredLighting() for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); @@ -8752,7 +8752,7 @@ void LLPipeline::renderDeferredLighting() while (!fullscreen_lights.empty()) { - LLFastTimer ftm(FTM_FULLSCREEN_LIGHTS); + LL_RECORD_BLOCK_TIME(FTM_FULLSCREEN_LIGHTS); light[count] = fullscreen_lights.front(); fullscreen_lights.pop_front(); col[count] = light_colors.front(); @@ -8787,7 +8787,7 @@ void LLPipeline::renderDeferredLighting() for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter) { - LLFastTimer ftm(FTM_PROJECTORS); + LL_RECORD_BLOCK_TIME(FTM_PROJECTORS); LLDrawable* drawablep = *iter; LLVOVolume* volume = drawablep->getVOVolume(); @@ -9444,13 +9444,13 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); -static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_RENDER("Render Shadows"); +static LLTrace::TimeBlock FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLTrace::TimeBlock FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) { - LLFastTimer t(FTM_SHADOW_RENDER); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER); //clip out geometry on the same side of water as the camera S32 occlude = LLPipeline::sUseOcclusion; @@ -9525,7 +9525,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera gGL.diffuseColor4f(1,1,1,1); gGL.setColorMask(false, false); - LLFastTimer ftm(FTM_SHADOW_SIMPLE); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE); gGL.getTexUnit(0)->disable(); for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i) @@ -9551,7 +9551,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera } { - LLFastTimer ftm(FTM_SHADOW_ALPHA); + LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA); gDeferredShadowAlphaMaskProgram.bind(); gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width); @@ -9604,10 +9604,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LLPipeline::sShadowRender = FALSE; } -static LLFastTimer::DeclareTimer FTM_VISIBLE_CLOUD("Visible Cloud"); +static LLTrace::TimeBlock FTM_VISIBLE_CLOUD("Visible Cloud"); BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) { - LLFastTimer t(FTM_VISIBLE_CLOUD); + LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); //get point cloud of intersection of frust and min, max if (getVisibleExtents(camera, min, max)) @@ -9854,7 +9854,7 @@ void LLPipeline::generateHighlight(LLCamera& camera) } -static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); +static LLTrace::TimeBlock FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); void LLPipeline::generateSunShadow(LLCamera& camera) { @@ -9863,7 +9863,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) return; } - LLFastTimer t(FTM_GEN_SUN_SHADOW); + LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW); BOOL skip_avatar_update = FALSE; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) @@ -10644,11 +10644,11 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu } } -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); -static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize"); +static LLTrace::TimeBlock FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); +static LLTrace::TimeBlock FTM_IMPOSTOR_SETUP("Impostor Setup"); +static LLTrace::TimeBlock FTM_IMPOSTOR_BACKGROUND("Impostor Background"); +static LLTrace::TimeBlock FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); +static LLTrace::TimeBlock FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { @@ -10706,7 +10706,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); { - LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE); markVisible(avatar->mDrawable, *viewer_camera); LLVOAvatar::sUseImpostors = FALSE; @@ -10736,7 +10736,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) U32 resX = 0; { - LLFastTimer t(FTM_IMPOSTOR_SETUP); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_SETUP); const LLVector4a* ext = avatar->mDrawable->getSpatialExtents(); LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset()); @@ -10793,7 +10793,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) if (!avatar->mImpostor.isComplete()) { - LLFastTimer t(FTM_IMPOSTOR_ALLOCATE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_ALLOCATE); avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE); if (LLPipeline::sRenderDeferred) @@ -10808,7 +10808,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) else if(resX != avatar->mImpostor.getWidth() || resY != avatar->mImpostor.getHeight()) { - LLFastTimer t(FTM_IMPOSTOR_RESIZE); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_RESIZE); avatar->mImpostor.resize(resX,resY,GL_RGBA); } @@ -10830,7 +10830,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) } { //create alpha mask based on depth buffer (grey out if muted) - LLFastTimer t(FTM_IMPOSTOR_BACKGROUND); + LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_BACKGROUND); if (LLPipeline::sRenderDeferred) { GLuint buff = GL_COLOR_ATTACHMENT0; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index b12dc3edbb..178a935d98 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -70,26 +70,26 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up); -extern LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY; -extern LLFastTimer::DeclareTimer FTM_RENDER_GRASS; -extern LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE; -extern LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION; -extern LLFastTimer::DeclareTimer FTM_RENDER_SHINY; -extern LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE; -extern LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN; -extern LLFastTimer::DeclareTimer FTM_RENDER_TREES; -extern LLFastTimer::DeclareTimer FTM_RENDER_UI; -extern LLFastTimer::DeclareTimer FTM_RENDER_WATER; -extern LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY; -extern LLFastTimer::DeclareTimer FTM_RENDER_ALPHA; -extern LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS; -extern LLFastTimer::DeclareTimer FTM_RENDER_BUMP; -extern LLFastTimer::DeclareTimer FTM_RENDER_MATERIALS; -extern LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT; -extern LLFastTimer::DeclareTimer FTM_RENDER_GLOW; -extern LLFastTimer::DeclareTimer FTM_STATESORT; -extern LLFastTimer::DeclareTimer FTM_PIPELINE; -extern LLFastTimer::DeclareTimer FTM_CLIENT_COPY; +extern LLTrace::TimeBlock FTM_RENDER_GEOMETRY; +extern LLTrace::TimeBlock FTM_RENDER_GRASS; +extern LLTrace::TimeBlock FTM_RENDER_INVISIBLE; +extern LLTrace::TimeBlock FTM_RENDER_OCCLUSION; +extern LLTrace::TimeBlock FTM_RENDER_SHINY; +extern LLTrace::TimeBlock FTM_RENDER_SIMPLE; +extern LLTrace::TimeBlock FTM_RENDER_TERRAIN; +extern LLTrace::TimeBlock FTM_RENDER_TREES; +extern LLTrace::TimeBlock FTM_RENDER_UI; +extern LLTrace::TimeBlock FTM_RENDER_WATER; +extern LLTrace::TimeBlock FTM_RENDER_WL_SKY; +extern LLTrace::TimeBlock FTM_RENDER_ALPHA; +extern LLTrace::TimeBlock FTM_RENDER_CHARACTERS; +extern LLTrace::TimeBlock FTM_RENDER_BUMP; +extern LLTrace::TimeBlock FTM_RENDER_MATERIALS; +extern LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT; +extern LLTrace::TimeBlock FTM_RENDER_GLOW; +extern LLTrace::TimeBlock FTM_STATESORT; +extern LLTrace::TimeBlock FTM_PIPELINE; +extern LLTrace::TimeBlock FTM_CLIENT_COPY; class LLPipeline -- cgit v1.3 From 5c7b84c682ea0f92f3f4389b0dbe758b8cadc6eb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 13 Sep 2013 10:49:31 -0600 Subject: fix for SH-4494: interesting: deleted objects reappear --- indra/newview/llviewermessage.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ce83221d2c..2550ab34ee 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4560,9 +4560,6 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Kill Objects"); -const U32 KILLOBJECT_DELETE_OPCODE = 0; - - void process_kill_object(LLMessageSystem *mesgsys, void **user_data) { LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS); @@ -4577,20 +4574,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) regionp = LLWorld::getInstance()->getRegion(host); } - bool delete_object = false; + bool delete_object = LLViewerRegion::sVOCacheCullingEnabled; S32 num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); for (S32 i = 0; i < num_objects; ++i) { U32 local_id; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); - if (local_id == KILLOBJECT_DELETE_OPCODE) - { - // This local_id is invalid, but was sent by the server to flag - // all subsequent local_id's as objects that were actually deleted - // rather than unsubscribed from interestlist. - delete_object = true; - continue; - } LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port); if (id == LLUUID::null) @@ -4623,10 +4612,10 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) gObjectList.killObject(objectp); } - if(delete_object) + if(delete_object) { - regionp->killCacheEntry(local_id); - } + regionp->killCacheEntry(local_id); + } // We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab, // which is using the object, release the mouse capture correctly when the object dies. -- cgit v1.3 From 697d2e720ba75e142a4d56ae8794bab8d7698dad Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Oct 2013 20:24:42 -0700 Subject: renamed TimeBlock to BlockTimerStatHandle --- indra/llappearance/llpolymorph.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- indra/llappearance/lltexlayer.cpp | 14 +- indra/llappearance/lltexlayerparams.cpp | 2 +- indra/llcharacter/llcharacter.cpp | 6 +- indra/llcharacter/llmotioncontroller.cpp | 2 +- indra/llcommon/lldate.cpp | 2 +- indra/llcommon/llfasttimer.cpp | 104 +++++++------- indra/llcommon/llfasttimer.h | 54 ++++--- indra/llcommon/llmetricperformancetester.cpp | 4 +- indra/llcommon/llsdparam.cpp | 2 +- indra/llcommon/llsdparam.h | 2 +- indra/llcommon/llstring.cpp | 2 +- indra/llcommon/lltrace.cpp | 6 +- indra/llcommon/lltrace.h | 6 +- indra/llcommon/lltraceaccumulators.h | 18 +-- indra/llcommon/lltracerecording.cpp | 44 +++++- indra/llcommon/lltracethreadrecorder.cpp | 14 +- indra/llinventory/llinventory.cpp | 2 +- indra/llmessage/llfiltersd2xmlrpc.cpp | 8 +- indra/llmessage/lliohttpserver.cpp | 14 +- indra/llmessage/lliosocket.cpp | 6 +- indra/llmessage/llioutil.cpp | 4 +- indra/llmessage/llpumpio.cpp | 6 +- indra/llmessage/llsdrpcclient.cpp | 4 +- indra/llmessage/llsdrpcserver.cpp | 2 +- indra/llmessage/lltemplatemessagereader.cpp | 2 +- indra/llmessage/llurlrequest.cpp | 16 +-- indra/llrender/llfontgl.cpp | 2 +- indra/llrender/llimagegl.cpp | 14 +- indra/llrender/llrender2dutils.cpp | 2 +- indra/llrender/llvertexbuffer.cpp | 28 ++-- indra/llui/llfloater.cpp | 6 +- indra/llui/llfolderview.cpp | 8 +- indra/llui/llfolderviewitem.cpp | 2 +- indra/llui/llkeywords.cpp | 2 +- indra/llui/lllayoutstack.cpp | 2 +- indra/llui/llpanel.cpp | 10 +- indra/llui/llscrolllistctrl.cpp | 2 +- indra/llui/lltextbase.cpp | 8 +- indra/llui/lltexteditor.cpp | 2 +- indra/llui/lltrans.cpp | 2 +- indra/llui/lluictrl.cpp | 2 +- indra/llui/lluictrlfactory.cpp | 12 +- indra/llui/lluictrlfactory.h | 6 +- indra/llui/lluistring.cpp | 2 +- indra/llui/llview.cpp | 2 +- indra/llui/llxuiparser.cpp | 2 +- indra/llvfs/llvfile.cpp | 2 +- indra/llwindow/llwindowwin32.cpp | 4 +- indra/newview/llagentcamera.cpp | 2 +- indra/newview/llappviewer.cpp | 108 +++++++------- indra/newview/llappviewer.h | 2 +- indra/newview/llchathistory.cpp | 2 +- indra/newview/lldebugview.cpp | 2 +- .../newview/lldonotdisturbnotificationstorage.cpp | 4 +- indra/newview/lldrawable.cpp | 10 +- indra/newview/lldrawpoolalpha.cpp | 4 +- indra/newview/lldrawpoolavatar.cpp | 6 +- indra/newview/lldrawpoolbump.cpp | 20 +-- indra/newview/lldrawpoolsimple.cpp | 10 +- indra/newview/lldrawpoolterrain.cpp | 2 +- indra/newview/lldrawpooltree.cpp | 2 +- indra/newview/llface.cpp | 56 ++++---- indra/newview/llfasttimerview.cpp | 74 +++++----- indra/newview/llfasttimerview.h | 12 +- indra/newview/llflexibleobject.cpp | 8 +- indra/newview/llfolderviewmodelinventory.cpp | 2 +- indra/newview/llhudmanager.cpp | 2 +- indra/newview/llhudobject.cpp | 2 +- indra/newview/llinventoryfilter.cpp | 2 +- indra/newview/llinventoryitemslist.cpp | 2 +- indra/newview/llinventorypanel.cpp | 4 +- indra/newview/llmaterialmgr.cpp | 2 +- indra/newview/llpersistentnotificationstorage.cpp | 4 +- indra/newview/llscenemonitor.cpp | 4 +- indra/newview/llscreenchannel.cpp | 2 +- indra/newview/llspatialpartition.cpp | 12 +- indra/newview/llviewerdisplay.cpp | 32 ++--- indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/llviewerjointmesh.cpp | 2 +- indra/newview/llviewermedia.cpp | 20 +-- indra/newview/llviewermenu.cpp | 6 +- indra/newview/llviewermessage.cpp | 4 +- indra/newview/llviewerobject.cpp | 4 +- indra/newview/llviewerobjectlist.cpp | 12 +- indra/newview/llvieweroctree.cpp | 24 ++-- indra/newview/llviewerpartsim.cpp | 2 +- indra/newview/llviewerprecompiledheaders.cpp | 2 +- indra/newview/llviewertexture.cpp | 6 +- indra/newview/llviewertexturelist.cpp | 18 +-- indra/newview/llviewerwindow.cpp | 8 +- indra/newview/llvoavatar.cpp | 8 +- indra/newview/llvograss.cpp | 4 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvopartgroup.cpp | 6 +- indra/newview/llvosky.cpp | 4 +- indra/newview/llvosurfacepatch.cpp | 4 +- indra/newview/llvotree.cpp | 2 +- indra/newview/llvovolume.cpp | 36 ++--- indra/newview/llvowater.cpp | 2 +- indra/newview/llvowlsky.cpp | 2 +- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwlparammanager.cpp | 2 +- indra/newview/llwlparamset.cpp | 2 +- indra/newview/llworld.cpp | 2 +- indra/newview/pipeline.cpp | 156 ++++++++++----------- indra/newview/pipeline.h | 40 +++--- 108 files changed, 642 insertions(+), 608 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index eb298db82a..ce8a0b0b76 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -525,7 +525,7 @@ F32 LLPolyMorphTarget::getMaxDistortion() //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_APPLY_MORPH_TARGET("Apply Morph"); +static LLTrace::BlockTimerStatHandle FTM_APPLY_MORPH_TARGET("Apply Morph"); void LLPolyMorphTarget::apply( ESex avatar_sex ) { diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index b778c15c22..a72b446ace 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -179,7 +179,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) //----------------------------------------------------------------------------- // apply() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion"); +static LLTrace::BlockTimerStatHandle FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion"); void LLPolySkeletalDistortion::apply( ESex avatar_sex ) { diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 17199fdc4d..a634186df0 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -518,7 +518,7 @@ const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const return mComposite; } -static LLTrace::TimeBlock FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha"); +static LLTrace::BlockTimerStatHandle FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha"); void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height) { LL_RECORD_BLOCK_TIME(FTM_GATHER_MORPH_MASK_ALPHA); @@ -534,7 +534,7 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S renderAlphaMaskTextures(origin_x, origin_y, width, height, true); } -static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures"); void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, bool forceClear) { LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_TEXTURES); @@ -1424,7 +1424,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) addAlphaMask(data, originX, originY, width, height); } -static LLTrace::TimeBlock FTM_RENDER_MORPH_MASKS("renderMorphMasks"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_MORPH_MASKS("renderMorphMasks"); void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render) { if (!force_render && !hasMorph()) @@ -1575,7 +1575,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } } -static LLTrace::TimeBlock FTM_ADD_ALPHA_MASK("addAlphaMask"); +static LLTrace::BlockTimerStatHandle FTM_ADD_ALPHA_MASK("addAlphaMask"); void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height) { LL_RECORD_BLOCK_TIME(FTM_ADD_ALPHA_MASK); @@ -1921,7 +1921,7 @@ void LLTexLayerStaticImageList::deleteCachedImages() // Returns an LLImageTGA that contains the encoded data from a tga file named file_name. // Caches the result to speed identical subsequent requests. -static LLTrace::TimeBlock FTM_LOAD_STATIC_TGA("getImageTGA"); +static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TGA("getImageTGA"); LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name) { LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TGA); @@ -1951,7 +1951,7 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name) // Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name. // Caches the result to speed identical subsequent requests. -static LLTrace::TimeBlock FTM_LOAD_STATIC_TEXTURE("getTexture"); +static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TEXTURE("getTexture"); LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask) { LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TEXTURE); @@ -2001,7 +2001,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, // Reads a .tga file, decodes it, and puts the decoded data in image_raw. // Returns TRUE if successful. -static LLTrace::TimeBlock FTM_LOAD_IMAGE_RAW("loadImageRaw"); +static LLTrace::BlockTimerStatHandle FTM_LOAD_IMAGE_RAW("loadImageRaw"); BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw) { LL_RECORD_BLOCK_TIME(FTM_LOAD_IMAGE_RAW); diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index e1c4f11ada..f1f7d07fa9 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -239,7 +239,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const } -static LLTrace::TimeBlock FTM_TEX_LAYER_PARAM_ALPHA("alpha render"); +static LLTrace::BlockTimerStatHandle FTM_TEX_LAYER_PARAM_ALPHA("alpha render"); BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) { LL_RECORD_BLOCK_TIME(FTM_TEX_LAYER_PARAM_ALPHA); diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 9eb2f9399b..82ddfa01ec 100755 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -188,9 +188,9 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- // updateMotions() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_UPDATE_ANIMATION("Update Animation"); -static LLTrace::TimeBlock FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); -static LLTrace::TimeBlock FTM_UPDATE_MOTIONS("Update Motions"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_ANIMATION("Update Animation"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 24fa1c86e9..50ccfd75fb 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -541,7 +541,7 @@ void LLMotionController::updateIdleActiveMotions() //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_MOTION_ON_UPDATE("Motion onUpdate"); +static LLTrace::BlockTimerStatHandle FTM_MOTION_ON_UPDATE("Motion onUpdate"); void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index b32c3f6830..7a2a0869f4 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -86,7 +86,7 @@ std::string LLDate::asRFC1123() const return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT")); } -LLTrace::TimeBlock FT_DATE_FORMAT("Date Format"); +LLTrace::BlockTimerStatHandle FT_DATE_FORMAT("Date Format"); std::string LLDate::toHTTPDateString (std::string fmt) const { diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index c948e0ac85..361d800629 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -60,14 +60,14 @@ namespace LLTrace ////////////////////////////////////////////////////////////////////////////// // statics -bool TimeBlock::sLog = false; -std::string TimeBlock::sLogName = ""; -bool TimeBlock::sMetricLog = false; +bool BlockTimerStatHandle::sLog = false; +std::string BlockTimerStatHandle::sLogName = ""; +bool BlockTimerStatHandle::sMetricLog = false; #if LL_LINUX || LL_SOLARIS -U64 TimeBlock::sClockResolution = 1000000000; // Nanosecond resolution +U64 BlockTimerStatHandle::sClockResolution = 1000000000; // Nanosecond resolution #else -U64 TimeBlock::sClockResolution = 1000000; // Microsecond resolution +U64 BlockTimerStatHandle::sClockResolution = 1000000; // Microsecond resolution #endif static LLMutex* sLogLock = NULL; @@ -77,13 +77,13 @@ static std::queue sLogQueue; // FIXME: move these declarations to the relevant modules // helper functions -typedef LLTreeDFSPostIter timer_tree_bottom_up_iterator_t; +typedef LLTreeDFSPostIter timer_tree_bottom_up_iterator_t; -static timer_tree_bottom_up_iterator_t begin_timer_tree_bottom_up(TimeBlock& id) +static timer_tree_bottom_up_iterator_t begin_timer_tree_bottom_up(BlockTimerStatHandle& id) { return timer_tree_bottom_up_iterator_t(&id, - boost::bind(boost::mem_fn(&TimeBlock::beginChildren), _1), - boost::bind(boost::mem_fn(&TimeBlock::endChildren), _1)); + boost::bind(boost::mem_fn(&BlockTimerStatHandle::beginChildren), _1), + boost::bind(boost::mem_fn(&BlockTimerStatHandle::endChildren), _1)); } static timer_tree_bottom_up_iterator_t end_timer_tree_bottom_up() @@ -91,14 +91,14 @@ static timer_tree_bottom_up_iterator_t end_timer_tree_bottom_up() return timer_tree_bottom_up_iterator_t(); } -typedef LLTreeDFSIter timer_tree_dfs_iterator_t; +typedef LLTreeDFSIter timer_tree_dfs_iterator_t; -static timer_tree_dfs_iterator_t begin_timer_tree(TimeBlock& id) +static timer_tree_dfs_iterator_t begin_timer_tree(BlockTimerStatHandle& id) { return timer_tree_dfs_iterator_t(&id, - boost::bind(boost::mem_fn(&TimeBlock::beginChildren), _1), - boost::bind(boost::mem_fn(&TimeBlock::endChildren), _1)); + boost::bind(boost::mem_fn(&BlockTimerStatHandle::beginChildren), _1), + boost::bind(boost::mem_fn(&BlockTimerStatHandle::endChildren), _1)); } static timer_tree_dfs_iterator_t end_timer_tree() @@ -110,26 +110,26 @@ static timer_tree_dfs_iterator_t end_timer_tree() // sort child timers by name struct SortTimerByName { - bool operator()(const TimeBlock* i1, const TimeBlock* i2) + bool operator()(const BlockTimerStatHandle* i1, const BlockTimerStatHandle* i2) { return i1->getName() < i2->getName(); } }; -TimeBlock& TimeBlock::getRootTimeBlock() +BlockTimerStatHandle& BlockTimerStatHandle::getRootTimeBlock() { - static TimeBlock root_timer("root", NULL); + static BlockTimerStatHandle root_timer("root", NULL); return root_timer; } -void TimeBlock::pushLog(LLSD log) +void BlockTimerStatHandle::pushLog(LLSD log) { LLMutexLock lock(sLogLock); sLogQueue.push(log); } -void TimeBlock::setLogLock(LLMutex* lock) +void BlockTimerStatHandle::setLogLock(LLMutex* lock) { sLogLock = lock; } @@ -137,12 +137,12 @@ void TimeBlock::setLogLock(LLMutex* lock) //static #if (LL_DARWIN || LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) -U64 TimeBlock::countsPerSecond() +U64 BlockTimerStatHandle::countsPerSecond() { return sClockResolution; } #else // windows or x86-mac or x86-linux or x86-solaris -U64 TimeBlock::countsPerSecond() +U64 BlockTimerStatHandle::countsPerSecond() { #if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz @@ -164,11 +164,11 @@ U64 TimeBlock::countsPerSecond() } #endif -TimeBlock::TimeBlock(const char* name, TimeBlock* parent) -: StatType(name) +BlockTimerStatHandle::BlockTimerStatHandle(const char* name, const char* description) +: StatType(name, description) {} -TimeBlockTreeNode& TimeBlock::getTreeNode() const +TimeBlockTreeNode& BlockTimerStatHandle::getTreeNode() const { TimeBlockTreeNode* nodep = LLTrace::get_thread_recorder()->getTimeBlockTreeNode(getIndex()); llassert(nodep); @@ -176,18 +176,18 @@ TimeBlockTreeNode& TimeBlock::getTreeNode() const } -void TimeBlock::bootstrapTimerTree() +void BlockTimerStatHandle::bootstrapTimerTree() { - for (LLInstanceTracker::instance_iter begin_it = LLInstanceTracker::beginInstances(), end_it = LLInstanceTracker::endInstances(), it = begin_it; + for (BlockTimerStatHandle::instance_tracker_t::instance_iter begin_it = BlockTimerStatHandle::instance_tracker_t::beginInstances(), end_it = BlockTimerStatHandle::instance_tracker_t::endInstances(), it = begin_it; it != end_it; ++it) { - TimeBlock& timer = *it; - if (&timer == &TimeBlock::getRootTimeBlock()) continue; + BlockTimerStatHandle& timer = static_cast(*it); + if (&timer == &BlockTimerStatHandle::getRootTimeBlock()) continue; // bootstrap tree construction by attaching to last timer to be on stack // when this timer was called - if (timer.getParent() == &TimeBlock::getRootTimeBlock()) + if (timer.getParent() == &BlockTimerStatHandle::getRootTimeBlock()) { TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator(); @@ -205,13 +205,13 @@ void TimeBlock::bootstrapTimerTree() // bump timers up tree if they have been flagged as being in the wrong place // do this in a bottom up order to promote descendants first before promoting ancestors // this preserves partial order derived from current frame's observations -void TimeBlock::incrementalUpdateTimerTree() +void BlockTimerStatHandle::incrementalUpdateTimerTree() { - for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(TimeBlock::getRootTimeBlock()); + for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(BlockTimerStatHandle::getRootTimeBlock()); it != end_timer_tree_bottom_up(); ++it) { - TimeBlock* timerp = *it; + BlockTimerStatHandle* timerp = *it; // sort timers by time last called, so call graph makes sense TimeBlockTreeNode& tree_node = timerp->getTreeNode(); @@ -221,7 +221,7 @@ void TimeBlock::incrementalUpdateTimerTree() } // skip root timer - if (timerp != &TimeBlock::getRootTimeBlock()) + if (timerp != &BlockTimerStatHandle::getRootTimeBlock()) { TimeBlockAccumulator& accumulator = timerp->getCurrentAccumulator(); @@ -245,7 +245,7 @@ void TimeBlock::incrementalUpdateTimerTree() } -void TimeBlock::updateTimes() +void BlockTimerStatHandle::updateTimes() { // walk up stack of active timers and accumulate current time while leaving timing structures active BlockTimerStackRecord* stack_record = LLThreadLocalSingletonPointer::getInstance(); @@ -273,11 +273,11 @@ void TimeBlock::updateTimes() } } -static LLTrace::TimeBlock FTM_PROCESS_TIMES("Process FastTimer Times"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_TIMES("Process FastTimer Times"); // not thread safe, so only call on main thread //static -void TimeBlock::processTimes() +void BlockTimerStatHandle::processTimes() { LL_RECORD_BLOCK_TIME(FTM_PROCESS_TIMES); get_clock_count(); // good place to calculate clock frequency @@ -290,12 +290,12 @@ void TimeBlock::processTimes() updateTimes(); // reset for next frame - for (LLInstanceTracker::instance_iter it = LLInstanceTracker::beginInstances(), - end_it = LLInstanceTracker::endInstances(); + for (BlockTimerStatHandle::instance_tracker_t::instance_iter it = BlockTimerStatHandle::instance_tracker_t::beginInstances(), + end_it = BlockTimerStatHandle::instance_tracker_t::endInstances(); it != end_it; ++it) { - TimeBlock& timer = *it; + BlockTimerStatHandle& timer = static_cast(*it); TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator(); accumulator.mLastCaller = NULL; @@ -303,23 +303,23 @@ void TimeBlock::processTimes() } } -std::vector::iterator TimeBlock::beginChildren() +std::vector::iterator BlockTimerStatHandle::beginChildren() { return getTreeNode().mChildren.begin(); } -std::vector::iterator TimeBlock::endChildren() +std::vector::iterator BlockTimerStatHandle::endChildren() { return getTreeNode().mChildren.end(); } -std::vector& TimeBlock::getChildren() +std::vector& BlockTimerStatHandle::getChildren() { return getTreeNode().mChildren; } // static -void TimeBlock::logStats() +void BlockTimerStatHandle::logStats() { // get ready for next frame if (sLog) @@ -340,12 +340,12 @@ void TimeBlock::logStats() LLSD sd; { - for (LLInstanceTracker::instance_iter it = LLInstanceTracker::beginInstances(), - end_it = LLInstanceTracker::endInstances(); + for (BlockTimerStatHandle::instance_tracker_t::instance_iter it = BlockTimerStatHandle::instance_tracker_t::beginInstances(), + end_it = BlockTimerStatHandle::instance_tracker_t::endInstances(); it != end_it; ++it) { - TimeBlock& timer = *it; + BlockTimerStatHandle& timer = static_cast(*it); LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); sd[timer.getName()]["Time"] = (LLSD::Real) (frame_recording.getLastRecording().getSum(timer).value()); sd[timer.getName()]["Calls"] = (LLSD::Integer) (frame_recording.getLastRecording().getSum(timer.callCount())); @@ -368,17 +368,17 @@ void TimeBlock::logStats() } //static -void TimeBlock::dumpCurTimes() +void BlockTimerStatHandle::dumpCurTimes() { LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); // walk over timers in depth order and output timings - for(timer_tree_dfs_iterator_t it = begin_timer_tree(TimeBlock::getRootTimeBlock()); + for(timer_tree_dfs_iterator_t it = begin_timer_tree(BlockTimerStatHandle::getRootTimeBlock()); it != end_timer_tree(); ++it) { - TimeBlock* timerp = (*it); + BlockTimerStatHandle* timerp = (*it); F64Seconds total_time = last_frame_recording.getSum(*timerp); U32 num_calls = last_frame_recording.getSum(timerp->callCount()); @@ -386,7 +386,7 @@ void TimeBlock::dumpCurTimes() if (total_time < F32Milliseconds(0.1f)) continue; std::ostringstream out_str; - TimeBlock* parent_timerp = timerp; + BlockTimerStatHandle* parent_timerp = timerp; while(parent_timerp && parent_timerp != parent_timerp->getParent()) { out_str << "\t"; @@ -402,7 +402,7 @@ void TimeBlock::dumpCurTimes() } //static -void TimeBlock::writeLog(std::ostream& os) +void BlockTimerStatHandle::writeLog(std::ostream& os) { while (!sLogQueue.empty()) { @@ -458,9 +458,9 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other ) F64Seconds BlockTimer::getElapsedTime() { - U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime; + U64 total_time = BlockTimerStatHandle::getCPUClockCount64() - mStartTime; - return F64Seconds((F64)total_time / (F64)TimeBlock::countsPerSecond()); + return F64Seconds((F64)total_time / (F64)BlockTimerStatHandle::countsPerSecond()); } diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 1266d87f08..faa622628b 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -30,36 +30,34 @@ #include "llinstancetracker.h" #include "lltrace.h" -#define FAST_TIMER_ON 1 +#define LL_FAST_TIMER_ON 1 #define LL_FASTTIMER_USE_RDTSC 1 -class LLMutex; - #define LL_RECORD_BLOCK_TIME(timer_stat) const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(timer_stat)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__); namespace LLTrace { - -class BlockTimer timeThisBlock(class TimeBlock& timer); +// use to create blocktimer rvalue to be captured in a reference so that the BlockTimer lives to the end of the block. +class BlockTimer timeThisBlock(class BlockTimerStatHandle& timer); class BlockTimer { public: typedef BlockTimer self_t; - typedef class TimeBlock DeclareTimer; + typedef class BlockTimerStatHandle DeclareTimer; ~BlockTimer(); F64Seconds getElapsedTime(); private: - friend class TimeBlock; + friend class BlockTimerStatHandle; // FIXME: this friendship exists so that each thread can instantiate a root timer, // which could be a derived class with a public constructor instead, possibly friend class ThreadRecorder; - friend BlockTimer timeThisBlock(TimeBlock&); + friend BlockTimer timeThisBlock(BlockTimerStatHandle&); - BlockTimer(TimeBlock& timer); + BlockTimer(BlockTimerStatHandle& timer); #if !defined(MSC_VER) || MSC_VER < 1700 // Visual Studio 2010 has a bug where capturing an object returned by value // into a local reference requires access to the copy constructor at the call site. @@ -79,28 +77,28 @@ private: // (This is most easily done using the macro LL_RECORD_BLOCK_TIME) // Otherwise, it would be possible to store a BlockTimer on the heap, resulting in non-nested lifetimes, // which would break the invariants of the timing hierarchy logic -LL_FORCE_INLINE class BlockTimer timeThisBlock(class TimeBlock& timer) +LL_FORCE_INLINE class BlockTimer timeThisBlock(class BlockTimerStatHandle& timer) { return BlockTimer(timer); } // stores a "named" timer instance to be reused via multiple BlockTimer stack instances -class TimeBlock -: public StatType, - public LLInstanceTracker +class BlockTimerStatHandle +: public StatType { public: - TimeBlock(const char* name, TimeBlock* parent = &getRootTimeBlock()); + typedef LLInstanceTracker, std::string> instance_tracker_t; + BlockTimerStatHandle(const char* name, const char* description = ""); TimeBlockTreeNode& getTreeNode() const; - TimeBlock* getParent() const { return getTreeNode().getParent(); } - void setParent(TimeBlock* parent) { getTreeNode().setParent(parent); } + BlockTimerStatHandle* getParent() const { return getTreeNode().getParent(); } + void setParent(BlockTimerStatHandle* parent) { getTreeNode().setParent(parent); } - typedef std::vector::iterator child_iter; - typedef std::vector::const_iterator child_const_iter; + typedef std::vector::iterator child_iter; + typedef std::vector::const_iterator child_const_iter; child_iter beginChildren(); child_iter endChildren(); - std::vector& getChildren(); + std::vector& getChildren(); StatType& callCount() { @@ -112,9 +110,9 @@ public: return static_cast&>(*(StatType*)this); } - static TimeBlock& getRootTimeBlock(); + static BlockTimerStatHandle& getRootTimeBlock(); static void pushLog(LLSD sd); - static void setLogLock(LLMutex* mutex); + static void setLogLock(class LLMutex* mutex); static void writeLog(std::ostream& os); static void updateTimes(); @@ -144,14 +142,14 @@ public: //#undef _interlockedbittestandset //#undef _interlockedbittestandreset - //inline U32 TimeBlock::getCPUClockCount32() + //inline U32 BlockTimerStatHandle::getCPUClockCount32() //{ // U64 time_stamp = __rdtsc(); // return (U32)(time_stamp >> 8); //} // //// return full timer value, *not* shifted by 8 bits - //inline U64 TimeBlock::getCPUClockCount64() + //inline U64 BlockTimerStatHandle::getCPUClockCount64() //{ // return __rdtsc(); //} @@ -279,9 +277,9 @@ public: static U64 sClockResolution; }; -LL_FORCE_INLINE BlockTimer::BlockTimer(TimeBlock& timer) +LL_FORCE_INLINE BlockTimer::BlockTimer(BlockTimerStatHandle& timer) { -#if FAST_TIMER_ON +#if LL_FAST_TIMER_ON BlockTimerStackRecord* cur_timer_data = LLThreadLocalSingletonPointer::getInstance(); if (!cur_timer_data) return; TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator(); @@ -296,14 +294,14 @@ LL_FORCE_INLINE BlockTimer::BlockTimer(TimeBlock& timer) cur_timer_data->mTimeBlock = &timer; cur_timer_data->mChildTime = 0; - mStartTime = TimeBlock::getCPUClockCount64(); + mStartTime = BlockTimerStatHandle::getCPUClockCount64(); #endif } LL_FORCE_INLINE BlockTimer::~BlockTimer() { -#if FAST_TIMER_ON - U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime; +#if LL_FAST_TIMER_ON + U64 total_time = BlockTimerStatHandle::getCPUClockCount64() - mStartTime; BlockTimerStackRecord* cur_timer_data = LLThreadLocalSingletonPointer::getInstance(); if (!cur_timer_data) return; diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 88287e5786..7963485456 100755 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -91,7 +91,7 @@ LLMetricPerformanceTesterBasic* LLMetricPerformanceTesterBasic::getTester(std::s // Return TRUE if this metric is requested or if the general default "catch all" metric is requested BOOL LLMetricPerformanceTesterBasic::isMetricLogRequested(std::string name) { - return (LLTrace::TimeBlock::sMetricLog && ((LLTrace::TimeBlock::sLogName == name) || (LLTrace::TimeBlock::sLogName == DEFAULT_METRIC_NAME))); + return (LLTrace::BlockTimerStatHandle::sMetricLog && ((LLTrace::BlockTimerStatHandle::sLogName == name) || (LLTrace::BlockTimerStatHandle::sLogName == DEFAULT_METRIC_NAME))); } /*static*/ @@ -194,7 +194,7 @@ void LLMetricPerformanceTesterBasic::preOutputTestResults(LLSD* sd) void LLMetricPerformanceTesterBasic::postOutputTestResults(LLSD* sd) { - LLTrace::TimeBlock::pushLog(*sd); + LLTrace::BlockTimerStatHandle::pushLog(*sd); } void LLMetricPerformanceTesterBasic::outputTestResults() diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index 371bd49c04..2e7b46f885 100755 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -37,7 +37,7 @@ static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs; static const LLSD NO_VALUE_MARKER; -LLTrace::TimeBlock FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion"); +LLTrace::BlockTimerStatHandle FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion"); // // LLParamSDParser diff --git a/indra/llcommon/llsdparam.h b/indra/llcommon/llsdparam.h index 47ec6414dd..1542f95e68 100755 --- a/indra/llcommon/llsdparam.h +++ b/indra/llcommon/llsdparam.h @@ -110,7 +110,7 @@ private: }; -extern LL_COMMON_API LLTrace::TimeBlock FTM_SD_PARAM_ADAPTOR; +extern LL_COMMON_API LLTrace::BlockTimerStatHandle FTM_SD_PARAM_ADAPTOR; template class LLSDParamAdapter : public T { diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index a4b1d2ede3..76979f29f6 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -36,7 +36,7 @@ #include // for WideCharToMultiByte #endif -LLTrace::TimeBlock FT_STRING_FORMAT("String Format"); +LLTrace::BlockTimerStatHandle FT_STRING_FORMAT("String Format"); std::string ll_safe_string(const char* in) diff --git a/indra/llcommon/lltrace.cpp b/indra/llcommon/lltrace.cpp index 1ad31cacfe..5c4b7b5bb4 100644 --- a/indra/llcommon/lltrace.cpp +++ b/indra/llcommon/lltrace.cpp @@ -59,7 +59,7 @@ TimeBlockTreeNode::TimeBlockTreeNode() mCollapsed(true) {} -void TimeBlockTreeNode::setParent( TimeBlock* parent ) +void TimeBlockTreeNode::setParent( BlockTimerStatHandle* parent ) { llassert_always(parent != mBlock); llassert_always(parent != NULL); @@ -69,8 +69,8 @@ void TimeBlockTreeNode::setParent( TimeBlock* parent ) if (mParent) { - std::vector& children = mParent->getChildren(); - std::vector::iterator found_it = std::find(children.begin(), children.end(), mBlock); + std::vector& children = mParent->getChildren(); + std::vector::iterator found_it = std::find(children.begin(), children.end(), mBlock); if (found_it != children.end()) { children.erase(found_it); diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 2f4390e4d1..cbdf4e4a6f 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -72,7 +72,7 @@ class StatType public LLInstanceTracker, std::string> { public: - StatType(const char* name, const char* description = NULL) + StatType(const char* name, const char* description) : LLInstanceTracker, std::string>(name), StatBase(name, description), mAccumulatorIndex(AccumulatorBuffer::getDefaultBuffer()->reserveSlot()) @@ -210,8 +210,8 @@ class MemStatHandle : public StatType { public: typedef StatType stat_t; - MemStatHandle(const char* name) - : stat_t(name) + MemStatHandle(const char* name, const char* description = "") + : stat_t(name, description) { mName = name; } diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 77370629d3..c30cc9a107 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -460,26 +460,26 @@ namespace LLTrace U64 mTotalTimeCounter, mSelfTimeCounter; S32 mCalls; - class TimeBlock* mParent; // last acknowledged parent of this time block - class TimeBlock* mLastCaller; // used to bootstrap tree construction + class BlockTimerStatHandle* mParent; // last acknowledged parent of this time block + class BlockTimerStatHandle* mLastCaller; // used to bootstrap tree construction U16 mActiveCount; // number of timers with this ID active on stack bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame }; - class TimeBlock; + class BlockTimerStatHandle; class TimeBlockTreeNode { public: TimeBlockTreeNode(); - void setParent(TimeBlock* parent); - TimeBlock* getParent() { return mParent; } + void setParent(BlockTimerStatHandle* parent); + BlockTimerStatHandle* getParent() { return mParent; } - TimeBlock* mBlock; - TimeBlock* mParent; - std::vector mChildren; + BlockTimerStatHandle* mBlock; + BlockTimerStatHandle* mParent; + std::vector mChildren; bool mCollapsed; bool mNeedsSorting; }; @@ -487,7 +487,7 @@ namespace LLTrace struct BlockTimerStackRecord { class BlockTimer* mActiveTimer; - class TimeBlock* mTimeBlock; + class BlockTimerStatHandle* mTimeBlock; U64 mChildTime; }; diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 87083eee96..2b2b55f614 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -139,192 +139,228 @@ void Recording::appendRecording( Recording& other ) F64Seconds Recording::getSum(const StatType& stat) { + llassert(!isStarted()); const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; return F64Seconds((F64)(accumulator.mTotalTimeCounter) - / (F64)LLTrace::TimeBlock::countsPerSecond()); + / (F64)LLTrace::BlockTimerStatHandle::countsPerSecond()); } F64Seconds Recording::getSum(const StatType& stat) { + llassert(!isStarted()); const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return F64Seconds((F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond()); + return F64Seconds((F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::BlockTimerStatHandle::countsPerSecond()); } S32 Recording::getSum(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mStackTimers[stat.getIndex()].mCalls; } F64Seconds Recording::getPerSec(const StatType& stat) { + llassert(!isStarted()); const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; return F64Seconds((F64)(accumulator.mTotalTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); + / ((F64)LLTrace::BlockTimerStatHandle::countsPerSecond() * mElapsedSeconds.value())); } F64Seconds Recording::getPerSec(const StatType& stat) { + llassert(!isStarted()); const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; return F64Seconds((F64)(accumulator.mSelfTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); + / ((F64)LLTrace::BlockTimerStatHandle::countsPerSecond() * mElapsedSeconds.value())); } F32 Recording::getPerSec(const StatType& stat) { + llassert(!isStarted()); return (F32)mBuffers->mStackTimers[stat.getIndex()].mCalls / mElapsedSeconds.value(); } bool Recording::hasValue(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mMemStats[stat.getIndex()].mSize.hasValue(); } F64Kilobytes Recording::getMin(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); } F64Kilobytes Recording::getMean(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); } F64Kilobytes Recording::getMax(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); } F64Kilobytes Recording::getStandardDeviation(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); } F64Kilobytes Recording::getLastValue(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } F64Kilobytes Recording::getSum(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocations.getSum()); } F64Kilobytes Recording::getPerSec(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mAllocations.getSum() / mElapsedSeconds.value()); } S32 Recording::getSampleCount(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mMemStats[stat.getIndex()].mAllocations.getSampleCount(); } F64Kilobytes Recording::getSum(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSum()); } F64Kilobytes Recording::getPerSec(const StatType& stat) { + llassert(!isStarted()); return F64Bytes(mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSum() / mElapsedSeconds.value()); } S32 Recording::getSampleCount(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mMemStats[stat.getIndex()].mDeallocations.getSampleCount(); } F64 Recording::getSum( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mCounts[stat.getIndex()].getSum(); } F64 Recording::getSum( const StatType& stat ) { + llassert(!isStarted()); return (F64)mBuffers->mEvents[stat.getIndex()].getSum(); } F64 Recording::getPerSec( const StatType& stat ) { + llassert(!isStarted()); F64 sum = mBuffers->mCounts[stat.getIndex()].getSum(); return sum / mElapsedSeconds.value(); } S32 Recording::getSampleCount( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mCounts[stat.getIndex()].getSampleCount(); } bool Recording::hasValue(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].hasValue(); } F64 Recording::getMin( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getMin(); } F64 Recording::getMax( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getMax(); } F64 Recording::getMean( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getMean(); } F64 Recording::getStandardDeviation( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getStandardDeviation(); } F64 Recording::getLastValue( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getLastValue(); } S32 Recording::getSampleCount( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mSamples[stat.getIndex()].getSampleCount(); } bool Recording::hasValue(const StatType& stat) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].hasValue(); } F64 Recording::getMin( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getMin(); } F64 Recording::getMax( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getMax(); } F64 Recording::getMean( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getMean(); } F64 Recording::getStandardDeviation( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getStandardDeviation(); } F64 Recording::getLastValue( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getLastValue(); } S32 Recording::getSampleCount( const StatType& stat ) { + llassert(!isStarted()); return mBuffers->mEvents[stat.getIndex()].getSampleCount(); } diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index 9dac4f6771..20e8a0bbaa 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -50,7 +50,7 @@ void ThreadRecorder::init() LLThreadLocalSingletonPointer::setInstance(&mBlockTimerStackRecord); //NB: the ordering of initialization in this function is very fragile due to a large number of implicit dependencies set_thread_recorder(this); - TimeBlock& root_time_block = TimeBlock::getRootTimeBlock(); + BlockTimerStatHandle& root_time_block = BlockTimerStatHandle::getRootTimeBlock(); BlockTimerStackRecord* timer_stack = LLThreadLocalSingletonPointer::getInstance(); timer_stack->mTimeBlock = &root_time_block; @@ -63,11 +63,11 @@ void ThreadRecorder::init() activate(&mThreadRecordingBuffers); // initialize time block parent pointers - for (LLInstanceTracker::instance_iter it = LLInstanceTracker::beginInstances(), end_it = LLInstanceTracker::endInstances(); + for (BlockTimerStatHandle::instance_tracker_t::instance_iter it = BlockTimerStatHandle::instance_tracker_t::beginInstances(), end_it = BlockTimerStatHandle::instance_tracker_t::endInstances(); it != end_it; ++it) { - TimeBlock& time_block = *it; + BlockTimerStatHandle& time_block = static_cast(*it); TimeBlockTreeNode& tree_node = mTimeBlockTreeNodes[it->getIndex()]; tree_node.mBlock = &time_block; tree_node.mParent = &root_time_block; @@ -78,7 +78,7 @@ void ThreadRecorder::init() mRootTimer = new BlockTimer(root_time_block); timer_stack->mActiveTimer = mRootTimer; - TimeBlock::getRootTimeBlock().getCurrentAccumulator().mActiveCount = 1; + BlockTimerStatHandle::getRootTimeBlock().getCurrentAccumulator().mActiveCount = 1; claim_alloc(gTraceMemStat, this); claim_alloc(gTraceMemStat, sizeof(BlockTimer)); @@ -138,7 +138,7 @@ void ThreadRecorder::activate( AccumulatorBufferGroup* recording, bool from_hand { AccumulatorBufferGroup& prev_active_recording = mActiveRecordings.back()->mPartialRecording; prev_active_recording.sync(); - TimeBlock::updateTimes(); + BlockTimerStatHandle::updateTimes(); prev_active_recording.handOffTo(active_recording->mPartialRecording); } mActiveRecordings.push_back(active_recording); @@ -151,7 +151,7 @@ ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::bringUpToDate( if (mActiveRecordings.empty()) return mActiveRecordings.end(); mActiveRecordings.back()->mPartialRecording.sync(); - TimeBlock::updateTimes(); + BlockTimerStatHandle::updateTimes(); active_recording_list_t::reverse_iterator it, end_it; for (it = mActiveRecordings.rbegin(), end_it = mActiveRecordings.rend(); @@ -265,7 +265,7 @@ void ThreadRecorder::pushToParent() } -static LLTrace::TimeBlock FTM_PULL_TRACE_DATA_FROM_CHILDREN("Pull child thread trace data"); +static LLTrace::BlockTimerStatHandle FTM_PULL_TRACE_DATA_FROM_CHILDREN("Pull child thread trace data"); void ThreadRecorder::pullFromChildren() { diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 61ba0939bf..7fb2a801b2 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1066,7 +1066,7 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; } -LLTrace::TimeBlock FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); +LLTrace::BlockTimerStatHandle FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); bool LLInventoryItem::fromLLSD(const LLSD& sd) { diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index b09c900ccb..d3e195789b 100755 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -309,7 +309,7 @@ LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse() } -static LLTrace::TimeBlock FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response"); // virtual LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( const LLChannelDescriptors& channels, @@ -386,7 +386,7 @@ LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest() { } -static LLTrace::TimeBlock FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request"); // virtual LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( @@ -593,7 +593,7 @@ LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD() { } -static LLTrace::TimeBlock FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response"); LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( const LLChannelDescriptors& channels, @@ -679,7 +679,7 @@ LLFilterXMLRPCRequest2LLSD::~LLFilterXMLRPCRequest2LLSD() { } -static LLTrace::TimeBlock FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request"); LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl( const LLChannelDescriptors& channels, buffer_ptr_t& buffer, diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 9178fc6891..23813c6edb 100755 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -139,11 +139,11 @@ private: LLSD mHeaders; }; -static LLTrace::TimeBlock FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); -static LLTrace::TimeBlock FTM_PROCESS_HTTP_GET("HTTP Get"); -static LLTrace::TimeBlock FTM_PROCESS_HTTP_PUT("HTTP Put"); -static LLTrace::TimeBlock FTM_PROCESS_HTTP_POST("HTTP Post"); -static LLTrace::TimeBlock FTM_PROCESS_HTTP_DELETE("HTTP Delete"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_GET("HTTP Get"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_PUT("HTTP Put"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_POST("HTTP Post"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_DELETE("HTTP Delete"); LLIOPipe::EStatus LLHTTPPipe::process_impl( const LLChannelDescriptors& channels, @@ -435,7 +435,7 @@ protected: * LLHTTPResponseHeader */ -static LLTrace::TimeBlock FTM_PROCESS_HTTP_HEADER("HTTP Header"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_HEADER("HTTP Header"); // virtual LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( @@ -635,7 +635,7 @@ void LLHTTPResponder::markBad( << "\n\n"; } -static LLTrace::TimeBlock FTM_PROCESS_HTTP_RESPONDER("HTTP Responder"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_HTTP_RESPONDER("HTTP Responder"); // virtual LLIOPipe::EStatus LLHTTPResponder::process_impl( diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index c81f0be865..4b8d1b44f6 100755 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -294,7 +294,7 @@ LLIOSocketReader::~LLIOSocketReader() //LL_DEBUGS() << "Destroying LLIOSocketReader" << LL_ENDL; } -static LLTrace::TimeBlock FTM_PROCESS_SOCKET_READER("Socket Reader"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SOCKET_READER("Socket Reader"); // virtual LLIOPipe::EStatus LLIOSocketReader::process_impl( @@ -394,7 +394,7 @@ LLIOSocketWriter::~LLIOSocketWriter() //LL_DEBUGS() << "Destroying LLIOSocketWriter" << LL_ENDL; } -static LLTrace::TimeBlock FTM_PROCESS_SOCKET_WRITER("Socket Writer"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SOCKET_WRITER("Socket Writer"); // virtual LLIOPipe::EStatus LLIOSocketWriter::process_impl( const LLChannelDescriptors& channels, @@ -550,7 +550,7 @@ void LLIOServerSocket::setResponseTimeout(F32 timeout_secs) mResponseTimeout = timeout_secs; } -static LLTrace::TimeBlock FTM_PROCESS_SERVER_SOCKET("Server Socket"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SERVER_SOCKET("Server Socket"); // virtual LLIOPipe::EStatus LLIOServerSocket::process_impl( const LLChannelDescriptors& channels, diff --git a/indra/llmessage/llioutil.cpp b/indra/llmessage/llioutil.cpp index 8ec93af33f..b8443c0600 100755 --- a/indra/llmessage/llioutil.cpp +++ b/indra/llmessage/llioutil.cpp @@ -45,7 +45,7 @@ LLIOPipe::EStatus LLIOFlush::process_impl( } -static LLTrace::TimeBlock FTM_PROCESS_SLEEP("IO Sleep"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SLEEP("IO Sleep"); /** * @class LLIOSleep */ @@ -66,7 +66,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl( return STATUS_DONE; } -static LLTrace::TimeBlock FTM_PROCESS_ADD_CHAIN("Add Chain"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_ADD_CHAIN("Add Chain"); /** * @class LLIOAddChain */ diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index 2cd1063414..506ccc98a4 100755 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -431,8 +431,8 @@ void LLPumpIO::pump() pump(DEFAULT_POLL_TIMEOUT); } -static LLTrace::TimeBlock FTM_PUMP_IO("Pump IO"); -static LLTrace::TimeBlock FTM_PUMP_POLL("Pump Poll"); +static LLTrace::BlockTimerStatHandle FTM_PUMP_IO("Pump IO"); +static LLTrace::BlockTimerStatHandle FTM_PUMP_POLL("Pump Poll"); LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain) { @@ -774,7 +774,7 @@ bool LLPumpIO::respond( return true; } -static LLTrace::TimeBlock FTM_PUMP_CALLBACK_CHAIN("Chain"); +static LLTrace::BlockTimerStatHandle FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 88f86c81b1..eb773ceb3a 100755 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -79,7 +79,7 @@ bool LLSDRPCResponse::extractResponse(const LLSD& sd) return rv; } -static LLTrace::TimeBlock FTM_SDRPC_RESPONSE("SDRPC Response"); +static LLTrace::BlockTimerStatHandle FTM_SDRPC_RESPONSE("SDRPC Response"); // virtual LLIOPipe::EStatus LLSDRPCResponse::process_impl( @@ -173,7 +173,7 @@ bool LLSDRPCClient::call( return true; } -static LLTrace::TimeBlock FTM_PROCESS_SDRPC_CLIENT("SDRPC Client"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SDRPC_CLIENT("SDRPC Client"); // virtual LLIOPipe::EStatus LLSDRPCClient::process_impl( diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index a16115372b..c3ed19889e 100755 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -95,7 +95,7 @@ void LLSDRPCServer::clearLock() } } -static LLTrace::TimeBlock FTM_PROCESS_SDRPC_SERVER("SDRPC Server"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_SDRPC_SERVER("SDRPC Server"); // virtual LLIOPipe::EStatus LLSDRPCServer::process_impl( diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 90263ff074..eba70e87ff 100755 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -525,7 +525,7 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3 gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET); } -static LLTrace::TimeBlock FTM_PROCESS_MESSAGES("Process Messages"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_MESSAGES("Process Messages"); // decode a given message BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 70c0354d62..11630ac022 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -282,11 +282,11 @@ LLIOPipe::EStatus LLURLRequest::handleError( return status; } -static LLTrace::TimeBlock FTM_PROCESS_URL_REQUEST("URL Request"); -static LLTrace::TimeBlock FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); -static LLTrace::TimeBlock FTM_URL_PERFORM("Perform"); -static LLTrace::TimeBlock FTM_PROCESS_URL_PUMP_RESPOND("Pump Respond"); -static LLTrace::TimeBlock FTM_URL_ADJUST_TIMEOUT("Adjust Timeout"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_URL_REQUEST("URL Request"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result"); +static LLTrace::BlockTimerStatHandle FTM_URL_PERFORM("Perform"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_URL_PUMP_RESPOND("Pump Respond"); +static LLTrace::BlockTimerStatHandle FTM_URL_ADJUST_TIMEOUT("Adjust Timeout"); // virtual LLIOPipe::EStatus LLURLRequest::process_impl( @@ -466,7 +466,7 @@ void LLURLRequest::initialize() mResponseTransferedBytes = 0; } -static LLTrace::TimeBlock FTM_URL_REQUEST_CONFIGURE("URL Configure"); +static LLTrace::BlockTimerStatHandle FTM_URL_REQUEST_CONFIGURE("URL Configure"); bool LLURLRequest::configure() { LL_RECORD_BLOCK_TIME(FTM_URL_REQUEST_CONFIGURE); @@ -668,7 +668,7 @@ static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) return header_len; } -static LLTrace::TimeBlock FTM_PROCESS_URL_EXTRACTOR("URL Extractor"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_URL_EXTRACTOR("URL Extractor"); /** * LLContextURLExtractor */ @@ -755,7 +755,7 @@ void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) mRequestStatus = status; } -static LLTrace::TimeBlock FTM_PROCESS_URL_COMPLETE("URL Complete"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_URL_COMPLETE("URL Complete"); // virtual LLIOPipe::EStatus LLURLRequestComplete::process_impl( const LLChannelDescriptors& channels, diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index b1ff2f7e07..1d181b476a 100755 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -98,7 +98,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, F32 point_size, F32 vert_dp return mFontFreetype->loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback); } -static LLTrace::TimeBlock FTM_RENDER_FONTS("Fonts"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_FONTS("Fonts"); S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index f2a660cda5..b2507af08b 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -242,7 +242,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) //---------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_STATS("Image Stats"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_STATS("Image Stats"); // static void LLImageGL::updateStats(F32 current_time) { @@ -623,7 +623,7 @@ void LLImageGL::setImage(const LLImageRaw* imageraw) setImage(rawdata, FALSE); } -static LLTrace::TimeBlock FTM_SET_IMAGE("setImage"); +static LLTrace::BlockTimerStatHandle FTM_SET_IMAGE("setImage"); void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) { LL_RECORD_BLOCK_TIME(FTM_SET_IMAGE); @@ -1091,7 +1091,7 @@ BOOL LLImageGL::setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_ } // static -static LLTrace::TimeBlock FTM_GENERATE_TEXTURES("generate textures"); +static LLTrace::BlockTimerStatHandle FTM_GENERATE_TEXTURES("generate textures"); void LLImageGL::generateTextures(LLTexUnit::eTextureType type, U32 format, S32 numTextures, U32 *textures) { LL_RECORD_BLOCK_TIME(FTM_GENERATE_TEXTURES); @@ -1184,7 +1184,7 @@ void LLImageGL::deleteTextures(LLTexUnit::eTextureType type, U32 format, S32 mip } // static -static LLTrace::TimeBlock FTM_SET_MANUAL_IMAGE("setManualImage"); +static LLTrace::BlockTimerStatHandle FTM_SET_MANUAL_IMAGE("setManualImage"); void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression) { LL_RECORD_BLOCK_TIME(FTM_SET_MANUAL_IMAGE); @@ -1291,7 +1291,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt //create an empty GL texture: just create a texture name //the texture is assiciate with some image by calling glTexImage outside LLImageGL -static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE1("createGLTexture()"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE1("createGLTexture()"); BOOL LLImageGL::createGLTexture() { LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE1); @@ -1322,7 +1322,7 @@ BOOL LLImageGL::createGLTexture() return TRUE ; } -static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE2("createGLTexture(raw)"); BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename/*=0*/, BOOL to_create, S32 category) { LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE2); @@ -1397,7 +1397,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S return createGLTexture(discard_level, rawdata, FALSE, usename); } -static LLTrace::TimeBlock FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_GL_TEXTURE3("createGLTexture3(data)"); BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename) { LL_RECORD_BLOCK_TIME(FTM_CREATE_GL_TEXTURE3); diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 14894c53b4..79db777f4b 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1062,7 +1062,7 @@ void gl_rect_2d_simple( S32 width, S32 height ) gGL.end(); } -static LLTrace::TimeBlock FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle"); void gl_segmented_rect_2d_tex(const S32 left, const S32 top, diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 3bbbccbad1..cb12f1fba2 100755 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -569,7 +569,7 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) } //static -static LLTrace::TimeBlock FTM_VB_DRAW_ARRAYS("drawArrays"); +static LLTrace::BlockTimerStatHandle FTM_VB_DRAW_ARRAYS("drawArrays"); void LLVertexBuffer::drawArrays(U32 mode, const std::vector& pos, const std::vector& norm) { LL_RECORD_BLOCK_TIME(FTM_VB_DRAW_ARRAYS); @@ -817,7 +817,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const placeFence(); } -static LLTrace::TimeBlock FTM_GL_DRAW_ARRAYS("GL draw arrays"); +static LLTrace::BlockTimerStatHandle FTM_GL_DRAW_ARRAYS("GL draw arrays"); void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const { llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL); @@ -1348,7 +1348,7 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) } } -static LLTrace::TimeBlock FTM_SETUP_VERTEX_ARRAY("Setup VAO"); +static LLTrace::BlockTimerStatHandle FTM_SETUP_VERTEX_ARRAY("Setup VAO"); void LLVertexBuffer::setupVertexArray() { @@ -1512,8 +1512,8 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count) return true; } -static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range"); -static LLTrace::TimeBlock FTM_VBO_MAP_BUFFER("VBO Map"); +static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_BUFFER_RANGE("VBO Map Range"); +static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_BUFFER("VBO Map"); // Map for data access volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) @@ -1694,8 +1694,8 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo } -static LLTrace::TimeBlock FTM_VBO_MAP_INDEX_RANGE("IBO Map Range"); -static LLTrace::TimeBlock FTM_VBO_MAP_INDEX("IBO Map"); +static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_INDEX_RANGE("IBO Map Range"); +static LLTrace::BlockTimerStatHandle FTM_VBO_MAP_INDEX("IBO Map"); volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { @@ -1860,12 +1860,12 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range } } -static LLTrace::TimeBlock FTM_VBO_UNMAP("VBO Unmap"); -static LLTrace::TimeBlock FTM_VBO_FLUSH_RANGE("Flush VBO Range"); +static LLTrace::BlockTimerStatHandle FTM_VBO_UNMAP("VBO Unmap"); +static LLTrace::BlockTimerStatHandle FTM_VBO_FLUSH_RANGE("Flush VBO Range"); -static LLTrace::TimeBlock FTM_IBO_UNMAP("IBO Unmap"); -static LLTrace::TimeBlock FTM_IBO_FLUSH_RANGE("Flush IBO Range"); +static LLTrace::BlockTimerStatHandle FTM_IBO_UNMAP("IBO Unmap"); +static LLTrace::BlockTimerStatHandle FTM_IBO_FLUSH_RANGE("Flush IBO Range"); void LLVertexBuffer::unmapBuffer() { @@ -2130,7 +2130,7 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider& strider, S32 in //---------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_BIND_GL_ARRAY("Bind Array"); +static LLTrace::BlockTimerStatHandle FTM_BIND_GL_ARRAY("Bind Array"); bool LLVertexBuffer::bindGLArray() { if (mGLArray && sGLRenderArray != mGLArray) @@ -2153,7 +2153,7 @@ bool LLVertexBuffer::bindGLArray() return false; } -static LLTrace::TimeBlock FTM_BIND_GL_BUFFER("Bind Buffer"); +static LLTrace::BlockTimerStatHandle FTM_BIND_GL_BUFFER("Bind Buffer"); bool LLVertexBuffer::bindGLBuffer(bool force_bind) { @@ -2178,7 +2178,7 @@ bool LLVertexBuffer::bindGLBuffer(bool force_bind) return ret; } -static LLTrace::TimeBlock FTM_BIND_GL_INDICES("Bind Indices"); +static LLTrace::BlockTimerStatHandle FTM_BIND_GL_INDICES("Bind Indices"); bool LLVertexBuffer::bindGLIndices(bool force_bind) { diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d077c6cf08..6cb77e51a9 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3114,8 +3114,8 @@ boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t:: return mCloseSignal.connect(cb); } -LLTrace::TimeBlock POST_BUILD("Floater Post Build"); -static LLTrace::TimeBlock FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference"); +LLTrace::BlockTimerStatHandle POST_BUILD("Floater Post Build"); +static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference"); bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node) { @@ -3270,7 +3270,7 @@ bool LLFloater::isVisible(const LLFloater* floater) return floater && floater->getVisible(); } -static LLTrace::TimeBlock FTM_BUILD_FLOATERS("Build Floaters"); +static LLTrace::BlockTimerStatHandle FTM_BUILD_FLOATERS("Build Floaters"); bool LLFloater::buildFromFile(const std::string& filename) { diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e6582a7ae9..253b23b2fb 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -318,7 +318,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) return llround(mTargetHeight); } -static LLTrace::TimeBlock FTM_FILTER("Filter Folder View"); +static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View"); void LLFolderView::filter( LLFolderViewFilter& filter ) { @@ -482,7 +482,7 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) return rv; } -static LLTrace::TimeBlock FTM_SANITIZE_SELECTION("Sanitize Selection"); +static LLTrace::BlockTimerStatHandle FTM_SANITIZE_SELECTION("Sanitize Selection"); void LLFolderView::sanitizeSelection() { LL_RECORD_BLOCK_TIME(FTM_SANITIZE_SELECTION); @@ -1588,8 +1588,8 @@ void LLFolderView::setShowSingleSelection(bool show) } } -static LLTrace::TimeBlock FTM_AUTO_SELECT("Open and Select"); -static LLTrace::TimeBlock FTM_INVENTORY("Inventory"); +static LLTrace::BlockTimerStatHandle FTM_AUTO_SELECT("Open and Select"); +static LLTrace::BlockTimerStatHandle FTM_INVENTORY("Inventory"); // Main idle routine void LLFolderView::update() diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index ac36cd1173..c8c0603abf 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -942,7 +942,7 @@ void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) folder->addFolder(this); } -static LLTrace::TimeBlock FTM_ARRANGE("Arrange"); +static LLTrace::BlockTimerStatHandle FTM_ARRANGE("Arrange"); // Make everything right and in the right place ready for drawing (CHUI-849) // * Sort everything correctly if necessary diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 569e8be450..d830df8772 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -347,7 +347,7 @@ LLColor3 LLKeywords::readColor( const std::string& s ) return LLColor3( r, g, b ); } -LLTrace::TimeBlock FTM_SYNTAX_COLORING("Syntax Coloring"); +LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring"); // Walk through a string, applying the rules specified by the keyword token list and // create a list of color segments. diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 762869fa1e..b13f61ea7e 100755 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -349,7 +349,7 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed) mNeedsLayout = true; } -static LLTrace::TimeBlock FTM_UPDATE_LAYOUT("Update LayoutStacks"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_LAYOUT("Update LayoutStacks"); void LLLayoutStack::updateLayout() { diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index f0157a2dec..f2acff9d55 100755 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -372,7 +372,7 @@ void LLPanel::setBorderVisible(BOOL b) } } -LLTrace::TimeBlock FTM_PANEL_CONSTRUCTION("Panel Construction"); +LLTrace::BlockTimerStatHandle FTM_PANEL_CONSTRUCTION("Panel Construction"); LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_node) { @@ -488,9 +488,9 @@ void LLPanel::initFromParams(const LLPanel::Params& p) setAcceptsBadge(p.accepts_badge); } -static LLTrace::TimeBlock FTM_PANEL_SETUP("Panel Setup"); -static LLTrace::TimeBlock FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference"); -static LLTrace::TimeBlock FTM_PANEL_POSTBUILD("Panel PostBuild"); +static LLTrace::BlockTimerStatHandle FTM_PANEL_SETUP("Panel Setup"); +static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_PANEL_LOAD("Load Extern Panel Reference"); +static LLTrace::BlockTimerStatHandle FTM_PANEL_POSTBUILD("Panel PostBuild"); BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params) { @@ -963,7 +963,7 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t:: return mVisibleSignal->connect(cb); } -static LLTrace::TimeBlock FTM_BUILD_PANELS("Build Panels"); +static LLTrace::BlockTimerStatHandle FTM_BUILD_PANELS("Build Panels"); //----------------------------------------------------------------------------- // buildPanel() diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 777a4b80b9..b9c87cc631 100755 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2840,7 +2840,7 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name) return NULL; } -LLTrace::TimeBlock FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item"); +LLTrace::BlockTimerStatHandle FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item"); LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata) { LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1c64751fbc..f08aeecc99 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1437,7 +1437,7 @@ S32 LLTextBase::getLeftOffset(S32 width) } -static LLTrace::TimeBlock FTM_TEXT_REFLOW ("Text Reflow"); +static LLTrace::BlockTimerStatHandle FTM_TEXT_REFLOW ("Text Reflow"); void LLTextBase::reflow() { LL_RECORD_BLOCK_TIME(FTM_TEXT_REFLOW); @@ -1779,7 +1779,7 @@ void LLTextBase::removeDocumentChild(LLView* view) } -static LLTrace::TimeBlock FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments"); void LLTextBase::updateSegments() { LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS); @@ -2020,7 +2020,7 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name) } } -static LLTrace::TimeBlock FTM_PARSE_HTML("Parse HTML"); +static LLTrace::BlockTimerStatHandle FTM_PARSE_HTML("Parse HTML"); void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params) { @@ -2097,7 +2097,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } } -static LLTrace::TimeBlock FTM_APPEND_TEXT("Append Text"); +static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text"); void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params) { diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 4467f04e5b..04ea60a4c2 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2501,7 +2501,7 @@ BOOL LLTextEditor::tryToRevertToPristineState() } -static LLTrace::TimeBlock FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); +static LLTrace::BlockTimerStatHandle FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); void LLTextEditor::loadKeywords(const std::string& filename, const std::vector& funcs, const std::vector& tooltips, diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp index ad7fb005f5..4d4ff4236d 100755 --- a/indra/llui/lltrans.cpp +++ b/indra/llui/lltrans.cpp @@ -135,7 +135,7 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) -static LLTrace::TimeBlock FTM_GET_TRANS("Translate string"); +static LLTrace::BlockTimerStatHandle FTM_GET_TRANS("Translate string"); //static std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args) diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 546cd6fc46..ef364dd3d3 100755 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -737,7 +737,7 @@ public: } }; -LLTrace::TimeBlock FTM_FOCUS_FIRST_ITEM("Focus First Item"); +LLTrace::BlockTimerStatHandle FTM_FOCUS_FIRST_ITEM("Focus First Item"); BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) { diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 1f5d77a958..4cc7da1267 100755 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -44,9 +44,9 @@ // this library includes #include "llpanel.h" -LLTrace::TimeBlock FTM_WIDGET_CONSTRUCTION("Widget Construction"); -LLTrace::TimeBlock FTM_INIT_FROM_PARAMS("Widget InitFromParams"); -LLTrace::TimeBlock FTM_WIDGET_SETUP("Widget Setup"); +LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION("Widget Construction"); +LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS("Widget InitFromParams"); +LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP("Widget Setup"); //----------------------------------------------------------------------------- @@ -105,7 +105,7 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa } } -static LLTrace::TimeBlock FTM_CREATE_CHILDREN("Create XUI Children"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_CHILDREN("Create XUI Children"); //static void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node) @@ -147,7 +147,7 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid } -static LLTrace::TimeBlock FTM_XML_PARSE("XML Reading/Parsing"); +static LLTrace::BlockTimerStatHandle FTM_XML_PARSE("XML Reading/Parsing"); //----------------------------------------------------------------------------- // getLayeredXMLNode() //----------------------------------------------------------------------------- @@ -179,7 +179,7 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename) //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_CREATE_FROM_XML("Create child widget"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_FROM_XML("Create child widget"); LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node) { diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 678e837fa1..a5796c8af2 100755 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -74,9 +74,9 @@ class LLWidgetNameRegistry //: public LLRegistrySingleton //{}; -extern LLTrace::TimeBlock FTM_WIDGET_SETUP; -extern LLTrace::TimeBlock FTM_WIDGET_CONSTRUCTION; -extern LLTrace::TimeBlock FTM_INIT_FROM_PARAMS; +extern LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP; +extern LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION; +extern LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS; // Build time optimization, generate this once in .cpp file #ifndef LLUICTRLFACTORY_CPP diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 9a6810947e..98d0c215e6 100755 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -31,7 +31,7 @@ #include "llsd.h" #include "lltrans.h" -LLTrace::TimeBlock FTM_UI_STRING("UI String"); +LLTrace::BlockTimerStatHandle FTM_UI_STRING("UI String"); LLUIString::LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index e3b3444a00..1982c97b8c 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1504,7 +1504,7 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const return getChild(name, recurse); } -static LLTrace::TimeBlock FTM_FIND_VIEWS("Find Widgets"); +static LLTrace::BlockTimerStatHandle FTM_FIND_VIEWS("Find Widgets"); LLView* LLView::findChildView(const std::string& name, BOOL recurse) const { diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 46b089fd02..4390ca83e9 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -677,7 +677,7 @@ LLXUIParser::LLXUIParser() } } -static LLTrace::TimeBlock FTM_PARSE_XUI("XUI Parsing"); +static LLTrace::BlockTimerStatHandle FTM_PARSE_XUI("XUI Parsing"); const LLXMLNodePtr DUMMY_NODE = new LLXMLNode(); void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename, bool silent) diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index add88fe0a3..34b61ee0a0 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -40,7 +40,7 @@ const S32 LLVFile::WRITE = 0x00000002; const S32 LLVFile::READ_WRITE = 0x00000003; // LLVFile::READ & LLVFile::WRITE const S32 LLVFile::APPEND = 0x00000006; // 0x00000004 & LLVFile::WRITE -static LLTrace::TimeBlock FTM_VFILE_WAIT("VFile Wait"); +static LLTrace::BlockTimerStatHandle FTM_VFILE_WAIT("VFile Wait"); //---------------------------------------------------------------------------- LLVFSThread* LLVFile::sVFSThread = NULL; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index c9e2e553b6..0637572f67 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1823,8 +1823,8 @@ void LLWindowWin32::gatherInput() mMousePositionModified = FALSE; } -static LLTrace::TimeBlock FTM_KEYHANDLER("Handle Keyboard"); -static LLTrace::TimeBlock FTM_MOUSEHANDLER("Handle Mouse"); +static LLTrace::BlockTimerStatHandle FTM_KEYHANDLER("Handle Keyboard"); +static LLTrace::BlockTimerStatHandle FTM_MOUSEHANDLER("Handle Mouse"); LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param) { diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 5fec0d927f..d1dfbe3315 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1126,7 +1126,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) } } -static LLTrace::TimeBlock FTM_UPDATE_CAMERA("Camera"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Camera"); //----------------------------------------------------------------------------- // updateCamera() diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5fbdc0e23e..037a9bda86 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -627,7 +627,7 @@ public: while (!LLAppViewer::instance()->isQuitting()) { - LLTrace::TimeBlock::writeLog(os); + LLTrace::BlockTimerStatHandle::writeLog(os); os.flush(); ms_sleep(32); } @@ -1240,24 +1240,24 @@ void LLAppViewer::checkMemory() } } -static LLTrace::TimeBlock FTM_MESSAGES("System Messages"); -static LLTrace::TimeBlock FTM_SLEEP("Sleep"); -static LLTrace::TimeBlock FTM_YIELD("Yield"); - -static LLTrace::TimeBlock FTM_TEXTURE_CACHE("Texture Cache"); -static LLTrace::TimeBlock FTM_DECODE("Image Decode"); -static LLTrace::TimeBlock FTM_VFS("VFS Thread"); -static LLTrace::TimeBlock FTM_LFS("LFS Thread"); -static LLTrace::TimeBlock FTM_PAUSE_THREADS("Pause Threads"); -static LLTrace::TimeBlock FTM_IDLE("Idle"); -static LLTrace::TimeBlock FTM_PUMP("Pump"); -static LLTrace::TimeBlock FTM_PUMP_ARES("Ares"); -static LLTrace::TimeBlock FTM_PUMP_SERVICE("Service"); -static LLTrace::TimeBlock FTM_SERVICE_CALLBACK("Callback"); -static LLTrace::TimeBlock FTM_AGENT_AUTOPILOT("Autopilot"); -static LLTrace::TimeBlock FTM_AGENT_UPDATE("Update"); - -LLTrace::TimeBlock FTM_FRAME("Frame"); +static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages"); +static LLTrace::BlockTimerStatHandle FTM_SLEEP("Sleep"); +static LLTrace::BlockTimerStatHandle FTM_YIELD("Yield"); + +static LLTrace::BlockTimerStatHandle FTM_TEXTURE_CACHE("Texture Cache"); +static LLTrace::BlockTimerStatHandle FTM_DECODE("Image Decode"); +static LLTrace::BlockTimerStatHandle FTM_VFS("VFS Thread"); +static LLTrace::BlockTimerStatHandle FTM_LFS("LFS Thread"); +static LLTrace::BlockTimerStatHandle FTM_PAUSE_THREADS("Pause Threads"); +static LLTrace::BlockTimerStatHandle FTM_IDLE("Idle"); +static LLTrace::BlockTimerStatHandle FTM_PUMP("Pump"); +static LLTrace::BlockTimerStatHandle FTM_PUMP_ARES("Ares"); +static LLTrace::BlockTimerStatHandle FTM_PUMP_SERVICE("Service"); +static LLTrace::BlockTimerStatHandle FTM_SERVICE_CALLBACK("Callback"); +static LLTrace::BlockTimerStatHandle FTM_AGENT_AUTOPILOT("Autopilot"); +static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE("Update"); + +LLTrace::BlockTimerStatHandle FTM_FRAME("Frame"); bool LLAppViewer::mainLoop() { @@ -1315,9 +1315,9 @@ bool LLAppViewer::mainLoop() #endif { LL_RECORD_BLOCK_TIME(FTM_FRAME); - LLTrace::TimeBlock::processTimes(); + LLTrace::BlockTimerStatHandle::processTimes(); LLTrace::get_frame_recording().nextPeriod(); - LLTrace::TimeBlock::logStats(); + LLTrace::BlockTimerStatHandle::logStats(); LLTrace::get_master_thread_recorder()->pullFromChildren(); @@ -1662,9 +1662,9 @@ bool LLAppViewer::cleanup() if (LLFastTimerView::sAnalyzePerformance) { LL_INFOS() << "Analyzing performance" << LL_ENDL; - std::string baseline_name = LLTrace::TimeBlock::sLogName + "_baseline.slp"; - std::string current_name = LLTrace::TimeBlock::sLogName + ".slp"; - std::string report_name = LLTrace::TimeBlock::sLogName + "_report.csv"; + std::string baseline_name = LLTrace::BlockTimerStatHandle::sLogName + "_baseline.slp"; + std::string current_name = LLTrace::BlockTimerStatHandle::sLogName + ".slp"; + std::string report_name = LLTrace::BlockTimerStatHandle::sLogName + "_report.csv"; LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name), @@ -2018,9 +2018,9 @@ bool LLAppViewer::cleanup() { LL_INFOS() << "Analyzing performance" << LL_ENDL; - std::string baseline_name = LLTrace::TimeBlock::sLogName + "_baseline.slp"; - std::string current_name = LLTrace::TimeBlock::sLogName + ".slp"; - std::string report_name = LLTrace::TimeBlock::sLogName + "_report.csv"; + std::string baseline_name = LLTrace::BlockTimerStatHandle::sLogName + "_baseline.slp"; + std::string current_name = LLTrace::BlockTimerStatHandle::sLogName + ".slp"; + std::string report_name = LLTrace::BlockTimerStatHandle::sLogName + "_report.csv"; LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name), @@ -2139,10 +2139,10 @@ bool LLAppViewer::initThreads() enable_threads && true, app_metrics_qa_mode); - if (LLTrace::TimeBlock::sLog || LLTrace::TimeBlock::sMetricLog) + if (LLTrace::BlockTimerStatHandle::sLog || LLTrace::BlockTimerStatHandle::sMetricLog) { - LLTrace::TimeBlock::setLogLock(new LLMutex(NULL)); - mFastTimerLogThread = new LLFastTimerLogThread(LLTrace::TimeBlock::sLogName); + LLTrace::BlockTimerStatHandle::setLogLock(new LLMutex(NULL)); + mFastTimerLogThread = new LLFastTimerLogThread(LLTrace::BlockTimerStatHandle::sLogName); mFastTimerLogThread->start(); } @@ -2597,18 +2597,18 @@ bool LLAppViewer::initConfiguration() if (gSavedSettings.getBOOL("LogPerformance")) { - LLTrace::TimeBlock::sLog = true; - LLTrace::TimeBlock::sLogName = std::string("performance"); + LLTrace::BlockTimerStatHandle::sLog = true; + LLTrace::BlockTimerStatHandle::sLogName = std::string("performance"); } std::string test_name(gSavedSettings.getString("LogMetrics")); if (! test_name.empty()) { - LLTrace::TimeBlock::sMetricLog = TRUE ; + LLTrace::BlockTimerStatHandle::sMetricLog = TRUE ; // '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test // In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...) LL_INFOS() << "'--logmetrics' argument : " << test_name << LL_ENDL; - LLTrace::TimeBlock::sLogName = test_name; + LLTrace::BlockTimerStatHandle::sLogName = test_name; } if (clp.hasOption("graphicslevel")) @@ -4470,20 +4470,20 @@ public: } }; -static LLTrace::TimeBlock FTM_AUDIO_UPDATE("Update Audio"); -static LLTrace::TimeBlock FTM_CLEANUP("Cleanup"); -static LLTrace::TimeBlock FTM_CLEANUP_DRAWABLES("Drawables"); -static LLTrace::TimeBlock FTM_CLEANUP_OBJECTS("Objects"); -static LLTrace::TimeBlock FTM_IDLE_CB("Idle Callbacks"); -static LLTrace::TimeBlock FTM_LOD_UPDATE("Update LOD"); -static LLTrace::TimeBlock FTM_OBJECTLIST_UPDATE("Update Objectlist"); -static LLTrace::TimeBlock FTM_REGION_UPDATE("Update Region"); -static LLTrace::TimeBlock FTM_WORLD_UPDATE("Update World"); -static LLTrace::TimeBlock FTM_NETWORK("Network"); -static LLTrace::TimeBlock FTM_AGENT_NETWORK("Agent Network"); -static LLTrace::TimeBlock FTM_VLMANAGER("VL Manager"); -static LLTrace::TimeBlock FTM_AGENT_POSITION("Agent Position"); -static LLTrace::TimeBlock FTM_HUD_EFFECTS("HUD Effects"); +static LLTrace::BlockTimerStatHandle FTM_AUDIO_UPDATE("Update Audio"); +static LLTrace::BlockTimerStatHandle FTM_CLEANUP("Cleanup"); +static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLES("Drawables"); +static LLTrace::BlockTimerStatHandle FTM_CLEANUP_OBJECTS("Objects"); +static LLTrace::BlockTimerStatHandle FTM_IDLE_CB("Idle Callbacks"); +static LLTrace::BlockTimerStatHandle FTM_LOD_UPDATE("Update LOD"); +static LLTrace::BlockTimerStatHandle FTM_OBJECTLIST_UPDATE("Update Objectlist"); +static LLTrace::BlockTimerStatHandle FTM_REGION_UPDATE("Update Region"); +static LLTrace::BlockTimerStatHandle FTM_WORLD_UPDATE("Update World"); +static LLTrace::BlockTimerStatHandle FTM_NETWORK("Network"); +static LLTrace::BlockTimerStatHandle FTM_AGENT_NETWORK("Agent Network"); +static LLTrace::BlockTimerStatHandle FTM_VLMANAGER("VL Manager"); +static LLTrace::BlockTimerStatHandle FTM_AGENT_POSITION("Agent Position"); +static LLTrace::BlockTimerStatHandle FTM_HUD_EFFECTS("HUD Effects"); /////////////////////////////////////////////////////// // idle() @@ -5079,12 +5079,12 @@ void LLAppViewer::idleNameCache() static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; #endif -static LLTrace::TimeBlock FTM_IDLE_NETWORK("Idle Network"); -static LLTrace::TimeBlock FTM_MESSAGE_ACKS("Message Acks"); -static LLTrace::TimeBlock FTM_RETRANSMIT("Retransmit"); -static LLTrace::TimeBlock FTM_TIMEOUT_CHECK("Timeout Check"); -static LLTrace::TimeBlock FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); -static LLTrace::TimeBlock FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"); +static LLTrace::BlockTimerStatHandle FTM_IDLE_NETWORK("Idle Network"); +static LLTrace::BlockTimerStatHandle FTM_MESSAGE_ACKS("Message Acks"); +static LLTrace::BlockTimerStatHandle FTM_RETRANSMIT("Retransmit"); +static LLTrace::BlockTimerStatHandle FTM_TIMEOUT_CHECK("Timeout Check"); +static LLTrace::BlockTimerStatHandle FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); +static LLTrace::BlockTimerStatHandle FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"); void LLAppViewer::idleNetwork() { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index e4dab8eb17..e9d86612ca 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -43,7 +43,7 @@ class LLWatchdogTimeout; class LLUpdaterService; class LLViewerJoystick; -extern LLTrace::TimeBlock FTM_FRAME; +extern LLTrace::BlockTimerStatHandle FTM_FRAME; class LLAppViewer : public LLApp diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index e64068330e..534961840a 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -734,7 +734,7 @@ void LLChatHistory::clear() mLastFromID = LLUUID::null; } -static LLTrace::TimeBlock FTM_APPEND_MESSAGE("Append Chat Message"); +static LLTrace::BlockTimerStatHandle FTM_APPEND_MESSAGE("Append Chat Message"); void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params) { diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 98c1685feb..dc1c085c88 100755 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -89,7 +89,7 @@ void LLDebugView::init() r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f)); - mFastTimerView = dynamic_cast(LLFloaterReg::getInstance("fast_timers")); + mFastTimerView = dynamic_cast(LLFloaterReg::getInstance("block_timers")); gSceneView = new LLSceneView(r); gSceneView->setFollowsTop(); diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 93a98084d9..7836e2cb94 100755 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -97,7 +97,7 @@ void LLDoNotDisturbNotificationStorage::resetDirty() mDirty = false; } -static LLTrace::TimeBlock FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications"); +static LLTrace::BlockTimerStatHandle FTM_SAVE_DND_NOTIFICATIONS("Save DND Notifications"); void LLDoNotDisturbNotificationStorage::saveNotifications() { @@ -128,7 +128,7 @@ void LLDoNotDisturbNotificationStorage::saveNotifications() resetDirty(); } -static LLTrace::TimeBlock FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications"); +static LLTrace::BlockTimerStatHandle FTM_LOAD_DND_NOTIFICATIONS("Load DND Notifications"); void LLDoNotDisturbNotificationStorage::loadNotifications() { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 5981153bd5..7414b24811 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -56,7 +56,7 @@ const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; -static LLTrace::TimeBlock FTM_CULL_REBOUND("Cull Rebound"); +static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound"); extern bool gShiftFrame; @@ -236,9 +236,9 @@ BOOL LLDrawable::isLight() const } } -static LLTrace::TimeBlock FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); -static LLTrace::TimeBlock FTM_DEREF_DRAWABLE("Deref"); -static LLTrace::TimeBlock FTM_DELETE_FACES("Faces"); +static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); +static LLTrace::BlockTimerStatHandle FTM_DEREF_DRAWABLE("Deref"); +static LLTrace::BlockTimerStatHandle FTM_DELETE_FACES("Faces"); void LLDrawable::cleanupReferences() { @@ -306,7 +306,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) return count; } -static LLTrace::TimeBlock FTM_ALLOCATE_FACE("Allocate Face"); +static LLTrace::BlockTimerStatHandle FTM_ALLOCATE_FACE("Allocate Face"); LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) { diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 2f9e5813c0..96393996c3 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -363,8 +363,8 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) } } -static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group"); -static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_GROUP_LOOP("Alpha Group"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_PUSH("Alpha Push Verts"); void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass) { diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 7b785a0220..966298b5d8 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -102,7 +102,7 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 cube_channel = -1; -static LLTrace::TimeBlock FTM_SHADOW_AVATAR("Avatar Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow"); LLDrawPoolAvatar::LLDrawPoolAvatar() : LLFacePool(POOL_AVATAR) @@ -1174,7 +1174,7 @@ void LLDrawPoolAvatar::endDeferredSkinned() gGL.getTexUnit(0)->activate(); } -static LLTrace::TimeBlock FTM_RENDER_AVATARS("renderAvatars"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_AVATARS("renderAvatars"); void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) @@ -1836,7 +1836,7 @@ void LLDrawPoolAvatar::renderDeferredRiggedMaterial(LLVOAvatar* avatar, S32 pass renderRigged(avatar, pass); } -static LLTrace::TimeBlock FTM_RIGGED_VBO("Rigged VBO"); +static LLTrace::BlockTimerStatHandle FTM_RIGGED_VBO("Rigged VBO"); void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) { diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index ef41cbd989..211a96b32d 100755 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1095,7 +1095,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText } -static LLTrace::TimeBlock FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback"); // static void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) @@ -1119,8 +1119,8 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu } } -static LLTrace::TimeBlock FTM_BUMP_GEN_NORMAL("Generate Normal Map"); -static LLTrace::TimeBlock FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_GEN_NORMAL("Generate Normal Map"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map"); void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { @@ -1196,13 +1196,13 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr } -static LLTrace::TimeBlock FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_RESCALE("Rescale"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); -static LLTrace::TimeBlock FTM_BUMP_SOURCE_CREATE("Bump Source Create"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_LOADED("Bump Source Loaded"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_RESCALE("Rescale"); +static LLTrace::BlockTimerStatHandle FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); +static LLTrace::BlockTimerStatHandle 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/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index f1289ab06a..61fbe6d5f6 100755 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -42,8 +42,8 @@ static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; -static LLTrace::TimeBlock FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); -static LLTrace::TimeBlock FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); void LLDrawPoolGlow::beginPostDeferredPass(S32 pass) { @@ -51,7 +51,7 @@ void LLDrawPoolGlow::beginPostDeferredPass(S32 pass) gDeferredEmissiveProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); } -static LLTrace::TimeBlock FTM_RENDER_GLOW_PUSH("Glow Push"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW_PUSH("Glow Push"); void LLDrawPoolGlow::renderPostDeferred(S32 pass) { @@ -237,7 +237,7 @@ void LLDrawPoolSimple::render(S32 pass) -static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK("Alpha Mask"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK("Alpha Mask"); LLDrawPoolAlphaMask::LLDrawPoolAlphaMask() : LLRenderPass(POOL_ALPHA_MASK) @@ -420,7 +420,7 @@ void LLDrawPoolSimple::renderDeferred(S32 pass) } } -static LLTrace::TimeBlock FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_DEFERRED("Deferred Alpha Mask"); void LLDrawPoolAlphaMask::beginDeferredPass(S32 pass) { diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 3d7d34d30d..33ce3d0111 100755 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -55,7 +55,7 @@ int DebugDetailMap = 0; S32 LLDrawPoolTerrain::sDetailMode = 1; F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE; static LLGLSLShader* sShader = NULL; -static LLTrace::TimeBlock FTM_SHADOW_TERRAIN("Terrain Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_TERRAIN("Terrain Shadow"); LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 187a2045dd..b1f40781f7 100755 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -41,7 +41,7 @@ S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; -static LLTrace::TimeBlock FTM_SHADOW_TREE("Tree Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_TREE("Tree Shadow"); LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) : LLFacePool(POOL_TREE), diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4c44e59d9b..f2727aa7b9 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1081,7 +1081,7 @@ bool LLFace::canRenderAsMask() } -static LLTrace::TimeBlock FTM_FACE_GEOM_VOLUME("Volume VB Cache"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_VOLUME("Volume VB Cache"); //static void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf) @@ -1148,33 +1148,33 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count) } } -static LLTrace::TimeBlock FTM_FACE_GET_GEOM("Face Geom"); -static LLTrace::TimeBlock FTM_FACE_GEOM_POSITION("Position"); -static LLTrace::TimeBlock FTM_FACE_GEOM_NORMAL("Normal"); -static LLTrace::TimeBlock FTM_FACE_GEOM_TEXTURE("Texture"); -static LLTrace::TimeBlock FTM_FACE_GEOM_COLOR("Color"); -static LLTrace::TimeBlock FTM_FACE_GEOM_EMISSIVE("Emissive"); -static LLTrace::TimeBlock FTM_FACE_GEOM_WEIGHTS("Weights"); -static LLTrace::TimeBlock FTM_FACE_GEOM_TANGENT("Binormal"); - -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK("Face Feedback"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive"); -static LLTrace::TimeBlock FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal"); - -static LLTrace::TimeBlock FTM_FACE_GEOM_INDEX("Index"); -static LLTrace::TimeBlock FTM_FACE_GEOM_INDEX_TAIL("Tail"); -static LLTrace::TimeBlock FTM_FACE_POSITION_STORE("Pos"); -static LLTrace::TimeBlock FTM_FACE_TEXTURE_INDEX_STORE("TexIdx"); -static LLTrace::TimeBlock FTM_FACE_POSITION_PAD("Pad"); -static LLTrace::TimeBlock FTM_FACE_TEX_DEFAULT("Default"); -static LLTrace::TimeBlock FTM_FACE_TEX_QUICK("Quick"); -static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_NO_XFORM("No Xform"); -static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_XFORM("Xform"); -static LLTrace::TimeBlock FTM_FACE_TEX_QUICK_PLANAR("Quick Planar"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GET_GEOM("Face Geom"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_POSITION("Position"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_NORMAL("Normal"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TEXTURE("Texture"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_COLOR("Color"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_EMISSIVE("Emissive"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_WEIGHTS("Weights"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_TANGENT("Binormal"); + +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK("Face Feedback"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_POSITION("Feedback Position"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_NORMAL("Feedback Normal"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_TEXTURE("Feedback Texture"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_COLOR("Feedback Color"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_EMISSIVE("Feedback Emissive"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_FEEDBACK_BINORMAL("Feedback Binormal"); + +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX("Index"); +static LLTrace::BlockTimerStatHandle FTM_FACE_GEOM_INDEX_TAIL("Tail"); +static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_STORE("Pos"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEXTURE_INDEX_STORE("TexIdx"); +static LLTrace::BlockTimerStatHandle FTM_FACE_POSITION_PAD("Pad"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_DEFAULT("Default"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK("Quick"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_NO_XFORM("No Xform"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_XFORM("Xform"); +static LLTrace::BlockTimerStatHandle FTM_FACE_TEX_QUICK_PLANAR("Quick Planar"); BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 4809a6b7da..6153c43690 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -64,17 +64,17 @@ static const S32 MIN_BAR_HEIGHT = 3; static const S32 RUNNING_AVERAGE_WIDTH = 100; static const S32 NUM_FRAMES_HISTORY = 200; -std::vector ft_display_idx; // line of table entry for display purposes (for collapse) +std::vector ft_display_idx; // line of table entry for display purposes (for collapse) -typedef LLTreeDFSIter timer_tree_iterator_t; +typedef LLTreeDFSIter timer_tree_iterator_t; BOOL LLFastTimerView::sAnalyzePerformance = FALSE; -static timer_tree_iterator_t begin_timer_tree(TimeBlock& id) +static timer_tree_iterator_t begin_timer_tree(BlockTimerStatHandle& id) { return timer_tree_iterator_t(&id, - boost::bind(boost::mem_fn(&TimeBlock::beginChildren), _1), - boost::bind(boost::mem_fn(&TimeBlock::endChildren), _1)); + boost::bind(boost::mem_fn(&BlockTimerStatHandle::beginChildren), _1), + boost::bind(boost::mem_fn(&BlockTimerStatHandle::endChildren), _1)); } static timer_tree_iterator_t end_timer_tree() @@ -82,10 +82,10 @@ static timer_tree_iterator_t end_timer_tree() return timer_tree_iterator_t(); } -S32 get_depth(const TimeBlock* blockp) +S32 get_depth(const BlockTimerStatHandle* blockp) { S32 depth = 0; - TimeBlock* timerp = blockp->getParent(); + BlockTimerStatHandle* timerp = blockp->getParent(); while(timerp) { depth++; @@ -172,7 +172,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) return LLFloater::handleRightMouseDown(x, y, mask); } -TimeBlock* LLFastTimerView::getLegendID(S32 y) +BlockTimerStatHandle* LLFastTimerView::getLegendID(S32 y) { S32 idx = (mLegendRect.mTop - y) / (LLFontGL::getFontMonospace()->getLineHeight() + 2); @@ -199,7 +199,7 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) { if (x < mBarRect.mLeft) { - TimeBlock* idp = getLegendID(y); + BlockTimerStatHandle* idp = getLegendID(y); if (idp) { idp->getTreeNode().mCollapsed = !idp->getTreeNode().mCollapsed; @@ -261,7 +261,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) TimerBar* hover_bar = NULL; F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay; - for (int bar_index = 0, end_index = LLInstanceTracker::instanceCount(); + for (int bar_index = 0, end_index = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount(); bar_index < end_index; ++bar_index) { @@ -275,7 +275,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) hover_bar = &bar; if (bar.mTimeBlock->getTreeNode().mCollapsed) { - // stop on first collapsed timeblock, since we can't select any children + // stop on first collapsed BlockTimerStatHandle, since we can't select any children break; } } @@ -300,7 +300,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } else if (x < mBarRect.mLeft) { - TimeBlock* timer_id = getLegendID(y); + BlockTimerStatHandle* timer_id = getLegendID(y); if (timer_id) { mHoverID = timer_id; @@ -311,7 +311,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } -static std::string get_tooltip(TimeBlock& timer, S32 history_index, PeriodicRecording& frame_recording) +static std::string get_tooltip(BlockTimerStatHandle& timer, S32 history_index, PeriodicRecording& frame_recording) { std::string tooltip; if (history_index == 0) @@ -351,7 +351,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) // tooltips for timer legend if (x < mBarRect.mLeft) { - TimeBlock* idp = getLegendID(y); + BlockTimerStatHandle* idp = getLegendID(y); if (idp) { LLToolTipMgr::instance().show(get_tooltip(*idp, 0, mRecording)); @@ -373,7 +373,7 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) return TRUE; } -static TimeBlock FTM_RENDER_TIMER("Timers"); +static BlockTimerStatHandle FTM_RENDER_TIMER("Timers"); static const S32 MARGIN = 10; static const S32 LEGEND_WIDTH = 220; @@ -938,13 +938,13 @@ void LLFastTimerView::outputAllMetrics() //static void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output) { - if(TimeBlock::sLog) + if(BlockTimerStatHandle::sLog) { doAnalysisDefault(baseline, target, output) ; return ; } - if(TimeBlock::sMetricLog) + if(BlockTimerStatHandle::sMetricLog) { LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ; return ; @@ -966,7 +966,7 @@ void LLFastTimerView::printLineStats() it != end_timer_tree(); ++it) { - TimeBlock* idp = (*it); + BlockTimerStatHandle* idp = (*it); if (!first) { @@ -988,7 +988,7 @@ void LLFastTimerView::printLineStats() it != end_timer_tree(); ++it) { - TimeBlock* idp = (*it); + BlockTimerStatHandle* idp = (*it); if (!first) { @@ -1019,7 +1019,7 @@ void LLFastTimerView::printLineStats() } } -static LLTrace::TimeBlock FTM_DRAW_LINE_GRAPH("Draw line graph"); +static LLTrace::BlockTimerStatHandle FTM_DRAW_LINE_GRAPH("Draw line graph"); void LLFastTimerView::drawLineGraph() { @@ -1066,7 +1066,7 @@ void LLFastTimerView::drawLineGraph() it != end_timer_tree(); ++it) { - TimeBlock* idp = (*it); + BlockTimerStatHandle* idp = (*it); //fatten highlighted timer if (mHoverID == idp) @@ -1208,12 +1208,12 @@ void LLFastTimerView::drawLegend() LLLocalClipRect clip(mLegendRect); S32 cur_line = 0; ft_display_idx.clear(); - std::map display_line; + std::map display_line; for (timer_tree_iterator_t it = begin_timer_tree(FTM_FRAME); it != timer_tree_iterator_t(); ++it) { - TimeBlock* idp = (*it); + BlockTimerStatHandle* idp = (*it); display_line[idp] = cur_line; ft_display_idx.push_back(idp); cur_line++; @@ -1275,7 +1275,7 @@ void LLFastTimerView::drawLegend() x += dx; BOOL is_child_of_hover_item = (idp == mHoverID); - TimeBlock* next_parent = idp->getParent(); + BlockTimerStatHandle* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); @@ -1303,7 +1303,7 @@ void LLFastTimerView::generateUniqueColors() { // generate unique colors { - sTimerColors.resize(LLTrace::TimeBlock::getNumIndices()); + sTimerColors.resize(LLTrace::BlockTimerStatHandle::getNumIndices()); sTimerColors[FTM_FRAME.getIndex()] = LLColor4::grey; F32 hue = 0.f; @@ -1312,7 +1312,7 @@ void LLFastTimerView::generateUniqueColors() it != timer_tree_iterator_t(); ++it) { - TimeBlock* idp = (*it); + BlockTimerStatHandle* idp = (*it); const F32 HUE_INCREMENT = 0.23f; hue = fmodf(hue + HUE_INCREMENT, 1.f); @@ -1462,7 +1462,7 @@ void LLFastTimerView::drawBars() U32 bar_index = 0; if (!mAverageTimerRow.mBars) { - mAverageTimerRow.mBars = new TimerBar[LLInstanceTracker::instanceCount()]; + mAverageTimerRow.mBars = new TimerBar[LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount()]; } updateTimerBarWidths(&FTM_FRAME, mAverageTimerRow, -1, bar_index); updateTimerBarOffsets(&FTM_FRAME, mAverageTimerRow); @@ -1474,7 +1474,7 @@ void LLFastTimerView::drawBars() bar_index = 0; if (!row.mBars) { - row.mBars = new TimerBar[LLInstanceTracker::instanceCount()]; + row.mBars = new TimerBar[LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount()]; updateTimerBarWidths(&FTM_FRAME, row, history_index, bar_index); updateTimerBarOffsets(&FTM_FRAME, row); } @@ -1509,9 +1509,9 @@ void LLFastTimerView::drawBars() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } -static LLTrace::TimeBlock FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TIMER_BAR_WIDTHS("Update timer bar widths"); -F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) +F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 history_index, U32& bar_index) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_WIDTHS); const F32Seconds self_time = history_index == -1 @@ -1525,7 +1525,7 @@ F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBar& timer_bar = row.mBars[bar_index]; bar_index++; - for (TimeBlock::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it) + for (BlockTimerStatHandle::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it) { full_time += updateTimerBarWidths(*it, row, history_index, bar_index); } @@ -1537,9 +1537,9 @@ F32Seconds LLFastTimerView::updateTimerBarWidths(LLTrace::TimeBlock* time_block, return full_time; } -static LLTrace::TimeBlock FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TIMER_BAR_FRACTIONS("Update timer bar fractions"); -S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index) +S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 timer_bar_index) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_TIMER_BAR_FRACTIONS); @@ -1560,14 +1560,14 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer TimerBar* last_child_timer_bar = NULL; bool first_child = true; - for (TimeBlock::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); + for (BlockTimerStatHandle::child_iter it = time_block->beginChildren(), end_it = time_block->endChildren(); it != end_it; ++it) { timer_bar_index++; TimerBar& child_timer_bar = row.mBars[timer_bar_index]; - TimeBlock* child_time_block = *it; + BlockTimerStatHandle* child_time_block = *it; if (last_child_timer_bar) { @@ -1603,7 +1603,7 @@ S32 LLFastTimerView::updateTimerBarOffsets(LLTrace::TimeBlock* time_block, Timer S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered, bool visible, S32 bar_index) { TimerBar& timer_bar = row.mBars[bar_index]; - LLTrace::TimeBlock* time_block = timer_bar.mTimeBlock; + LLTrace::BlockTimerStatHandle* time_block = timer_bar.mTimeBlock; hovered |= mHoverID == time_block; @@ -1648,7 +1648,7 @@ S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, bool children_visible = visible && !time_block->getTreeNode().mCollapsed; bar_index++; - const U32 num_bars = LLInstanceTracker::instanceCount(); + const U32 num_bars = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount(); if (bar_index < num_bars && row.mBars[bar_index].mFirstChild) { bool is_last = false; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 672bb5d7ca..c23846afab 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -62,7 +62,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); virtual void onOpen(const LLSD& key); - LLTrace::TimeBlock* getLegendID(S32 y); + LLTrace::BlockTimerStatHandle* getLegendID(S32 y); private: virtual void onClickCloseBtn(); @@ -93,7 +93,7 @@ private: mChildrenEnd, mSelfStart, mSelfEnd; - LLTrace::TimeBlock* mTimeBlock; + LLTrace::BlockTimerStatHandle* mTimeBlock; bool mVisible, mFirstChild, mLastChild; @@ -113,8 +113,8 @@ private: TimerBar* mBars; }; - F32Seconds updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); - S32 updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0); + F32Seconds updateTimerBarWidths(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); + S32 updateTimerBarOffsets(LLTrace::BlockTimerStatHandle* time_block, TimerBarRow& row, S32 timer_bar_index = 0); S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0); void setPauseState(bool pause_state); @@ -134,8 +134,8 @@ private: mHoverBarIndex, mStatsIndex; S32 mDisplayMode; - LLTrace::TimeBlock* mHoverID; - LLTrace::TimeBlock* mHoverTimer; + LLTrace::BlockTimerStatHandle* mHoverID; + LLTrace::BlockTimerStatHandle* mHoverTimer; LLRect mToolTipRect, mGraphRect, mBarRect, diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 7c7b59445c..c589bea674 100755 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -47,8 +47,8 @@ std::vector LLVolumeImplFlexible::sInstanceList; std::vector LLVolumeImplFlexible::sUpdateDelay; -static LLTrace::TimeBlock FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLTrace::TimeBlock FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); +static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild"); +static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -334,7 +334,7 @@ void LLVolumeImplFlexible::updateRenderRes() // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies"); void LLVolumeImplFlexible::doIdleUpdate() { LLDrawable* drawablep = mVO->mDrawable; @@ -715,7 +715,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() mLastSegmentRotation = parentSegmentRotation; } -static LLFastTimer::DeclareTimer FTM_FLEXI_PREBUILD("Flexi Prebuild"); +static LLTrace::BlockTimerStatHandle FTM_FLEXI_PREBUILD("Flexi Prebuild"); void LLVolumeImplFlexible::preRebuild() { diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp index d76d6d422f..0dc667f9f5 100755 --- a/indra/newview/llfolderviewmodelinventory.cpp +++ b/indra/newview/llfolderviewmodelinventory.cpp @@ -34,7 +34,7 @@ // // class LLFolderViewModelInventory // -static LLTrace::TimeBlock FTM_INVENTORY_SORT("Sort"); +static LLTrace::BlockTimerStatHandle FTM_INVENTORY_SORT("Sort"); bool LLFolderViewModelInventory::startDrag(std::vector& items) { diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index 9d7b8b13e3..6b6d7d7e7f 100755 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -54,7 +54,7 @@ LLHUDManager::~LLHUDManager() { } -static LLTrace::TimeBlock FTM_HUD_EFFECTS("Hud Effects"); +static LLTrace::BlockTimerStatHandle FTM_HUD_EFFECTS("Hud Effects"); void LLHUDManager::updateEffects() { diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 4b0dadec38..45fa09e1a1 100755 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -252,7 +252,7 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type) return hud_objectp; } -static LLTrace::TimeBlock FTM_HUD_UPDATE("Update Hud"); +static LLTrace::BlockTimerStatHandle FTM_HUD_UPDATE("Update Hud"); // static void LLHUDObject::updateAll() diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index c71e610941..33f0e56e4b 100755 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -42,7 +42,7 @@ #include "llclipboard.h" #include "lltrans.h" -LLTrace::TimeBlock FT_FILTER_CLIPBOARD("Filter Clipboard"); +LLTrace::BlockTimerStatHandle FT_FILTER_CLIPBOARD("Filter Clipboard"); LLInventoryFilter::FilterOps::FilterOps(const Params& p) : mFilterObjectTypes(p.object_types), diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index f6d0ecc5bf..36e1cc97d1 100755 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -133,7 +133,7 @@ void LLInventoryItemsList::idle(void* user_data) } } -LLTrace::TimeBlock FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); +LLTrace::BlockTimerStatHandle FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); void LLInventoryItemsList::refresh() { diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6358620f0b..d10aa6d7b0 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -397,7 +397,7 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() } // Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849) -static LLTrace::TimeBlock FTM_REFRESH("Inventory Refresh"); +static LLTrace::BlockTimerStatHandle FTM_REFRESH("Inventory Refresh"); void LLInventoryPanel::modelChanged(U32 mask) { LL_RECORD_BLOCK_TIME(FTM_REFRESH); @@ -1295,7 +1295,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id) } } -LLTrace::TimeBlock FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); +LLTrace::BlockTimerStatHandle FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID"); LLFolderViewItem* LLInventoryPanel::getItemByID(const LLUUID& id) { LL_RECORD_BLOCK_TIME(FTM_GET_ITEM_BY_ID); diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index a3a080ab59..973220007a 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -527,7 +527,7 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) } } -static LLTrace::TimeBlock FTM_MATERIALS_IDLE("Materials"); +static LLTrace::BlockTimerStatHandle FTM_MATERIALS_IDLE("Materials"); void LLMaterialMgr::onIdle(void*) { diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index c13c305791..ff47fa42a9 100755 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -47,7 +47,7 @@ LLPersistentNotificationStorage::~LLPersistentNotificationStorage() { } -static LLTrace::TimeBlock FTM_SAVE_NOTIFICATIONS("Save Notifications"); +static LLTrace::BlockTimerStatHandle FTM_SAVE_NOTIFICATIONS("Save Notifications"); void LLPersistentNotificationStorage::saveNotifications() { @@ -82,7 +82,7 @@ void LLPersistentNotificationStorage::saveNotifications() writeNotifications(output); } -static LLTrace::TimeBlock FTM_LOAD_NOTIFICATIONS("Load Notifications"); +static LLTrace::BlockTimerStatHandle FTM_LOAD_NOTIFICATIONS("Load Notifications"); void LLPersistentNotificationStorage::loadNotifications() { diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 142cda87a4..6c35ae2672 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -331,8 +331,8 @@ bool LLSceneMonitor::needsUpdate() const return mDiffState == NEED_DIFF; } -static LLTrace::TimeBlock FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE("Generate Scene Load Dither Texture"); -static LLTrace::TimeBlock FTM_SCENE_LOAD_IMAGE_DIFF("Scene Load Image Diff"); +static LLTrace::BlockTimerStatHandle FTM_GENERATE_SCENE_LOAD_DITHER_TEXTURE("Generate Scene Load Dither Texture"); +static LLTrace::BlockTimerStatHandle FTM_SCENE_LOAD_IMAGE_DIFF("Scene Load Image Diff"); static LLStaticHashedString sDitherScale("dither_scale"); static LLStaticHashedString sDitherScaleS("dither_scale_s"); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index fbf3c8c401..6a840f3f40 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -49,7 +49,7 @@ using namespace LLNotificationsUI; bool LLScreenChannel::mWasStartUpToastShown = false; -LLTrace::TimeBlock FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); +LLTrace::BlockTimerStatHandle FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region"); LLRect LLScreenChannelBase::getChannelRect() { LL_RECORD_BLOCK_TIME(FTM_GET_CHANNEL_RECT); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index fe4f53425e..449a192332 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -53,8 +53,8 @@ #include "lltextureatlas.h" #include "llviewershadermgr.h" -static LLTrace::TimeBlock FTM_FRUSTUM_CULL("Frustum Culling"); -static LLTrace::TimeBlock FTM_CULL_REBOUND("Cull Rebound Partition"); +static LLTrace::BlockTimerStatHandle FTM_FRUSTUM_CULL("Frustum Culling"); +static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound Partition"); extern bool gShiftFrame; @@ -409,10 +409,10 @@ void LLSpatialGroup::rebuildMesh() } } -static LLTrace::TimeBlock FTM_REBUILD_VBO("VBO Rebuilt"); -static LLTrace::TimeBlock FTM_ADD_GEOMETRY_COUNT("Add Geometry"); -static LLTrace::TimeBlock FTM_CREATE_VB("Create VB"); -static LLTrace::TimeBlock FTM_GET_GEOMETRY("Get Geometry"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_VBO("VBO Rebuilt"); +static LLTrace::BlockTimerStatHandle FTM_ADD_GEOMETRY_COUNT("Add Geometry"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_VB("Create VB"); +static LLTrace::BlockTimerStatHandle FTM_GET_GEOMETRY("Get Geometry"); void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) { diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 6545f35091..ae16372963 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -180,7 +180,7 @@ void display_startup() glClear(GL_DEPTH_BUFFER_BIT); } -static LLTrace::TimeBlock FTM_UPDATE_CAMERA("Update Camera"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Update Camera"); void display_update_camera() { @@ -228,20 +228,20 @@ void display_stats() } } -static LLTrace::TimeBlock FTM_PICK("Picking"); -static LLTrace::TimeBlock FTM_RENDER("Render"); -static LLTrace::TimeBlock FTM_UPDATE_SKY("Update Sky"); -static LLTrace::TimeBlock FTM_UPDATE_TEXTURES("Update Textures"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE("Update Images"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_CLASS("Class"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_BUMP("Image Update Bump"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_LIST("List"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_DELETE("Delete"); -static LLTrace::TimeBlock FTM_RESIZE_WINDOW("Resize Window"); -static LLTrace::TimeBlock FTM_HUD_UPDATE("HUD Update"); -static LLTrace::TimeBlock FTM_DISPLAY_UPDATE_GEOM("Update Geom"); -static LLTrace::TimeBlock FTM_TEXTURE_UNBIND("Texture Unbind"); -static LLTrace::TimeBlock FTM_TELEPORT_DISPLAY("Teleport Display"); +static LLTrace::BlockTimerStatHandle FTM_PICK("Picking"); +static LLTrace::BlockTimerStatHandle FTM_RENDER("Render"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_SKY("Update Sky"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXTURES("Update Textures"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE("Update Images"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_CLASS("Class"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_BUMP("Image Update Bump"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_LIST("List"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_DELETE("Delete"); +static LLTrace::BlockTimerStatHandle FTM_RESIZE_WINDOW("Resize Window"); +static LLTrace::BlockTimerStatHandle FTM_HUD_UPDATE("HUD Update"); +static LLTrace::BlockTimerStatHandle FTM_DISPLAY_UPDATE_GEOM("Update Geom"); +static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UNBIND("Texture Unbind"); +static LLTrace::BlockTimerStatHandle FTM_TELEPORT_DISPLAY("Teleport Display"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) @@ -1331,7 +1331,7 @@ void render_ui(F32 zoom_factor, int subfield) } } -static LLTrace::TimeBlock FTM_SWAP("Swap"); +static LLTrace::BlockTimerStatHandle FTM_SWAP("Swap"); void swap() { diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 39f8249300..3ba91ff3cd 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -172,7 +172,7 @@ void LLViewerFloaterReg::registerFloaters() // *NOTE: Please keep these alphabetized for easier merges LLFloaterAboutUtil::registerFloater(); - LLFloaterReg::add("fast_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("block_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index deabc9c8b3..bf7cf08c63 100755 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -376,7 +376,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 //----------------------------------------------------------------------------- // updateFaceData() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_AVATAR_FACE("Avatar Face"); +static LLTrace::BlockTimerStatHandle FTM_AVATAR_FACE("Avatar Face"); void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 868cb740dc..d8684a5e5c 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -776,12 +776,12 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi } } -static LLTrace::TimeBlock FTM_MEDIA_UPDATE("Update Media"); -static LLTrace::TimeBlock FTM_MEDIA_SPARE_IDLE("Spare Idle"); -static LLTrace::TimeBlock FTM_MEDIA_UPDATE_INTEREST("Update/Interest"); -static LLTrace::TimeBlock FTM_MEDIA_SORT("Sort"); -static LLTrace::TimeBlock FTM_MEDIA_SORT2("Sort 2"); -static LLTrace::TimeBlock FTM_MEDIA_MISC("Misc"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_UPDATE("Update Media"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_SPARE_IDLE("Spare Idle"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_UPDATE_INTEREST("Update/Interest"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_SORT("Sort"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_SORT2("Sort 2"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_MISC("Misc"); ////////////////////////////////////////////////////////////////////////////////////////// @@ -2746,9 +2746,9 @@ bool LLViewerMediaImpl::canNavigateBack() } ////////////////////////////////////////////////////////////////////////////////////////// -static LLTrace::TimeBlock FTM_MEDIA_DO_UPDATE("Do Update"); -static LLTrace::TimeBlock FTM_MEDIA_GET_DATA("Get Data"); -static LLTrace::TimeBlock FTM_MEDIA_SET_SUBIMAGE("Set Subimage"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_DO_UPDATE("Do Update"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_GET_DATA("Get Data"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_SET_SUBIMAGE("Set Subimage"); void LLViewerMediaImpl::update() @@ -3435,7 +3435,7 @@ BOOL LLViewerMediaImpl::isUpdated() return mIsUpdated ; } -static LLTrace::TimeBlock FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest"); +static LLTrace::BlockTimerStatHandle FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest"); void LLViewerMediaImpl::calculateInterest() { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 792394b423..4b0957679c 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -524,7 +524,7 @@ class LLAdvancedToggleConsole : public view_listener_t } else if ("fast timers" == console_type) { - LLFloaterReg::toggleInstance("fast_timers"); + LLFloaterReg::toggleInstance("block_timers"); } else if ("scene view" == console_type) { @@ -550,7 +550,7 @@ class LLAdvancedCheckConsole : public view_listener_t } else if ("fast timers" == console_type) { - new_value = LLFloaterReg::instanceVisible("fast_timers"); + new_value = LLFloaterReg::instanceVisible("block_timers"); } else if ("scene view" == console_type) { @@ -7491,7 +7491,7 @@ void handle_dump_avatar_local_textures(void*) void handle_dump_timers() { - LLTrace::TimeBlock::dumpCurTimes(); + LLTrace::BlockTimerStatHandle::dumpCurTimes(); } void handle_debug_avatar_textures(void*) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b8d3d0387c..10df15a836 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4245,7 +4245,7 @@ const F32 THRESHOLD_HEAD_ROT_QDOT = 0.9997f; // ~= 2.5 degrees -- if its less th const F32 MAX_HEAD_ROT_QDOT = 0.99999f; // ~= 0.5 degrees -- if its greater than this then no need to update head_rot // between these values we delay the updates (but no more than one second) -static LLTrace::TimeBlock FTM_AGENT_UPDATE_SEND("Send Message"); +static LLTrace::BlockTimerStatHandle FTM_AGENT_UPDATE_SEND("Send Message"); void send_agent_update(BOOL force_send, BOOL send_reliable) { @@ -4560,7 +4560,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Kill Objects"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Kill Objects"); void process_kill_object(LLMessageSystem *mesgsys, void **user_data) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9f49e8aff5..2dbcdeeb64 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -132,7 +132,7 @@ std::map LLViewerObject::sObjectDataMap; const F32 PHYSICS_TIMESTEP = 1.f / 45.f; -static LLTrace::TimeBlock FTM_CREATE_OBJECT("Create Object"); +static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object"); // static LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) @@ -2409,7 +2409,7 @@ void LLViewerObject::loadFlags(U32 flags) void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - //static LLTrace::TimeBlock ftm("Viewer Object"); + //static LLTrace::BlockTimerStatHandle ftm("Viewer Object"); //LL_RECORD_BLOCK_TIME(ftm); if (!mDead) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 686eff8426..861fc1b8bc 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -289,7 +289,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLTrace::TimeBlock FTM_PROCESS_OBJECTS("Process Objects"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_OBJECTS("Process Objects"); LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* entry, LLViewerRegion* regionp) { @@ -978,7 +978,7 @@ private: LLSD mObjectIDs; }; -static LLTrace::TimeBlock FTM_IDLE_COPY("Idle Copy"); +static LLTrace::BlockTimerStatHandle FTM_IDLE_COPY("Idle Copy"); void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { @@ -1328,7 +1328,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) mNumDeadObjects++; } -static LLTrace::TimeBlock FTM_REMOVE_DRAWABLE("Remove Drawable"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_DRAWABLE("Remove Drawable"); void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) { @@ -1617,9 +1617,9 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id) mPendingPhysicsFlags.erase(object_id); } -static LLTrace::TimeBlock FTM_SHIFT_OBJECTS("Shift Objects"); -static LLTrace::TimeBlock FTM_PIPELINE_SHIFT("Pipeline Shift"); -static LLTrace::TimeBlock FTM_REGION_SHIFT("Region Shift"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_OBJECTS("Shift Objects"); +static LLTrace::BlockTimerStatHandle FTM_PIPELINE_SHIFT("Pipeline Shift"); +static LLTrace::BlockTimerStatHandle FTM_REGION_SHIFT("Region Shift"); void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index ce8eef7d86..e390249504 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1020,8 +1020,8 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode) } } -static LLTrace::TimeBlock FTM_OCCLUSION_READBACK("Readback Occlusion"); -static LLTrace::TimeBlock FTM_OCCLUSION_WAIT("Occlusion Wait"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_READBACK("Readback Occlusion"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_WAIT("Occlusion Wait"); BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds) { @@ -1158,16 +1158,16 @@ void LLOcclusionCullingGroup::checkOcclusion() } } -static LLTrace::TimeBlock FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); -static LLTrace::TimeBlock FTM_SET_OCCLUSION_STATE("Occlusion State"); -static LLTrace::TimeBlock FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); -static LLTrace::TimeBlock FTM_OCCLUSION_ALLOCATE("Allocate"); -static LLTrace::TimeBlock FTM_OCCLUSION_BUILD("Build"); -static LLTrace::TimeBlock FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); -static LLTrace::TimeBlock FTM_OCCLUSION_END_QUERY("End Query"); -static LLTrace::TimeBlock FTM_OCCLUSION_SET_BUFFER("Set Buffer"); -static LLTrace::TimeBlock FTM_OCCLUSION_DRAW_WATER("Draw Water"); -static LLTrace::TimeBlock FTM_OCCLUSION_DRAW("Draw"); +static LLTrace::BlockTimerStatHandle FTM_PUSH_OCCLUSION_VERTS("Push Occlusion"); +static LLTrace::BlockTimerStatHandle FTM_SET_OCCLUSION_STATE("Occlusion State"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_ALLOCATE("Allocate"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_BUILD("Build"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_BEGIN_QUERY("Begin Query"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_END_QUERY("End Query"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_SET_BUFFER("Set Buffer"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_DRAW_WATER("Draw Water"); +static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_DRAW("Draw"); void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* shift) { diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index cdb58f76d0..76418ad6a6 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -657,7 +657,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLTrace::TimeBlock FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLTrace::BlockTimerStatHandle FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { diff --git a/indra/newview/llviewerprecompiledheaders.cpp b/indra/newview/llviewerprecompiledheaders.cpp index 768f1f3387..307e903726 100755 --- a/indra/newview/llviewerprecompiledheaders.cpp +++ b/indra/newview/llviewerprecompiledheaders.cpp @@ -26,7 +26,7 @@ // source file that includes just the standard includes // newview.pch will be the pre-compiled header -// llviewerprecompiledheaders.obj will contain the pre-compllviewiled type information +// llviewerprecompiledheaders.obj will contain the pre-compiled type information #include "llviewerprecompiledheaders.h" diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 09bf022008..405fcff584 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -455,7 +455,7 @@ const S32 min_non_tex_system_mem = (128<<20); // 128 MB F32 texmem_lower_bound_scale = 0.85f; F32 texmem_middle_bound_scale = 0.925f; -static LLTrace::TimeBlock FTM_TEXTURE_MEMORY_CHECK("Memory Check"); +static LLTrace::BlockTimerStatHandle FTM_TEXTURE_MEMORY_CHECK("Memory Check"); //static bool LLViewerTexture::isMemoryForTextureLow() @@ -510,8 +510,8 @@ bool LLViewerTexture::isMemoryForTextureLow() return low_mem; } -static LLTrace::TimeBlock FTM_TEXTURE_UPDATE_MEDIA("Media"); -static LLTrace::TimeBlock FTM_TEXTURE_UPDATE_TEST("Test"); +static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UPDATE_MEDIA("Media"); +static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UPDATE_TEST("Test"); //static void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index cfcbe655b8..2f887d7185 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -68,7 +68,7 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; S32 LLViewerTextureList::sNumImages = 0; LLViewerTextureList gTextureList; -static LLTrace::TimeBlock FTM_PROCESS_IMAGES("Process Images"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -662,14 +662,14 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLTrace::TimeBlock FTM_IMAGE_MARK_DIRTY("Dirty Images"); -static LLTrace::TimeBlock FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); -static LLTrace::TimeBlock FTM_IMAGE_CALLBACKS("Callbacks"); -static LLTrace::TimeBlock FTM_IMAGE_FETCH("Fetch"); -static LLTrace::TimeBlock FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); -static LLTrace::TimeBlock FTM_IMAGE_CREATE("Create"); -static LLTrace::TimeBlock FTM_IMAGE_STATS("Stats"); -static LLTrace::TimeBlock FTM_UPDATE_IMAGES("Update Images"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_CALLBACKS("Callbacks"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_FETCH("Fetch"); +static LLTrace::BlockTimerStatHandle FTM_FAST_CACHE_IMAGE_FETCH("Fast Cache Fetch"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_CREATE("Create"); +static LLTrace::BlockTimerStatHandle FTM_IMAGE_STATS("Stats"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_IMAGES("Update Images"); void LLViewerTextureList::updateImages(F32 max_time) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 844f4344e0..3e1ffa573e 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -288,7 +288,7 @@ public: // LLDebugText // -static LLTrace::TimeBlock FTM_DISPLAY_DEBUG_TEXT("Display Debug Text"); +static LLTrace::BlockTimerStatHandle FTM_DISPLAY_DEBUG_TEXT("Display Debug Text"); class LLDebugText { @@ -2839,7 +2839,7 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params) } } -static LLTrace::TimeBlock ftm("Update UI"); +static LLTrace::BlockTimerStatHandle ftm("Update UI"); // Update UI based on stored mouse position from mouse-move // event processing. @@ -3417,7 +3417,7 @@ void LLViewerWindow::updateKeyboardFocus() } } -static LLTrace::TimeBlock FTM_UPDATE_WORLD_VIEW("Update World View"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_WORLD_VIEW("Update World View"); void LLViewerWindow::updateWorldViewRect(bool use_full_window) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_WORLD_VIEW); @@ -4914,7 +4914,7 @@ void LLViewerWindow::requestResolutionUpdate() mResDirty = true; } -static LLTrace::TimeBlock FTM_WINDOW_CHECK_SETTINGS("Window Settings"); +static LLTrace::BlockTimerStatHandle FTM_WINDOW_CHECK_SETTINGS("Window Settings"); void LLViewerWindow::checkSettings() { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 64b4b2ee25..f6029f3bcd 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1929,8 +1929,8 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) return setTETextureCore(te, image); } -static LLTrace::TimeBlock FTM_AVATAR_UPDATE("Avatar Update"); -static LLTrace::TimeBlock FTM_JOINT_UPDATE("Update Joints"); +static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE("Avatar Update"); +static LLTrace::BlockTimerStatHandle FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ // LLVOAvatar::dumpAnimationState() @@ -2169,7 +2169,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) }//if ( voiceEnabled ) } -static LLTrace::TimeBlock FTM_ATTACHMENT_UPDATE("Update Attachments"); +static LLTrace::BlockTimerStatHandle FTM_ATTACHMENT_UPDATE("Update Attachments"); void LLVOAvatar::idleUpdateMisc(bool detailed_update) { @@ -5426,7 +5426,7 @@ void LLVOAvatar::updateGL() //----------------------------------------------------------------------------- // updateGeometry() //----------------------------------------------------------------------------- -static LLTrace::TimeBlock FTM_UPDATE_AVATAR("Update Avatar"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_AVATAR("Update Avatar"); BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_AVATAR); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 7aee0efe69..3d4d7aaa81 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -412,7 +412,7 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLTrace::TimeBlock FTM_UPDATE_GRASS("Update Grass"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_GRASS("Update Grass"); BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { @@ -671,7 +671,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count } } -static LLTrace::TimeBlock FTM_REBUILD_GRASS_VB("Grass VB"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_GRASS_VB("Grass VB"); void LLGrassPartition::getGeometry(LLSpatialGroup* group) { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 42211202f8..de553e9c42 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6314,7 +6314,7 @@ LLVivoxProtocolParser::~LLVivoxProtocolParser() XML_ParserFree(parser); } -static LLTrace::TimeBlock FTM_VIVOX_PROCESS("Vivox Process"); +static LLTrace::BlockTimerStatHandle FTM_VIVOX_PROCESS("Vivox Process"); // virtual LLIOPipe::EStatus LLVivoxProtocolParser::process_impl( diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index cfc35692a8..f7289bcfaa 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -292,7 +292,7 @@ LLVector3 LLVOPartGroup::getCameraPosition() const return gAgentCamera.getCameraPositionAgent(); } -static LLTrace::TimeBlock FTM_UPDATE_PARTICLES("Update Particles"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_PARTICLES("Update Particles"); BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_PARTICLES); @@ -739,7 +739,7 @@ LLHUDParticlePartition::LLHUDParticlePartition(LLViewerRegion* regionp) : mPartitionType = LLViewerRegion::PARTITION_HUD_PARTICLE; } -static LLTrace::TimeBlock FTM_REBUILD_PARTICLE_VBO("Particle VBO"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_PARTICLE_VBO("Particle VBO"); void LLParticlePartition::rebuildGeom(LLSpatialGroup* group) { @@ -828,7 +828,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co } -static LLTrace::TimeBlock FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 00e52531d6..7bbcd3b709 100755 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1243,7 +1243,7 @@ void LLVOSky::createDummyVertexBuffer() } } -static LLTrace::TimeBlock FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); void LLVOSky::updateDummyVertexBuffer() { @@ -1269,7 +1269,7 @@ void LLVOSky::updateDummyVertexBuffer() //---------------------------------- //end of fake vertex buffer updating //---------------------------------- -static LLTrace::TimeBlock FTM_GEO_SKY("Sky Geometry"); +static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Sky Geometry"); BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index c77ba26ba3..79e1921f1b 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -212,7 +212,7 @@ LLDrawable *LLVOSurfacePatch::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLTrace::TimeBlock FTM_UPDATE_TERRAIN("Update Terrain"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TERRAIN("Update Terrain"); void LLVOSurfacePatch::updateGL() { @@ -1070,7 +1070,7 @@ LLVertexBuffer* LLTerrainPartition::createVertexBuffer(U32 type_mask, U32 usage) return new LLVertexBufferTerrain(); } -static LLTrace::TimeBlock FTM_REBUILD_TERRAIN_VB("Terrain VB"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_TERRAIN_VB("Terrain VB"); void LLTerrainPartition::getGeometry(LLSpatialGroup* group) { LL_RECORD_BLOCK_TIME(FTM_REBUILD_TERRAIN_VB); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index dad8ba09fe..d33812ea68 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -479,7 +479,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -static LLTrace::TimeBlock FTM_UPDATE_TREE("Update Tree"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_TREE("Update Tree"); BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ae18410ed1..52c4c24686 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -96,9 +96,9 @@ S32 LLVOVolume::mRenderComplexity_current = 0; LLPointer LLVOVolume::sObjectMediaClient = NULL; LLPointer LLVOVolume::sObjectMediaNavigateClient = NULL; -static LLTrace::TimeBlock FTM_GEN_TRIANGLES("Generate Triangles"); -static LLTrace::TimeBlock FTM_GEN_VOLUME("Generate Volumes"); -static LLTrace::TimeBlock FTM_VOLUME_TEXTURES("Volume Textures"); +static LLTrace::BlockTimerStatHandle FTM_GEN_TRIANGLES("Generate Triangles"); +static LLTrace::BlockTimerStatHandle FTM_GEN_VOLUME("Generate Volumes"); +static LLTrace::BlockTimerStatHandle FTM_VOLUME_TEXTURES("Volume Textures"); extern BOOL gGLDebugLoggingEnabled; @@ -1630,9 +1630,9 @@ void LLVOVolume::updateRelativeXform(bool force_identity) } } -static LLTrace::TimeBlock FTM_GEN_FLEX("Generate Flexies"); -static LLTrace::TimeBlock FTM_UPDATE_PRIMITIVES("Update Primitives"); -static LLTrace::TimeBlock FTM_UPDATE_RIGGED_VOLUME("Update Rigged"); +static LLTrace::BlockTimerStatHandle FTM_GEN_FLEX("Generate Flexies"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_PRIMITIVES("Update Primitives"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_RIGGED_VOLUME("Update Rigged"); BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { @@ -3917,8 +3917,8 @@ void LLVOVolume::updateRiggedVolume() } -static LLTrace::TimeBlock FTM_SKIN_RIGGED("Skin"); -static LLTrace::TimeBlock FTM_RIGGED_OCTREE("Octree"); +static LLTrace::BlockTimerStatHandle FTM_SKIN_RIGGED("Skin"); +static LLTrace::BlockTimerStatHandle FTM_RIGGED_OCTREE("Octree"); void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* volume) { @@ -4115,7 +4115,7 @@ bool can_batch_texture(LLFace* facep) return true; } -static LLTrace::TimeBlock FTM_REGISTER_FACE("Register Face"); +static LLTrace::BlockTimerStatHandle FTM_REGISTER_FACE("Register Face"); void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type) { @@ -4346,9 +4346,9 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -static LLTrace::TimeBlock FTM_REBUILD_VOLUME_VB("Volume VB"); -static LLTrace::TimeBlock FTM_REBUILD_VOLUME_FACE_LIST("Build Face List"); -static LLTrace::TimeBlock FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_VB("Volume VB"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_FACE_LIST("Build Face List"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_VOLUME_GEN_DRAW_INFO("Gen Draw Info"); static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj) { @@ -5047,7 +5047,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } } -static LLFastTimer::DeclareTimer FTM_REBUILD_MESH_FLUSH("Flush Mesh"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_MESH_FLUSH("Flush Mesh"); void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { @@ -5195,11 +5195,11 @@ struct CompareBatchBreakerModified } }; -static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort"); -static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing"); -static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB"); -static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_FIND_VB("Find VB"); -static LLTrace::TimeBlock FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB"); +static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_SORT("Draw Info Face Sort"); +static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FACE_SIZE("Face Sizing"); +static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_ALLOCATE("Allocate VB"); +static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_FIND_VB("Find VB"); +static LLTrace::BlockTimerStatHandle FTM_GEN_DRAW_INFO_RESIZE_VB("Resize VB"); diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 9f01e56284..a140d927a5 100755 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -123,7 +123,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLTrace::TimeBlock FTM_UPDATE_WATER("Update Water"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_WATER("Update Water"); BOOL LLVOWater::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index e798a6eb51..3a2ced9f72 100755 --- 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 LLTrace::TimeBlock FTM_GEO_SKY("Windlight Sky Geometry"); +static LLTrace::BlockTimerStatHandle FTM_GEO_SKY("Windlight Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index b30475d7df..c854e1fc66 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -215,7 +215,7 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate) } } -static LLTrace::TimeBlock FTM_UPDATE_WATERPARAM("Update Water Params"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERPARAM("Update Water Params"); void LLWaterParamManager::update(LLViewerCamera * cam) { diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index a6cc651eda..91ea10d43d 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -364,7 +364,7 @@ void LLWLParamManager::updateShaderUniforms(LLGLSLShader * shader) } -static LLTrace::TimeBlock FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_WLPARAM("Update Windlight Params"); void LLWLParamManager::propagateParameters(void) { diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 58f10e9078..066cb9a0ac 100755 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -60,7 +60,7 @@ LLWLParamSet::LLWLParamSet(void) : mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f) {} -static LLTrace::TimeBlock FTM_WL_PARAM_UPDATE("WL Param Update"); +static LLTrace::BlockTimerStatHandle FTM_WL_PARAM_UPDATE("WL Param Update"); void LLWLParamSet::update(LLGLSLShader * shader) const { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index e4e0a745ce..1940bdcccc 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1035,7 +1035,7 @@ void LLWorld::disconnectRegions() } } -static LLTrace::TimeBlock FTM_ENABLE_SIMULATOR("Enable Sim"); +static LLTrace::BlockTimerStatHandle FTM_ENABLE_SIMULATOR("Enable Sim"); void process_enable_simulator(LLMessageSystem *msg, void **user_data) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index aba26bf586..5983fee222 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -228,40 +228,40 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLTrace::TimeBlock FTM_RENDER_GEOMETRY("Render Geometry"); -LLTrace::TimeBlock FTM_RENDER_GRASS("Grass"); -LLTrace::TimeBlock FTM_RENDER_INVISIBLE("Invisible"); -LLTrace::TimeBlock FTM_RENDER_OCCLUSION("Occlusion"); -LLTrace::TimeBlock FTM_RENDER_SHINY("Shiny"); -LLTrace::TimeBlock FTM_RENDER_SIMPLE("Simple"); -LLTrace::TimeBlock FTM_RENDER_TERRAIN("Terrain"); -LLTrace::TimeBlock FTM_RENDER_TREES("Trees"); -LLTrace::TimeBlock FTM_RENDER_UI("UI"); -LLTrace::TimeBlock FTM_RENDER_WATER("Water"); -LLTrace::TimeBlock FTM_RENDER_WL_SKY("Windlight Sky"); -LLTrace::TimeBlock FTM_RENDER_ALPHA("Alpha Objects"); -LLTrace::TimeBlock FTM_RENDER_CHARACTERS("Avatars"); -LLTrace::TimeBlock FTM_RENDER_BUMP("Bump"); -LLTrace::TimeBlock FTM_RENDER_MATERIALS("Materials"); -LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT("Fullbright"); -LLTrace::TimeBlock FTM_RENDER_GLOW("Glow"); -LLTrace::TimeBlock FTM_GEO_UPDATE("Geo Update"); -LLTrace::TimeBlock FTM_PIPELINE_CREATE("Pipeline Create"); -LLTrace::TimeBlock FTM_POOLRENDER("RenderPool"); -LLTrace::TimeBlock FTM_POOLS("Pools"); -LLTrace::TimeBlock FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); -LLTrace::TimeBlock FTM_DEFERRED_POOLS("Pools (Deferred)"); -LLTrace::TimeBlock FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); -LLTrace::TimeBlock FTM_POST_DEFERRED_POOLS("Pools (Post)"); -LLTrace::TimeBlock FTM_RENDER_BLOOM_FBO("First FBO"); -LLTrace::TimeBlock FTM_STATESORT("Sort Draw State"); -LLTrace::TimeBlock FTM_PIPELINE("Pipeline"); -LLTrace::TimeBlock FTM_CLIENT_COPY("Client Copy"); -LLTrace::TimeBlock FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLTrace::TimeBlock FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLTrace::TimeBlock FTM_STATESORT_POSTSORT("Post Sort"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GEOMETRY("Render Geometry"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS("Grass"); +LLTrace::BlockTimerStatHandle FTM_RENDER_INVISIBLE("Invisible"); +LLTrace::BlockTimerStatHandle FTM_RENDER_OCCLUSION("Occlusion"); +LLTrace::BlockTimerStatHandle FTM_RENDER_SHINY("Shiny"); +LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE("Simple"); +LLTrace::BlockTimerStatHandle FTM_RENDER_TERRAIN("Terrain"); +LLTrace::BlockTimerStatHandle FTM_RENDER_TREES("Trees"); +LLTrace::BlockTimerStatHandle FTM_RENDER_UI("UI"); +LLTrace::BlockTimerStatHandle FTM_RENDER_WATER("Water"); +LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY("Windlight Sky"); +LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA("Alpha Objects"); +LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS("Avatars"); +LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP("Bump"); +LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS("Materials"); +LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT("Fullbright"); +LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW("Glow"); +LLTrace::BlockTimerStatHandle FTM_GEO_UPDATE("Geo Update"); +LLTrace::BlockTimerStatHandle FTM_PIPELINE_CREATE("Pipeline Create"); +LLTrace::BlockTimerStatHandle FTM_POOLRENDER("RenderPool"); +LLTrace::BlockTimerStatHandle FTM_POOLS("Pools"); +LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)"); +LLTrace::BlockTimerStatHandle FTM_DEFERRED_POOLS("Pools (Deferred)"); +LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)"); +LLTrace::BlockTimerStatHandle FTM_POST_DEFERRED_POOLS("Pools (Post)"); +LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM_FBO("First FBO"); +LLTrace::BlockTimerStatHandle FTM_STATESORT("Sort Draw State"); +LLTrace::BlockTimerStatHandle FTM_PIPELINE("Pipeline"); +LLTrace::BlockTimerStatHandle FTM_CLIENT_COPY("Client Copy"); +LLTrace::BlockTimerStatHandle FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLTrace::BlockTimerStatHandle FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLTrace::BlockTimerStatHandle FTM_STATESORT_POSTSORT("Post Sort"); static LLStaticHashedString sTint("tint"); static LLStaticHashedString sAmbiance("ambiance"); @@ -772,7 +772,7 @@ void LLPipeline::destroyGL() } } -static LLTrace::TimeBlock FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static void LLPipeline::throttleNewMemoryAllocation(BOOL disable) @@ -1821,11 +1821,11 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) } -static LLTrace::TimeBlock FTM_UNLINK("Unlink"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_MOVE_LIST("Movelist"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_LIGHT_SET("Light Set"); -static LLTrace::TimeBlock FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); +static LLTrace::BlockTimerStatHandle FTM_UNLINK("Unlink"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_MOVE_LIST("Movelist"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_LIGHT_SET("Light Set"); +static LLTrace::BlockTimerStatHandle FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); void LLPipeline::unlinkDrawable(LLDrawable *drawable) { @@ -2101,10 +2101,10 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) } } -static LLTrace::TimeBlock FTM_OCTREE_BALANCE("Balance Octree"); -static LLTrace::TimeBlock FTM_UPDATE_MOVE("Update Move"); -static LLTrace::TimeBlock FTM_RETEXTURE("Retexture"); -static LLTrace::TimeBlock FTM_MOVED_LIST("Moved List"); +static LLTrace::BlockTimerStatHandle FTM_OCTREE_BALANCE("Balance Octree"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_MOVE("Update Move"); +static LLTrace::BlockTimerStatHandle FTM_RETEXTURE("Retexture"); +static LLTrace::BlockTimerStatHandle FTM_MOVED_LIST("Moved List"); void LLPipeline::updateMove() { @@ -2465,7 +2465,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLTrace::TimeBlock FTM_CULL("Object Culling"); +static LLTrace::BlockTimerStatHandle FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { @@ -2869,9 +2869,9 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) return update_complete; } -static LLTrace::TimeBlock FTM_SEED_VBO_POOLS("Seed VBO Pool"); +static LLTrace::BlockTimerStatHandle FTM_SEED_VBO_POOLS("Seed VBO Pool"); -static LLTrace::TimeBlock FTM_UPDATE_GL("Update GL"); +static LLTrace::BlockTimerStatHandle FTM_UPDATE_GL("Update GL"); void LLPipeline::updateGL() { @@ -2892,7 +2892,7 @@ void LLPipeline::updateGL() } } -static LLTrace::TimeBlock FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups"); void LLPipeline::clearRebuildGroups() { @@ -3022,7 +3022,7 @@ void LLPipeline::rebuildPriorityGroups() } -static LLTrace::TimeBlock FTM_REBUILD_GROUPS("Rebuild Groups"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_GROUPS("Rebuild Groups"); void LLPipeline::rebuildGroups() { @@ -3268,9 +3268,9 @@ void LLPipeline::markShift(LLDrawable *drawablep) } } -static LLTrace::TimeBlock FTM_SHIFT_DRAWABLE("Shift Drawable"); -static LLTrace::TimeBlock FTM_SHIFT_OCTREE("Shift Octree"); -static LLTrace::TimeBlock FTM_SHIFT_HUD("Shift HUD"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_DRAWABLE("Shift Drawable"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_OCTREE("Shift Octree"); +static LLTrace::BlockTimerStatHandle FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { @@ -3352,7 +3352,7 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable) } } -static LLTrace::TimeBlock FTM_PROCESS_PARTITIONQ("PartitionQ"); +static LLTrace::BlockTimerStatHandle FTM_PROCESS_PARTITIONQ("PartitionQ"); void LLPipeline::processPartitionQ() { LL_RECORD_BLOCK_TIME(FTM_PROCESS_PARTITIONQ); @@ -3443,7 +3443,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLTrace::TimeBlock FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLTrace::BlockTimerStatHandle FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -5668,7 +5668,7 @@ void LLPipeline::renderDebug() } } -static LLTrace::TimeBlock FTM_REBUILD_POOLS("Rebuild Pools"); +static LLTrace::BlockTimerStatHandle FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { @@ -7383,7 +7383,7 @@ void LLPipeline::resetVertexBuffers() mResetVertexBuffers = true; } -static LLTrace::TimeBlock FTM_RESET_VB("Reset VB"); +static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB"); void LLPipeline::doResetVertexBuffers() { @@ -7544,7 +7544,7 @@ void LLPipeline::bindScreenToTexture() } -static LLTrace::TimeBlock FTM_RENDER_BLOOM("Bloom"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { @@ -8201,7 +8201,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) } -static LLTrace::TimeBlock FTM_BIND_DEFERRED("Bind Deferred"); +static LLTrace::BlockTimerStatHandle FTM_BIND_DEFERRED("Bind Deferred"); void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map) { @@ -8426,16 +8426,16 @@ LLVector4 pow4fsrgb(LLVector4 v, F32 f) return v; } -static LLTrace::TimeBlock FTM_GI_TRACE("Trace"); -static LLTrace::TimeBlock FTM_GI_GATHER("Gather"); -static LLTrace::TimeBlock FTM_SUN_SHADOW("Shadow Map"); -static LLTrace::TimeBlock FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLTrace::TimeBlock FTM_EDGE_DETECTION("Find Edges"); -static LLTrace::TimeBlock FTM_LOCAL_LIGHTS("Local Lights"); -static LLTrace::TimeBlock FTM_ATMOSPHERICS("Atmospherics"); -static LLTrace::TimeBlock FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLTrace::TimeBlock FTM_PROJECTORS("Projectors"); -static LLTrace::TimeBlock FTM_POST("Post"); +static LLTrace::BlockTimerStatHandle FTM_GI_TRACE("Trace"); +static LLTrace::BlockTimerStatHandle FTM_GI_GATHER("Gather"); +static LLTrace::BlockTimerStatHandle FTM_SUN_SHADOW("Shadow Map"); +static LLTrace::BlockTimerStatHandle FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLTrace::BlockTimerStatHandle FTM_EDGE_DETECTION("Find Edges"); +static LLTrace::BlockTimerStatHandle FTM_LOCAL_LIGHTS("Local Lights"); +static LLTrace::BlockTimerStatHandle FTM_ATMOSPHERICS("Atmospherics"); +static LLTrace::BlockTimerStatHandle FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLTrace::BlockTimerStatHandle FTM_PROJECTORS("Projectors"); +static LLTrace::BlockTimerStatHandle FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -10143,9 +10143,9 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLTrace::TimeBlock FTM_SHADOW_RENDER("Render Shadows"); -static LLTrace::TimeBlock FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLTrace::TimeBlock FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) { @@ -10303,7 +10303,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera LLPipeline::sShadowRender = FALSE; } -static LLTrace::TimeBlock FTM_VISIBLE_CLOUD("Visible Cloud"); +static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud"); BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) { LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); @@ -10553,7 +10553,7 @@ void LLPipeline::generateHighlight(LLCamera& camera) } -static LLTrace::TimeBlock FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); +static LLTrace::BlockTimerStatHandle FTM_GEN_SUN_SHADOW("Gen Sun Shadow"); void LLPipeline::generateSunShadow(LLCamera& camera) { @@ -11343,11 +11343,11 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu } } -static LLTrace::TimeBlock FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); -static LLTrace::TimeBlock FTM_IMPOSTOR_SETUP("Impostor Setup"); -static LLTrace::TimeBlock FTM_IMPOSTOR_BACKGROUND("Impostor Background"); -static LLTrace::TimeBlock FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); -static LLTrace::TimeBlock FTM_IMPOSTOR_RESIZE("Impostor Resize"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_SETUP("Impostor Setup"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_BACKGROUND("Impostor Background"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_ALLOCATE("Impostor Allocate"); +static LLTrace::BlockTimerStatHandle FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index bfcd0eec6b..469c7b329e 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -70,26 +70,26 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up); -extern LLTrace::TimeBlock FTM_RENDER_GEOMETRY; -extern LLTrace::TimeBlock FTM_RENDER_GRASS; -extern LLTrace::TimeBlock FTM_RENDER_INVISIBLE; -extern LLTrace::TimeBlock FTM_RENDER_OCCLUSION; -extern LLTrace::TimeBlock FTM_RENDER_SHINY; -extern LLTrace::TimeBlock FTM_RENDER_SIMPLE; -extern LLTrace::TimeBlock FTM_RENDER_TERRAIN; -extern LLTrace::TimeBlock FTM_RENDER_TREES; -extern LLTrace::TimeBlock FTM_RENDER_UI; -extern LLTrace::TimeBlock FTM_RENDER_WATER; -extern LLTrace::TimeBlock FTM_RENDER_WL_SKY; -extern LLTrace::TimeBlock FTM_RENDER_ALPHA; -extern LLTrace::TimeBlock FTM_RENDER_CHARACTERS; -extern LLTrace::TimeBlock FTM_RENDER_BUMP; -extern LLTrace::TimeBlock FTM_RENDER_MATERIALS; -extern LLTrace::TimeBlock FTM_RENDER_FULLBRIGHT; -extern LLTrace::TimeBlock FTM_RENDER_GLOW; -extern LLTrace::TimeBlock FTM_STATESORT; -extern LLTrace::TimeBlock FTM_PIPELINE; -extern LLTrace::TimeBlock FTM_CLIENT_COPY; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_GEOMETRY; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_GRASS; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_INVISIBLE; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_OCCLUSION; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_SHINY; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_SIMPLE; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_TERRAIN; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_TREES; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_UI; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_WATER; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_WL_SKY; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_CHARACTERS; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_BUMP; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_MATERIALS; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_FULLBRIGHT; +extern LLTrace::BlockTimerStatHandle FTM_RENDER_GLOW; +extern LLTrace::BlockTimerStatHandle FTM_STATESORT; +extern LLTrace::BlockTimerStatHandle FTM_PIPELINE; +extern LLTrace::BlockTimerStatHandle FTM_CLIENT_COPY; class LLPipeline -- cgit v1.3 From c4fc085f74392d8bd2746134e703edbbbc911012 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 6 Nov 2013 18:16:57 -0800 Subject: fixed some warnings --- indra/llui/llfloater.cpp | 2 +- indra/llui/lluictrl.cpp | 8 ++++---- indra/llui/llview.cpp | 6 +++--- indra/llui/llviewereventrecorder.cpp | 30 +++++++++++++++--------------- indra/newview/llfacebookconnect.cpp | 4 ++-- indra/newview/llsnapshotlivepreview.cpp | 4 ++-- indra/newview/llviewermenu.cpp | 8 ++++---- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerwindow.cpp | 18 +++++++++--------- indra/newview/llvoavatar.cpp | 2 +- 10 files changed, 42 insertions(+), 42 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d12f8a032d..513a7e2ab0 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1549,7 +1549,7 @@ BOOL LLFloater::handleScrollWheel(S32 x, S32 y, S32 clicks) // virtual BOOL LLFloater::handleMouseUp(S32 x, S32 y, MASK mask) { - lldebugs << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << llendl; + LL_DEBUGS() << "LLFloater::handleMouseUp calling LLPanel (really LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL; BOOL handled = LLPanel::handleMouseUp(x,y,mask); // Not implemented in LLPanel so this actually calls LLView if (handled) { LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-55,-55,getPathname()); diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 8f075771a8..df74e113e9 100755 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -312,7 +312,7 @@ void LLUICtrl::onMouseLeave(S32 x, S32 y, MASK mask) BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask) { - lldebugs << "LLUICtrl::handleMouseDown calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << llendl; + LL_DEBUGS() << "LLUICtrl::handleMouseDown calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL; BOOL handled = LLView::handleMouseDown(x,y,mask); @@ -320,7 +320,7 @@ BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask) { (*mMouseDownSignal)(this,x,y,mask); } - lldebugs << "LLUICtrl::handleMousedown - handled is returning as: " << handled << " " << llendl; + LL_DEBUGS() << "LLUICtrl::handleMousedown - handled is returning as: " << handled << " " << LL_ENDL; if (handled) { LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-56,-56,getPathname()); @@ -332,7 +332,7 @@ BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask) { - lldebugs << "LLUICtrl::handleMouseUp calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << llendl; + LL_DEBUGS() << "LLUICtrl::handleMouseUp calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL; BOOL handled = LLView::handleMouseUp(x,y,mask); if (handled) { @@ -343,7 +343,7 @@ BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask) (*mMouseUpSignal)(this,x,y,mask); } - lldebugs << "LLUICtrl::handleMouseUp - handled for xui " << getPathname() << " - is returning as: " << handled << " " << llendl; + LL_DEBUGS() << "LLUICtrl::handleMouseUp - handled for xui " << getPathname() << " - is returning as: " << handled << " " << LL_ENDL; return handled; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 7f21522942..357948b6fe 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -603,7 +603,7 @@ void LLView::onVisibilityChange ( BOOL new_visibility ) // Consider changing returns to confirm success and know which widget grabbed it // For now assume success and log at highest xui possible // NOTE we log actual state - which may differ if it somehow failed to set visibility - lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl; + LL_DEBUGS() << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << LL_ENDL; } } @@ -700,8 +700,8 @@ LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDA if ((viewp->*method)( local_x, local_y, extra ) || (allow_mouse_block && viewp->blockMouseEvent( local_x, local_y ))) { - lldebugs << "LLView::childrenHandleMouseEvent calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << llendl; - lldebugs << "LLView::childrenHandleMouseEvent getPathname for viewp result: " << viewp->getPathname() << "for this view: " << getPathname() << llendl; + LL_DEBUGS() << "LLView::childrenHandleMouseEvent calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL; + LL_DEBUGS() << "LLView::childrenHandleMouseEvent getPathname for viewp result: " << viewp->getPathname() << "for this view: " << getPathname() << LL_ENDL; LLViewerEventRecorder::instance().updateMouseEventInfo(x,y,-55,-55,getPathname()); diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp index a352f621eb..556b45a9ba 100644 --- a/indra/llui/llviewereventrecorder.cpp +++ b/indra/llui/llviewereventrecorder.cpp @@ -53,14 +53,14 @@ void LLViewerEventRecorder::setEventLoggingOn() { mLog.open(mLogFilename, llofstream::out); } logEvents=true; - lldebugs << "LLViewerEventRecorder::setEventLoggingOn event logging turned on" << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::setEventLoggingOn event logging turned on" << LL_ENDL; } void LLViewerEventRecorder::setEventLoggingOff() { logEvents=false; mLog.flush(); mLog.close(); - lldebugs << "LLViewerEventRecorder::setEventLoggingOff event logging turned off" << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::setEventLoggingOff event logging turned off" << LL_ENDL; } @@ -101,10 +101,10 @@ void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 g LLView * target_view = LLUI::resolvePath(LLUI::getRootView(), xui); if (! target_view) { - lldebugs << "LLViewerEventRecorder::updateMouseEventInfo - xui path on file at moment is NOT valid - so DO NOT record these local coords" << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::updateMouseEventInfo - xui path on file at moment is NOT valid - so DO NOT record these local coords" << LL_ENDL; return; } - lldebugs << "LLViewerEventRecorder::updateMouseEventInfo b4 updatemouseeventinfo - local_x|global x "<< this->local_x << " " << this->global_x << "local/global y " << this->local_y << " " << this->global_y << " mname: " << mName << " xui: " << xui << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::updateMouseEventInfo b4 updatemouseeventinfo - local_x|global x "<< this->local_x << " " << this->global_x << "local/global y " << this->local_y << " " << this->global_y << " mname: " << mName << " xui: " << xui << LL_ENDL; if (this->local_x < 1 && this->local_y<1 && local_x && local_y) { @@ -121,7 +121,7 @@ void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 g xui = mName; // TODO review confirm we never call with partial path - also cAN REMOVE CHECK FOR "" - ON OTHER HAND IT'S PRETTY HARMLESS } - lldebugs << "LLViewerEventRecorder::updateMouseEventInfo after updatemouseeventinfo - local_x|global x "<< this->local_x << " " << this->global_x << "local/global y " << this->local_y << " " << this->global_y << " mname: " << mName << " xui: " << xui << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::updateMouseEventInfo after updatemouseeventinfo - local_x|global x "<< this->local_x << " " << this->global_x << "local/global y " << this->local_y << " " << this->global_y << " mname: " << mName << " xui: " << xui << LL_ENDL; } void LLViewerEventRecorder::logVisibilityChange(std::string xui, std::string name, BOOL visibility, std::string event_subtype) { @@ -158,10 +158,10 @@ std::string LLViewerEventRecorder::get_xui() { } void LLViewerEventRecorder::update_xui(std::string xui) { if (xui!="" && this->xui=="" ) { - lldebugs << "LLViewerEventRecorder::update_xui to " << xui << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::update_xui to " << xui << LL_ENDL; this->xui=xui; } else { - lldebugs << "LLViewerEventRecorder::update_xui called with empty string" << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::update_xui called with empty string" << LL_ENDL; } } @@ -200,11 +200,11 @@ void LLViewerEventRecorder::logKeyEvent(KEY key, MASK mask) { // (maybe it should) - instead it has a convenience method that generates the keydown and keyup events // Here we will use "type" as our event type - lldebugs << "LLVIewerEventRecorder::logKeyEvent Serialized LLSD for event " << event.asString() << "\n" << llendl; + LL_DEBUGS() << "LLVIewerEventRecorder::logKeyEvent Serialized LLSD for event " << event.asString() << "\n" << LL_ENDL; - //lldebugs << "[VITA] key_name: " << LLKeyboard::stringFromKey(key) << "mask: "<< mask << "handled by " << getName() << llendl; - lldebugs << "LLVIewerEventRecorder::logKeyEvent key_name: " << LLKeyboard::stringFromKey(key) << "mask: "<< mask << llendl; + //LL_DEBUGS() << "[VITA] key_name: " << LLKeyboard::stringFromKey(key) << "mask: "<< mask << "handled by " << getName() << LL_ENDL; + LL_DEBUGS() << "LLVIewerEventRecorder::logKeyEvent key_name: " << LLKeyboard::stringFromKey(key) << "mask: "<< mask << LL_ENDL; recordEvent(event); @@ -218,14 +218,14 @@ void LLViewerEventRecorder::playbackRecording() { // ivita sets this on startup, it also sends commands to the viewer to make start, stop, and playback menu items visible in viewer LeapCommand =LLUI::sSettingGroups["config"]->getLLSD("LeapPlaybackEventsCommand"); - lldebugs << "[VITA] launching playback - leap command is: " << LLSDXMLStreamer(LeapCommand) << llendl; + LL_DEBUGS() << "[VITA] launching playback - leap command is: " << LLSDXMLStreamer(LeapCommand) << LL_ENDL; LLLeap::create("", LeapCommand, false); // exception=false } void LLViewerEventRecorder::recordEvent(LLSD event) { - lldebugs << "LLViewerEventRecorder::recordEvent event written to log: " << LLSDXMLStreamer(event) << llendl; + LL_DEBUGS() << "LLViewerEventRecorder::recordEvent event written to log: " << LLSDXMLStreamer(event) << LL_ENDL; mLog << event << std::endl; } @@ -243,7 +243,7 @@ void LLViewerEventRecorder::logKeyUnicodeEvent(llwchar uni_char) { // keycode...or // char - lldebugs << "Wrapped in conversion to wstring " << wstring_to_utf8str(LLWString( 1, uni_char)) << "\n" << llendl; + LL_DEBUGS() << "Wrapped in conversion to wstring " << wstring_to_utf8str(LLWString( 1, uni_char)) << "\n" << LL_ENDL; event.insert("char", LLSD( wstring_to_utf8str(LLWString( 1,uni_char)) ) @@ -257,8 +257,8 @@ void LLViewerEventRecorder::logKeyUnicodeEvent(llwchar uni_char) { event.insert("event",LLSD("keyDown")); - lldebugs << "[VITA] unicode key: " << uni_char << llendl; - lldebugs << "[VITA] dumpxml " << LLSDXMLStreamer(event) << "\n" << llendl; + LL_DEBUGS() << "[VITA] unicode key: " << uni_char << LL_ENDL; + LL_DEBUGS() << "[VITA] dumpxml " << LLSDXMLStreamer(event) << "\n" << LL_ENDL; recordEvent(event); diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 611d18d6d6..ac27ade2b4 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -275,7 +275,7 @@ public: { if (isGoodStatus(status)) { - llinfos << "Facebook: Info received" << llendl; + LL_INFOS() << "Facebook: Info received" << LL_ENDL; LL_DEBUGS("FacebookConnect") << "Getting Facebook info successful. info: " << info << LL_ENDL; LLFacebookConnect::instance().storeInfo(info); } @@ -453,7 +453,7 @@ void LLFacebookConnect::sharePhoto(LLPointer image, const std: } else { - llwarns << "Image to upload is not a PNG or JPEG" << llendl; + LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL; return; } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 791d9cf4e0..737f665954 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -827,7 +827,7 @@ void LLSnapshotLivePreview::saveTexture() else { LLNotificationsUtil::add("ErrorEncodingSnapshot"); - llwarns << "Error encoding snapshot" << LL_ENDL; + LL_WARNS() << "Error encoding snapshot" << LL_ENDL; } add(LLStatViewer::SNAPSHOT, 1); @@ -853,7 +853,7 @@ void LLSnapshotLivePreview::saveWeb() LLImageJPEG* jpg = dynamic_cast(mFormattedImage.get()); if(!jpg) { - llwarns << "Formatted image not a JPEG" << LL_ENDL; + LL_WARNS() << "Formatted image not a JPEG" << LL_ENDL; return; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index aeafbaa358..1c5c4e0cc7 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1954,9 +1954,9 @@ class LLAdvancedViewerEventRecorder : public view_listener_t std::string command = userdata.asString(); if ("start playback" == command) { - llinfos << "Event Playback starting" << llendl; + LL_INFOS() << "Event Playback starting" << LL_ENDL; LLViewerEventRecorder::instance().playbackRecording(); - llinfos << "Event Playback completed" << llendl; + LL_INFOS() << "Event Playback completed" << LL_ENDL; } else if ("stop playback" == command) { @@ -1965,12 +1965,12 @@ class LLAdvancedViewerEventRecorder : public view_listener_t else if ("start recording" == command) { LLViewerEventRecorder::instance().setEventLoggingOn(); - llinfos << "Event recording started" << llendl; + LL_INFOS() << "Event recording started" << LL_ENDL; } else if ("stop recording" == command) { LLViewerEventRecorder::instance().setEventLoggingOff(); - llinfos << "Event recording stopped" << llendl; + LL_INFOS() << "Event recording stopped" << LL_ENDL; } return true; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index cb2d0fa2ac..01e1137fb8 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6882,7 +6882,7 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response) LLUUID from_id = notification["payload"]["from_id"].asUUID(); if(from_id.isNull()) { - llwarns << "from_id is NULL" << llendl; + LL_WARNS() << "from_id is NULL" << LL_ENDL; return false; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e192c93d0a..7ab3a17587 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -963,7 +963,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK BOOL r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); if (r) { - lldebugs << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << llendl; + LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL; LLViewerEventRecorder::instance().setMouseGlobalCoords(x,y); LLViewerEventRecorder::instance().logMouseEvent(std::string(buttonstatestr),std::string(buttonname)); @@ -983,7 +983,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK if (r) { - lldebugs << "LLViewerWindow::handleAnyMouseClick calling updatemouseeventinfo - global x "<< " " << x << "global y " << y << "buttonstate: " << buttonstatestr << " buttonname " << buttonname << llendl; + LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick calling updatemouseeventinfo - global x "<< " " << x << "global y " << y << "buttonstate: " << buttonstatestr << " buttonname " << buttonname << LL_ENDL; LLViewerEventRecorder::instance().setMouseGlobalCoords(x,y); @@ -2531,7 +2531,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE))) { - lldebugs << "LLviewerWindow::handleKey handle nav keys for nav" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey handle nav keys for nav" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return TRUE; } @@ -2564,7 +2564,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // if nothing has focus, go to first or last UI element as appropriate if (key == KEY_TAB && (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL)) { - llwarns << "LLviewerWindow::handleKey give floaters first chance at tab key " << llendl; + LL_WARNS() << "LLviewerWindow::handleKey give floaters first chance at tab key " << LL_ENDL; if (gMenuHolder) gMenuHolder->hideMenus(); // if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode @@ -2626,17 +2626,17 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if (keyboard_focus->handleKey(key, mask, FALSE)) { - lldebugs << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return TRUE; } else { - lldebugs << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << LL_ENDL; } } if( LLToolMgr::getInstance()->getCurrentTool()->handleKey(key, mask) ) { - lldebugs << "LLviewerWindow::handleKey toolbar handling?" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return TRUE; } @@ -2644,7 +2644,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // Try for a new-format gesture if (LLGestureMgr::instance().triggerGesture(key, mask)) { - lldebugs << "LLviewerWindow::handleKey new gesture feature" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return TRUE; } @@ -2653,7 +2653,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // don't pass it down to the menus. if (gGestureList.trigger(key, mask)) { - lldebugs << "LLviewerWindow::handleKey check gesture trigger" << llendl; + LL_DEBUGS() << "LLviewerWindow::handleKey check gesture trigger" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return TRUE; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8bd220c752..7ca8a4ed3a 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8042,7 +8042,7 @@ LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high) //LL_INFOS() << "From value " << std::setprecision(3) << value << " returning color " << new_color // << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2 // << " and fractBetween " << fractBetween - // << llendl; + // << LL_ENDL; return new_color; } -- cgit v1.3 From 0954d4f5d563740d0425fb9e8d118a95a34bd283 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 22 Nov 2013 15:46:50 -0700 Subject: fix for SH-4632: Water over land doesn't render when teleporting to the same place twice with location toolbar --- indra/newview/llviewermessage.cpp | 2 ++ indra/newview/pipeline.cpp | 16 +++++++++++++++- indra/newview/pipeline.h | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bf1e915d5d..c5126ea78a 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3917,6 +3917,8 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Teleport is finished; it can't be cancelled now. gViewerWindow->setProgressCancelButtonVisible(FALSE); + gPipeline.doResetVertexBuffers(true); + // Do teleport effect for where you're leaving // VEFFECT: TeleportStart LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c2c981893a..c4fa80f0a2 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7385,12 +7385,26 @@ void LLPipeline::resetVertexBuffers() static LLTrace::BlockTimerStatHandle FTM_RESET_VB("Reset VB"); -void LLPipeline::doResetVertexBuffers() +void LLPipeline::doResetVertexBuffers(bool forced) { if (!mResetVertexBuffers) { return; } + if(!forced && LLSpatialPartition::sTeleportRequested) + { + if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) + { + return; //wait for teleporting to finish + } + else + { + //teleporting aborted + LLSpatialPartition::sTeleportRequested = FALSE; + mResetVertexBuffers = false; + return; + } + } LL_RECORD_BLOCK_TIME(FTM_RESET_VB); mResetVertexBuffers = false; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 469c7b329e..9e29ebd2a8 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -101,7 +101,7 @@ public: void destroyGL(); void restoreGL(); void resetVertexBuffers(); - void doResetVertexBuffers(); + void doResetVertexBuffers(bool forced = false); void resizeScreenTexture(); void releaseGLBuffers(); void releaseLUTBuffers(); -- cgit v1.3