Additional fast timers from V3; From Henri Beauchamp (Cool VL)

Sun, 18 Dec 2011 13:16:12 +0100

author
Ansariel
date
Sun, 18 Dec 2011 13:16:12 +0100
changeset 1607
bf6ce4770b56
parent 1606
3c98a3ae1707
child 1608
d95fae20e46b

Additional fast timers from V3; From Henri Beauchamp (Cool VL)

indra/llcommon/llfasttimer.h file | annotate | diff | revisions
indra/newview/llappviewer.cpp file | annotate | diff | revisions
indra/newview/llfasttimerview.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llcommon/llfasttimer.h	Sun Dec 18 13:14:30 2011 +0100
     1.2 +++ b/indra/llcommon/llfasttimer.h	Sun Dec 18 13:16:12 2011 +0100
     1.3 @@ -200,6 +200,7 @@
     1.4  
     1.5  //		FTM_VFILE_WAIT,			// Disabled because it would be called from a thread in the mesh repository
     1.6  		FTM_FLEXIBLE_UPDATE,
     1.7 +		FTM_OCCLUSION_WAIT,
     1.8  		FTM_OCCLUSION_READBACK,
     1.9  		FTM_BUILD_OCCLUSION,
    1.10  		FTM_PUSH_OCCLUSION_VERTS,
    1.11 @@ -213,6 +214,11 @@
    1.12  		FTM_REFRESH,
    1.13  		FTM_SORT,
    1.14  		FTM_PICK,
    1.15 +		FTM_TEXTURE_CACHE,
    1.16 +		FTM_DECODE,
    1.17 +		FTM_FETCH,
    1.18 +		FTM_VFS,
    1.19 +		FTM_LFS,
    1.20  		
    1.21  		// Temp
    1.22  		FTM_TEMP1,
     2.1 --- a/indra/newview/llappviewer.cpp	Sun Dec 18 13:14:30 2011 +0100
     2.2 +++ b/indra/newview/llappviewer.cpp	Sun Dec 18 13:16:12 2011 +0100
     2.3 @@ -1227,16 +1227,31 @@
     2.4  				bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ;
     2.5  				S32 total_work_pending = 0;
     2.6  				S32 total_io_pending = 0;
     2.7 +				F32 max_time = llmin(gFrameIntervalSeconds * 10.f, 1.f);
     2.8  				while(!is_slow)//do not unpause threads if the frame rates are very low.
     2.9  				{
    2.10  					S32 work_pending = 0;
    2.11  					S32 io_pending = 0;
    2.12 - 					work_pending += LLAppViewer::getTextureCache()->update(1); // unpauses the texture cache thread
    2.13 - 					work_pending += LLAppViewer::getImageDecodeThread()->update(1); // unpauses the image thread
    2.14 - 					work_pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
    2.15 -
    2.16 -					io_pending += LLVFSThread::updateClass(1);
    2.17 -					io_pending += LLLFSThread::updateClass(1);
    2.18 +					{
    2.19 +						LLFastTimer t3(LLFastTimer::FTM_TEXTURE_CACHE);
    2.20 +	 					work_pending = LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread
    2.21 +					}
    2.22 +					{
    2.23 +						LLFastTimer t3(LLFastTimer::FTM_DECODE);
    2.24 + 						work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread
    2.25 +					}
    2.26 +					{
    2.27 +						LLFastTimer t3(LLFastTimer::FTM_FETCH);
    2.28 + 						work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread
    2.29 +					}
    2.30 +					{
    2.31 +						LLFastTimer t3(LLFastTimer::FTM_VFS);
    2.32 +						io_pending += LLVFSThread::updateClass(1);
    2.33 +					}
    2.34 +					{
    2.35 +						LLFastTimer t3(LLFastTimer::FTM_LFS);
    2.36 +						io_pending += LLLFSThread::updateClass(1);
    2.37 +					}
    2.38  					if (io_pending > 1000)
    2.39  					{
    2.40  						ms_sleep(llmin(io_pending / 100, 100)); // give the fs some time to catch up
     3.1 --- a/indra/newview/llfasttimerview.cpp	Sun Dec 18 13:14:30 2011 +0100
     3.2 +++ b/indra/newview/llfasttimerview.cpp	Sun Dec 18 13:16:12 2011 +0100
     3.3 @@ -79,9 +79,14 @@
     3.4  {
     3.5  	{ LLFastTimer::FTM_FRAME,				"Frame",				&LLColor4::white, 0 },
     3.6  	{ LLFastTimer::FTM_MESSAGES,			" System Messages",		&LLColor4::grey1, 1 },
     3.7 -	{ LLFastTimer::FTM_MOUSEHANDLER,		"  Mouse",				&LLColor4::grey1, 0 },
     3.8 -	{ LLFastTimer::FTM_KEYHANDLER,			"  Keyboard",			&LLColor4::grey1, 0 },
     3.9 -	{ LLFastTimer::FTM_SLEEP,				" Sleep & BG Threads",	&LLColor4::grey2, 1 },
    3.10 +	{ LLFastTimer::FTM_MOUSEHANDLER,		"  Mouse",				&LLColor4::grey2, 0 },
    3.11 +	{ LLFastTimer::FTM_KEYHANDLER,			"  Keyboard",			&LLColor4::grey4, 0 },
    3.12 +	{ LLFastTimer::FTM_SLEEP,				" Sleep & BG Threads",	&LLColor4::yellow1, 1 },
    3.13 +	{ LLFastTimer::FTM_FETCH,				"  Texture Fetch",		&LLColor4::yellow5, 0 },
    3.14 +	{ LLFastTimer::FTM_TEXTURE_CACHE,		"  Texture Cache",		&LLColor4::yellow3, 0 },
    3.15 +	{ LLFastTimer::FTM_DECODE,				"  Texture Decode",		&LLColor4::yellow7, 0 },
    3.16 +	{ LLFastTimer::FTM_VFS,					"  VFS Thread",			&LLColor4::yellow4, 0 },
    3.17 +	{ LLFastTimer::FTM_LFS,					"  LFS Thread",			&LLColor4::yellow6, 0 },
    3.18  	{ LLFastTimer::FTM_IDLE,				" Idle",				&blue0, 0 },
    3.19  	{ LLFastTimer::FTM_PUMP,				"  Pump",				&LLColor4::magenta2, 1 },
    3.20  	{ LLFastTimer::FTM_ARES,				"   Ares",				&LLColor4::magenta4, 0 },
    3.21 @@ -157,7 +162,8 @@
    3.22  	{ LLFastTimer::FTM_FRUSTUM_CULL,		"   Frustum Cull",		&LLColor4::blue4, 0 },
    3.23  	{ LLFastTimer::FTM_OCCLUSION_EARLY_FAIL,"    Occl. Early Fail",	&LLColor4::blue1, 0 },
    3.24  
    3.25 -	{ LLFastTimer::FTM_OCCLUSION_READBACK,	"   Occlusion Read", &LLColor4::red2, 0 },
    3.26 +	{ LLFastTimer::FTM_OCCLUSION_WAIT,		"   Occlusion Wait",	&LLColor4::red1, 0 },
    3.27 +	{ LLFastTimer::FTM_OCCLUSION_READBACK,	"   Occlusion Read",	&LLColor4::red2, 0 },
    3.28  	{ LLFastTimer::FTM_BUILD_OCCLUSION,		"   Occlusion Build",	&LLColor4::red3, 0 },
    3.29  	{ LLFastTimer::FTM_PUSH_OCCLUSION_VERTS,"   Occlusion Push",	&LLColor4::red4, 0 },
    3.30  	{ LLFastTimer::FTM_SET_OCCLUSION_STATE,	"   Occlusion State",	&LLColor4::orange1, 0 },

mercurial