提交 a9fa62f3 编写于 作者: D Daniel P. Berrangé

src: don't include ref count in debug messages / probes

The ref count will be private to the GObject base class
and we must not peek at it, even for debugging messages.
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 2bd7ed78
......@@ -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);
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册