mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
trace: make alloc trace work for miniobject again
This commit is contained in:
parent
753a1125dd
commit
166f6e1cc5
3 changed files with 14 additions and 2 deletions
|
@ -638,6 +638,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
|||
llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
|
||||
g_log_set_handler (g_log_domain_gstreamer, llf, debug_log_handler, NULL);
|
||||
|
||||
_priv_gst_mini_object_initialize ();
|
||||
_priv_gst_quarks_initialize ();
|
||||
_priv_gst_memory_initialize ();
|
||||
_priv_gst_format_initialize ();
|
||||
|
|
|
@ -94,6 +94,7 @@ gboolean _priv_gst_in_valgrind (void);
|
|||
|
||||
/* init functions called from gst_init(). */
|
||||
void _priv_gst_quarks_initialize (void);
|
||||
void _priv_gst_mini_object_initialize (void);
|
||||
void _priv_gst_buffer_initialize (void);
|
||||
void _priv_gst_buffer_list_initialize (void);
|
||||
void _priv_gst_structure_initialize (void);
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
#include "gst/gstinfo.h"
|
||||
#include <gobject/gvaluecollector.h>
|
||||
|
||||
#define GST_DISABLE_TRACE
|
||||
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
#include "gsttrace.h"
|
||||
static GstAllocTrace *_gst_mini_object_trace;
|
||||
|
@ -48,6 +46,14 @@ static GstAllocTrace *_gst_mini_object_trace;
|
|||
/* Mutex used for weak referencing */
|
||||
G_LOCK_DEFINE_STATIC (weak_refs_mutex);
|
||||
|
||||
void
|
||||
_priv_gst_mini_object_initialize (void)
|
||||
{
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
_gst_mini_object_trace = gst_alloc_trace_register ("GstMiniObject");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_mini_object_init:
|
||||
* @mini_object: a #GstMiniObject
|
||||
|
@ -69,6 +75,10 @@ gst_mini_object_init (GstMiniObject * mini_object, GType type, gsize size)
|
|||
mini_object->size = size;
|
||||
mini_object->n_weak_refs = 0;
|
||||
mini_object->weak_refs = NULL;
|
||||
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
gst_alloc_trace_new (_gst_mini_object_trace, mini_object);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue