[Pixman] [RFC] Performance reporting capabilities for pixman?
Maarten Bosmans
mkbosmans at gmail.com
Wed Oct 20 03:40:26 PDT 2010
2010/10/20 Siarhei Siamashka <siarhei.siamashka at gmail.com>:
> Here is a work-in-progress branch with the initial variant slow path reporting
> code:
> http://cgit.freedesktop.org/~siamashka/pixman/log/?h=perfstat-wip
I tried to compile it for Window using mingw. It failed because
pthread and syslog are unavailable.
I "solved" the pthread issue by commenting out all the mutex lines.
(my application does all drawing from one thread) The right approach
is probably to include a cross-platform mutex in pixman-compiler.h. At
least the mingw part can be factored out from the existing
PIXMAN_DEFINE_THREAD_LOCAL implementation.
For missing syslog, a patch is attached. If no syslog is present, perf
stats are just printed to stdout. It obviously isn't a complete patch,
as I have not altered the autotools machinery to check for syslog.h
and set HAVE_SYSLOG_H. Also the definition of PERF_LOG is rather ugly,
with the missing opening brace on places the macro is used. My C
preprocessor skills aren't sufficient to make something nice of it.
But at least the patch suggests the changes necessary to make the perf
stats work on mingw.
> Anyway, here is an example of usage of this code at the moment. It would be
> nice if somebody could also try it and provide some feedback. And there is also
> a possibility that it may help to find some good candidate for optimizations
> even now.
Below are the results for the six worst slow paths, on Windows. My app
does scrolling text (pre rendered to a cairo image surface), with
individual lines fading in and out when they come into the viewport.
Perhaps an extra empty line after the decoded result and before the
next undecoded line would be better for readability.
Maarten
pixman slow path: op=5 s=20028888|002F0A7F m=00000000|00000000
d=20028888|002E0A7F - 465/352935 (321,171 MPix)
IN
a8r8g8b8 null a8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA
NO_NORMAL_REPEAT NO_NORMAL_REPEAT
NO_PAD_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO
SAMPLES_COVER_CLIP
pixman slow path: op=5 s=20028888|002E0A7F m=00000000|00000000
d=20028888|002E0A7F - 465/352935 (169,056 MPix)
IN
a8r8g8b8 null a8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA
NO_NORMAL_REPEAT NO_NORMAL_REPEAT
NO_PAD_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO
pixman slow path: op=12 s=20028888|002F0A7F m=00000001|002E0A7F
d=20028888|002E0A7F - 397/169539 (72,902 MPix)
ADD
a8r8g8b8 solid a8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA UNIFIED_ALPHA
NO_NORMAL_REPEAT NO_NORMAL_REPEAT NO_NORMAL_REPEAT
NO_PAD_REPEAT NO_PAD_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO Y_UNIT_ZERO
SAMPLES_COVER_CLIP
pixman slow path: op=3 s=00000002|002E8A77 m=08018000|002F0A7F
d=20020888|002E0AFF - 17/1591 (0,151 MPix)
OVER
pixbuf a8 x8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA UNIFIED_ALPHA
NO_NONE_REPEAT NO_NORMAL_REPEAT NO_NORMAL_REPEAT
NO_NORMAL_REPEAT NO_PAD_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO Y_UNIT_ZERO
SAMPLES_COVER_CLIP SAMPLES_OPAQUE
pixman slow path: op=3 s=00000002|002EAA77 m=08018000|002F0A7F
d=20020888|002E0AFF - 23/2221 (0,087 MPix)
OVER
pixbuf a8 x8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA UNIFIED_ALPHA
NO_NONE_REPEAT NO_NORMAL_REPEAT NO_NORMAL_REPEAT
NO_NORMAL_REPEAT NO_PAD_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO Y_UNIT_ZERO
IS_OPAQUE SAMPLES_COVER_CLIP SAMPLES_OPAQUE
pixman slow path: op=1 s=00000002|002EAA77 m=00000000|00000000
d=20020888|002E0AFF - 21/1260 (0,054 MPix)
SRC
pixbuf null x8r8g8b8
-- src -- -- mask -- -- dest --
NARROW_FORMAT NARROW_FORMAT
NO_ACCESSORS NO_ACCESSORS
NO_ALPHA_MAP NO_ALPHA_MAP
UNIFIED_ALPHA UNIFIED_ALPHA
NO_NONE_REPEAT NO_NORMAL_REPEAT
NO_NORMAL_REPEAT NO_PAD_REPEAT
NO_REFLECT_REPEAT NO_REFLECT_REPEAT
NEAREST_FILTER NEAREST_FILTER
NO_CONVOLUTION_FILTER NO_CONVOLUTION_FILTER
AFFINE_TRANSFORM AFFINE_TRANSFORM
ID_TRANSFORM ID_TRANSFORM
X_UNIT_POSITIVE X_UNIT_POSITIVE
Y_UNIT_ZERO Y_UNIT_ZERO
IS_OPAQUE SAMPLES_OPAQUE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixman-perf-syslog.patch
Type: application/octet-stream
Size: 997 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20101020/42674c8d/attachment.obj>
More information about the Pixman
mailing list