[Mesa-dev] [PATCH 2/6] ddebug: record and dump apitrace call numbers
Marek Olšák
maraeo at gmail.com
Tue Jul 5 10:17:17 UTC 2016
On Tue, Jul 5, 2016 at 12:13 PM, Jon Turney <jon.turney at dronecode.org.uk> wrote:
> On 01/07/2016 00:21, Marek Olšák wrote:
> [...]
>>
>> diff --git a/src/gallium/drivers/ddebug/dd_util.h
>> b/src/gallium/drivers/ddebug/dd_util.h
>> index 093bdff..3649644 100644
>> --- a/src/gallium/drivers/ddebug/dd_util.h
>> +++ b/src/gallium/drivers/ddebug/dd_util.h
>> @@ -71,4 +71,27 @@ dd_get_debug_file(bool verbose)
>> return f;
>> }
>>
>> +static inline void
>> +dd_parse_apitrace_marker(const char *string, int len, unsigned
>> *call_number)
>> +{
>> + unsigned num;
>> + char *s;
>> +
>> + if (len <= 0)
>> + return;
>> +
>> + /* Make it zero-terminated. */
>> + s = alloca(len + 1);
>
>
> This adds a use of alloca(), without a corresponding #include <alloca.h>
>
> This fails to build, for me:
>
>> In file included from dd_pipe.h:34:0,
>> from dd_screen.c:28:
>> dd_util.h: In function 'dd_parse_apitrace_marker':
>> dd_util.h:84:4: error: implicit declaration of function 'alloca'
>> [-Werror=implicit-function-declaration]
>> s = alloca(len + 1);
>
>
> Perhaps the attached is needed?
Yeah.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
More information about the mesa-dev
mailing list