|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
cairo-trace and cairo-perf-trace with new backendHi,
I have developped a new backend for Cairo 1.9.2. (Embedded environment) I want to know, how can I test perfs of this new backend ??? How can I use cairo-trace and cairo-perf-trace for this backend ? I have tried to use cairo-trace : cairo-trace --profile my_application the result in the file is : % Unknown object of type cairo_surface_t, trace is incomplete. Help plz, Thanks. Best Regards, Aymen _______________________________________________ cairo mailing list cairo@... http://lists.cairographics.org/mailman/listinfo/cairo |
|
|
Re: cairo-trace and cairo-perf-trace with new backendExcerpts from aymen chehaider's message of Tue Oct 13 12:13:37 +0100 2009:
> I have developped a new backend for Cairo 1.9.2. *(Embedded environment)* > > I want to know, how can I test perfs of this new backend ??? > > How can I use cairo-trace and cairo-perf-trace for this backend ? First I presume that you have coupled in the boilerplate/ for your backend and are satisfied with the results from the test suite. > I have tried to use cairo-trace : *cairo-trace --profile my_application* > the result in the file is : *% Unknown object of type cairo_surface_t, trace > is incomplete.* Indeed, it means that util/cairo-trace/trace.c does not have the appropriate hook for backend surface constructor. Simply add the relevant function wrappers by doing a copy'n'paste from one of the other backends. But recording new traces is not strictly relevant for performance testing, since you can just use the existing traces from cairo-traces.git with cairo-perf-trace. The trick here is that cairo-perf-trace uses a default value of FALSE for target_is_measurable(), so you need to add your surface type to that switch. And the same for the micro-benchmark suite, called cairo-perf for 1.9.2. And whilst we're on that subject, beware the interface changes that are in master. Hope this helps, and you have fun with cairo. Please do share any experiences you gained whilst developing a novel backend -- especially if they may help shape the internal interfaces both for easing maintenance and improving performance. -ickle -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ cairo mailing list cairo@... http://lists.cairographics.org/mailman/listinfo/cairo |
|
|
Re: cairo-trace and cairo-perf-trace with new backendHi,
Thank you very much for your response. I have encountered other problems : 1- I have coupled in the boilerplate/ for my backend ==> but test results are FAIL (out of memory !!!) 2- I have generate a cairo trace for my application (Browser OWB), but when I use the cairo-perf-trace, I have this error : [ # ] backend test min(s) median(s) stddev. count [ 0] sahgfx Error during replay, line 5: invalid value (typically too big) for the size of the input (surface, pattern, etc.) [ 0] image Error during replay, line 5: invalid value (typically too big) for the size of the input (surface, pattern, etc.) there is my app.trace file : %!CairoScript - middleware %*** Warning CairoScript is still a new tracing format, and is subject to change. dict /type /sahgfx set surface dup /s0 exch def <==== the problem is in this line 5 dict /type /sahgfx set surface dup /s1 exch def exch dup /s0 exch def context % c0 exch dup /s1 exch def context % c1 s1 context % c2 s1 context % c3 s1 context % c4 s1 context % c5 s1 context % c6 0 0 1280 720 rectangle Thanks, Best Regards, Aymen CHEHAIDER 2009/10/13 Chris Wilson <chris@...> Excerpts from aymen chehaider's message of Tue Oct 13 12:13:37 +0100 2009: _______________________________________________ cairo mailing list cairo@... http://lists.cairographics.org/mailman/listinfo/cairo |
|
|
Re: cairo-trace and cairo-perf-trace with new backendExcerpts from aymen chehaider's message of Wed Nov 04 17:46:32 +0000 2009:
> Hi, > > Thank you very much for your response. > > I have encountered other problems : > > 1- I have coupled in the boilerplate/ for my backend ==> but test results > are FAIL (out of memory !!!) Hmm, sounds like an error is being returned somewhere. I've actually been meaning to change that FAIL to an ERROR to distinguish these cases. This is likely to be somewhere in your backend either as an error return, or you have not implemented a required interface (but that should lead to an assert). If you have wrapped all instances of CAIRO_STATUS_NO_MEMORY with _cairo_error(), then you can attach a debugger and set a breakpoint on _cairo_error -- which will trap the faulting instruction. If you want to post your backend for review, I'm happy to do so, as will other members of this list. > 2- I have generate a cairo trace for my application (Browser OWB), but when > I use the cairo-perf-trace, I have this error : > *[ # ] backend test min(s) median(s) stddev. > count > [ 0] sahgfx Error during replay, line 5: invalid value > (typically too big) for the size of the input (surface, pattern, etc.) [snip] > dict > /type /sahgfx set > surface dup /s0 exch def *<==== the problem is in this line 5* Ok, I realise I haven't documented the requirements at all for tracing... In order to reconstruct a surface, the minimum we need is a content type and size. During the trace these are added to the surface dictionary, like for example: dict /content //COLOR_ALPHA set /width 128 set /height 64 set surface The error that the script is reporting is the absent width or height, content defaults to COLOR_ALPHA. There is a supply of pre-traced applications available from anongit.freedesktop.org/cairo-traces if you want to use some existing behaviour for profiling whilst developing the backend. It sounds like your backend is developing at quite a pace - I hope you are enjoying working with Cairo! :-) -ickle -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ cairo mailing list cairo@... http://lists.cairographics.org/mailman/listinfo/cairo |
| Free embeddable forum powered by Nabble | Forum Help |