Philippe Mathieu-Daudé <phi...@redhat.com> writes:

> On 7/20/19 8:39 AM, Markus Armbruster wrote:
>> Consider hw/tpm/trace-events
>> 
>>     # tpm_crb.c
>>     tpm_crb_mmio_read(uint64_t addr, unsigned size, uint32_t val) "CRB read 
>> 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
>>     tpm_crb_mmio_write(uint64_t addr, unsigned size, uint32_t val) "CRB 
>> write 0x" TARGET_FMT_plx " len:%u val: 0x%" PRIx32
>> 
>> Format is TARGET_FMT_plx formats a hwaddr, but the parameter type is
>> uint64_t.  They happen to be the same.  Is this kosher?
>> 
>
> Missed when converting from DPRINTF() to trace-events:
> https://git.qemu.org/?p=qemu.git;a=commitdiff;h=ec427498;hp=8cb340c613
>
> PRIx64 certainly makes sense here.
>
> Since it is the single use, once updated we can remote this hunk from
> scripts/tracetool/format/log_stap.py:
>
>     if macro == "TARGET_FMT_plx":
>         return "%016x"

Good point, thanks!

[...]

Reply via email to