From 1cd7fa7adc157c5ec8050a6fe31670bdf3f6c2a5 Mon Sep 17 00:00:00 2001 From: Joao Martins Date: Tue, 7 Mar 2023 12:54:41 +0000 Subject: vfio/common: Use a single tracepoint for skipped sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation to turn more of the memory listener checks into common functions, one of the affected places is how we trace when sections are skipped. Right now there is one for each. Change it into one single tracepoint `vfio_listener_region_skip` which receives a name which refers to the callback i.e. region_add and region_del. Suggested-by: Avihai Horon Signed-off-by: Joao Martins Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/r/20230307125450.62409-7-joao.m.martins@oracle.com Signed-off-by: Alex Williamson --- hw/vfio/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/vfio/common.c') diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 99acb998eb..1cb62efa97 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -945,7 +945,7 @@ static void vfio_listener_region_add(MemoryListener *listener, Error *err = NULL; if (vfio_listener_skipped_section(section)) { - trace_vfio_listener_region_add_skip( + trace_vfio_listener_region_skip("region_add", section->offset_within_address_space, section->offset_within_address_space + int128_get64(int128_sub(section->size, int128_one()))); @@ -1183,7 +1183,7 @@ static void vfio_listener_region_del(MemoryListener *listener, bool try_unmap = true; if (vfio_listener_skipped_section(section)) { - trace_vfio_listener_region_del_skip( + trace_vfio_listener_region_skip("region_del", section->offset_within_address_space, section->offset_within_address_space + int128_get64(int128_sub(section->size, int128_one()))); -- cgit v1.2.3