Window content update benchmark (code review)
Yann Droneaud
ydroneaud at mandriva.com
Mon Mar 16 04:18:00 PDT 2009
Hi,
Here is some code for reviews.
This program tries to benchmark window update using X11 + extensions
requests. The program uses Xlib functions such as XPutImage(),
XCopyArea(), XRender function XRenderComposite(), Pixmap, MIT-SHM shared
memory, shared memory Pixmap, etc.
The purpose of the program is to show how ARGB32 visual, composite
manager, drivers and shared memory interact between each others on
different hardware/driver configuration.
Running this program on different system configuration will show that
hardware and driver configuration (for example a nvidia card with X.org
driver vs proprietary driver) affect window update performance, which is
especially true regarding shared memory pixmap.
BTW, I'm sure I made some mistake and forgot some efficient/clever ways
of updating window content. Feel free to comment/improve this little
program.
Example, running on 855GM adapter, using intel_drv version 2.4.2
Composite: 0.4
Render: 0.10
MIT-SHM: 1.1
event 19
Can't set priority, harmless: Permission denied
Can't set scheduler, harmless: Operation not permitted
Can't lock memory, harmless: Cannot allocate memory
event 15
event 12
1: XPutImage(XImage): 6.842764797
2: XPutImage(XImage): Pixmap, XCopyArea(Pixmap): 10.318757087
3: XPutImage(XImage): Pixmap, XRenderComposite(Pixmap): 10.241974700
4: XShmPutImage(XImage SHM): 4.224114416
5: XShmPutImage(XImage SHM): Pixmap, XCopyArea(Pixmap): 6.694422568
6: XShmPutImage(XImage SHM): Pixmap, XRenderComposite(Pixmap):
6.575778511
7: XCopyArea(Pixmap SHM): 3.993095927
8: XRenderComposite(Pixmap SHM): 3.805270309
Regards
--
Yann Droneaud
-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchimagemark.c
Type: text/x-csrc
Size: 22794 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090316/22ae26f9/attachment.c>
More information about the xorg
mailing list