Remove unused valgrind detection
authorTim-Philipp Müller <tim@centricular.com>
Fri, 14 Aug 2020 15:38:26 +0000 (16:38 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 11 Oct 2020 22:39:51 +0000 (22:39 +0000)
Having this just to log a debug message in case we're
running inside valgrind doesn't seem very useful, and
the code that used to use this no longer exists it seems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>

gst/gst_private.h
gst/gstinfo.c
meson.build

index b998833..ff75d2d 100644 (file)
@@ -116,8 +116,6 @@ G_GNUC_INTERNAL  gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
 
 G_GNUC_INTERNAL  gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
 
-G_GNUC_INTERNAL  gboolean _priv_gst_in_valgrind (void);
-
 /* init functions called from gst_init(). */
 G_GNUC_INTERNAL  void  _priv_gst_quarks_initialize (void);
 G_GNUC_INTERNAL  void  _priv_gst_mini_object_initialize (void);
index c9a2337..ac6f907 100644 (file)
@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
 static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
 static volatile gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
 
-/* FIXME: export this? */
-gboolean
-_priv_gst_in_valgrind (void)
-{
-  static enum
-  {
-    GST_VG_UNCHECKED,
-    GST_VG_NO_VALGRIND,
-    GST_VG_INSIDE
-  }
-  in_valgrind = GST_VG_UNCHECKED;
-
-  if (in_valgrind == GST_VG_UNCHECKED) {
-#ifdef HAVE_VALGRIND_VALGRIND_H
-    if (RUNNING_ON_VALGRIND) {
-      GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
-      in_valgrind = GST_VG_INSIDE;
-    } else {
-      GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
-      in_valgrind = GST_VG_NO_VALGRIND;
-    }
-#else
-    in_valgrind = GST_VG_NO_VALGRIND;
-#endif
-    g_assert (in_valgrind == GST_VG_NO_VALGRIND ||
-        in_valgrind == GST_VG_INSIDE);
-  }
-  return (in_valgrind == GST_VG_INSIDE);
-}
-
 static gchar *
 _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token,
     guint val)
@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
   _priv_GST_CAT_PROTECTION =
       _gst_debug_category_new ("GST_PROTECTION", 0, "protection");
 
-  /* print out the valgrind message if we're in valgrind */
-  _priv_gst_in_valgrind ();
-
   env = g_getenv ("GST_DEBUG_OPTIONS");
   if (env != NULL) {
     if (strstr (env, "full_tags") || strstr (env, "full-tags"))
@@ -2503,12 +2470,6 @@ gst_debug_construct_win_color (guint colorinfo)
   return 0;
 }
 
-gboolean
-_priv_gst_in_valgrind (void)
-{
-  return FALSE;
-}
-
 void
 _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
     const gchar * func, gint line, GObject * obj, const gchar * msg,
index 9967d0f..9167199 100644 (file)
@@ -200,7 +200,6 @@ check_headers = [
   'sys/wait.h',
   'ucontext.h',
   'unistd.h',
-  'valgrind/valgrind.h',
   'sys/resource.h',
   'sys/uio.h',
 ]