server: Add dtrace probes with pts
parent
1e3819b6fb
commit
8bde568112
12
src/server.c
12
src/server.c
|
@ -667,6 +667,9 @@ static void process_fb_update_requests(struct nvnc_client* client)
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
DTRACE_PROBE2(neatvnc, process_fb_update_requests__pull, client,
|
||||||
|
pts);
|
||||||
|
|
||||||
int n_rects = client->encoder->n_rects;
|
int n_rects = client->encoder->n_rects;
|
||||||
n_rects += will_send_pts(client, pts) ? 1 : 0;
|
n_rects += will_send_pts(client, pts) ? 1 : 0;
|
||||||
|
|
||||||
|
@ -701,6 +704,9 @@ static void process_fb_update_requests(struct nvnc_client* client)
|
||||||
client->encoder->on_done = on_encode_frame_done;
|
client->encoder->on_done = on_encode_frame_done;
|
||||||
client->encoder->userdata = client;
|
client->encoder->userdata = client;
|
||||||
|
|
||||||
|
DTRACE_PROBE2(neatvnc, process_fb_update_requests__encode,
|
||||||
|
client, fb->pts);
|
||||||
|
|
||||||
if (encoder_encode(client->encoder, fb, &damage) >= 0) {
|
if (encoder_encode(client->encoder, fb, &damage) >= 0) {
|
||||||
--client->n_pending_requests;
|
--client->n_pending_requests;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1368,7 +1374,7 @@ static void finish_fb_update(struct nvnc_client* client, struct rcbuf* payload,
|
||||||
client_ref(client);
|
client_ref(client);
|
||||||
|
|
||||||
if (client->net_stream->state != STREAM_STATE_CLOSED) {
|
if (client->net_stream->state != STREAM_STATE_CLOSED) {
|
||||||
DTRACE_PROBE1(neatvnc, send_fb_start, client);
|
DTRACE_PROBE2(neatvnc, send_fb_start, client, pts);
|
||||||
n_rects += will_send_pts(client, pts) ? 1 : 0;
|
n_rects += will_send_pts(client, pts) ? 1 : 0;
|
||||||
struct rfb_server_fb_update_msg update_msg = {
|
struct rfb_server_fb_update_msg update_msg = {
|
||||||
.type = RFB_SERVER_TO_CLIENT_FRAMEBUFFER_UPDATE,
|
.type = RFB_SERVER_TO_CLIENT_FRAMEBUFFER_UPDATE,
|
||||||
|
@ -1380,7 +1386,7 @@ static void finish_fb_update(struct nvnc_client* client, struct rcbuf* payload,
|
||||||
rcbuf_ref(payload);
|
rcbuf_ref(payload);
|
||||||
stream_send(client->net_stream, payload, on_write_frame_done,
|
stream_send(client->net_stream, payload, on_write_frame_done,
|
||||||
client);
|
client);
|
||||||
DTRACE_PROBE1(neatvnc, send_fb_done, client);
|
DTRACE_PROBE2(neatvnc, send_fb_done, client, pts);
|
||||||
} else {
|
} else {
|
||||||
client->is_updating = false;
|
client->is_updating = false;
|
||||||
assert(client->current_fb);
|
assert(client->current_fb);
|
||||||
|
@ -1391,7 +1397,7 @@ static void finish_fb_update(struct nvnc_client* client, struct rcbuf* payload,
|
||||||
client_unref(client);
|
client_unref(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
DTRACE_PROBE1(neatvnc, update_fb_done, client);
|
DTRACE_PROBE2(neatvnc, update_fb_done, client, pts);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_encode_frame_done(struct encoder* encoder, struct rcbuf* result,
|
static void on_encode_frame_done(struct encoder* encoder, struct rcbuf* result,
|
||||||
|
|
Loading…
Reference in New Issue