[PATCH] tracedump: add --help and --function-histogram

Alon Levy alevy at redhat.com
Wed Sep 7 13:59:50 PDT 2011


On Wed, Sep 07, 2011 at 10:48:36AM -0400, Zack Rusin wrote:
> On Wednesday, September 07, 2011 05:21:53 AM Alon Levy wrote:
> > ---
> >  trace_parser.cpp |   11 +++++++++++
> >  trace_parser.hpp |    5 +++++
> >  tracedump.cpp    |   20 ++++++++++++++++++--
> >  3 files changed, 34 insertions(+), 2 deletions(-)
> 
> Hi, Alon.
> 
> It's great to see you start contributing to the project. But FWIW I don't 
> think this is the right approach.
> 
> Most importantly parser shouldn't do any analysis of the trace. It's just too 
> crucial to have it do anything but parsing.
> 
> I'm not sure if having trace dump not do trace dumping in certain cases is a 
> good idea. I know you did it because there's no better place to put it right 
> now but I think a lot better approach would be to create a new tool, e.g. 
> tracestats, that would along the histogram dump average/min/max number of 
> calls per frame, size of data downloaded by the gpu on each frame and so on.
> 
> Finally,  tbh, I'd vastly prefer if trace visualization would be done in the 
> gui rather than writing tools that keep doing the same thing gui is supposed 
> to be doing, but that might be just my preference.
> 

Thanks for the feedback. Looked at the GUI stuff, I think I'll be going with either
the json or library approach (probably the former as that's what Jose prefers I
think), since I'd rather write tools in python and it's taking me some time to get
the hang of the qt+c++ gui part. Wrt speed of python all I can say is pypy is doing
great :)

No problem with this patch being nacked, had it around and thought I'd just send it
to get feedback - I agree it's taking tracedump in the wrong direction.

What I'm actually after atm (maybe you are working on this) is trying to figure out
optimizations possible from the calls. I have for instance a trace that shows about 3.3
MB per frame, most of it spent in setting up arrays, glVertexArrayPointer. I wanted
to answer the question wether there were reused buffers here. So basically just caching
the blobs per function per index, but it gets a little more complicated for places where
you need to track the current item being set via previous function calls, for glVertexArrayPointer
luckily you only need the first index parameter. Is anyone looking at this?

> z


More information about the apitrace mailing list