Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 1 | From 598d108e2c438d8f2ecd3bf948fa3ebbd3681490 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 2 | From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> |
| 3 | Date: Fri, 14 Aug 2020 16:38:26 +0100 |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 4 | Subject: [PATCH 2/3] Remove unused valgrind detection |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 5 | |
| 6 | Having this just to log a debug message in case we're |
| 7 | running inside valgrind doesn't seem very useful, and |
| 8 | the code that used to use this no longer exists it seems. |
| 9 | |
| 10 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595> |
| 11 | |
| 12 | Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] |
| 13 | |
| 14 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> |
| 15 | --- |
| 16 | gst/gst_private.h | 2 -- |
| 17 | gst/gstinfo.c | 39 --------------------------------------- |
| 18 | meson.build | 1 - |
| 19 | 3 files changed, 42 deletions(-) |
| 20 | |
| 21 | diff --git a/gst/gst_private.h b/gst/gst_private.h |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 22 | index eefd044d9..8252ede51 100644 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 23 | --- a/gst/gst_private.h |
| 24 | +++ b/gst/gst_private.h |
| 25 | @@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin |
| 26 | |
| 27 | G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); |
| 28 | |
| 29 | -G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void); |
| 30 | - |
| 31 | /* init functions called from gst_init(). */ |
| 32 | G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); |
| 33 | G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); |
| 34 | diff --git a/gst/gstinfo.c b/gst/gstinfo.c |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 35 | index 5d317877b..097f8b20d 100644 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 36 | --- a/gst/gstinfo.c |
| 37 | +++ b/gst/gstinfo.c |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 38 | @@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 39 | static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; |
| 40 | static volatile gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON; |
| 41 | |
| 42 | -/* FIXME: export this? */ |
| 43 | -gboolean |
| 44 | -_priv_gst_in_valgrind (void) |
| 45 | -{ |
| 46 | - static enum |
| 47 | - { |
| 48 | - GST_VG_UNCHECKED, |
| 49 | - GST_VG_NO_VALGRIND, |
| 50 | - GST_VG_INSIDE |
| 51 | - } |
| 52 | - in_valgrind = GST_VG_UNCHECKED; |
| 53 | - |
| 54 | - if (in_valgrind == GST_VG_UNCHECKED) { |
| 55 | -#ifdef HAVE_VALGRIND_VALGRIND_H |
| 56 | - if (RUNNING_ON_VALGRIND) { |
| 57 | - GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind"); |
| 58 | - in_valgrind = GST_VG_INSIDE; |
| 59 | - } else { |
| 60 | - GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff"); |
| 61 | - in_valgrind = GST_VG_NO_VALGRIND; |
| 62 | - } |
| 63 | -#else |
| 64 | - in_valgrind = GST_VG_NO_VALGRIND; |
| 65 | -#endif |
| 66 | - g_assert (in_valgrind == GST_VG_NO_VALGRIND || |
| 67 | - in_valgrind == GST_VG_INSIDE); |
| 68 | - } |
| 69 | - return (in_valgrind == GST_VG_INSIDE); |
| 70 | -} |
| 71 | - |
| 72 | static gchar * |
| 73 | _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token, |
| 74 | guint val) |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 75 | @@ -463,9 +433,6 @@ _priv_gst_debug_init (void) |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 76 | _priv_GST_CAT_PROTECTION = |
| 77 | _gst_debug_category_new ("GST_PROTECTION", 0, "protection"); |
| 78 | |
| 79 | - /* print out the valgrind message if we're in valgrind */ |
| 80 | - _priv_gst_in_valgrind (); |
| 81 | - |
| 82 | env = g_getenv ("GST_DEBUG_OPTIONS"); |
| 83 | if (env != NULL) { |
| 84 | if (strstr (env, "full_tags") || strstr (env, "full-tags")) |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 85 | @@ -2503,12 +2470,6 @@ gst_debug_construct_win_color (guint colorinfo) |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 86 | return 0; |
| 87 | } |
| 88 | |
| 89 | -gboolean |
| 90 | -_priv_gst_in_valgrind (void) |
| 91 | -{ |
| 92 | - return FALSE; |
| 93 | -} |
| 94 | - |
| 95 | void |
| 96 | _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, |
| 97 | const gchar * func, gint line, GObject * obj, const gchar * msg, |
| 98 | diff --git a/meson.build b/meson.build |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 99 | index ce1921aa4..7a84d0981 100644 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 100 | --- a/meson.build |
| 101 | +++ b/meson.build |
| 102 | @@ -200,7 +200,6 @@ check_headers = [ |
| 103 | 'sys/wait.h', |
| 104 | 'ucontext.h', |
| 105 | 'unistd.h', |
| 106 | - 'valgrind/valgrind.h', |
| 107 | 'sys/resource.h', |
| 108 | 'sys/uio.h', |
| 109 | ] |
| 110 | -- |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 111 | 2.29.2 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 112 | |