diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-09-21 13:15:27 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-09-29 10:36:33 +0200 |
commit | ad6374c43e572e6e53020a97e72e9ea525b08334 (patch) | |
tree | a3101cd1dc7ca47185396d94ec3f2a963ec56e5d /ui/vnc.c | |
parent | f4924974c7c72560f68ab298ac25a525a28a2124 (diff) |
ui: add tracing of VNC operations related to QIOChannel
Trace anything which opens/closes/wraps a QIOChannel in the
VNC server.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170921121528.23935-2-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1118,6 +1118,7 @@ static void vnc_disconnect_start(VncState *vs) if (vs->disconnecting) { return; } + trace_vnc_client_disconnect_start(vs, vs->ioc); vnc_set_share_mode(vs, VNC_SHARE_MODE_DISCONNECTED); if (vs->ioc_tag) { g_source_remove(vs->ioc_tag); @@ -1130,6 +1131,8 @@ void vnc_disconnect_finish(VncState *vs) { int i; + trace_vnc_client_disconnect_finish(vs, vs->ioc); + vnc_jobs_join(vs); /* Wait encoding jobs */ vnc_lock_output(vs); @@ -1183,11 +1186,12 @@ ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp) { if (ret <= 0) { if (ret == 0) { - VNC_DEBUG("Closing down client sock: EOF\n"); + trace_vnc_client_eof(vs, vs->ioc); vnc_disconnect_start(vs); } else if (ret != QIO_CHANNEL_ERR_BLOCK) { - VNC_DEBUG("Closing down client sock: ret %zd (%s)\n", - ret, errp ? error_get_pretty(*errp) : "Unknown"); + trace_vnc_client_io_error(vs, vs->ioc, + errp ? error_get_pretty(*errp) : + "Unknown"); vnc_disconnect_start(vs); } @@ -2884,6 +2888,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSocket *sioc, bool first_client = QTAILQ_EMPTY(&vd->clients); int i; + trace_vnc_client_connect(vs, sioc); vs->sioc = sioc; object_ref(OBJECT(vs->sioc)); vs->ioc = QIO_CHANNEL(sioc); |