]> xenbits.xensource.com Git - libvirt.git/commitdiff
src: don't include ref count in debug messages / probes
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 19 May 2020 14:55:01 +0000 (15:55 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 3 Jun 2020 09:20:17 +0000 (10:20 +0100)
The ref count will be private to the GObject base class
and we must not peek at it, even for debugging messages.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
14 files changed:
src/admin/libvirt-admin.c
src/libvirt-domain-checkpoint.c
src/libvirt-domain-snapshot.c
src/libvirt-domain.c
src/libvirt-host.c
src/libvirt-interface.c
src/libvirt-network.c
src/libvirt-nodedev.c
src/libvirt-nwfilter.c
src/libvirt-secret.c
src/libvirt-storage.c
src/libvirt-stream.c
src/libvirt_qemu_probes.d
src/qemu/qemu_monitor.c

index 1d4ac51296ecb91a30c7a82b68ea3f101527ba84..b7f21275cb9f0cf5f806144740718eb6c3bc4fc2 100644 (file)
@@ -322,8 +322,7 @@ virAdmConnectClose(virAdmConnectPtr conn)
 int
 virAdmConnectRef(virAdmConnectPtr conn)
 {
-    VIR_DEBUG("conn=%p refs=%d", conn,
-              conn ? conn->parent.parent.u.s.refs : 0);
+    VIR_DEBUG("conn=%p", conn);
 
     virResetLastError();
     virCheckAdmConnectReturn(conn, -1);
index 432c2d5a52041bba02b12bf1cb0aa81a2e88bc7d..50627c486c0b0833228289cecf2e3d6fa166e926 100644 (file)
@@ -535,8 +535,7 @@ virDomainCheckpointDelete(virDomainCheckpointPtr checkpoint,
 int
 virDomainCheckpointRef(virDomainCheckpointPtr checkpoint)
 {
-    VIR_DEBUG("checkpoint=%p, refs=%d", checkpoint,
-              checkpoint ? checkpoint->parent.u.s.refs : 0);
+    VIR_DEBUG("checkpoint=%p", checkpoint);
 
     virResetLastError();
 
index 33593e11e90816d5fe0ea28658544e49c14157f5..f856e5b9b83d6223483fd15f363a665f957917df 100644 (file)
@@ -1080,8 +1080,7 @@ virDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
 int
 virDomainSnapshotRef(virDomainSnapshotPtr snapshot)
 {
-    VIR_DEBUG("snapshot=%p, refs=%d", snapshot,
-              snapshot ? snapshot->parent.u.s.refs : 0);
+    VIR_DEBUG("snapshot=%p", snapshot);
 
     virResetLastError();
 
index 37f864b7b05b5a105a0df6112e2bd39b02d12459..60b5e65fc3ef1ad428b6896fbde3f21dcc0bc32e 100644 (file)
@@ -590,7 +590,7 @@ virDomainFree(virDomainPtr domain)
 int
 virDomainRef(virDomainPtr domain)
 {
-    VIR_DOMAIN_DEBUG(domain, "refs=%d", domain ? domain->parent.u.s.refs : 0);
+    VIR_DOMAIN_DEBUG(domain);
 
     virResetLastError();
 
index bc3d1d2803fe43acdd01b17fc3573fe925718418..07d13585f48ebfcc1cb81c73c56107ab598c0deb 100644 (file)
@@ -51,7 +51,7 @@ VIR_LOG_INIT("libvirt.host");
 int
 virConnectRef(virConnectPtr conn)
 {
-    VIR_DEBUG("conn=%p refs=%d", conn, conn ? conn->parent.parent.u.s.refs : 0);
+    VIR_DEBUG("conn=%p", conn);
 
     virResetLastError();
 
index 2d2df68131a505497b6c19c19d460fb4dce66404..5eb5980483f22ff8ede7089bc2a627a2e9062c7b 100644 (file)
@@ -642,7 +642,7 @@ virInterfaceDestroy(virInterfacePtr iface, unsigned int flags)
 int
 virInterfaceRef(virInterfacePtr iface)
 {
-    VIR_DEBUG("iface=%p refs=%d", iface, iface ? iface->parent.u.s.refs : 0);
+    VIR_DEBUG("iface=%p", iface);
 
     virResetLastError();
 
index 09e24fb0a874bc53074e84718b488524e7f347ab..f691b672c7283a7cdffedb060560ea3bf8ddd0b4 100644 (file)
@@ -679,8 +679,7 @@ virNetworkFree(virNetworkPtr network)
 int
 virNetworkRef(virNetworkPtr network)
 {
-    VIR_DEBUG("network=%p refs=%d", network,
-              network ? network->parent.u.s.refs : 0);
+    VIR_DEBUG("network=%p", network);
 
     virResetLastError();
 
@@ -1714,8 +1713,7 @@ virNetworkPortFree(virNetworkPortPtr port)
 int
 virNetworkPortRef(virNetworkPortPtr port)
 {
-    VIR_DEBUG("port=%p refs=%d", port,
-              port ? port->parent.u.s.refs : 0);
+    VIR_DEBUG("port=%p", port);
 
     virResetLastError();
 
index dce46b71817545e1de82ce5df9647482cb0f1456..cdec1235687a6aa6a0863c5f15a171b4e9723a4e 100644 (file)
@@ -477,7 +477,7 @@ virNodeDeviceFree(virNodeDevicePtr dev)
 int
 virNodeDeviceRef(virNodeDevicePtr dev)
 {
-    VIR_DEBUG("dev=%p refs=%d", dev, dev ? dev->parent.u.s.refs : 0);
+    VIR_DEBUG("dev=%p", dev);
 
     virResetLastError();
 
index d28220db8a79969fbff1bbb1efe6537c6b8bfd9b..e2993858950f3581cce3159f5923a60e8f1bed22 100644 (file)
@@ -503,8 +503,7 @@ virNWFilterGetXMLDesc(virNWFilterPtr nwfilter, unsigned int flags)
 int
 virNWFilterRef(virNWFilterPtr nwfilter)
 {
-    VIR_DEBUG("nwfilter=%p refs=%d", nwfilter,
-              nwfilter ? nwfilter->parent.u.s.refs : 0);
+    VIR_DEBUG("nwfilter=%p", nwfilter);
 
     virResetLastError();
 
@@ -820,8 +819,7 @@ virNWFilterBindingGetXMLDesc(virNWFilterBindingPtr binding, unsigned int flags)
 int
 virNWFilterBindingRef(virNWFilterBindingPtr binding)
 {
-    VIR_DEBUG("binding=%p refs=%d", binding,
-              binding ? binding->parent.u.s.refs : 0);
+    VIR_DEBUG("binding=%p", binding);
 
     virResetLastError();
 
index 33cbdd7b0bb2c95a52c41d900c2d2678b314383b..75d40f53dc841995e70aa760d5e3078edfc6a6d6 100644 (file)
@@ -658,8 +658,7 @@ virSecretUndefine(virSecretPtr secret)
 int
 virSecretRef(virSecretPtr secret)
 {
-    VIR_DEBUG("secret=%p refs=%d", secret,
-              secret ? secret->parent.u.s.refs : 0);
+    VIR_DEBUG("secret=%p", secret);
 
     virResetLastError();
 
index 0406fe84d3c212b2a032135638d1b23a57237076..a45c8b98c1529c955e0d620b3d649da980bee44f 100644 (file)
@@ -872,7 +872,7 @@ virStoragePoolFree(virStoragePoolPtr pool)
 int
 virStoragePoolRef(virStoragePoolPtr pool)
 {
-    VIR_DEBUG("pool=%p refs=%d", pool, pool ? pool->parent.u.s.refs : 0);
+    VIR_DEBUG("pool=%p", pool);
 
     virResetLastError();
 
@@ -1909,7 +1909,7 @@ virStorageVolFree(virStorageVolPtr vol)
 int
 virStorageVolRef(virStorageVolPtr vol)
 {
-    VIR_DEBUG("vol=%p refs=%d", vol, vol ? vol->parent.u.s.refs : 0);
+    VIR_DEBUG("vol=%p", vol);
 
     virResetLastError();
 
index 41b9cc1445a43e9ec08d92bbe827bf4e9bead523..aeb7562018711f5afb87dd715de6f39980eec9f7 100644 (file)
@@ -85,8 +85,7 @@ virStreamNew(virConnectPtr conn,
 int
 virStreamRef(virStreamPtr stream)
 {
-    VIR_DEBUG("stream=%p refs=%d", stream,
-              stream ? stream->parent.u.s.refs : 0);
+    VIR_DEBUG("stream=%p", stream);
 
     virResetLastError();
 
index e4449a9922c50077832f5fdafe69c4c932da055c..5bcac7667be062471c3c6da47127354c410afd73 100644 (file)
@@ -4,10 +4,10 @@ provider libvirt {
         # binary: libvirtd
         # module: libvirt/connection-driver/libvirt_driver_qemu.so
         # Monitor lifecycle
-        probe qemu_monitor_new(void *mon, int refs, int fd);
-        probe qemu_monitor_ref(void *mon, int refs);
-        probe qemu_monitor_unref(void *mon, int refs);
-        probe qemu_monitor_close(void *monm, int refs);
+        probe qemu_monitor_new(void *mon, int fd);
+        probe qemu_monitor_ref(void *mon);
+        probe qemu_monitor_unref(void *mon);
+        probe qemu_monitor_close(void *monm);
 
         # High level monitor message processing
         probe qemu_monitor_send_msg(void *mon, const char *msg, int fd);
index b88eac96a1966f4b18651db34dba370097350416..3ec22b939fb11050990c2d6b17839f6e5ff24fcd 100644 (file)
@@ -714,9 +714,7 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
     virObjectLock(mon);
     qemuMonitorRegister(mon);
 
-    PROBE(QEMU_MONITOR_NEW,
-          "mon=%p refs=%d fd=%d",
-          mon, mon->parent.parent.u.s.refs, mon->fd);
+    PROBE(QEMU_MONITOR_NEW, "mon=%p fd=%d", mon, mon->fd);
     virObjectUnlock(mon);
 
     return mon;
@@ -865,8 +863,7 @@ qemuMonitorClose(qemuMonitorPtr mon)
         return;
 
     virObjectLock(mon);
-    PROBE(QEMU_MONITOR_CLOSE,
-          "mon=%p refs=%d", mon, mon->parent.parent.u.s.refs);
+    PROBE(QEMU_MONITOR_CLOSE, "mon=%p", mon);
 
     qemuMonitorSetDomainLogLocked(mon, NULL, NULL, NULL);