thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-spice-display-add-display-channel-id-to-the-debug-me.patch

958e1b
From 514a9261b651aacc643075159f7c8eac07c64d81 Mon Sep 17 00:00:00 2001
91048c
From: Gerd Hoffmann <kraxel@redhat.com>
91048c
Date: Mon, 15 Sep 2014 13:08:22 +0200
958e1b
Subject: [PATCH 3/4] spice-display: add display channel id to the debug messages.
91048c
91048c
Message-id: <1410786503-19794-4-git-send-email-kraxel@redhat.com>
91048c
Patchwork-id: 61138
91048c
O-Subject: [RHEL-7.1 qemu-kvm PATCH 3/4] spice-display: add display channel id to the debug messages.
958e1b
Bugzilla: 1139118
91048c
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
91048c
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
91048c
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
91048c
91048c
And s/__FUNCTION__/__func__/ while being at it.
91048c
91048c
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
91048c
(cherry picked from commit 35b2122db446a03be9b88f540e865930efd01d6a)
91048c
91048c
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
91048c
---
91048c
 ui/spice-display.c |   27 ++++++++++++++-------------
91048c
 1 files changed, 14 insertions(+), 13 deletions(-)
91048c
91048c
diff --git a/ui/spice-display.c b/ui/spice-display.c
958e1b
index f0f95c8..5d0a21e 100644
91048c
--- a/ui/spice-display.c
91048c
+++ b/ui/spice-display.c
958e1b
@@ -280,7 +280,7 @@ void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd)
91048c
 {
91048c
     QXLDevMemSlot memslot;
91048c
 
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
 
91048c
     memset(&memslot, 0, sizeof(memslot));
91048c
     memslot.slot_group_id = MEMSLOT_GROUP_HOST;
958e1b
@@ -294,7 +294,7 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd)
91048c
 
91048c
     memset(&surface, 0, sizeof(surface));
91048c
 
91048c
-    dprint(1, "%s: %dx%d\n", __FUNCTION__,
91048c
+    dprint(1, "%s/%d: %dx%d\n", __func__, ssd->qxl.id,
91048c
            surface_width(ssd->ds), surface_height(ssd->ds));
91048c
 
91048c
     surface.format     = SPICE_SURFACE_FMT_32_xRGB;
958e1b
@@ -312,7 +312,7 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd)
91048c
 
91048c
 void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd)
91048c
 {
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
 
91048c
     qemu_spice_destroy_primary_surface(ssd, 0, QXL_SYNC);
91048c
 }
958e1b
@@ -337,7 +337,8 @@ void qemu_spice_display_update(SimpleSpiceDisplay *ssd,
91048c
 {
91048c
     QXLRect update_area;
91048c
 
91048c
-    dprint(2, "%s: x %d y %d w %d h %d\n", __FUNCTION__, x, y, w, h);
91048c
+    dprint(2, "%s/%d: x %d y %d w %d h %d\n", __func__,
91048c
+           ssd->qxl.id, x, y, w, h);
91048c
     update_area.left = x,
91048c
     update_area.right = x + w;
91048c
     update_area.top = y;
958e1b
@@ -354,7 +355,7 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
91048c
 {
91048c
     SimpleSpiceUpdate *update;
91048c
 
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
 
91048c
     memset(&ssd->dirty, 0, sizeof(ssd->dirty));
91048c
     if (ssd->surface) {
958e1b
@@ -396,7 +397,7 @@ void qemu_spice_cursor_refresh_unlocked(SimpleSpiceDisplay *ssd)
91048c
 
91048c
 void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
91048c
 {
91048c
-    dprint(3, "%s:\n", __func__);
91048c
+    dprint(3, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
     graphic_hw_update(ssd->dcl.con);
91048c
 
91048c
     qemu_mutex_lock(&ssd->lock);
958e1b
@@ -410,7 +411,7 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
91048c
     if (ssd->notify) {
91048c
         ssd->notify = 0;
91048c
         qemu_spice_wakeup(ssd);
91048c
-        dprint(2, "%s: notify\n", __FUNCTION__);
91048c
+        dprint(2, "%s/%d: notify\n", __func__, ssd->qxl.id);
91048c
     }
91048c
 }
91048c
 
958e1b
@@ -420,19 +421,19 @@ static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
91048c
 {
91048c
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
91048c
 
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
     ssd->worker = qxl_worker;
91048c
 }
91048c
 
91048c
 static void interface_set_compression_level(QXLInstance *sin, int level)
91048c
 {
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, sin->id);
91048c
     /* nothing to do */
91048c
 }
91048c
 
91048c
 static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time)
91048c
 {
91048c
-    dprint(3, "%s:\n", __FUNCTION__);
91048c
+    dprint(3, "%s/%d:\n", __func__, sin->id);
91048c
     /* nothing to do */
91048c
 }
91048c
 
958e1b
@@ -455,7 +456,7 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
91048c
     SimpleSpiceUpdate *update;
91048c
     int ret = false;
91048c
 
91048c
-    dprint(3, "%s:\n", __FUNCTION__);
91048c
+    dprint(3, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
 
91048c
     qemu_mutex_lock(&ssd->lock);
91048c
     update = QTAILQ_FIRST(&ssd->updates);
958e1b
@@ -471,7 +472,7 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
91048c
 
91048c
 static int interface_req_cmd_notification(QXLInstance *sin)
91048c
 {
91048c
-    dprint(1, "%s:\n", __FUNCTION__);
91048c
+    dprint(1, "%s/%d:\n", __func__, sin->id);
91048c
     return 1;
91048c
 }
91048c
 
958e1b
@@ -481,7 +482,7 @@ static void interface_release_resource(QXLInstance *sin,
91048c
     SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
91048c
     uintptr_t id;
91048c
 
91048c
-    dprint(2, "%s:\n", __FUNCTION__);
91048c
+    dprint(2, "%s/%d:\n", __func__, ssd->qxl.id);
91048c
     id = ext.info->id;
91048c
     qemu_spice_destroy_update(ssd, (void*)id);
91048c
 }
91048c
-- 
91048c
1.7.1
91048c