Patches to glretrace to add support for looping arbitrary frames

Jon Ashburn jon at lunarg.com
Tue Apr 22 11:53:08 PDT 2014


glretrace has ability to loop the last frame of a trace continuosly. These
two patches improve upon this feature in several ways.  For analysis of
the driver/GPU performance  from a captured trace the existing looping can be
improved. Firstly, statistics  of the looping  performance should be logged,
in addition to the total retrace statistics which include non looping frames.
Secondly, the  looping should be generalized for N iterations and any arbitrary
range of frames or API call numbers.  Thirdly, time spent in apitrace  parsing
and executing calls  should be minimized so any driver or GPU bottlenecks  are
not masked by glretrace looping replay time.

To achieve these improvements, these features are added to glretrace by these
patches:

Add  a numeric parameter to the --loop option which is the number of times to
loop.  Zero is continuous looping, default is 1.

Add --framerange  option that allows an arbitray range of frames to be looped 
and log the time spent in the framerange looping.

Add --callrange option that allows an arbitrary range of call numbers to be
looped and log the time spent in the callrange looping.  Framerange and callrange
are mutually exclusive options. --loop=N specifies the number of times to loop
the range.  The replay ends after the looping is finished.

When executing a looping replay (non-continuos  and iterations != 1)  first
save the parsed API calls.  Thus,  no need to reparse  the calls on every
iteration of a loop.  This vastly improves the execution time  of glretrace.
The looping replay performance, in many cases now matches the performance for
the frames of interest from the original app/benchmark prior to capture.  This
makes glretrace a very useful performance analysis tool  and also performance
regression tool.


More information about the apitrace mailing list