]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
client rpc: Improve debug messages in virNetClientIO
authorJiri Denemark <jdenemar@redhat.com>
Fri, 8 Jun 2012 11:41:25 +0000 (13:41 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 13 Jun 2012 13:24:18 +0000 (15:24 +0200)
When analyzing our debug log, I'm always confused about what each of the
pointers mean. Let's be explicit.

src/rpc/virnetclient.c

index 14f806f99b2d89a470f50a4eb4ce999ff2f5dbfd..c62e04530eefcc0b0f0ee032fe61d91118d6cef3 100644 (file)
@@ -1567,7 +1567,8 @@ static int virNetClientIO(virNetClientPtr client,
             return -1;
         }
 
-        VIR_DEBUG("Going to sleep %p %p", client->waitDispatch, thiscall);
+        VIR_DEBUG("Going to sleep head=%p call=%p",
+                  client->waitDispatch, thiscall);
         /* Go to sleep while other thread is working... */
         if (virCondWait(&thiscall->cond, &client->lock) < 0) {
             virNetClientCallRemove(&client->waitDispatch, thiscall);
@@ -1576,7 +1577,8 @@ static int virNetClientIO(virNetClientPtr client,
             return -1;
         }
 
-        VIR_DEBUG("Wokeup from sleep %p %p", client->waitDispatch, thiscall);
+        VIR_DEBUG("Woken up from sleep head=%p call=%p",
+                  client->waitDispatch, thiscall);
         /* Three reasons we can be woken up
          *  1. Other thread has got our reply ready for us
          *  2. Other thread is all done, and it is our turn to
@@ -1608,7 +1610,8 @@ static int virNetClientIO(virNetClientPtr client,
         client->haveTheBuck = true;
     }
 
-    VIR_DEBUG("We have the buck %p %p", client->waitDispatch, thiscall);
+    VIR_DEBUG("We have the buck head=%p call=%p",
+              client->waitDispatch, thiscall);
 
     /*
      * The buck stops here!
@@ -1637,7 +1640,8 @@ static int virNetClientIO(virNetClientPtr client,
         rv = -1;
 
 cleanup:
-    VIR_DEBUG("All done with our call %p %p %d", client->waitDispatch, thiscall, rv);
+    VIR_DEBUG("All done with our call head=%p call=%p rv=%d",
+              client->waitDispatch, thiscall, rv);
     return rv;
 }