Commit graph

243 commits

Author SHA1 Message Date
Chris Wilson
1f542965f0 [perf] Mention cairo-perf-compare-backends in the README 2009-06-13 08:24:22 +01:00
Chris Wilson
a41e1275d2 [boilerplate] Make array of targets const.
Protect the boilerplate targets from unexpected modifications.
2009-06-12 22:28:38 +01:00
Chris Wilson
9e3019ef98 [perf] Add libcairoperf.la to DEPENDENCIES
It seems adding the explicit dependencies to encourage it to rebuild
components from other parts of the source tree removed the automagic
dependency of libcairoperf.la. So add it to the list. Maybe this is not
the correct solution, but it works again for now.
2009-06-11 22:27:18 +01:00
Chris Wilson
55cbf52547 [perf] Fix -i getopt parsing.
Gah, I presumed that the ':' separated options that required arguments
from stand-alone options. I was wrong. The ':' indicates that the
preceding option takes an argument. So add it back to -i.
2009-06-11 15:40:27 +01:00
Chris Wilson
ecee5663bf [perf] Fixup compare-backends to work with just a single test. 2009-06-11 15:19:50 +01:00
Chris Wilson
42c0aee1d9 [perf] Add a -x to exclude traces from a benchmark.
Read names of traces to exclude from a file specified using -x on the
commandline, i.e.
$ ./cairo-perf-trace -x cairo-traces/tiny.exclude

This is a convenient method for me to exclude certain traces for
particular machines. For example tiny cannot run
firefox-36-20090609.trace as that has a greater working set than the
available RAM on tiny.
2009-06-11 13:00:31 +01:00
Chris Wilson
81b5dc42b0 [perf] Expand the section on cairo-perf-trace in the README
Promote the information on how to use cairo-perf-trace and include it
immediately after the details on cairo-perf. This should make it much
clearer on how to replay the traces, and the difference between the two
benchmarks.
2009-06-10 08:52:50 +01:00
Chris Wilson
ec92e633ed [perf] Couple cairo-perf-traces into make perf
Rather than complicating cairo-perf to extend it to perform both micro-
and macro-benchmarks, simply run the two binaries in succession during
make perf.

