Commit graph

41 commits

Author SHA1 Message Date
Unknown
12cb59be7d Cairo trivial typos
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2018-04-02 17:46:58 -07:00
Ravi Nanjundappa
0e0004a971 perf: Refactor some macros to cairo-perf.h
This commit covers one of the left out modifications from
"commit cd11a4ff0421fd293279b202be800550890574bb" by Bryce.
It removes the duplicate macro definition in cairo-perf-diff-files.c
which by default includes the cairo-perf.h having MAX macro defnition.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
2014-04-22 09:51:45 -07:00
Chris Wilson
af9fbd176b 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. :)
2011-09-12 08:29:48 +01:00
Nis Martensen
1a4e9f1e91 Fix typos
Reported in
http://lists.cairographics.org/archives/cairo/2011-May/021921.html
2011-06-25 10:19:23 +02:00
Chris Wilson
27d26bb8b5 cairo-perf-diff-files: Don't print size/content for trace results
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-06 15:09:50 +01:00
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
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
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
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
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
f2ff794426 [perf] A crude tool to visualise performance changes across a series.
Generate a cairo-perf-diff graph for a series of commits in order to be
able to identify significant commits. Still very crude, but minimally
functional.
2008-10-19 09:36:53 +01:00
Chris Wilson
c44f2ab4d1 [perf] Silence trivial compiler warning.
The compiler complained about passing a non-string literal as the format
to printf, so just to sanitize the code and keep the compiler happy, add
the magic "%s" format.
2008-08-17 11:39:56 +01:00
Frederic Plourde
5284f8cab4 [win32] Make cairo-perf-diff run on win32 2008-07-17 13:56:22 -07:00
Chris Wilson
1651359ffb [cairo-perf-diff-files] Only use a valid initializer for min_test.
Do not assume that the tests[0] is a valid test, but instead scan for
the first test that has a name (i.e. is not a terminator).
2007-10-24 19:33:19 +01:00
Chris Wilson
38c779e7d6 [cairo-perf-diff-files] Check for terminator before comparing tests.
Only the name of the terminating test is set so check that the current
test is not the terminator before comparing.
2007-10-23 13:03:40 +01:00
Behdad Esfahbod
8ea48710dc [perf] Check availability before including nonstandard headers 2007-04-30 19:20:56 -04:00
Carl Worth
7e6ab5461c Add missing prototypes for getline and strndup
This is needed to prevent breaking the build for non-GNU systems.
2007-04-28 07:46:56 -07:00
Carl Worth
422798db1d cairo-perf-diff-files: Add missing include of libgen.h for basename 2007-04-28 07:46:15 -07:00
Carl Worth
050dad7173 cairo-perf-diff-files: Always print old and new configuration names
Previously, if the change in the first test case was small enough
to be considered insignificant, then the header lines showing the
names of the old and new configurations would be omitted. This
commit fixes that bug.
2007-04-26 11:30:27 -07:00
Carl Worth
342de46eb4 Make the traditional speedup vs. slowdown report style available again
Now, if you pass exactly two performance reports on the command line
you'll get the traditional report style again, (so the tool remains
backwards compatible). If you really want the new style with two
reports you can get it by adding /dev/null as a third argument.
2007-04-25 11:27:33 -07:00
Carl Worth
db2a761ae7 Implement support for generating a report from more than two files
This support is intended to compare the identical backends across multiple
reports from several different configurations, (of one sort or another).
The configuration names used in the report are taken from the filenames
of the report files, (which will format most nicely if 8 characters or
less).

