[Qemu-devel] [PATCH] ati-vga: fix tracing

Gerd Hoffmann posted 1 patch 5 years, 1 month ago
Test checkpatch passed
Test asan failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190312081143.24850-1-kraxel@redhat.com
hw/display/trace-events | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] ati-vga: fix tracing
Posted by Gerd Hoffmann 5 years, 1 month ago
HWADDR_PRIx can't be used in tracing, use PRIx64 instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/trace-events | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/trace-events b/hw/display/trace-events
index 80993cc4d913..c09854314b03 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -140,5 +140,5 @@ sii9022_write_reg(uint8_t addr, uint8_t val) "addr 0x%02x, val 0x%02x"
 sii9022_switch_mode(const char *mode) "mode: %s"
 
 # hw/display/ati*.c
-ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s -> 0x%"PRIx64
-ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s <- 0x%"PRIx64
+ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s -> 0x%"PRIx64
+ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s <- 0x%"PRIx64
-- 
2.18.1


Re: [Qemu-devel] [PATCH] ati-vga: fix tracing
Posted by Daniel P. Berrangé 5 years, 1 month ago
On Tue, Mar 12, 2019 at 09:11:43AM +0100, Gerd Hoffmann wrote:
> HWADDR_PRIx can't be used in tracing, use PRIx64 instead.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/trace-events | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index 80993cc4d913..c09854314b03 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -140,5 +140,5 @@ sii9022_write_reg(uint8_t addr, uint8_t val) "addr 0x%02x, val 0x%02x"
>  sii9022_switch_mode(const char *mode) "mode: %s"
>  
>  # hw/display/ati*.c
> -ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s -> 0x%"PRIx64
> -ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s <- 0x%"PRIx64
> +ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s -> 0x%"PRIx64
> +ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s <- 0x%"PRIx64

FWIW, it would be valid to just make  log_stap.py automatically convert
HWADDR_PRIx into "%x", which will have the same functional effect and
protect us against similar cases in the future.

I don't mind which solution is used though so

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH] ati-vga: fix tracing
Posted by Philippe Mathieu-Daudé 5 years, 1 month ago
Cc'ing Stefan

On 3/12/19 10:56 AM, Daniel P. Berrangé wrote:
> On Tue, Mar 12, 2019 at 09:11:43AM +0100, Gerd Hoffmann wrote:
>> HWADDR_PRIx can't be used in tracing, use PRIx64 instead.
>>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>>  hw/display/trace-events | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/display/trace-events b/hw/display/trace-events
>> index 80993cc4d913..c09854314b03 100644
>> --- a/hw/display/trace-events
>> +++ b/hw/display/trace-events
>> @@ -140,5 +140,5 @@ sii9022_write_reg(uint8_t addr, uint8_t val) "addr 0x%02x, val 0x%02x"
>>  sii9022_switch_mode(const char *mode) "mode: %s"
>>  
>>  # hw/display/ati*.c
>> -ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s -> 0x%"PRIx64
>> -ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s <- 0x%"PRIx64
>> +ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s -> 0x%"PRIx64
>> +ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s <- 0x%"PRIx64
> 
> FWIW, it would be valid to just make  log_stap.py automatically convert
> HWADDR_PRIx into "%x", which will have the same functional effect and
> protect us against similar cases in the future.
> 
> I don't mind which solution is used though so
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Re: [Qemu-devel] [PATCH] ati-vga: fix tracing
Posted by Stefan Hajnoczi 5 years, 1 month ago
On Tue, Mar 12, 2019 at 02:42:50PM +0100, Philippe Mathieu-Daudé wrote:
> Cc'ing Stefan

This is fine.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [PATCH] ati-vga: fix tracing
Posted by Markus Armbruster 5 years, 1 month ago
Gerd Hoffmann <kraxel@redhat.com> writes:

> HWADDR_PRIx can't be used in tracing, use PRIx64 instead.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/trace-events | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/display/trace-events b/hw/display/trace-events
> index 80993cc4d913..c09854314b03 100644
> --- a/hw/display/trace-events
> +++ b/hw/display/trace-events
> @@ -140,5 +140,5 @@ sii9022_write_reg(uint8_t addr, uint8_t val) "addr 0x%02x, val 0x%02x"
>  sii9022_switch_mode(const char *mode) "mode: %s"
>  
>  # hw/display/ati*.c
> -ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s -> 0x%"PRIx64
> -ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"HWADDR_PRIx " %s <- 0x%"PRIx64
> +ati_mm_read(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s -> 0x%"PRIx64
> +ati_mm_write(unsigned int size, uint64_t addr, const char *name, uint64_t val) "%u 0x%"PRIx64 " %s <- 0x%"PRIx64

Fixes the build for me, thanks!

Reviewed-by: Markus Armbruster <armbru@redhat.com>