Mesa (master): util: move debug_memory_{begin,end} to os_memory_debug.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 25 00:02:13 UTC 2020


Module: Mesa
Branch: master
Commit: 5f0b984cb8fd424facc7b245e4649b38f4815e3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f0b984cb8fd424facc7b245e4649b38f4815e3c

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Feb 19 12:51:08 2020 +0100

util: move debug_memory_{begin,end} to os_memory_debug.h

This is where the other debug_memory_* functions are declared, so let's
move it here for symmetry.

This allows us to drop an include of u_debug_gallium.h, which makes us
depend on gallium-headers in non-gallium code.

Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3901>

---

 src/gallium/auxiliary/util/u_debug_gallium.h | 6 ------
 src/gallium/state_trackers/wgl/stw_device.c  | 1 -
 src/util/os_memory_debug.h                   | 6 ++++++
 src/util/u_debug_memory.c                    | 1 -
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_debug_gallium.h b/src/gallium/auxiliary/util/u_debug_gallium.h
index 0710ce2b703..df4e919c803 100644
--- a/src/gallium/auxiliary/util/u_debug_gallium.h
+++ b/src/gallium/auxiliary/util/u_debug_gallium.h
@@ -35,12 +35,6 @@
 extern "C" {
 #endif
 
-unsigned long
-debug_memory_begin(void);
-
-void 
-debug_memory_end(unsigned long beginning);
-
 #ifdef DEBUG
 void debug_print_format(const char *msg, unsigned fmt);
 #else
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index f1b1dfd9a14..d88b37f7225 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -29,7 +29,6 @@
 
 #include "glapi/glapi.h"
 #include "util/u_debug.h"
-#include "util/u_debug_gallium.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "pipe/p_screen.h"
diff --git a/src/util/os_memory_debug.h b/src/util/os_memory_debug.h
index 8f3e936cbbf..020f46fb3d1 100644
--- a/src/util/os_memory_debug.h
+++ b/src/util/os_memory_debug.h
@@ -57,6 +57,12 @@ void *
 debug_realloc(const char *file, unsigned line, const char *function,
               void *old_ptr, size_t old_size, size_t new_size );
 
+unsigned long
+debug_memory_begin(void);
+
+void
+debug_memory_end(unsigned long start_no);
+
 void
 debug_memory_tag(void *ptr, unsigned tag);
 
diff --git a/src/util/u_debug_memory.c b/src/util/u_debug_memory.c
index e468fd0b252..e5e1b630489 100644
--- a/src/util/u_debug_memory.c
+++ b/src/util/u_debug_memory.c
@@ -39,7 +39,6 @@
 #include "os/os_thread.h"
 
 #include "util/u_debug.h"
-#include "util/u_debug_gallium.h"
 #include "util/u_debug_stack.h"
 #include "util/list.h"
 #include "util/os_memory.h"



More information about the mesa-commit mailing list