tu: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
authorCorentin Noël <corentin.noel@collabora.com>
Wed, 20 Sep 2023 14:38:43 +0000 (16:38 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Oct 2023 17:20:03 +0000 (17:20 +0000)
The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

src/freedreno/vulkan/tu_knl_drm_virtio.cc

index df7b1fc..8f43bf8 100644 (file)
@@ -101,9 +101,8 @@ struct tu_virtio_device {
 };
 
 #define virtio_ioctl(fd, name, args) ({                              \
-      MESA_TRACE_BEGIN(#name);                                       \
+      MESA_TRACE_SCOPE(#name);                                       \
       int ret = drmIoctl((fd), DRM_IOCTL_ ## name, (args));          \
-      MESA_TRACE_END();                                              \
       ret;                                                           \
    })
 
@@ -236,10 +235,9 @@ out_unlock:
       return ret;
 
    if (sync) {
-      MESA_TRACE_BEGIN("virtio_execbuf sync");
+      MESA_TRACE_SCOPE("virtio_execbuf sync");
       sync_wait(fence_fd, -1);
       close(fence_fd);
-      MESA_TRACE_END();
    }
 
    return 0;