Patchwork [v2] qxl: update and add debug prints

login
register
mail settings
Submitter Alon Levy
Date June 24, 2011, 1:02 p.m.
Message ID <1308920577-31569-8-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/101800/
State New
Headers show

Comments

Alon Levy - June 24, 2011, 1:02 p.m.
---
 hw/qxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index 96f9c55..865e985 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -361,7 +361,7 @@  static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
 
     switch (qxl->mode) {
     case QXL_MODE_VGA:
-        dprint(qxl, 2, "%s: vga\n", __FUNCTION__);
+        dprint(qxl, 4, "%s: vga\n", __FUNCTION__);
         ret = false;
         qemu_mutex_lock(&qxl->ssd.lock);
         if (qxl->ssd.update != NULL) {
@@ -700,7 +700,8 @@  static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)
     qemu_spice_create_host_memslot(&d->ssd);
     qxl_soft_reset(d);
 
-    dprint(d, 1, "%s: done\n", __FUNCTION__);
+    dprint(d, 1, "%s: done (num_free_res %d, %p)\n", __FUNCTION__,
+        d->num_free_res, d->last_release);
 }
 
 static void qxl_reset_handler(DeviceState *dev)
@@ -1040,6 +1041,7 @@  static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
         }
         pthread_yield();
         if (!SPICE_RING_IS_EMPTY(&d->ram->release_ring)) {
+            dprint(d, 1, "QXL_IO_NOTIFY_OOM (return after pthread_yield)\n");
             break;
         }
         d->oom_running = 1;
@@ -1057,7 +1059,8 @@  static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
         }
         break;
     case QXL_IO_RESET:
-        dprint(d, 1, "QXL_IO_RESET\n");
+        dprint(d, 1, "QXL_IO_RESET %d (%p)\n", d->num_free_res,
+               d->last_release);
         qxl_hard_reset(d, 0);
         break;
     case QXL_IO_MEMSLOT_ADD:
@@ -1073,6 +1076,7 @@  static void ioport_write(void *opaque, uint32_t addr, uint32_t val)
         break;
     }
     case QXL_IO_MEMSLOT_DEL:
+        dprint(d, 1, "QXL_IO_MEMSLOT_DEL %d\n", val);
         qxl_del_memslot(d, val);
         break;
     case QXL_IO_CREATE_PRIMARY: