From bded52d5d343281ffb06761397cdecf6623020b0 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 4 Sep 2012 12:37:14 +0300 Subject: (wip) add red_dtrace.d --- server/Makefile.am | 8 ++++++++ server/red_dtrace.d | 3 +++ server/red_worker.c | 4 ++++ 3 files changed, 15 insertions(+) create mode 100644 server/red_dtrace.d diff --git a/server/Makefile.am b/server/Makefile.am index 18a9d8a7..d6438544 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -91,8 +91,16 @@ libspice_server_la_SOURCES = \ spicevmc.c \ zlib_encoder.c \ zlib_encoder.h \ + red_dtrace.d \ + red_dtrace.h \ $(NULL) +.d.o: + libtool --mode=compile --tag=CC dtrace -o $@ -G -s $< + +.d.h: + dtrace -o $@ -h -s $< + if SUPPORT_TUNNEL libspice_server_la_SOURCES += \ red_tunnel_worker.c \ diff --git a/server/red_dtrace.d b/server/red_dtrace.d new file mode 100644 index 00000000..f0ea8408 --- /dev/null +++ b/server/red_dtrace.d @@ -0,0 +1,3 @@ +provider spice_server { + probe red_marshall_monitors_config(MonitorsConfig *monitors_config); +}; diff --git a/server/red_worker.c b/server/red_worker.c index eee9915d..40591c31 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -81,6 +81,8 @@ #include "main_channel.h" #include "migration_protocol.h" +#include "red_dtrace.h" + //#define COMPRESS_STAT //#define DUMP_BITMAP //#define PIPE_DEBUG @@ -8849,6 +8851,8 @@ static void red_marshall_monitors_config(RedChannelClient *rcc, SpiceMarshaller SpiceMsgDisplayMonitorsConfig *msg = spice_malloc0(sizeof(*msg) + heads_size); int count = 0; // ignore monitors_config->count, it may contain zero width monitors, remove them now + SPICE_SERVER_RED_MARSHALL_MONITORS_CONFIG(monitors_config); + red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_MONITORS_CONFIG, NULL); for (i = 0 ; i < monitors_config->count; ++i) { if (monitors_config->heads[i].width == 0 || monitors_config->heads[i].height == 0) { -- cgit v1.2.3