qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] vfio: Fix vfio_get_dev_region() trace event


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2] vfio: Fix vfio_get_dev_region() trace event
Date: Fri, 3 Mar 2023 11:31:35 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/3/23 10:45, Cédric Le Goater wrote:
On 3/3/23 10:34, Philippe Mathieu-Daudé wrote:
On 3/3/23 08:43, Cédric Le Goater wrote:
From: Cédric Le Goater <clg@redhat.com>

Simply revert 'x8' to fix the typo and remove the ending '8'

Fixes: e61a424f05 ("vfio: Create device specific region info helper")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1526
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
  hw/vfio/trace-events | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index 669d9fe07c..28e82541a2 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -117,7 +117,7 @@ vfio_region_mmaps_set_enabled(const char *name, bool enabled) "Region %s mmaps e   vfio_region_unmap(const char *name, unsigned long offset, unsigned long end) "Region %s unmap [0x%lx - 0x%lx]"   vfio_region_sparse_mmap_header(const char *name, int index, int nr_areas) "Device %s region %d: %d sparse mmap entries"   vfio_region_sparse_mmap_entry(int i, unsigned long start, unsigned long end) "sparse entry %d [0x%lx - 0x%lx]" -vfio_get_dev_region(const char *name, int index, uint32_t type, uint32_t subtype) "%s index %d, %08x/%0x8" +vfio_get_dev_region(const char *name, int index, uint32_t type, uint32_t subtype) "%s index %d, %08x/%08x"

8 digits might be over-engineered, but at least is future-proof :)

well, yes, but it also depends on other possible outputs from the OS or,
more important, from gdb when dumping memory. It it better if they match.

Since it is an hex number, may be I should add a '0x' prefix also ? That's
a lot of versions for a 2 bytes patch ! :)

Per the coding style if you don't want to use the 0x prefix for
readability, add a "(in hex)" hint:
https://qemu-project.gitlab.io/qemu/devel/style.html#trace-events-style



reply via email to

[Prev in Thread] Current Thread [Next in Thread]