From a3e3e8b4ccd96e98da73acf1c584bbfa5a8b2b56 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 12 Nov 2012 19:08:14 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system simplified llfasttimer code down to 2 classes llunit unit conversion now done in floating point or 64 bit integer precision, depending on source type --- indra/newview/llfasttimerview.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 5766cfa0b0..01a3501e4b 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -46,7 +46,7 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); - LLFastTimer::NamedTimer& getFrameTimer(); + LLFastTimer::DeclareTimer& getFrameTimer(); public: @@ -59,7 +59,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLFastTimer::NamedTimer* getLegendID(S32 y); + LLFastTimer::DeclareTimer* getLegendID(S32 y); F64 getTime(const std::string& name); protected: @@ -85,8 +85,8 @@ private: U64 mMaxCountTotal; LLRect mBarRect; S32 mScrollIndex; - LLFastTimer::NamedTimer* mHoverID; - LLFastTimer::NamedTimer* mHoverTimer; + LLFastTimer::DeclareTimer* mHoverID; + LLFastTimer::DeclareTimer* mHoverTimer; LLRect mToolTipRect; S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; -- cgit v1.2.3 From 9d77e030d9a0d23cebce616631677459eec1612c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Nov 2012 23:52:27 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system cleaning up build moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc streamlined Time class and consolidated functionality in BlockTimer class llfasttimer is no longer included via llstring.h, so had to add it manually in several places --- indra/newview/llfasttimerview.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 01a3501e4b..d7f7f27cd4 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -46,7 +46,7 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); - LLFastTimer::DeclareTimer& getFrameTimer(); + LLTrace::BlockTimer& getFrameTimer(); public: @@ -59,7 +59,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLFastTimer::DeclareTimer* getLegendID(S32 y); + LLTrace::BlockTimer* getLegendID(S32 y); F64 getTime(const std::string& name); protected: @@ -85,8 +85,8 @@ private: U64 mMaxCountTotal; LLRect mBarRect; S32 mScrollIndex; - LLFastTimer::DeclareTimer* mHoverID; - LLFastTimer::DeclareTimer* mHoverTimer; + LLTrace::BlockTimer* mHoverID; + LLTrace::BlockTimer* mHoverTimer; LLRect mToolTipRect; S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; -- cgit v1.2.3 From 407e5013f3845208e0a60e26e8f0a7fad997df5d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 3 Dec 2012 19:54:53 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system converted fast timer view over to new lltrace mechanisms --- indra/newview/llfasttimerview.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d7f7f27cd4..55adae4147 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -29,6 +29,7 @@ #include "llfloater.h" #include "llfasttimer.h" +#include "llunit.h" class LLFastTimerView : public LLFloater { @@ -46,7 +47,7 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); - LLTrace::BlockTimer& getFrameTimer(); + LLTrace::TimeBlock& getFrameTimer(); public: @@ -59,7 +60,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLTrace::BlockTimer* getLegendID(S32 y); + LLTrace::TimeBlock* getLegendID(S32 y); F64 getTime(const std::string& name); protected: @@ -78,20 +79,19 @@ private: ALIGN_COUNT } ChildAlignment; - ChildAlignment mDisplayCenter; - S32 mDisplayCalls; - S32 mDisplayHz; - U64 mAvgCountTotal; - U64 mMaxCountTotal; - LLRect mBarRect; - S32 mScrollIndex; - LLTrace::BlockTimer* mHoverID; - LLTrace::BlockTimer* mHoverTimer; - LLRect mToolTipRect; - S32 mHoverBarIndex; - LLFrameTimer mHighlightTimer; - S32 mPrintStats; - LLRect mGraphRect; + ChildAlignment mDisplayCenter; + bool mDisplayCalls, + mDisplayHz; + LLUnit mAllTimeMax; + LLRect mBarRect; + S32 mScrollIndex; + LLTrace::TimeBlock* mHoverID; + LLTrace::TimeBlock* mHoverTimer; + LLRect mToolTipRect; + S32 mHoverBarIndex; + LLFrameTimer mHighlightTimer; + S32 mPrintStats; + LLRect mGraphRect; }; #endif -- cgit v1.2.3 From 6c7825107f6ebb3dd8697a52aeb5d29a93060dc4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 4 Dec 2012 19:10:02 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system added copy constructor to periodic recording to allow snapshot generation in fast timer view fixed build errors --- indra/newview/llfasttimerview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 55adae4147..6474c2f524 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -30,11 +30,13 @@ #include "llfloater.h" #include "llfasttimer.h" #include "llunit.h" +#include "lltracerecording.h" class LLFastTimerView : public LLFloater { public: LLFastTimerView(const LLSD&); + ~LLFastTimerView(); BOOL postBuild(); static BOOL sAnalyzePerformance; @@ -92,6 +94,7 @@ private: LLFrameTimer mHighlightTimer; S32 mPrintStats; LLRect mGraphRect; + LLTrace::PeriodicRecording* mRecording; }; #endif -- cgit v1.2.3 From c219282f5de753a044cecb53bd806145f68add9a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 18 Dec 2012 20:07:25 -0800 Subject: SH-3406 WIP convert fast timers to lltrace system removed some potential data races got memory stats recording in trace system --- indra/newview/llfasttimerview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 6474c2f524..07662bb795 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -95,6 +95,7 @@ private: S32 mPrintStats; LLRect mGraphRect; LLTrace::PeriodicRecording* mRecording; + bool mPauseHistory; }; #endif -- cgit v1.2.3 From 096b2738c2213281b463d0de093c08a406f53946 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 24 Jan 2013 01:18:49 -0800 Subject: SH-3275 WIP interesting Update viewer metrics system to be more flexible clean up LLFastTimerView so it can be converted to handling LLTrace data --- indra/newview/llfasttimerview.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 07662bb795..09be137027 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -62,15 +62,28 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); + + LLTrace::TimeBlock* getLegendID(S32 y); F64 getTime(const std::string& name); protected: virtual void onClickCloseBtn(); + private: - typedef std::vector > bar_positions_t; - bar_positions_t mBarStart; - bar_positions_t mBarEnd; + void drawTicks(LLUnit total_time); + void drawLineGraph(); + void drawLegend(S32 y); + S32 drawHelp(S32 y); + void drawBorders( S32 y, const S32 x_start, S32 barh, S32 dy); + void drawBars(); + + void printLineStats(); + void generateUniqueColors(); + LLUnit getTotalTime(); + + + std::vector* mBarRects; S32 mDisplayMode; typedef enum child_alignment -- cgit v1.2.3 From 3a555a2ff84d9b340e33673d7a03f37c966f06e6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 24 Jan 2013 19:53:17 -0800 Subject: SH-3275 WIP interesting Update viewer metrics system to be more flexible removed LLFastTimerView::getFrameTimer() dead code elimination fixed off by one array access crash --- indra/newview/llfasttimerview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 09be137027..7eee3c1cb5 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -49,7 +49,6 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); - LLTrace::TimeBlock& getFrameTimer(); public: -- cgit v1.2.3 From 2c68d5367c5c44aceb4ff23d9672c35642e030f7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 27 Jan 2013 21:35:20 -0800 Subject: SH-3275 WIP interesting Update viewer metrics system to be more flexible fixed memory leak fixed glitching of fast timer display --- indra/newview/llfasttimerview.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 7eee3c1cb5..86781b626c 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -70,7 +70,7 @@ protected: virtual void onClickCloseBtn(); private: - void drawTicks(LLUnit total_time); + void drawTicks(); void drawLineGraph(); void drawLegend(S32 y); S32 drawHelp(S32 y); @@ -79,10 +79,18 @@ private: void printLineStats(); void generateUniqueColors(); - LLUnit getTotalTime(); + void updateTotalTime(); - - std::vector* mBarRects; + struct TimerBar + { + LLRect mRect; + LLColor4 mColor; + F32 mStartFraction, + mEndFraction; + }; + LLRect updateTimerBars(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector& bars, S32 history_index); + + std::vector* mTimerBars; S32 mDisplayMode; typedef enum child_alignment @@ -96,7 +104,8 @@ private: ChildAlignment mDisplayCenter; bool mDisplayCalls, mDisplayHz; - LLUnit mAllTimeMax; + LLUnit mAllTimeMax, + mTotalTimeDisplay; LLRect mBarRect; S32 mScrollIndex; LLTrace::TimeBlock* mHoverID; -- cgit v1.2.3 From a441664c109e4fca4154dbf80e108c27b3e9e601 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 31 Jan 2013 00:50:54 -0800 Subject: SH-3275 WIP interesting Update viewer metrics system to be more flexible fast timer bars render correctly --- indra/newview/llfasttimerview.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 86781b626c..b3e428908a 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -83,12 +83,26 @@ private: struct TimerBar { - LLRect mRect; + TimerBar() + : mWidth(0), + mSelfWidth(0), + mVisible(true), + mStartFraction(0.f), + mEndFraction(1.f) + {} + S32 mWidth; + S32 mSelfWidth; + LLRect mVisibleRect, + mChildrenRect; LLColor4 mColor; + bool mVisible; F32 mStartFraction, mEndFraction; }; - LLRect updateTimerBars(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector& bars, S32 history_index); + S32 updateTimerBarWidths(LLTrace::TimeBlock* time_block, std::vector& bars, S32 history_index); + S32 updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 timer_bar_index, std::vector& bars, S32 history_index, bool draw); + S32 drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector& bars, S32 bar_index, LLPointer& bar_image); + void updatePauseState(); std::vector* mTimerBars; S32 mDisplayMode; -- cgit v1.2.3 From eb6c8959ca5b8b3c100114d4d659a48bb4d56b2c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 2 Feb 2013 01:09:52 -0800 Subject: SH-3275 WIP interesting Update viewer metrics system to be more flexible fixed most fast timer display and interaction issues --- indra/newview/llfasttimerview.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index b3e428908a..f9ceb4423b 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -61,8 +61,6 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - - LLTrace::TimeBlock* getLegendID(S32 y); F64 getTime(const std::string& name); @@ -99,10 +97,10 @@ private: F32 mStartFraction, mEndFraction; }; - S32 updateTimerBarWidths(LLTrace::TimeBlock* time_block, std::vector& bars, S32 history_index); - S32 updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 timer_bar_index, std::vector& bars, S32 history_index, bool draw); + 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); - void updatePauseState(); + void setPauseState(bool pause_state); std::vector* mTimerBars; S32 mDisplayMode; -- cgit v1.2.3 From fbce0030494ccb6fa8f6cf45e1ec95a2fa922bcd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 20 May 2013 12:47:23 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics killed LLFastTimerView::getTime fixed block time stats always being 0 --- indra/newview/llfasttimerview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 8b9ad290bc..341adacd65 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -62,7 +62,6 @@ public: virtual void draw(); LLTrace::TimeBlock* getLegendID(S32 y); - F64 getTime(const std::string& name); protected: virtual void onClickCloseBtn(); -- cgit v1.2.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/newview/llfasttimerview.h | 77 ++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 36 deletions(-) (limited to 'indra/newview/llfasttimerview.h') 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 -- cgit v1.2.3 From 3f2de87340b1c831ea59e4a3ca960d49f343c9fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 17 Jun 2013 01:18:21 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics added getAs and setAs to LLUnit to make it clearer how you specify units removed accidental 0-based indexing of periodicRecording history... should now be consistently 1-based, with 0 accessing current active recording removed per frame timer updates of all historical timer bars in fast timer display added missing assignment operator to recordings --- indra/newview/llfasttimerview.h | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index c20cadd6d7..d9ae6348da 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -80,31 +80,38 @@ private: struct TimerBar { TimerBar() - : mWidth(0), - mSelfWidth(0), + : mTotalTime(0), + mSelfTime(0), mVisible(true), mStartFraction(0.f), - mEndFraction(1.f) + mEndFraction(1.f), + mFirstChild(false), + mLastChild(false) {} - S32 mWidth; - S32 mSelfWidth; - LLRect mVisibleRect, - mChildrenRect; + LLUnit mTotalTime, + mSelfTime, + mChildrenStart, + mChildrenEnd, + mSelfStart, + mSelfEnd; LLTrace::TimeBlock* mTimeBlock; - bool mVisible; + bool mVisible, + mFirstChild, + mLastChild; F32 mStartFraction, mEndFraction; }; struct TimerBarRow { - S32 mBottom; + S32 mBottom, + mTop; 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); + LLUnit updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, bool visible = true); + 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, S32 bar_index = 0); void setPauseState(bool pause_state); std::deque mTimerBarRows; -- cgit v1.2.3 From d136c4c29686c565b5a46503aa67a9c958b4145d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 18 Jun 2013 23:41:53 -0700 Subject: SH-4246 FIX interesting: fast timers significantly decreases framerate removed implicit flushes on reads from recorders for better performance made sure stack timers were updated on recorder deactivate faster rendering and better ui for fast timer view --- indra/newview/llfasttimerview.h | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d9ae6348da..d931f25a7e 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -68,8 +68,8 @@ private: virtual void onClickCloseBtn(); void drawTicks(); void drawLineGraph(); - void drawLegend(S32 y); - S32 drawHelp(S32 y); + void drawLegend(); + void drawHelp(S32 y); void drawBorders( S32 y, const S32 x_start, S32 barh, S32 dy); void drawBars(); @@ -82,7 +82,6 @@ private: TimerBar() : mTotalTime(0), mSelfTime(0), - mVisible(true), mStartFraction(0.f), mEndFraction(1.f), mFirstChild(false), @@ -104,29 +103,26 @@ private: struct TimerBarRow { - S32 mBottom, - mTop; - std::vector mBars; + S32 mBottom, + mTop; + TimerBar* mBars; }; - LLUnit updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, bool visible = true); + LLUnit 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, S32 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); std::deque mTimerBarRows; TimerBarRow mAverageTimerRow; - enum ChildAlignment + enum EDisplayType { - ALIGN_LEFT, - ALIGN_CENTER, - ALIGN_RIGHT, - ALIGN_COUNT - } mDisplayCenter; - bool mDisplayCalls, - mDisplayHz, - mPauseHistory; + TIME, + CALLS, + HZ + } mDisplayType; + bool mPauseHistory; LLUnit mAllTimeMax, mTotalTimeDisplay; S32 mScrollIndex, @@ -137,7 +133,8 @@ private: LLTrace::TimeBlock* mHoverTimer; LLRect mToolTipRect, mGraphRect, - mBarRect; + mBarRect, + mLegendRect; LLFrameTimer mHighlightTimer; LLTrace::PeriodicRecording mRecording; }; -- cgit v1.2.3 From 3fe19d883d2856cd7d104810b794eee82d642a3e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 19 Jun 2013 20:30:41 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics scene monitor output is cleaned up, no duplicate first frame, less scientific notation periodic recording extension now works more cleanly --- indra/newview/llfasttimerview.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d931f25a7e..9d88bb2d3f 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -103,6 +103,11 @@ private: struct TimerBarRow { + TimerBarRow() + : mBottom(0), + mTop(0), + mBars(NULL) + {} S32 mBottom, mTop; TimerBar* mBars; @@ -118,9 +123,9 @@ private: enum EDisplayType { - TIME, - CALLS, - HZ + DISPLAY_TIME, + DISPLAY_CALLS, + DISPLAY_HZ } mDisplayType; bool mPauseHistory; LLUnit mAllTimeMax, -- cgit v1.2.3 From 26581404e426b00cd0a07c38b5cb858d5d5faa28 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 14 Aug 2013 11:51:49 -0700 Subject: BUILDFIX: added header for numeric_limits support on gcc added convenience types for units F32Seconds, etc. --- indra/newview/llfasttimerview.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 9d88bb2d3f..8f61a2fc87 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -87,7 +87,7 @@ private: mFirstChild(false), mLastChild(false) {} - LLUnit mTotalTime, + LLUnits::F32Seconds mTotalTime, mSelfTime, mChildrenStart, mChildrenEnd, @@ -113,7 +113,7 @@ private: TimerBar* mBars; }; - LLUnit updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index); + LLUnits::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; - LLUnit mAllTimeMax, + LLUnits::F64Seconds mAllTimeMax, mTotalTimeDisplay; S32 mScrollIndex, mHoverBarIndex, -- cgit v1.2.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/newview/llfasttimerview.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfasttimerview.h') 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, -- cgit v1.2.3 From 9c256611f1814b843e1adc29f8a9185a3519eeaf Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 19 Aug 2013 16:05:03 -0700 Subject: BUILDFIX: removed consideration of some bad overloads in return type evaluation of unit operators --- indra/newview/llfasttimerview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d184aae03d..8c2c939c5e 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -128,7 +128,7 @@ private: DISPLAY_HZ } mDisplayType; bool mPauseHistory; - F64Seconds mAllTimeMax, + F64Seconds mAllTimeMax, mTotalTimeDisplay; S32 mScrollIndex, mHoverBarIndex, -- cgit v1.2.3 From a7aed07a5b620977fb74e4070e432eef01d11d3c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Aug 2013 13:41:19 -0700 Subject: broke out llunit.h into llunittype.h and llunits.h for unit declarations changed unit declarations macros to make a lot more sense --- indra/newview/llfasttimerview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 8c2c939c5e..8c8eb99b59 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -29,7 +29,7 @@ #include "llfloater.h" #include "llfasttimer.h" -#include "llunit.h" +#include "llunits.h" #include "lltracerecording.h" #include -- cgit v1.2.3 From f8a85003ddd4bee1ae00fc329c1c1d66d6100cbd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 3 Oct 2013 19:04:51 -0700 Subject: more memory optimizations of lltrace --- indra/newview/llfasttimerview.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 8c8eb99b59..672bb5d7ca 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -87,12 +87,12 @@ private: mFirstChild(false), mLastChild(false) {} - F32Seconds mTotalTime, - mSelfTime, - mChildrenStart, - mChildrenEnd, - mSelfStart, - mSelfEnd; + F32Seconds mTotalTime, + mSelfTime, + mChildrenStart, + mChildrenEnd, + mSelfStart, + mSelfEnd; LLTrace::TimeBlock* mTimeBlock; bool mVisible, mFirstChild, -- cgit v1.2.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/newview/llfasttimerview.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfasttimerview.h') 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, -- cgit v1.2.3 From 6ddfc8031c73f342cf8459445a20cd50ceb3efba Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 12 Nov 2013 11:42:06 -0800 Subject: BUILDFIX - miscellaneous stuff missed in the merge --- indra/newview/llfasttimerview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfasttimerview.h') diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d7d87c8522..3e30bd86ba 100755 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -62,10 +62,10 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); virtual void onOpen(const LLSD& key); + virtual void onClose(bool app_quitting); LLTrace::BlockTimerStatHandle* getLegendID(S32 y); private: - virtual void onClickCloseBtn(bool app_quitting = false); void drawTicks(); void drawLineGraph(); void drawLegend(); -- cgit v1.2.3