dmabuf: Add dtrace probes
parent
9d6310cb14
commit
04569b01f2
|
@ -25,6 +25,7 @@
|
||||||
#include "dmabuf.h"
|
#include "dmabuf.h"
|
||||||
#include "wlr-export-dmabuf-unstable-v1.h"
|
#include "wlr-export-dmabuf-unstable-v1.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
#include "usdt.h"
|
||||||
|
|
||||||
static void dmabuf_close_fds(struct dmabuf_capture* self)
|
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 dmabuf_capture* self = data;
|
||||||
struct frame_capture* fc = data;
|
struct frame_capture* fc = data;
|
||||||
|
|
||||||
|
DTRACE_PROBE1(wayvnc, dmabuf_frame_ready, self);
|
||||||
|
|
||||||
dmabuf_capture_stop(fc);
|
dmabuf_capture_stop(fc);
|
||||||
|
|
||||||
fc->status = CAPTURE_DONE;
|
fc->status = CAPTURE_DONE;
|
||||||
|
@ -115,6 +118,8 @@ static void dmabuf_frame_cancel(void* data,
|
||||||
struct dmabuf_capture* self = data;
|
struct dmabuf_capture* self = data;
|
||||||
struct frame_capture* fc = data;
|
struct frame_capture* fc = data;
|
||||||
|
|
||||||
|
DTRACE_PROBE1(wayvnc, dmabuf_frame_cancel, self);
|
||||||
|
|
||||||
dmabuf_capture_stop(fc);
|
dmabuf_capture_stop(fc);
|
||||||
fc->status = reason == ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT
|
fc->status = reason == ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT
|
||||||
? CAPTURE_FATAL : CAPTURE_FAILED;
|
? CAPTURE_FATAL : CAPTURE_FAILED;
|
||||||
|
@ -137,6 +142,8 @@ static int dmabuf_capture_start(struct frame_capture* fc,
|
||||||
.cancel = dmabuf_frame_cancel,
|
.cancel = dmabuf_frame_cancel,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DTRACE_PROBE1(wayvnc, dmabuf_capture_start, self);
|
||||||
|
|
||||||
self->zwlr_frame =
|
self->zwlr_frame =
|
||||||
zwlr_export_dmabuf_manager_v1_capture_output(self->manager,
|
zwlr_export_dmabuf_manager_v1_capture_output(self->manager,
|
||||||
fc->overlay_cursor,
|
fc->overlay_cursor,
|
||||||
|
|
Loading…
Reference in New Issue