| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ctype(3) character classification and mapping functions have a
peculiarly limited definition (C11, Sec. 7.4 `Character handling
<ctype.h>', p. 200):
`The header <ctype.h> declares several functions useful for
classifying and mapping characters. In all cases the
argument is an int, the value of which shall be
representable as an unsigned char or shall equal the value
of the macro EOF. If the argument has any other value, the
behavior is undefined.'
In other words, in the most common case of 8-bit char and EOF = -1,
the domain of the 257 allowed arguments is:
-1, 0, 1, 2, ..., 254, 255
The ctype(3) functions are designed for use with stdio functions like
getchar and fgetc which return int values in the same domain.
In an ABI where char is signed (e.g., x86 SysV ABI used by most
Unixish operating systems), passing an argument of type char as is
can go wrong in two ways:
1. The value of a non-EOF input octet interpreted as `char' may
coincide, as an integer, with the value of EOF, leading to wrong
answers for some non-EOF inputs.
E.g., if EOF = 1, and an input octet has all bits set, i.e., 255
as an unsigned char, then as a char the value is -1, which will be
confused with EOF. In the ISO-8859-1 locale, the code point 255
is (in Unicode terminology) LATIN SMALL LETTER Y WITH DIAERESIS,
for which isprint, isalpha, &c., are true. But isprint, isalpha,
&c., are false for EOF. So if char *s points to a string with
that character, isprint(*s) will return false when it should
return true.
2. Passing a negative char whose value does not coincide with EOF is
undefined behaviour.
This isn't purely theoretical: often the functions are implemented
by an array lookup, #define isprint(c) (ctypetab[c] & ISPRINT).
If c is out of range (e.g., 192, ISO-8859-1 for LATIN CAPITAL
LETTER A WITH GRAVE, which convers to (signed) char as -64), then
you can get garbage answers by reading uninitialized memory or
application crashes with SIGSEGV if the page preceding the table
is unmapped.
If what you have is an arbitrary char (e.g., from a char * string
pointing at user input), then the only correct way to use the
ctype(3) functions is by converting to unsigned char first -- e.g.,
isprint((unsigned char)*s). (If the functions were defined as macros
that convert to unsigned char first, they would then spuriously
interpret EOF as a non-EOF, so they can't do that themselves.)
It is possible, in some cases, to prove that the input always
actually lies in {0, 1, 2, ..., 127}, so the conversion to unsigned
char is not necessary. I didn't check whether this was the case --
it's safer to just adopt the habit of always casting char to unsigned
char first before using the ctype(3) macros, which satisfies a
compiler warning on some systems designed to detect this class of
application errors at compile-time.
|
|\
| |
| |
| |
| | |
Delete cairo/perf/make-html.py
See merge request cairo/cairo!448
|
| |
| |
| |
| |
| |
| |
| | |
This file has not been updated in 13 years and does not correspond to
the current implementation of cairo perf. The code is in Python 2 and
will generate syntax errors on current versions of Python.
See !7 and !357
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
../perf/cairo-perf-chart.c:232:4: warning: variable 'sum' is uninitialized when used here [-Wuninitialized]
sum += v/100;
^~~
../perf/cairo-perf-chart.c:142:43: note: initialize the variable 'sum' to silence this warning
double slow_sum = 0, fast_sum = 0, sum;
^
= 0.0
|
| |
| |
| |
| |
| |
| |
| | |
We're using an EOL version of GTK; we know we are using deprecated API.
Until somebody shows up with a replacement, or until we drop the perf
widget, we should avoid unnecessary compiler warnings.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WINVER and _WIN32_WINNT macros were defined in each source files and
headers that were including <windows.h>. However, because DirectWrite
requires new Windows API, some files included <windows.h> without the
version macros. This inconsistency sometimes caused troubles.
Define the version macros in meson.build.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
are used
In !309 Taylor R Campbell found a number of instances of ctype
incorrectly passed a signed char. In many cases, where only ASCII
characters are used, the code should have been using the cairo version
of the ctype function to avoid locale issues.
|
|
|
|
|
|
|
| |
OS/2 support was last built in Cairo 1.12, which was released 10 years
ago.
Additionally, OS/2 is not supported by Meson.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I merged two MRs and broke the build:
- One MR added perf/ to the meson build
- The second MR changed lots of meson code to just dependency objects
instead of just "messing" with include directories and library objects
The result was that perf/meson.build now referred to include objects and
library objects that no longer exist.
Fix this by also using dependency objects in perf/.
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
| |
This adds the code under perf/ to meson. The only testing I did was "it
builds for me". I do not have gtk+2 installed and so I did not even try
whether that thing builds. Besides that, I mostly tried to stay close to
the autofoo build.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We *always* generate this file, and we depend on its existence.
The idea behind HAVE_CONFIG_H was being able to include random files
from different projects, back in a time where "libraries" were literally
just random files instead of actual shared objects.
Since we're not in the '80s any more, and our build system(s) define
HAVE_CONFIG_H *and* generate the config.h header file, we don't need a
conditional guard around its inclusion.
|
|
|
|
|
|
| |
We define _GNU_SOURCE globally in both the Autotools build, through the
use of the AC_USE_SYSTEM_EXTENSIONS macro; and in the Meson build, with
add_project_arguments().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was originally added to make bisecting easier,
but has outlived its usefuleness now.
Going forward we'll have just a single cairo-version.h
header file, the one with the real version numbers.
This is needed to fix the case where cairo is being
built as a Meson subproject, but also simplifies
things in general.
Fixes #421
|
|
|
|
|
|
|
| |
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7da
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IGT wants to add support for planes with a bit depth >10, which
requires a higher precision format than we have currently.
I'm using RGBA as format, because of its existence in OpenGL.
With the new formats we can directly convert our bytes to half float,
or multiply a colro vector with a matrix to go to the Y'CbCr colorspace.
This requires pixman 0.36.0, so bump the version requirement.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
|
|
|
|
|
|
|
|
| |
Run the command below suggested by geirha in ##sed@irc.freenode.net.
git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
On AIX 6.1, getdelim() and getline() are not provided by default,
causing a gcc compilation error. With _GETDELIM defined, AIX's stdio.h
header provides definitions for these routines.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89356
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new command line option FORMAT which can take rgb and/or rgba
values which enables the execution of tests only for the given FORMAT
For ex:
(1). CAIRO_TESTS="zero-alpha" make test TARGETS=ps2,image FORMAT=rgba,rgb
This command runs the zero-alpha test for both ps2 and image backends
with argb32 and rgb24 content formats.
(2). CAIRO_TESTS="zero-alpha" make test TARGETS=ps2,image FORMAT=rgba
This command runs the zero-alpha test for both ps2 and image backends
with argb32 content format and so on.
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
These macros are standard in src's cairoint.h and test's cairo-test.h
internal header files, so for consistency do the same thing with perf's
cairo-perf.h.
Reviewed-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This quells the following warning:
perf/micro/hatching.c:39:5: warning: cannot optimize loop, the
loop counter may overflow
Width and height aren't going to be negative so enforce it so that the
compiler can do whatever optimization it wants to do.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
The macro benchmarks were moved to a separate repository some time ago,
but the perf README still refers to these tests as if they were still
present, which may lead to some confusion. Instead, consolodate the
macro benchmark documentation with the macro benchmarks, and focus this
README on just the (still in tree) micro-benchmarks.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Remove the intentional #error for non-UNIX path used to remind me to fix
up configure.ac.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
If we have more rows than the max_count in any column, we end up
stretching the histogram vertically, which makes it harder to read.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
If running ./cairo-perf-print in a terminal, query the terminal size and
rescale the histogram to use the maximum available space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you call ./cairo-perf-print --histogram results.txt, it will then
print a histogram of the results, one per test. Ideally, you should see
a skewed distribution (with a negative skew representing that most results
run in optimal time), but random sampling errors (scheduling,
throttling, general inefficiency etc) will push it more towards a normal
distribution.
For example,
| x |
| x xx |
| x xx |
| x xx |
| xxxx |
| xxxx x |
| x xxxxxx |
| x xxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxx |
| xxxxxxxxxxxx |
| xxxxxxxxxxxx |
| xxxxxxxxxxxx |
| xxxxxxxxxxxxxx |
|x xxxxxxxxxxxxxx |
|x x xxxxxxxxxxxxxxx |
|x x xxxxxxxxxxxxxxx |
|x x xxxxxxxxxxxxxxxxx |
|xxx x xxxxxxxxxxxxxxxxxxx |
|xxx xxxxxxxxxxxxxxxxxxxxxxxxx |
|xxxxxx xxxx x x x x xxx xx xxxxx xxx x xxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
.------------------------------------------------------------------------------.
xlib firefox-fishtank 8298.44 1.53% (829/946)
Starts off reasonably, but quickly deteriorates as the integrated CPU/GPU
overheats and is forced to throttle.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a regression from
commit 2855ff4666922f2c38505414270d47f659b0d499
Author: Andrea Canciani <ranma42@gmail.com>
Date: Wed Aug 31 16:42:03 2011 +0200
perf: Reuse cairo-time
which dropped the essential call to synchronize when refactoring the
code.
Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
The importance of writing to the scratch surface before retrieving an
image is that it makes that the write lands in the server queue, as well
as the GetImage, in order to serialise the timer against all the
operations.
Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
|
|
|
|
|
|
| |
Although in this case the boolean values are guaranteed to be 1/0,
using them as true/false (in an if condition) seems much saner than
using them to limit the number of iterations on a for loop.
Fixes:
cairo-perf-micro.c:221:5: warning: cannot optimize possibly infinite
loops [-Wunsafe-loop-optimizations]
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Don't open code xstrdup, just use it.
|