[Mesa-dev] [PATCH v2 1/1] intel: print performance debug messages to `logcat' on Android.

Eric Anholt eric at anholt.net
Thu Oct 4 14:37:19 PDT 2012


Chad Versace <chad.versace at linux.intel.com> writes:

> On 10/01/2012 04:25 PM, Oliver McFadden wrote:
>> On Mon, Oct 01, 2012 at 02:55:31PM -0700, Kenneth Graunke wrote:
>>> On 10/01/2012 02:35 PM, Eric Anholt wrote:
>>>> Oliver McFadden <oliver.mcfadden at linux.intel.com> writes:
>>>>> diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
>>>>> index 25334da..7eb2706 100644
>>>>> --- a/src/mesa/drivers/dri/intel/intel_context.c
>>>>> +++ b/src/mesa/drivers/dri/intel/intel_context.c
>>>>> @@ -744,6 +744,11 @@ intelInitContext(struct intel_context *intel,
>>>>>     intelInitExtensions(ctx);
>>>>>  
>>>>>     INTEL_DEBUG = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
>>>>> +
>>>>> +#ifdef HAVE_ANDROID_PLATFORM
>>>>> +   INTEL_DEBUG |= DEBUG_PERF;
>>>>> +#endif /* HAVE_ANDROID_PLATFORM */
>>>>> +
>>>>>     if (INTEL_DEBUG & DEBUG_BUFMGR)
>>>>>        dri_bufmgr_set_debug(intel->bufmgr, true);
>>>>
>>>> I don't see why the driver should be logging debug messages by default.
>>>> You want to be able to actually ship this driver for non-developers.
>>>
>>> At least normally, this causes a _ton_ of spew which can actually
>>> introduce significant amounts of printf overhead.
>>>
>> 
>> The objective is to inform the application developer when they are doing
>> something stupid; most of them will not go through the trouble of
>> looking up how to turn on Intel performance debugging.
>> 
>> I would like to see this upstream, but I can understand if you would
>> prefer this patch be carried internally.
>> 
>> In any case, Android logcat is not exactly known for it's sparseness; in
>> fact the opposite.  I have seen such stupidity as "Hi, I'm still
>> connected to the 'FUBAR' network!" every few seconds.  :-(
>
> To second what Oliver said. Applications that spew firehose-fashion into
> Android's logcat are not misbehaved. For example, each time the Dalvik VM
> performs garbage collection it spews gc statistics into logcat. What's
> considered the norm on desktop Linux is not necessarily the norm the Android.
>
> I approve of this patch's intent. (Though I did have an issue with it in another
> email).

Except that we use DEBUG_PERF to signal that we should do potentially
slow work to tell the developer about potential issues.  We don't want
to limit driver performance to print messages when nobody's reading.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121004/b12323fe/attachment.pgp>


More information about the mesa-dev mailing list