summaryrefslogtreecommitdiff
path: root/perf
AgeCommit message (Collapse)AuthorFilesLines
2010-01-22perf: Enable a surface cache for perf-traceChris Wilson2-5/+139
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-22gitignore: refreshChris Wilson1-0/+1
Add forgotten local targets to .gitignore
2009-10-26gitignore: Add forgotten cairo-perf-printChris Wilson1-0/+1
2009-10-26perf: Fix comparisonsChris Wilson1-7/+15
The sort order was unstable resulting in incorrect ordering dependent upon libc version.
2009-10-22[meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.M Joonas Pihlaja2-4/+4
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-09-29[perf] Support parsing reports from stdinChris Wilson2-20/+31
2009-09-15[perf] Reorganise cairo-perfChris Wilson33-43/+46
In preparation to creating a new hub to control performance measuring and reporting, move the current cairo-perf out of the way.
2009-09-08[build] Improve handling of missing test apparatusChris Wilson1-1/+1
Improve detection, reporting and disabling of test backends when we lack the required libraries and utilities.
2009-09-05[perf] Move the calibration to its own functionChris Wilson1-30/+41
Improve code clarity and whatnot.
2009-09-05[perf] Add a fast-and-sloppy mode to cairo-perf.M Joonas Pihlaja2-20/+42
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-04[perf] Use milliseconds by default in cairo-perf-diff-filesChris Wilson1-5/+8
Necessary when comparing performance reports from different machines (or even at different CPU states).
2009-08-30[perf] Trim outliers from chartChris Wilson1-39/+172
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-29Add skia backendVladimir Vukicevic2-0/+6
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[perf] Match directory namesChris Wilson28-39/+68
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[perf] Reset global caches after every traceChris Wilson1-0/+5
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[perf] Remove cpuset warning for cairo-perf-traceChris Wilson1-47/+0
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[perf] Add charting utilityChris Wilson2-0/+755
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-26[perf] Fix unaligned-clipChris Wilson1-1/+3
We failed to reset the scale after each loop, eventually generating a vast clip-mask that exceeded memory capacity.
2009-08-26[perf] Add a box mode to spiralChris Wilson1-0/+73
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[perf] Support objdir!=srcdir in cairo-perf-diffChris Wilson1-10/+16
Crude support to detect when we have cairo-perf-diff-files in the local directory which is not srcdir.
2009-08-26[perf] Add spiral strokesChris Wilson1-0/+73
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[perf] Reset the path after each spiralChris Wilson3-0/+5
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[perf] Add clipped modes to dragonChris Wilson1-0/+35
Investigate the performance hit for unclipped/aligned/unaligned/masked modes with a reasonably complex geometry.
2009-08-10[qt] Fix compilationChris Wilson1-1/+1
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-06[perf] Compare drawing random curvesChris Wilson1-1/+57
Extend the intersection tests with straight lines, with random curves as well.
2009-08-06[perf] Calibrate tests to run for at least 2 secondsChris Wilson28-381/+496
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-07-31[perf] Print min_ticks in reportChris Wilson1-1/+3
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[perf] Change the order of slowdowns.Chris Wilson1-4/+7
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[perf] Add a more complex fill, a set of ringsChris Wilson1-0/+37
In investigating performance regressions with the wip/tessellator, I'm keen to inspect how the tessellator scales with polygon complexity.
2009-07-31[perf] Add a single shot long-linesChris Wilson1-11/+34
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[perf] Fix the asymmetry in long linesChris Wilson1-1/+1
We missed the final long diagonal to the bottom-right.
2009-07-31[perf] Correct typo in long-lines.cChris Wilson1-1/+1
Computed may_y using height not width, fortunately the test cases have always been square.
2009-07-31[perf] Check outputChris Wilson1-0/+19
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-29[perf] Remove the warning about failing to open a directoryChris Wilson1-3/+1
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[perf] Add another stroking micro-benchmarkChris Wilson1-0/+36
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-28[perf] Avoid NULL derefs on broken result files.Chris Wilson1-4/+4
Instead of testing for a NULL return we checked that the pointer didn't point to NIL. Oops.
2009-07-24[perf] Specify html file on cmdline instead of redirecting all outputChris Wilson2-5/+5
Redirecting all output was causing the build messages to be entangled with the Performance Change html.
2009-07-24[perf] Compare performance against most recent tag.Chris Wilson1-1/+6
2009-07-23[drm] Add an accelerated image surface.Chris Wilson2-1/+7
Use the DRM interface to h/w accelerate composition on image surfaces. The purpose of the backend is simply to explore what such a hardware interface might look like and what benefits we might expect. The use case that might justify writing such custom backends are embedded devices running a drm compositor like wayland - which would, for example, allow one to write applications that seamlessly integrated accelerated, dynamic, high quality 2D graphics using Cairo with advanced interaction (e.g. smooth animations in the UI) driven by a clutter framework... In this first step we introduce the fundamental wrapping of GEM for intel and radeon chipsets, and, for comparison, gallium. No acceleration, all we do is use buffer objects (that is use the kernel memory manager) to allocate images and simply use the fallback mechanism. This provides a suitable base to start writing chip specific drivers.
2009-07-23Remove clip handling from generic surface layer.Chris Wilson1-0/+3
Handling clip as part of the surface state, as opposed to being part of the operation state, is cumbersome and a hindrance to providing true proxy surface support. For example, the clip must be copied from the surface onto the fallback image, but this was forgotten causing undue hassle in each backend. Another example is the contortion the meta surface endures to ensure the clip is correctly recorded. By contrast passing the clip along with the operation is quite simple and enables us to write generic handlers for providing surface wrappers. (And in the future, we should be able to write more esoteric wrappers, e.g. automatic 2x FSAA, trivially.) In brief, instead of the surface automatically applying the clip before calling the backend, the backend can call into a generic helper to apply clipping. For raster surfaces, clip regions are handled automatically as part of the composite interface. For vector surfaces, a clip helper is introduced to replay and callback into an intersect_clip_path() function as necessary. Whilst this is not primarily a performance related change (the change should just move the computation of the clip from the moment it is applied by the user to the moment it is required by the backend), it is important to track any potential regression: ppc: Speedups ======== image-rgba evolution-20090607-0 1026085.22 0.18% -> 672972.07 0.77%: 1.52x speedup ▌ image-rgba evolution-20090618-0 680579.98 0.12% -> 573237.66 0.16%: 1.19x speedup ▎ image-rgba swfdec-fill-rate-4xaa-0 460296.92 0.36% -> 407464.63 0.42%: 1.13x speedup ▏ image-rgba swfdec-fill-rate-2xaa-0 128431.95 0.47% -> 115051.86 0.42%: 1.12x speedup ▏ Slowdowns ========= image-rgba firefox-periodic-table-0 56837.61 0.78% -> 66055.17 3.20%: 1.09x slowdown ▏
2009-07-23[perf] Add a simple report printer.Chris Wilson2-2/+78
After a run, it can be useful to reprint the results, so add cairo-perf-print to perform that task. For the future, I'd like to move the performance suite over to the git/perf style of single, multi-function binary. The sequence of operations that I typically do are: ./cairo-perf-trace -r -v -i 6 > `git describe`.`hostname`.perf ./cairo-perf-diff-files REVA REVB ./cairo-perf-print REVA ./cairo-perf-compare-backends REVA which misses the caching available with cairo-perf-diff. 'make html' is almost what I want, but still too prescriptive. However, that does need to be addressed for continuous performance monitoring. Along the perf lines, those sequence of operations become: ./cairo-perf record -i 6 ./cairo-perf report ./cairo-perf report REVA REVB ./cairo-perf report --backends="image,xlib,gl" REVA REVB ./cairo-perf report --html REVA REVB Also we want to think about installing the cairo-perf binary. So we want to differentiate when run inside a git checkout.
2009-07-22[gl] Enable GL backend for cairo-perf-traceChris Wilson2-1/+6
2009-07-21Merge commit 'anholt/gl'Chris Wilson1-0/+1
Conflicts: boilerplate/Makefile.sources boilerplate/cairo-boilerplate.c build/configure.ac.features src/cairo.h util/cairo-script/Makefile.am
2009-07-21[perf] Don't override CAIRO_TRACE_DIR in cairo-perf-diffChris Wilson1-1/+0
2009-07-20[perf] Include trace comparison in html outputChris Wilson3-13/+9
2009-07-20[perf] Search multiple directories for tracesChris Wilson1-2/+21
In view of sharing traces between multiple builder, add some system wide directories to the search path. This should be refined to a single canonical location before release.
2009-07-14[perf] Add cairo-traces to .gitignoreChris Wilson1-0/+1
2009-07-03Export meta-surfaceChris Wilson1-4/+2
The meta-surface is a vital tool to record a trace of drawing commands in-memory. As such it is used throughout cairo. The value of such a surface is immediately obvious and should be applicable for many applications. The first such case is by cairo-test-trace which wants to record the entire graph of drawing commands that affect a surface in the event of a failure.
2009-07-01[perf] Fix use-after-free when retrieving error line numberChris Wilson1-3/+2
We find out the status on destroying the script and then attempt to query the defunct script for more info about the error. Wrong.
2009-07-01[perf] Unbreak cairo-perf-diff builderChris Wilson1-9/+10