mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
- Slight reorganisation of functions that should be disabled
Original commit message from CVS: - Slight reorganisation of functions that should be disabled - make sure _gst_debug_register_funcptr is #ifdeffed out when DEBUGGING is disabled. This should fix 106047. Please retest.
This commit is contained in:
parent
981f6185c5
commit
0b3a5d14db
2 changed files with 18 additions and 25 deletions
|
@ -484,13 +484,9 @@ gst_default_error_handler (gchar *file, gchar *function,
|
|||
}
|
||||
|
||||
|
||||
|
||||
/***** DEBUG system *****/
|
||||
#ifdef GST_DEBUG_ENABLED
|
||||
#ifdef GST_DEBUG_ENABLED
|
||||
GHashTable *__gst_function_pointers = NULL;
|
||||
/* FIXME make this thread specific */
|
||||
/* static GSList *stack_trace = NULL; */
|
||||
|
||||
gchar *_gst_debug_nameof_funcptr (void *ptr) G_GNUC_NO_INSTRUMENT;
|
||||
|
||||
|
@ -507,12 +503,25 @@ _gst_debug_nameof_funcptr (void *ptr)
|
|||
return g_strdup_printf("%p",ptr);
|
||||
}
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void *
|
||||
_gst_debug_register_funcptr (void *ptr, gchar *ptrname)
|
||||
{
|
||||
if (!__gst_function_pointers)
|
||||
__gst_function_pointers = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
if (!g_hash_table_lookup (__gst_function_pointers, ptr))
|
||||
g_hash_table_insert (__gst_function_pointers, ptr, ptrname);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
#endif /* GST_DEBUG_ENABLED */
|
||||
|
||||
|
||||
#ifdef GST_ENABLE_FUNC_INSTRUMENTATION
|
||||
/* FIXME make this thread specific */
|
||||
static GSList *stack_trace = NULL;
|
||||
|
||||
void __cyg_profile_func_enter(void *this_fn,void *call_site) G_GNUC_NO_INSTRUMENT;
|
||||
void __cyg_profile_func_enter(void *this_fn,void *call_site)
|
||||
{
|
||||
|
@ -564,13 +573,3 @@ gst_debug_print_stack_trace (void)
|
|||
|
||||
#endif /* GST_ENABLE_FUNC_INTSTRUMENTATION */
|
||||
|
||||
void *
|
||||
_gst_debug_register_funcptr (void *ptr, gchar *ptrname)
|
||||
{
|
||||
if (!__gst_function_pointers)
|
||||
__gst_function_pointers = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
if (!g_hash_table_lookup (__gst_function_pointers, ptr))
|
||||
g_hash_table_insert (__gst_function_pointers, ptr, ptrname);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -352,8 +352,6 @@ void gst_default_info_handler (gint category,gboolean incore,
|
|||
gint line,const gchar *debug_string,
|
||||
void *element,gchar *string);
|
||||
|
||||
void * _gst_debug_register_funcptr (void *ptr, gchar *ptrname);
|
||||
|
||||
extern GstInfoHandler _gst_info_handler;
|
||||
extern guint32 _gst_info_categories;
|
||||
|
||||
|
@ -458,13 +456,11 @@ extern GstErrorHandler _gst_error_handler;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/********** function pointer stuff **********/
|
||||
extern GHashTable *__gst_function_pointers;
|
||||
|
||||
#if GST_DEBUG_ENABLED
|
||||
void* _gst_debug_register_funcptr (void *ptr, gchar *ptrname);
|
||||
gchar* _gst_debug_nameof_funcptr (void *ptr);
|
||||
|
||||
#define GST_DEBUG_FUNCPTR(ptr) _gst_debug_register_funcptr((void *)(ptr), #ptr)
|
||||
#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr)
|
||||
#else
|
||||
|
@ -472,8 +468,6 @@ extern GHashTable *__gst_function_pointers;
|
|||
#define GST_DEBUG_FUNCPTR_NAME(ptr) ""
|
||||
#endif /* GST_DEBUG_ENABLED */
|
||||
|
||||
gchar *_gst_debug_nameof_funcptr (void *ptr);
|
||||
|
||||
void gst_debug_print_stack_trace (void);
|
||||
|
||||
#endif /* __GSTINFO_H__ */
|
||||
|
|
Loading…
Reference in a new issue