[PATCH] Android: Port eglretracer for Android

José Fonseca jose.r.fonseca at gmail.com
Wed Jul 24 23:35:37 PDT 2013


On Wed, Jul 24, 2013 at 11:05 PM, Chad Versace <chad.versace at linux.intel.com
> wrote:

> On 07/23/2013 08:28 AM, Alexander Monakov wrote:
>
>> On Tue, 23 Jul 2013, Juha-Pekka Heikkilä wrote:
>>
>>> Why do you need Waffle to handle symbol lookups for Apitrace?  As far as
>>>> I
>>>> understand, you only need the surface+context handling from Waffle, and
>>>> Apitrace's own dynamic loading code should be sufficient.  Can you drop
>>>> all
>>>> code that references waffle_gl_api from this patch?
>>>>
>>>
>>> If the intention is to go Waffle way for Android why would I go
>>> sideloading with different APIs?
>>>
>>
>> I've asked the code to be removed because the way it introduces
>> waffle_dl_* is
>> very inelegant and does not appear to add anything useful.  If there are
>> reasons you want Waffle's dynamic loading be used in Apitrace, please make
>> that a separate patch, but for retracing just the glws_waffle.cpp code
>> should
>> be sufficient.
>>
>
> I agree with Alexander here. Apitrace already has code to handle dynamic
> loading,
> and I would prefer if the Apitrace Waffle codepaths used the same dynamic
> loading
> as the other parts of Apitrace.
>
>
>  Can this code go into the constructor instead and the static method be
>>>> removed?
>>>>
>>>
>>> I prefer the two stage constructor so I don't need to start throwing
>>> exceptions. All waffle functions can fail so I take them the C-ish way.
>>>
>>
>> But you don't have any recovery code, you just immediately terminate the
>> application with assert(0) when Waffle fails.  You can do that in the
>> constructor as well.
>>
>
> Are exceptions enabled in Apitrace? That is, is Apitrace compiled with
> -fno-exceptions?
> Do other components of Apitrace throw exceptions? What is the common
> pattern in Apitrace
> for construction failure? (I'm not an Apitrace developer, so these are all
> open questions
> to me).
>

No, there are no exceptions. Constructors tend to be mere variable
initialization, and real work done in function/methods. Though not
everything follows these trend, e.g. GlxDrawable's constructor does work,
but then again, it doesn't even detect errors..

Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20130725/171c4366/attachment.html>


More information about the apitrace mailing list