mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
Trace streaming device data using recorder
Trace when data is received from the guest and when is sent to the client. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
1de0e6a292
commit
e5bc6f952c
@ -19,6 +19,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <common/recorder.h>
|
||||
|
||||
#include "red-stream-device.h"
|
||||
|
||||
#include "stream-channel.h"
|
||||
@ -70,6 +72,8 @@ static StreamMsgHandler handle_msg_format, handle_msg_data, handle_msg_cursor_se
|
||||
static bool handle_msg_invalid(StreamDevice *dev, SpiceCharDeviceInstance *sin,
|
||||
const char *error_msg) SPICE_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
RECORDER(stream_device_data, 32, "Stream device data packet");
|
||||
|
||||
static void
|
||||
close_timer_func(void *opaque)
|
||||
{
|
||||
@ -324,6 +328,8 @@ handle_msg_data(StreamDevice *dev, SpiceCharDeviceInstance *sin)
|
||||
*/
|
||||
if (dev->msg_pos == 0) {
|
||||
dev->frame_mmtime = reds_get_mm_time();
|
||||
record(stream_device_data, "Stream data packet size %u mm_time %u",
|
||||
dev->hdr.size, dev->frame_mmtime);
|
||||
if (dev->msg_len < dev->hdr.size) {
|
||||
g_free(dev->msg);
|
||||
dev->msg = g_malloc(dev->hdr.size);
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#endif
|
||||
|
||||
#include <common/generated_server_marshallers.h>
|
||||
#include <common/recorder.h>
|
||||
#include <spice/stream-device.h>
|
||||
|
||||
#include "red-channel-client.h"
|
||||
@ -116,6 +117,8 @@ typedef struct StreamDataItem {
|
||||
|
||||
static void stream_channel_client_on_disconnect(RedChannelClient *rcc);
|
||||
|
||||
RECORDER(stream_channel_data, 32, "Stream channel data packet");
|
||||
|
||||
static void
|
||||
stream_channel_client_class_init(StreamChannelClientClass *klass)
|
||||
{
|
||||
@ -289,6 +292,8 @@ stream_channel_send_item(RedChannelClient *rcc, RedPipeItem *pipe_item)
|
||||
red_pipe_item_ref(pipe_item);
|
||||
spice_marshaller_add_by_ref_full(m, item->data.data, item->data.data_size,
|
||||
marshaller_unref_pipe_item, pipe_item);
|
||||
record(stream_channel_data, "Stream data packet size %u mm_time %u",
|
||||
item->data.data_size, item->data.base.multi_media_time);
|
||||
break;
|
||||
}
|
||||
case RED_PIPE_ITEM_TYPE_STREAM_DESTROY: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user