summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-diff-files.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-30 17:28:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-12 08:29:48 +0100
commitaf9fbd176b145f042408ef5391eef2a51d7531f8 (patch)
tree5f75d1087d4325a013af6f0a4204a666fb4ca4f0 /perf/cairo-perf-diff-files.c
parent0540bf384aed344899417d3b0313bd6704679c1c (diff)
downloadcairo-af9fbd176b145f042408ef5391eef2a51d7531f8.tar.gz
Introduce a new compositor architecture
Having spent the last dev cycle looking at how we could specialize the compositors for various backends, we once again look for the commonalities in order to reduce the duplication. In part this is motivated by the idea that spans is a good interface for both the existent GL backend and pixman, and so they deserve a dedicated compositor. xcb/xlib target an identical rendering system and so they should be using the same compositor, and it should be possible to run that same compositor locally against pixman to generate reference tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> P.S. This brings massive upheaval (read breakage) I've tried delaying in order to fix as many things as possible but now this one patch does far, far, far too much. Apologies in advance for breaking your favourite backend, but trust me in that the end result will be much better. :)
Diffstat (limited to 'perf/cairo-perf-diff-files.c')
-rw-r--r--perf/cairo-perf-diff-files.c47
1 files changed, 28 insertions, 19 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index 34311b044..08509271f 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -161,16 +161,14 @@ test_diff_print_binary (test_diff_t *diff,
else
printf ("%5s %26s", diff->tests[0]->backend, diff->tests[0]->name);
- if (diff->tests[0]->size) {
- printf (" %6.2f (%.2f %4.2f%%) -> %6.2f (%.2f %4.2f%%): %5.2fx ",
- diff->tests[0]->stats.min_ticks / diff->tests[0]->stats.ticks_per_ms,
- diff->tests[0]->stats.median_ticks / diff->tests[0]->stats.ticks_per_ms,
- diff->tests[0]->stats.std_dev * 100,
- diff->tests[1]->stats.min_ticks / diff->tests[1]->stats.ticks_per_ms,
- diff->tests[1]->stats.median_ticks / diff->tests[1]->stats.ticks_per_ms,
- diff->tests[1]->stats.std_dev * 100,
- fabs (diff->change));
- }
+ printf (" %6.2f (%.2f %4.2f%%) -> %6.2f (%.2f %4.2f%%): %5.2fx ",
+ diff->tests[0]->stats.min_ticks / diff->tests[0]->stats.ticks_per_ms,
+ diff->tests[0]->stats.median_ticks / diff->tests[0]->stats.ticks_per_ms,
+ diff->tests[0]->stats.std_dev * 100,
+ diff->tests[1]->stats.min_ticks / diff->tests[1]->stats.ticks_per_ms,
+ diff->tests[1]->stats.median_ticks / diff->tests[1]->stats.ticks_per_ms,
+ diff->tests[1]->stats.std_dev * 100,
+ fabs (diff->change));
if (diff->change > 1.0)
printf ("speedup\n");
@@ -191,24 +189,32 @@ test_diff_print_multi (test_diff_t *diff,
double test_time;
double change;
- printf ("%s (backend: %s-%s, size: %d)\n",
- diff->tests[0]->name,
- diff->tests[0]->backend,
- diff->tests[0]->content,
- diff->tests[0]->size);
+ if (diff->tests[0]->size) {
+ printf ("%s (backend: %s-%s, size: %d)\n",
+ diff->tests[0]->name,
+ diff->tests[0]->backend,
+ diff->tests[0]->content,
+ diff->tests[0]->size);
+ } else {
+ printf ("%s (backend: %s)\n",
+ diff->tests[0]->name,
+ diff->tests[0]->backend);
+ }
for (i = 0; i < diff->num_tests; i++) {
test_time = diff->tests[i]->stats.min_ticks;
if (! options->use_ticks)
test_time /= diff->tests[i]->stats.ticks_per_ms;
change = diff->max / test_time;
- printf ("%8s %6.2f: %5.2fx ",
- diff->tests[i]->configuration,
+ printf ("[%d] %6.2f: %5.2fx ",
+ diff->tests[i]->fileno,
diff->tests[i]->stats.min_ticks / diff->tests[i]->stats.ticks_per_ms,
change);
if (options->print_change_bars)
print_change_bar (change, max_change, options->use_utf);
+ else
+ printf("\n");
}
printf("\n");
@@ -476,8 +482,11 @@ main (int argc,
reports = xmalloc (args.num_filenames * sizeof (cairo_perf_report_t));
- for (i = 0; i < args.num_filenames; i++ )
- cairo_perf_report_load (&reports[i], args.filenames[i], NULL);
+ for (i = 0; i < args.num_filenames; i++ ) {
+ cairo_perf_report_load (&reports[i], args.filenames[i], i, NULL);
+ printf ("[%d] %s\n", i, args.filenames[i]);
+ }
+ printf ("\n");
cairo_perf_reports_compare (reports, args.num_filenames, &args.options);