dmabuf: Add dtrace probes

pull/40/head
Andri Yngvason 2020-04-26 11:07:32 +00:00
parent 9d6310cb14
commit 04569b01f2
1 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include "dmabuf.h"
#include "wlr-export-dmabuf-unstable-v1.h"
#include "render.h"
#include "usdt.h"
static void dmabuf_close_fds(struct dmabuf_capture* self)
{
@ -100,6 +101,8 @@ static void dmabuf_frame_ready(void* data,
struct dmabuf_capture* self = data;
struct frame_capture* fc = data;
DTRACE_PROBE1(wayvnc, dmabuf_frame_ready, self);
dmabuf_capture_stop(fc);
fc->status = CAPTURE_DONE;
@ -115,6 +118,8 @@ static void dmabuf_frame_cancel(void* data,
struct dmabuf_capture* self = data;
struct frame_capture* fc = data;
DTRACE_PROBE1(wayvnc, dmabuf_frame_cancel, self);
dmabuf_capture_stop(fc);
fc->status = reason == ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT
? CAPTURE_FATAL : CAPTURE_FAILED;
@ -137,6 +142,8 @@ static int dmabuf_capture_start(struct frame_capture* fc,
.cancel = dmabuf_frame_cancel,
};
DTRACE_PROBE1(wayvnc, dmabuf_capture_start, self);
self->zwlr_frame =
zwlr_export_dmabuf_manager_v1_capture_output(self->manager,
fc->overlay_cursor,