tracers: set MAY_BE_LEAKED on tracer records
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Fri, 2 Aug 2019 07:37:58 +0000 (13:07 +0530)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 14 Aug 2019 03:21:02 +0000 (08:51 +0530)
The records are static and so appear as false positives when using those
tracers with the leaks tracer as well.
The leaks tracer was already setting this flag on its record so let's
set it on the other ones as well.

plugins/tracers/gstlatency.c
plugins/tracers/gstrusage.c
plugins/tracers/gststats.c

index 945ad2493480742594382fdc9605a37f080a694f..c3e8f746f356fc9e733e765fa2e05ff0e678047b 100644 (file)
@@ -668,6 +668,11 @@ gst_latency_tracer_class_init (GstLatencyTracerClass * klass)
           NULL),
       NULL);
   /* *INDENT-ON* */
+
+  GST_OBJECT_FLAG_SET (tr_latency, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_element_latency, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_element_reported_latency,
+      GST_OBJECT_FLAG_MAY_BE_LEAKED);
 }
 
 static void
index 9086f1edc66d4494af78df6a8760fc5f18f89773..68178150428a302c56466e4825ace3dae9abfd57 100644 (file)
@@ -346,6 +346,9 @@ gst_rusage_tracer_class_init (GstRUsageTracerClass * klass)
           NULL),
       NULL);
   /* *INDENT-ON* */
+
+  GST_OBJECT_FLAG_SET (tr_thread, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_proc, GST_OBJECT_FLAG_MAY_BE_LEAKED);
 }
 
 static void
index 7ca1eca3c321a3976d2b01c1867d71de3b4451bd..2fba4fa3ff5c490857d4a55bacfd3dc2c17cf98a 100644 (file)
@@ -744,6 +744,14 @@ gst_stats_tracer_class_init (GstStatsTracerClass * klass)
           NULL),
       NULL);
   /* *INDENT-ON* */
+
+  GST_OBJECT_FLAG_SET (tr_buffer, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_event, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_message, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_element_query, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_query, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_new_element, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+  GST_OBJECT_FLAG_SET (tr_new_pad, GST_OBJECT_FLAG_MAY_BE_LEAKED);
 }
 
 static void