blob: 5121044734d97cfac268e34335e0d814639fc403 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From e275ba2bd854ac15a4b65a8f07d9f042021950da Mon Sep 17 00:00:00 2001
Andrew Geissler6ce62a22020-11-30 19:58:47 -06002From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
3Date: Fri, 14 Aug 2020 16:38:26 +0100
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004Subject: [PATCH 2/3] Remove unused valgrind detection
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005
6Having this just to log a debug message in case we're
7running inside valgrind doesn't seem very useful, and
8the code that used to use this no longer exists it seems.
9
10Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
11
12Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245]
13
14Signed-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
21diff --git a/gst/gst_private.h b/gst/gst_private.h
Andrew Geisslereff27472021-10-29 15:35:00 -050022index eefd044..8252ede 100644
Andrew Geissler6ce62a22020-11-30 19:58:47 -060023--- 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);
34diff --git a/gst/gstinfo.c b/gst/gstinfo.c
Andrew Geisslereff27472021-10-29 15:35:00 -050035index eea1a21..d3035d6 100644
Andrew Geissler6ce62a22020-11-30 19:58:47 -060036--- a/gst/gstinfo.c
37+++ b/gst/gstinfo.c
Andrew Geisslerd1e89492021-02-12 15:35:20 -060038@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
Andrew Geisslereff27472021-10-29 15:35:00 -050039 static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
40 static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
Andrew Geissler6ce62a22020-11-30 19:58:47 -060041
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 Geisslerd1e89492021-02-12 15:35:20 -060075@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
Andrew Geissler6ce62a22020-11-30 19:58:47 -060076 _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 Geisslereff27472021-10-29 15:35:00 -050085@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo)
Andrew Geissler6ce62a22020-11-30 19:58:47 -060086 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,
98diff --git a/meson.build b/meson.build
Andrew Geisslereff27472021-10-29 15:35:00 -050099index 82a1728..42ae617 100644
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600100--- 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 Geisslerd1e89492021-02-12 15:35:20 -06001112.29.2
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600112