[olpc-software] XRes Improvements

Daniel P. Berrange berrange at redhat.com
Tue Mar 14 21:53:24 UTC 2006


On Tue, Mar 14, 2006 at 04:56:09PM +0000, Daniel P. Berrange wrote:
> On Tue, Mar 14, 2006 at 04:42:00PM +0000, Matthew Allum wrote:
> > Hi;
> > 
> > On Tue, 2006-03-14 at 16:04 +0000, Daniel P. Berrange wrote:
> > > 
> > > Absolutely this is useful :-) I've been working on this problem from a
> > > completely different technical angle. I created an LD_PRELOAD hack
> > > which intercepts the XCreatePixmap & XFreePixmap operations to log
> > > the timing & all parameters of these two calls, and at time of XFreePixmap
> > > call auto-dump it to a TIFF file. A little post-processing was used to
> > > generate HTML pages display all pixmaps at specific points in time,
> > > along with stack trace of the code allocating / freeing them.
> > > 
> > 
> > Beware, tracking like that also, like regular XRes, suffers from
> > ignoring window background pixmaps. I.e, code can do a;
> > 
> > pxm = XCreatePixmap(..)
> > XSetWindowBackgroundPixmap(win, pxm)
> > XFreePixmap(pxm);
> > 
> > But the pixmap is still allocated server side as the window background. 
> 
> Yeah, tracking that would require hooking in any methods relating to 
> setting of window backgrouns, and also XDestroyWindow to track the 
> implicit release I'd guess. For this use case, probably not worth the
> effort in my LD_PRELOAD hack, but desirable for XRes to do this preperly
> 
> > > This extension to XRes is definitely a more pleasent way of capturing
> > > the list of active pixmaps, since it doesn't require changing the way
> > > an app runs before hand & thus much simpler for your typical user or 
> > > developer to use.  
> > 
> > Another big advantage is you can run the test remotely with DISPLAY
> > pointing at your target device. 
> > 
> > I am wondering if it would be practical to further extend XRes as to
> > provide events when a client creates or frees a resource and avoid the
> > need for any LD_PRELOAD-isms. 
> 
> The information I collect from the LD_PRELOAD is
> 
>   1. Width, height, depth
>   2. Stack trace of caller for Create/Free
>   3. Timestamp at which call occurred
> 
> An event when creating / deleting a pixmap would be sufficient to obtain
> the timestamp, which is then used to correlate with specific actions 
> performed from the Dogtail test script. So the only thing missing would 
> then be the stack trace, which is a 'nice-to-have' but not really critical 
> for high level analysis. 
> 
> BTW, I'll be posting the results of our tests & source code later today.

Its now available at this URL:

http://people.redhat.com/berrange/olpc/performance/

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the olpc-software mailing list