[cairo] Oprofiling Cairo on ARM

Carl Worth cworth at cworth.org
Tue Nov 28 07:05:17 PST 2006


On Mon, 27 Nov 2006 18:32:23 +0200, "Xan Lopez" wrote:
> I finally managed to get oprofile running on my ARM environment.

Thanks for doing this!
> demangle it manually to get coherent results. Anyway, I'm attaching the top
> offenders in an oprofiled gtk-theme-torturer run with Cairo 1.3.4.

>   00007ee8 224      83.8951  libcairo.so.2.10.0       cairo_rectangle
> 00052ed8 4662      6.0572  libcairo.so.2.10.0       __adddf3

>   00007ee8 480      82.0513  libcairo.so.2.10.0       cairo_rectangle
> 00053294 3782      4.9139  libcairo.so.2.10.0       __muldf3

So the above shows that 10% of the time is spent doing floating-point
adds and multiplies on behalf of cairo_rectangle, right?

So this should benefit from a general short-circuiting of identity
matrix transformations in _cairo_matrix_transform_point and
_cairo_matrix_transform_distance.

I know Daniel has been experimenting with patches for this. And I
think he was just waiting to see a test case for which it was a
bottleneck. Is that right Daniel? Maybe we want to add a test that
just does a bunch of cairo_rectangle;cairo_fill will integer
coordinates and an identity matrix?

As for what remains in the profile:

> 0000add0 3241      4.2110  libcairo.so.2.10.0       _cairo_bentley_ottmann_tessellate_polygon
> 00039bb4 1824      2.3699  libcairo.so.2.10.0       _cairo_xlib_surface_show_glyphs
> 000061b4 1735      2.2542  libcairo.so.2.10.0       .plt
> 0000f0bc 1612      2.0944  libcairo.so.2.10.0       _cairo_hash_table_lookup_internal
> 000534ec 1434      1.8632  libcairo.so.2.10.0       __aeabi_ddiv
> 000172a0 1133      1.4721  libcairo.so.2.10.0       _cairo_scaled_glyph_lookup
> 00012c90 968       1.2577  libcairo.so.2.10.0       _cairo_path_fixed_interpret

These are all rather small percentages individually, so I don't see
any easy fixes that are going to make a big difference in this
profile.

Was this a list of the top functions overall for the theme torturer?
Or just the top functions from cairo itself? It would be interesting
to know how much time is spent in cairo compared to the rest of the
GTK+ stack, for example.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061128/7f768492/attachment.pgp


More information about the cairo mailing list