[Bug 765052] tracer: add (mini) object leak tracer

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jun 1 09:52:46 UTC 2016


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

Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #328808|none                        |needs-work
             status|                            |

--- Comment #53 from Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> ---
Review of attachment 328808:
 --> (https://bugzilla.gnome.org/review?bug=765052&attachment=328808)

::: plugins/tracers/Makefile.am
@@ +23,3 @@
   gststats.c \
+  gsttracers.c \
+  gstleaks.c

please keep list sorted

@@ +38,3 @@
   gstrusage.h \
+  gststats.h \
+  gstlatency.h

please keep list sorted

::: plugins/tracers/gstleaks.c
@@ +70,3 @@
+
+    self->filter = g_list_prepend (self->filter, GSIZE_TO_POINTER (type));
+  }

consider a GPtrArray since this is created once and never modifies, you can
even know the size beforehand.

@@ +98,3 @@
+    if (GST_IS_MINI_OBJECT_TYPE (object, type))
+      return TRUE;
+  }

What about getting the object/mini-object type outside of the loop, so that you
only compare types inside the loop

@@ +130,3 @@
+
+  if (G_IS_OBJECT (object))
+    g_object_weak_ref (G_OBJECT (object), object_weak_cb, self);

maybe (GObject *) for perf reasons

-- 
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