The traditional two-input report mode, (showing one line perdiff with
all speedups before all slowdowns), is removed with this commit, but
is intended to return again shortly.
2007-04-25 11:27:33 -07:00
Carl Worth
5030cfce5d cairo-perf-diff-files: Use pointers instead of indexing to iterate over reports
We terminate the iteration by adding a final report with a NULL
name. This will simplify future code that iterates over more than
two reports simultaneously.
2007-04-25 11:27:33 -07:00
Carl Worth
6121f4fccf cairo-perf-diff-files: Simplify code to grow report->tests 2007-04-25 11:27:33 -07:00
Carl Worth
cc03f0499e cairo-perf-diff-files: Sort and compute stats at the time of loading a report 2007-04-25 11:27:33 -07:00
Carl Worth
228c83c9d2 cairo-perf-diff: Separate command-line options within the args structure
A function like cairo_perf_report_diff wants the options, but really
doesn't want/need to see the filenames for example,
2007-04-25 11:27:33 -07:00
Carl Worth
876786b3f7 Move implementation of getline and strndup
These kept getting in my way as I looked for structure declarations
at the top of the file.
2007-04-25 11:27:33 -07:00
Carl Worth
90d532e08f Replace old and new reports with reports array
Another baby step toward allowing comparison of more than two reports.
2007-04-25 11:27:33 -07:00
Carl Worth
c6c17633e4 Replace old_filename and new_filename with a filenames array
More preparation for comparing more than two perf reports.
2007-04-25 11:27:33 -07:00
Carl Worth
1849a7a8be cairo-perf-diff-files: Add new --min-change option, (replacing third positional argument)
An upcoming change will allow cairo-perf-diff-files to generate
a report based on more than two files. This prepares for that by
moving the minimum-change support from the 3rd positional argument
to a new --min-change option.
2007-04-25 11:27:32 -07:00
Carl Worth
a8d4fed67a cairo-perf-diff-files: Remove some overzealous option parsing.
The code was complicated and confusing, and only existed to implement
undocumented and unneeded command-line options.
2007-04-25 11:27:32 -07:00
Carl Worth
ef3e13337e cairo-perf-diff: Use median not minimum to report differences
Ideally, the minimum value would indicate the best possible performance,
but I've encountered situations where a bogus minimum value gets lodged
into the cached results for some reason, (and yet doesn't also get
discarded as an outlier). The downside of that situation is that running
more iterations never changes the result, so it's hard to fix the problem,
(resulting in cairo-perf-diff feeling just plain broken as more runs
change nothing).

So let's try using the median time instead.
2007-04-13 13:36:49 -07:00
Kalle Vahlman
2f6d184e66 Add --use-ms option to cairo-perf-diff-files
This allows for comparing perf files generation on different hardware
platforms, (since the ticks can be very different on different hardware).
2007-01-19 16:47:31 -08:00
M Joonas Pihlaja
8354906381 Make UTF-8 output from cairo-perf-diff-files optional
This patch adds options to disable the UTF-8 change bars and replace
them with ASCII '*' gfx. The motivation is that UTF-8 really does some
damage to some terminals, and some always forget to pipe stuff through
a pager to make it safe. The new options for cairo-perf-diff-files are:

	--no-utf
	--no-bars
2007-01-19 16:47:31 -08:00
M Joonas Pihlaja
4057a98f88 cairo-perf-diff-files: Don't segfault reading cooked perf reports.
Fixes cairo-perf-diff-files for non-raw cairo-perf reports.  Similar
to the patch on the mailing list, only applied to the caller of
_cairo_stats_compute():

http://lists.freedesktop.org/archives/cairo/2006-December/008720.html
2006-12-05 06:02:45 +02:00
Dan Amelang
3dbe468fd6 [perf] Provide watered-down implementations of getline and strndup for
building on non-GNU toolchains.
2006-12-01 14:12:16 -08:00
Carl Worth
439bf81e56 Fix broken size calculation for xrealloc
Another one of those "untested code == broken code" situations.
2006-11-10 10:00:31 -08:00
Carl Worth
6d5df0e3e2 cairo-perf-diff-files: Add support for diffing "raw" files from "cairo-perf -r" 2006-11-08 06:07:01 -08:00
Carl Worth
b717e98777 cairo-perf: Change outlier elimination and report minimum times.
Instead of just discarding the worst 15% of the results, we now
do IQR-based detection and elimination of outliers. Also, instead
of reporting mean times we now report minimum and median times.
We still do compute the mean and standard deviation for the
detection of when results seem stable for early bailout. And we
do still report the standard deviation.

A statistician might complain that it looks funny to report the
median and the standard deviation together, (instead of median
and average absolute deviation from the median, say), but I liked
the standard deviation since it is always larger, so it might
ensure better separatation if we use it to determine when two
sets of results are sufficiently different to be interesting.
2006-11-02 12:21:26 -08:00
Carl Worth
a9f51c2973 Add new cairo-perf-diff for finding the performance difference between any 2 revisions.
The old cairo-perf-diff is now named cairo-perf-diff-files, but
the new one calls out to it and can still be used in an identical
way.

The new cairo-perf-diff can also be used to see what the performance
impact of a single commit is like so:

	cairo-perf-diff HEAD

or between two commits:

	cairo-perf-diff 1.2.4 HEAD

The script is careful to always run the latest cairo-perf program
even when testing old versions of the library. Also, the output
from any given performance run is cached so it gets less painful
to run as the cache gets primed (the cache is in .perf next to
.git).

The script is still a bit fragile in spots. In particular it depends
on cairo-perf being built in advance but doesn't do anythin to ensure
that happens.
2006-10-25 17:15:22 -07:00
Renamed from perf/cairo-perf-diff.c (Browse further)