Add a trace event to display the amount of IRQs available
on the device.

Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
---
 util/vfio-helpers.c | 1 +
 util/trace-events   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 6defefcc01..3ad7e6be52 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -192,6 +192,7 @@ int qemu_vfio_pci_init_irq(QEMUVFIOState *s, EventNotifier 
*e,
         error_setg(errp, "Device interrupt doesn't support eventfd");
         return -EINVAL;
     }
+    trace_qemu_vfio_pci_init_irq(irq_info.count);
 
     irq_set_size = sizeof(*irq_set) + sizeof(int32_t);
     irq_set = g_malloc0(irq_set_size);
diff --git a/util/trace-events b/util/trace-events
index 0ce42822eb..351dbdbe3c 100644
--- a/util/trace-events
+++ b/util/trace-events
@@ -83,3 +83,4 @@ qemu_vfio_new_mapping(void *s, void *host, size_t size, int 
index, uint64_t iova
 qemu_vfio_do_mapping(void *s, void *host, size_t size, uint64_t iova) "s %p 
host %p size %zu iova 0x%"PRIx64
 qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t 
*iova) "s %p host %p size %zu temporary %d iova %p"
 qemu_vfio_dma_unmap(void *s, void *host) "s %p host %p"
+qemu_vfio_pci_init_irq(uint32_t count) "device interrupt count: %"PRIu32
-- 
2.21.3


Reply via email to