For bonus points, consider whether we should hook cairo-perf-trace into
cairo-perf-diff.
2009-06-10 08:52:43 +01:00
Chris Wilson
0db946cdd9 [perf] Add explicit dependences for the local libraries
Update the build rules and add the dependences for the libraries built in
other parts of cairo.
2009-06-10 08:52:35 +01:00
Chris Wilson
39bac6eddd [perf] Mention cairo-perf-trace early on in the README 2009-06-08 11:52:56 +01:00
Chris Wilson
34ccaeae2d [perf] Continuously update the summary for traces 2009-06-08 00:12:28 +01:00
Chris Wilson
4ccfd474a3 [perf] Switch to using clock_gettime()
Try using clock_gettime() for a high resolution stable time source in
preference to the potentially unstable TSC.
2009-06-06 13:37:00 +01:00
Chris Wilson
867c88ae90 [script] Add a finish method to the interpreter
When using fonts circular references are established between the holdover
font caches and the interpreter which need manual intervention via
cairo_script_interpreter_finish() to break.
2009-06-06 12:59:39 +01:00
Chris Wilson
4e11d56f8e [perf] Update trace summary after each iteration
Running the macro-benchmarks takes so long, feedback is important.
2009-06-04 11:16:48 +01:00
Chris Wilson
5c2e73e74c [perf] Enable traces to be interrupted
Waiting for a long running benchmark can be very annoying, especially if
you just want a rough-and-ready result. So hook into SIGINT and stop the
current benchmark (after the end of the iteration) on the first ^C. A
second ^C within the same iteration will kill the program as before.
2009-06-04 10:03:45 +01:00
Chris Wilson
2eaced2447 [perf] Reconstruct interpreter for each run
Destroy the interpreter after each run of a trace so that we collect any
left-over garbage.
2009-06-03 21:49:17 +01:00
Chris Wilson
fa5d6c7afd [trace] Add a --profile mode
To save typing when creating macro-benchmarks --profile disables
mark-dirty and caller-info and compresses the trace using LZMA. Not for
computers short on memory!
2009-06-03 19:29:19 +01:00
Chris Wilson
9451f0b983 [perf] Drop ticks from trace benchmarks
Don't report the tick values for the macro-benchmarks as these are so
large as to be meaningless.
2009-06-03 13:26:52 +01:00
Chris Wilson
eec5476484 [perf] s/git/anongit/
Third time lucky?
2009-06-03 08:57:15 +01:00
Chris Wilson
ce7e633942 [perf] Warn if no traces were found 2009-06-02 21:59:07 +01:00
Chris Wilson
f0366f0f32 [perf] Update to point to new toplevel cairo-traces repo 2009-06-02 21:48:26 +01:00
Chris Wilson
d331dda480 [perf] Missing ')' in output 2009-06-02 15:41:19 +01:00
Chris Wilson
7ed050fd43 [perf] Benchmark traces
Add a variant of cairo-perf that measures the time to replay traces.
2009-06-02 15:13:47 +01:00
Chris Wilson
403f780b29 [perf] Add a verbose flag for summary output with raw
Use 'cairo-perf -v -r' to have both the summary output along with the raw
values. This gives a progress report whilst benchmarking, very reassuring
with long running tests.
2009-06-02 15:13:47 +01:00
Chris Wilson
70fd2bbce3 [perf] Exclude similar testing by default
There are synchronisation issues with similar surfaces (as only the
original target surface is synced) which interferes with making
performance comparisons. (There still maybe some value should you be aware
of the limitations...)
2009-06-02 15:13:47 +01:00
Chris Wilson
bc49cb377c [perf] Benchmark mixing different masks and sources 2009-06-02 15:13:47 +01:00
Chris Wilson
4aca84ddb2 [perf] Add a pure glyphs performance metric
Use the new API Behdad exposed in 1.8 to precompute a glyph string using
Cairo and then benchmark cairo_show_glyphs(). This is then equivalent to
the text benchmark but without the extra step of converting to glyphs on
every call to cairo_show_text() i.e. it shows the underlying glyph
rendering performance.
2009-06-02 15:13:46 +01:00
Chris Wilson
55f4e0e4e8 [perf] Change seperators from '-' to '.'
This allows the perf tests to use '-' in the name which is easier to read
and differentiates with using '_' to separate source and operators.
2009-06-02 15:13:46 +01:00
Chris Wilson
578b06a978 [perf] Use CAIRO_LDFLAGS
Use CAIRO_LDFLAGS in order to pull in additional link options, such as
--coverage.
2009-03-24 07:50:58 +00:00
M Joonas Pihlaja
e380beae53 [sdl] Remove new backend.
The SDL backend makes invalid assumptions about SDL_Surface locking
semantics and doesn't deal correctly with the unpremultiplied pixel
format supported by SDL.  Removed as per discussion on the mailing list.

