[Pixman] [RFC] Performance statistics analyzer

Taekyun Kim podain77 at gmail.com
Thu Sep 15 01:00:18 PDT 2011


On 09/07/2011 10:46 PM, Maarten Bosmans wrote:
> I took this RFC to also be a request for patches.
> Attached is a patch that strips out the pthread mutex usage and
> implements some macros in pixman-compiler.h, not unlike the TLS
> macros. I also added a win32 implementation and tested it using mingw.

Thanks for looking into this RFC.

Currently pixman does not have platform independent mutex implementations.
So I have to be careful not to break platform independency of current 
pixman.
It might be useful to know whether the platform support mutex or not.
As mentioned by andrea, we should ifdef out perfstat if mutex is not 
available.
Something like "HAVE_MUTEX" seems te be needed.


On 09/14/2011 11:57 PM, Andrea Canciani wrote:
> About the previous part of the patchset:
> Would it be possible to avoid the #ifdef PIXMAN_PERF_STAT in
> pixman.c and just make perfstat_is_enabled() an inline function
> which always returns false when it is not defined?
> I believe that the code would look cleaner.
>
> (We might actually need to ifdef the code out in order to be able
> to compile when no mutexes are available, but the branch currently
> does not try to detect it AFAICT)

I updated it in my branch. Remaining things would be

1. introducing HAVE_MUTEX and MUTEX macos.
2. replace pthread_mutex with new MUTEX macros.
3. ifdef out the code when HAVE_MUTEX is not defined.

Thanks.

--
Best Regards,
Taekyun Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20110915/2d5dc450/attachment.htm>


More information about the Pixman mailing list