diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llcommon/llerror.cpp | 25 | ||||
| -rwxr-xr-x | indra/llcommon/llerror.h | 12 | ||||
| -rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 1 | ||||
| -rwxr-xr-x | indra/llui/llnotifications.h | 5 | ||||
| -rwxr-xr-x | indra/llui/llstatbar.cpp | 21 | ||||
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 11 | ||||
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/pipeline.cpp | 12 | 
9 files changed, 55 insertions, 38 deletions
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<LLNotificationPtr> 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();  }  | 
