diff mbox

[PATCHv3] qxl: update and add debug prints

Message ID 1309348641-20061-9-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy June 29, 2011, 11:57 a.m. UTC
---
 hw/qxl.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

Comments

Gerd Hoffmann June 29, 2011, 1:01 p.m. UTC | #1
Hi,

> -    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);

>       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);

Hmm, this looks pretty much like something added to debug a specific 
issue, not something useful for tracing in general ...

cheers,
   Gerd
Alon Levy June 29, 2011, 2:24 p.m. UTC | #2
On Wed, Jun 29, 2011 at 03:01:30PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> >-    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);
> 
> >      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);
> 
> Hmm, this looks pretty much like something added to debug a specific
> issue, not something useful for tracing in general ...

ok. can you just drop it from the queue so I can avoid sending a v4?

> 
> cheers,
>   Gerd
>
Gerd Hoffmann June 29, 2011, 2:36 p.m. UTC | #3
Hi,

>> Hmm, this looks pretty much like something added to debug a specific
>> issue, not something useful for tracing in general ...
>
> ok. can you just drop it from the queue so I can avoid sending a v4?

Pushed a new bz700134 branch version with bits cherry-picked, just 
resend anything which isn't there yet, not the whole series.

cheers,
   Gerd
diff mbox

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index d38e3c0..8895b14 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -444,7 +444,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) {
@@ -783,7 +783,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)
@@ -1122,6 +1123,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;
@@ -1138,7 +1140,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:
@@ -1153,6 +1156,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: