[Mesa-dev] [PATCH 4/6] ac/debug: annotate IB dumps with the raw values

Rob Herring robh at kernel.org
Thu Aug 24 21:43:29 UTC 2017


On Thu, Aug 24, 2017 at 4:24 PM, Rob Herring <robh at kernel.org> wrote:
> On Tue, Aug 22, 2017 at 10:45 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>
>> ---
>>  src/amd/common/ac_debug.c | 84 +++++++++++++++++++++++++++++++++++++----------
>>  1 file changed, 66 insertions(+), 18 deletions(-)
>>
>> diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
>> index 518893ff481..e92dfbd0e4a 100644
>> --- a/src/amd/common/ac_debug.c
>> +++ b/src/amd/common/ac_debug.c
>
> [...]
>
>> +static void format_ib_output(FILE *f, char *out)
>> +{
>> +       unsigned depth = 0;
>> +
>> +       for (;;) {
>> +               char op = 0;
>> +
>> +               if (out[0] == '\n' && out[1] == '\035')
>> +                       out++;
>> +               if (out[0] == '\035') {
>> +                       op = out[1];
>> +                       out += 2;
>> +               }
>> +
>> +               if (op == '<')
>> +                       depth--;
>> +
>> +               unsigned indent = 4 * depth;
>> +               if (op != '#')
>> +                       indent += 9;
>> +
>> +               if (indent)
>> +                       print_spaces(f, indent);
>> +
>> +               char *end = strchrnul(out, '\n');
>
> This fails to build on Android. I think you need an explicit include
> of string.h.

Actually, it's not enabled in bionic, so perhaps util_strchrnul()
instead. I'll send a patch.

Rob


More information about the mesa-dev mailing list