From 10a3fd62384782ad8f9244e6c4d25ea177bc1cfc Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 1 Apr 2020 22:53:22 +0000 Subject: [PATCH] Add dtrace probes for framebuffer updates --- src/server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server.c b/src/server.c index e0c950b..b3c1a3d 100644 --- a/src/server.c +++ b/src/server.c @@ -27,6 +27,7 @@ #include "stream.h" #include "config.h" #include "logging.h" +#include "usdt.h" #include #include @@ -499,6 +500,8 @@ static int on_client_fb_update_request(struct nvnc_client* client) pixman_region_union_rect(&client->damage, &client->damage, x, y, width, height); + DTRACE_PROBE1(neatvnc, update_fb_request, client); + nvnc_fb_req_fn fn = server->fb_req_fn; if (fn) fn(client, incremental, x, y, width, height); @@ -892,6 +895,8 @@ void on_client_update_fb_done(void* work) process_fb_update_requests(client); nvnc_fb_unref(update->fb); + DTRACE_PROBE1(neatvnc, update_fb_done, client); + pixman_region_fini(&update->region); client_unref(client); @@ -902,6 +907,8 @@ int schedule_client_update_fb(struct nvnc_client* client) struct nvnc_fb* fb = client->server->frame; assert(fb); + DTRACE_PROBE1(neatvnc, update_fb_start, client); + struct fb_update_work* work = calloc(1, sizeof(*work)); if (!work) return -1;