[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] memory: Replace DEBUG_UNASSIGNED printf calls by trace event
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] memory: Replace DEBUG_UNASSIGNED printf calls by trace events |
Date: |
Fri, 20 Sep 2019 18:03:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
Cc'ing Daniel and Lluís,
On 9/20/19 5:01 PM, Eric Blake wrote:
> On 9/20/19 9:39 AM, Philippe Mathieu-Daudé wrote:
>
>>>> I thought I read a comment about it between Eric/Stefan but I can't find
>>>> it, maybe I dreamed it. (Cc'ed Eric).
>
> Not from me. But looking at scripts/tracetool/format/log_stap.py, I
> suspect the dtrace via stap backend cannot support it.
>
> Researching further,
>
> https://sourceware.org/systemtap/langref.pdf
>
> section 9.2 printf, states:
>
> "The printf formatting directives are similar to those of C, except that
> they are fully checked for type by the translator."
>
> and does NOT list handling for '*' under precision or width.
>
Thanks for checking this.
>>>
>>> If my grep is correct we currently use the syntax already in
>>> gt64120_read, gt64120_write, pflash_io_read, pflash_io_write,
>>> pflash_data_read and pflash_data_write trace events.
>>
>> If you use 'git blame' you'll notice I added all of them, so better
>> let's get a proper confirmation from Stefan :)
>>
>> I plan to use them more, I find them helpful to directly see the access
>> size looking at the value width.
>
> You'll probably have to revert that, or else teach the various backend
> generators how to dumb-down a format string containing it when coupled
> with a backend that doesn't support it natively.
OK, I'll see what is doable with the backend generators, else revert/fix
the trace events already introduced :(
Regards,
Phil.