http://lists.cairographics.org/archives/cairo/2009-February/016595.html
2009-02-16 14:01:43 +02:00
Chris Wilson
fa66291c88 [perf] Test non-antialiased fill.
Just because the i915 can special case such fills using a single-pass
tessellation in the stencil buffer.
2009-02-13 14:13:32 +00:00
Chris Wilson
aab9ed3432 [perf] Env variable to ignore similar targets whilst benchmarking.
Use CAIRO_TEST_IGNORE_SIMILAR to skip similar targets.
2009-02-13 14:13:25 +00:00
Chris Wilson
655f698733 [perf] Split can_run? into a separate precondition.
Allow tests to skip unnecessary setup when pruning the list of perf cases.
2009-02-13 13:26:53 +00:00
Chris Wilson
798581a1b5 [perf] Extend range of testing.
Primarily to test longer glyph runs, but also test large upper bounds for
strokes and fills.
2009-02-13 13:26:53 +00:00
Chris Wilson
1522fac5c7 [perf] Fix infinite loop in text
The row would wrap-around with the character index, causing an infinite
loop when trying to fill a window of size 512x512 and above.
2009-02-13 13:26:52 +00:00
Chris Wilson
75f7c420b6 [perf] Remove a redundant clear during source init.
After a short wild goose chase to see why
cairo_image_surface_fill_rectangles() was appearing in the profile,
tweak init_and_set_source_surface() to remove the redundant clear and
to propagate any errors in the auxiliary context.
2009-01-29 10:10:38 +00:00
Chris Wilson
706f6de68d [perf] Add another variation on the many-rectangles case
This variation aims to show the difference between calling fill once
per-rectangle, or once for all rectangles.
2009-01-29 10:10:38 +00:00
Chris Wilson
6801f28f6d [perf] Add a utility to compare backends.
A minor variation on cairo-perf-diff-files that compares tests with the
same name for multiple backends.
2009-01-14 16:51:09 +00:00
Chris Wilson
4c79cd480d [perf] Tweak dragon to hit fill_rectangles().
Add a second dragon path that is pixel-aligned and uses a solid pattern,
so that it can be drawn using fill-rectangles.
2009-01-14 16:51:09 +00:00
Chris Wilson
de9e6b5a3f [perf] Cover linear gradient with 3 stops.
The i915 is able to special case gradients with just 2 color stops to
avoid creating temporary gradient textures, so add a 3 stop linear
gradient to compare the speed difference.
2009-01-14 16:51:09 +00:00
Chris Wilson
7cbc55f216 [perf] Add scaled similar surface sources.
Cover the similar source with min/mag scale factors as well, so we can
compare the performance impact with scaled image sources. This is useful
to distinguish between transport overhead and transform cost.
2009-01-14 16:51:09 +00:00
Chris Wilson
6662eede2a [perf] Fix errors reported by cppcheck
Trivial mistakes, identified in bugs
http://bugs.freedesktop.org/show_bug.cgi?id=19206 and
http://bugs.freedesktop.org/show_bug.cgi?id=19207.
2009-01-02 09:53:20 +00:00
Chris Wilson
8419c4f124 [perf] Correct another reference to '<cairo>'
I think that's the last use of the old internal name for twin!
2009-01-02 09:53:20 +00:00
Chris Wilson
0a1d194ad8 [perf] Fix for git-1.6
git-1.6 moved all the subcommands out of the PATH so update our usage.
2008-12-14 16:41:17 +00:00
Chris Wilson
0c0f4862c5 [perf-diff] Fix cairo-perf-diff for git 1.6
Since git 1.6 the plumbing commands aren't installed in the user's
path by default.  This patch fixes cairo-perf-diff to find the
git-sh-setup command from git's lib dir.
2008-12-06 13:32:37 +02:00
M Joonas Pihlaja
afba0c3129 [perf] Add perf tests to hit rectilinear code paths.
These tests look at the differences in code paths
hit by filling paths that are rectilinear (or not) and
pixel aligned (or not) with the even-odd and non-zero
fill rules.  The paths are not simple, so they don't
hit the special case quad/triangle tessellator.
2008-12-06 13:30:29 +02:00
M Joonas Pihlaja
8ec58113df [perf] Explicitly test rendering a path with lots of intersections.
We don't have one just for this purpose.  The only other
path with many intersections that gets actually rendered is zrusin-another,
but that might be sped up in the future (say by identifying
collinearities up front or something like that.)
2008-12-06 13:21:44 +02:00
Chris Wilson
36147140ce [perf] Fix build
If automake detects the use of cairo_perf_LDADD in an unused conditional
that overrides the default - so we need to manually set cairo_perf_LDADD.
2008-11-29 10:13:53 +00:00
Paolo Bonzini
993941cfd7 [perf] Fix SDL compilation for MacOS X
The attached patch makes the SDL tests compile under Mac OS X.  The
problem is:

1) that <SDL_main.h> should be included in files that define the main
function for SDL Mac OS X programs (this is not true with the upcoming
SDL 1.3 release).

2) that -lSDLmain, because it is statically linked, needs the Cocoa
framework in the LDADD of the main program.  Again, 1.3 will not require
this.
2008-11-26 16:15:35 +00:00
Chris Wilson
7657bda017 [perf/pythagoras_tree] Another fractal.
Test lots of rectangles and recursion path construction.
2008-11-19 14:06:10 +00:00