]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: object: Add class name to the Ref/Unref/Dispose debug messages
authorPeter Krempa <pkrempa@redhat.com>
Thu, 30 Apr 2026 05:56:54 +0000 (07:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 19 May 2026 07:42:35 +0000 (09:42 +0200)
commitdbbe72e83b04dc1663c7e50c88679b0686d02ea6
treeb0be423a74bf3583c99112b6ea6145730110fb29
parent5516b104302c2c3d7b558dbef07fb5cf42ca2173
util: object: Add class name to the Ref/Unref/Dispose debug messages

Since the object stores the pointer to the parent class object
internally we can add the name of the class of the object to the debug
messages. Since the debug messages are based on probe points propagate
it into the probe point rather than adding separate debug message.

For virObjectUnref, this also fixes the ordering of the messages to be
'unref->dispose' by invoking the PROBE before unref rather than the
other way around which didn't make sense in the logs and wouldn't allow
accessing the class pointer from the already disposed-of object.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libvirt_probes.d
src/util/virobject.c