[Bug 765052] tracer: add refcounts tracer

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Apr 18 12:23:56 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765052

--- Comment #10 from Guillaume Desmottes <gdesmott at gnome.org> ---
I actually used this kind of things when I added valgrind support to
gst-validate and was tracking leaks in various scenarios. It wasn't this code
(didn't have tracers yet) but the idea was the same: tracking
gst_(mini_)object_ref/unref calls using printf and parsing them using a script.
I also did some magic with gdb at this time:
http://blog.desmottes.be/?post/2015/03/30/Tracking-the-ref-count-of-a-GstMiniObject
This was especially useful when tracking events and caps leaks for example.

So yeah, I do think this kind of tool can actually be useful.
I agree with you that it is not perfect, especially with GObject, and tools
like refdbg or gobject-list may be a better fit. But I think this may be a nice
addition to the existing tools, if only because of the convenience to have it
embedded with gst core as using external tools can sometime not be easily
doable on some hardware/platform.

On the other hand I can see the point of the GObject limitation being a
problem. So it could make sense to reduce the scope of this tracer to
GstMiniObject only.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list