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