On Sun, 12 Nov 2006 00:34:37 -0500, Jeff Muizelaar wrote:
> I have looked further into developing a small test case for hitting
> composteGeneral. The code at the end of this email calls
> compositeGeneral in both box_clip() and tri_clip(). I haven't looked
> into why this is happening at all. I also haven't written the tests up
> as performance tests because they didn't really seem that interesting...

Thanks for doing this Jeff.

I rewrote your test as a performance test since I think it is very
interesting, (it should give me something to measure the impact of
Søren's patch, and I want to be able to measure all performance
patches before including them in cairo).

I've attached the patch below, (Jeff, please advise me if the
copyright line should be anything different before I include this in
cairo itself). It's also in a branch named unaligned-clip in my
personal tree.

I didn't get the chance to use this to measure Søren's patch yet since
if I run this test with:

        ./cairo-perf clip

it manages to bring my machine to a grinding halt as it swaps itself
silly. I can get it to complete quite quickly by reducing the number
of iterations. For example, "./cairo-perf -i 50 clip" returns very
quickly, but "./cairo-perf -i 100 clip" puts it back into the swap
swamp.

I'm guessing there's an X server resource leak here, as the test works
fine when restricted to the image backend. And I just discovered that
my X server doesn't have the XRes extension that xrestop wants to tell
me about the leaks. That's annoying.

Meanwhile, the fact that the X server still has the bug where
intermediate mask surfaces for trapezoid rasterization results are
created larger than necessary can't be helping either.

All that to say that I wanted to get Søren's patch into the snapshot
I'm doing right now, but it's not going to make it just yet.

> On a slightly related note, to investigate this problem I made a library
> that wraps all of the calls to cairo functions and logs them to stdout.
> usage is something like the following:
> 
> $ LD_PRELOAD=libcairowrap.so ./clip
> cairo_image_surface_create(0, 100, 100)
> cairo_create(0x80537b0)

This kind of thing looks extremely interesting to me! I've often
wanted something like this to be able to extract code snippets from
programs. Here are a couple of things I'd like to see in addition:

1) It would be nice if it could log the return values from
   surface_create and cairo_create so they could be correlated with
   usage later.

2) It might be handy if there were an easy way to start and stop the
   logging so I could focus the extraction on one single chunk of a
   program's behavior.

> If anyone is interested in such a thing I'd happily share it.

Yes, please do. Even without either of the above changes, I think this
would be quite helpful.

-Carl

Attachment: unaligned-clip.patchset
Description: Binary data


Attachment: pgpMOkKyzlVKj.pgp
Description: PGP signature

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to