>>Because x11perf and gtkperf exercise different code in the X >>server,obviously.<br><br>yes, they both do not run same kind of test cases. But, isn't gtkperf running on an accelerated server should give better results than that on an accelerated server??<br>
<br>To know the exact reason, i have made a small Gtk application which draws a fillrect 100 times using gdk_draw_rectangle() call.<br>I have checked the implementation of function used by gdk to draw a rectangle - <font face="courier new,courier,monospace">gdk_x11_draw_rectangle() function which internally calls XFillRectangle/XDrawRectangle</font>(). The same XFillRectangles() (though not excatly same as <font face="courier new,courier,monospace">XFillRectangle() its almost same</font>) function is called by x11perf to execute -rect500 test case. <br>
<br>Even though both of these (gdk_draw_rectangle() and x11perf -rect500) calls <font face="courier new,courier,monospace">XFillRectangle/</font><font face="courier new,courier,monospace">XFillRectangles() internally why is the improvement is shown only in x11perf case?? Is gdk is causing some overhead??<br>
<br>i am including the function of gtk application that i have used below:<br><br>static void<br>test_gtk_drawrects ( void )<br>{<br> GtkWidget *window = gtk_test_create_simple_window ( "Test Window", "Test: gtk_draw_rectangle" );<br>
GtkWidget *darea = gtk_drawing_area_new ();<br> GTimer *gtimer = g_timer_new();<br> gint repeat = 5;<br> gtk_widget_set_size_request ( darea, 500, 500 );<br> gtk_container_add ( GTK_CONTAINER ( GTK_BIN ( window )->child ), darea );<br>
gtk_widget_show ( darea );<br> gtk_widget_show_now ( window );<br> while ( repeat-- )<br> {<br> gint i, many = 100;<br> double elapsed_time;<br> while ( gtk_events_pending () )<br> gtk_main_iteration ();<br>
/* run a number of consecutive drawing requests, just using drawing queue */<br> g_timer_start ( gtimer );<br> for ( i = 0; i < many; i++ )<br> {<br> gdk_draw_rectangle ( darea->window, darea->style->black_gc, TRUE, 0, 0, 500, 500 );<br>
}<br> g_timer_stop ( gtimer );<br> </font><font face="courier new,courier,monospace">elapsed</font><font face="courier new,courier,monospace">_time = g_timer_elapsed ( gtimer, NULL );<br> printf("\nGtkDrawRectangle Time - %lf\n", </font><font face="courier new,courier,monospace">elapsed</font><font face="courier new,courier,monospace">_time); <br>
gdk_flush();<br> while ( gtk_events_pending () )<br> gtk_main_iteration ();<br> }<br> g_timer_destroy ( gtimer );<br> sleep(3);<br> gtk_widget_destroy ( window );<br>}<br></font><br><div class="gmail_quote">
On Thu, Dec 3, 2009 at 9:08 PM, Vincent Torri <span dir="ltr"><<a href="mailto:vtorri@univ-evry.fr">vtorri@univ-evry.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
On Thu, 3 Dec 2009, Arnaud Mouiche wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think gtkperf is more a tool to test gtk non-regression or optimization (on a same X server), than a tool to test X.<br>
<br>
I tried to use it to see if EXA optimizations that optimize everything by doing nothing (screen stay black), makes Gtkperf more efficient.<br>
the result was that xorg without EXA management overhead (so without any optmization) gives better results than xorg with a EXA optimization that can't be more efficient...<br>
<br>
Indeed, gtkperf ony creat pixmap, but doesn't try to move / blit / compose... all the thing a acceleration can be used for.<br>
<br>
so what you need is a perf tool more usefull that measure the user experience feeling (scrolling, transparency, move, composition).<br>
<br>
Does somebody know one ? I'm also interested.<br>
</blockquote>
<br></div>
you can try render_bench, written by Carsten Haitzler:<br>
<br>
<a href="http://www.rasterman.com/files/render_bench.tar.gz" target="_blank">http://www.rasterman.com/files/render_bench.tar.gz</a><br>
<br>
it mesures some operations, maybe not all you want though.<br><font color="#888888">
<br>
Vincent Torri</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
arnaud<br>
<br>
Alan Coopersmith wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
prudhvi raj wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
My question is why is the performance improvement shown through x11perf<br>
is not getting reflected when we run gtkperf??<br>
<br>
</blockquote>
<br>
x11perf is a wonderful way to make you optimize code that no one ever calls.<br>
<br>
Notice that all the x11perf tests are single color, and use the Xlib drawing<br>
routines, while gtk is multicolor and usually does not use Xlib drawing.<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
</div></div></blockquote></div><br>