Commit graph

420 commits

Author SHA1 Message Date
M Joonas Pihlaja
b036a09972 whitespace: Fixup formal arguments and tabs in boilerplate/ and perf/.
Ran a script to align the formal parameters of functions and
collapse spaces to tabs in code.
2010-06-24 15:02:53 +03:00
M Joonas Pihlaja
800e977c2e perf: Allow comparing perf reports with only one difference.
The cairo-perf-diff-files tool would ignore perf reports with
just one test for no apparent reason.  The traces take so long
that it's useful to be able to compare runs with just one trace.
2010-06-17 14:27:13 +03:00
Chris Wilson
0d5a15f238 check: Disable running cairo-perf-micro
Since this takes days to run now and should not find any bugs that are
not covered by the test-suite it seems like a pointless exercise.
Especially as I am trying to make a release!
2010-06-12 20:02:39 +01:00
Andrea Canciani
061ea78ad2 perf: Correct cairo-perf-diff syntax
{ cmd-list; } seems to literally be the required syntax. Blanks and
';' are both mandatory.
2010-04-10 18:25:25 +02:00
Chris Wilson
f5f6431787 perf: Switch between micro and trace benchmarks for cairo-perf-diff 2010-04-07 22:50:15 +01:00
Chris Wilson
fe610d559c perf/micro: Show megapixel fill rate during paint. 2010-04-02 08:51:03 +01:00
Andrea Canciani
a81d347c24 perf: Fix timestamp computation on MacOS X
The OIL routines don't work as expected on MacOS X. The operating
system gives access to the timestamp counter through the function
mach_absolute_time.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-31 16:13:05 +02:00
Chris Wilson
d2ec151e49 perf/micro: Exercise different sizes and antialising modes with glyphs 2010-03-30 15:28:37 +01:00
Chris Wilson
72481acf0d perf: Compute ops per second
Provide a hook for the test to be able to compute the number of ops per
second. For instance, the glyphs test uses it to report the number of
kiloglyph per second Cairo is able to render.
2010-03-30 15:28:37 +01:00
Chris Wilson
97f8c20727 boilerplate: Create an image16 target
In order to exercise the newly restored r5g6g5 support, we need to
create an appropriate surface and feed it through the test and
performance suites.
2010-03-27 21:53:55 +00:00
Chris Wilson
25a77b263d boilerplate: Cleanup the list of backends upon shutdown. 2010-03-23 16:49:21 +00:00
Chris Wilson
e1f0c2e73f perf: Check for and include unistd.h
isatty() and access() require unistd.h, so include it!
2010-03-04 17:11:58 +00:00
Chris Wilson
411c09eed7 perf: Enable a surface cache for perf-trace
Real applications that control their Drawable externally to Cairo are
'disadvantaged' by cairo-perf-trace when it creates a similar surface
for each new instance of the same Drawable. The difficulty in
maintaining one perf surface for every application surface is that the
traces do not track lifetimes for the application surfaces, so we would
just accumulate stale surfaces. The surface cache takes a different
approach and returns the same surface for each active Drawable, and
maintains a hold-over of the MRU 16 surfaces. This achieves 60-80% hit
rate with firefox, which is probably as good as can be expected.
Obviously for double-buffered applications we only every draw to freshly
created surfaces (and Gtk+ bypasses cairo to do the final copy -- the
ideal application would just use a push-group for double buffering, in
which case we would capture and replay the entire expose event).

To enable use of the surface cache whilst replaying use -c:

  ./cairo-perf-trace -c firefox-talos-gfx
