From 5e3c53b8dbd5646c0c143931d26ac7802351382f Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 26 Jun 2022 13:54:59 +0000 Subject: [PATCH] screencopy: Add pts to dtrace probes --- src/screencopy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/screencopy.c b/src/screencopy.c index 783d210..f53b078 100644 --- a/src/screencopy.c +++ b/src/screencopy.c @@ -157,7 +157,10 @@ static void screencopy_ready(void* data, { struct screencopy* self = data; - DTRACE_PROBE1(wayvnc, screencopy_ready, self); + uint64_t sec = (uint64_t)sec_hi << 32 | (uint64_t)sec_lo; + uint64_t pts = sec * UINT64_C(1000000) + (uint64_t)nsec / UINT64_C(1000); + + DTRACE_PROBE2(wayvnc, screencopy_ready, self, pts); screencopy__stop(self); @@ -174,8 +177,6 @@ static void screencopy_ready(void* data, self->back = self->front; self->front = NULL; - uint64_t sec = (uint64_t)sec_hi << 32 | (uint64_t)sec_lo; - uint64_t pts = sec * UINT64_C(1000000) + (uint64_t)nsec / UINT64_C(1000); nvnc_fb_set_pts(self->back->nvnc_fb, pts); self->status = SCREENCOPY_DONE;