[RFC] [PATCH 1/2] Add a basic support of logging cpu and gpu time

Jose Fonseca jfonseca at vmware.com
Wed Aug 24 15:06:53 PDT 2011


----- Original Message -----
> On Wed, 24 Aug 2011 10:08:01 +0800, Yuanhan Liu
> <yuanhan.liu at intel.com> wrote:
> > Restructured to match the latest master branch. The implementation
> > is
> > quite ugly and dirty. But it didn't change the structure of the
> > trace file.
> > 
> > --
> > From ec52fd63c08eca86fca42ae27e79309130984078 Mon Sep 17 00:00:00
> > 2001
> > From: Liu Aleaxander <Aleaxander at gmail.com>
> > Date: Wed, 24 Aug 2011 09:55:03 +0800
> > Subject: [PATCH 1/2] Add a basic support of logging cpu and gpu
> > time
> > 
> > Logging GPU time is a kind of trick, since you can't get the gpu
> > time
> > immediately after your opengl call. Thus we need to move it at the
> > end of
> > frame to reduce the time query overhead.
> > 
> > Well, that would introduce another problem, as the trace_writer
> > doesn't
> > know the real opengl call for the specified gpu time. Thus I
> > introduce
> > another log file for time. Please see comments inline for more
> > info.
> 
> Trace capture time seems like the wrong time to be doing performance
> analysis to me.  I would expect GPU performance analysis to be done
> after the fact in qapitrace.  Then you could do multiple runs to
> ensure
> reliable data, and you could do even more clever things like culling
> all
> primitives to try to determine the balance of time used between VS
> and
> FS.

Yes. Although there are use cases for measuring the real application, I do feel that measuring times in retrace time is more useful, as everything becomes reproducible & easily automated. 

Jose


More information about the apitrace mailing list