2010-01-22 23:01:46 +00:00
Chris Wilson
8f69481722 gitignore: refresh
Add forgotten local targets to .gitignore
2010-01-22 22:30:43 +00:00
Chris Wilson
f648fcd2f9 gitignore: Add forgotten cairo-perf-print 2009-10-26 11:03:16 +00:00
Chris Wilson
6911ba2f76 perf: Fix comparisons
The sort order was unstable resulting in incorrect ordering dependent
upon libc version.
2009-10-26 11:03:16 +00:00
M Joonas Pihlaja
43a775f60d [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:

http://lists.cairographics.org/archives/cairo/2009-July/017571.html
2009-10-22 02:29:47 +03:00
Chris Wilson
f23ae97e30 [perf] Support parsing reports from stdin 2009-09-29 03:03:51 +01:00
Chris Wilson
ccf84a8883 [perf] Reorganise cairo-perf
In preparation to creating a new hub to control performance measuring
and reporting, move the current cairo-perf out of the way.
2009-09-15 18:19:08 +01:00
Chris Wilson
9389cb78a8 [build] Improve handling of missing test apparatus
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
2009-09-08 17:51:33 +01:00
Chris Wilson
9b932d7cd7 [perf] Move the calibration to its own function
Improve code clarity and whatnot.
2009-09-05 08:46:39 +01:00
M Joonas Pihlaja
270b2f1be0 [perf] Add a fast-and-sloppy mode to cairo-perf.
A new -f option to cairo-perf reverts to a fast run
mode for quick performance overviews. The number of
milliseconds each iteration of a test is run for can
be overriden using the new CAIRO_PERF_ITERATION_MS
environment variable. The default remains 2000 ms/iter.
2009-09-05 05:50:57 +03:00
Chris Wilson
0ffca06d7f [perf] Use milliseconds by default in cairo-perf-diff-files
Necessary when comparing performance reports from different machines (or
even at different CPU states).
2009-09-04 08:32:31 +01:00
Chris Wilson
3acccf0ea5 [perf] Trim outliers from chart
Use "mild outliers" method to remove exceptional speed-ups and slow-downs
from the graph, so that the majority of information is not lost by the
scaling. Add the timing labels to the bars so that the true factor is
always presented.
2009-08-30 12:35:47 +01:00
Vladimir Vukicevic
d7faec024a Add skia backend
Originally written by Vladimir Vukicevic to investigate using Skia for
Mozilla, it provides a nice integration with a rather interesting code
base. By hooking Skia underneath Cairo it allows us to directly compare
code paths... which is interesting.

[updated by Chris Wilson]
2009-08-29 17:07:35 +01:00
Chris Wilson
bdd3c5ba69 [perf] Match directory names
In order to handle 'cairo-perf-trace benchmark', we need to perform the
can_run? test on the directory name as opposed to the individual trace
names. Make it so.
2009-08-29 08:08:26 +01:00
Chris Wilson
77c1109616 [perf] Reset global caches after every trace
I'd disabled this to look at cairo-qt performance, then forgot about it.
Be clean, cleanup globals -- this should fix the huge performance loss
when running in series multiple backends that need separate font caches.
2009-08-29 08:08:25 +01:00
Chris Wilson
9c8e60f771 [perf] Remove cpuset warning for cairo-perf-trace
These traces run for much longer than the original synthetic benchmarks
and seek to replicate 'real-world' applications, so the warning that the
xserver and cairo-perf are not bound to any cpu is false.
2009-08-29 08:08:25 +01:00
Chris Wilson
d07ed5d990 [perf] Add charting utility
cairo-perf-chart takes multiple runs (currently it is limited to
prefiltered data sets) and pretty-prints a chart showing performace
improvements/regressions (in either ASCII or HTML) along with a
cairo-perf-chart.png
2009-08-29 08:08:00 +01:00
Chris Wilson
015eccadcb [perf] Fix unaligned-clip
We failed to reset the scale after each loop, eventually generating a vast
clip-mask that exceeded memory capacity.
2009-08-26 23:51:43 +01:00
Chris Wilson
6f8fae21e6 [perf] Add a box mode to spiral
Add a very similar 'spiral' path (really just concentric boxes) that hit
the rectangular optimisations so that we can compare how effective they
are.
2009-08-26 23:51:43 +01:00
Chris Wilson
e79a9a87c3 [perf] Support objdir!=srcdir in cairo-perf-diff
Crude support to detect when we have cairo-perf-diff-files in the local
directory which is not srcdir.
2009-08-26 23:51:43 +01:00
Chris Wilson
6bfb77a33c [perf] Add spiral strokes
Use cairo_stroke() to perform the equivalent of
spiral-rect-(pix|non)align-evenodd-fill. A useful comparison of stroking
versus filling, as we can assume the composition costs are similar.
2009-08-26 23:51:42 +01:00
Chris Wilson
54b2935c38 [perf] Reset the path after each spiral
Oops we were accumulating paths during each spiral iteration and so the
tests were getting slower and slower and slower...

[And fix a couple of other instances of path accumulation.]
2009-08-26 23:51:42 +01:00
Chris Wilson
fddfe4973f [perf] Add clipped modes to dragon
Investigate the performance hit for unclipped/aligned/unaligned/masked
modes with a reasonably complex geometry.
2009-08-26 23:51:42 +01:00
Chris Wilson
d1b8e260d4 [qt] Fix compilation
Enabling 'FAST CLIP' appears to trigger an infinite loop so disable.

Enabling 'FAST FILL' has limited effect on performance, so disable whilst
the basic QT surface is improved.
2009-08-10 21:31:10 +01:00
Chris Wilson
a439bd99d0 [perf] Compare drawing random curves
Extend the intersection tests with straight lines, with random curves as
well.
2009-08-06 10:17:21 +01:00
Chris Wilson
0db9e010fa [perf] Calibrate tests to run for at least 2 seconds
By ensuring that tests take longer than a couple of seconds we eliminate
systematic errors in our measurements. However, we also effectively
eliminate the synchronisation overhead. To compensate, we attempt to
estimate the overhead by reporting the difference between a single
instance and the minimum averaged instance.
2009-08-06 10:15:40 +01:00
Chris Wilson
e283e53563 [perf] Print min_ticks in report
As the change and ranking is based on the min_ticks, and as this can
sometimes deviate wildly from median_ticks, include min_ticks in the
output.

In particular it helps to explain cases like:

xlib-rgba rectangles_similar-rgba-mag_source-512    10.13 88.41% ->   5.77 0.19%:  1.50x slowdown

which becomes

xlib-rgba rectangles_similar-rgba-mag_source-512    3.83 (10.13 88.41%) ->   5.75 (5.77 0.19%):  1.50x slowdown

(Considering the poor standard deviation on the initial measurement, this
is more likely a sampling error than a true regression.)
2009-07-31 10:51:30 +01:00
Chris Wilson
ce8a8424aa [perf] Change the order of slowdowns.
More the large slowdowns to the end. This has two pleasing effects:

  1. There is symmetry between large speedups at the top, and large
     slowdowns at the bottom, with long bars -> short bars -> long bars.

  2. After a cairo-perf-diff run the largest slowdowns are immediately
     visible on the console. What better way to flag performance
     regressions?
2009-07-31 09:43:12 +01:00
Chris Wilson
877ed645f9 [perf] Add a more complex fill, a set of rings
In investigating performance regressions with the wip/tessellator, I'm
keen to inspect how the tessellator scales with polygon complexity.
2009-07-31 09:43:12 +01:00
Chris Wilson
3dbc4170f0 [perf] Add a single shot long-lines
Compare the performance of self-intersection removal by comparing the cost
of individually stroking each line versus stroking them all en-mass.
2009-07-31 09:43:12 +01:00
Chris Wilson
2f033af5ab [perf] Fix the asymmetry in long lines
We missed the final long diagonal to the bottom-right.
2009-07-31 09:43:12 +01:00
Chris Wilson
944206e55b [perf] Correct typo in long-lines.c
Computed may_y using height not width, fortunately the test cases have
always been square.
2009-07-31 09:43:12 +01:00
Chris Wilson
229887e980 [perf] Check output
Add a CAIRO_PERF_OUTPUT environment variable to cause cairo-perf to first
generate an output image in order to manually check that the test is
functioning correctly. This needs to be automated, so that we have
absolute confidence that the performance tests are not broken - but isn't
that the role of the test suite? If we were ever to publish cairo-perf
results, I would want some means of verification that the test-suite had
first been passed.
2009-07-31 09:39:38 +01:00
Chris Wilson
8c6ecfe648 [perf] Remove the warning about failing to open a directory
The warning is repeated in the error message if we fail to find any
traces, and now that we search a path it is likely that some elements do
not exist. Thus we annoy the user with irrelevant, non-fatal warnings.

Still looking for suggestions for the most appropriate home for the system
wide cairo-traces dir...
2009-07-29 16:19:21 +01:00
Chris Wilson
8c1aed17ca [perf] Add another stroking micro-benchmark
The original stroke only contains a single subpath. Self-intersection
removal particularly affects strokes with multiple curved segments, so add
a path that encompasses both straight edges and rounded corners.
2009-07-29 16:17:12 +01:00
Chris Wilson
c11f369057 [perf] Avoid NULL derefs on broken result files.
Instead of testing for a NULL return we checked that the pointer didn't
point to NIL. Oops.
2009-07-28 13:02:10 +01:00
Chris Wilson
0c4692a1d0 [perf] Specify html file on cmdline instead of redirecting all output
Redirecting all output was causing the build messages to be entangled with
the Performance Change html.
2009-07-24 10:44:03 +01:00
Chris Wilson
1ec1d6148e [perf] Compare performance against most recent tag. 2009-07-24 10:44:02 +01:00