[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/19] configure: properly pass through MM_DEBUG
From: |
Daniel Axtens |
Subject: |
[PATCH 06/19] configure: properly pass through MM_DEBUG |
Date: |
Tue, 12 Oct 2021 18:29:55 +1100 |
I noticed that compiling with --enable-mm-debug didn't cause the
functions in #ifdef MM_DEBUG to be compiled in. Somehow the variable
wasn't actually being substituted into anything that was built.
Change configure.ac to do AC_SUBST(), and put a substitution into
config.h.in. This makes MM_DEBUG available to any file which includes
config.h.
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
config.h.in | 3 +++
configure.ac | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/config.h.in b/config.h.in
index 9e8f9911b183..8cf62616cad7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -13,6 +13,9 @@
#define DISK_CACHE_STATS @DISK_CACHE_STATS@
#define BOOT_TIME_STATS @BOOT_TIME_STATS@
+/* Define to 1 to enable mm debugging */
+#define MM_DEBUG @MM_DEBUG@
+
/* We don't need those. */
#define MINILZO_CFG_SKIP_LZO_PTR 1
#define MINILZO_CFG_SKIP_LZO_UTIL 1
diff --git a/configure.ac b/configure.ac
index 8d1c81a7316e..889d07b3c1d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1511,9 +1511,11 @@ AC_ARG_ENABLE([mm-debug],
AS_HELP_STRING([--enable-mm-debug],
[include memory manager debugging]))
if test x$enable_mm_debug = xyes; then
- AC_DEFINE([MM_DEBUG], [1],
- [Define to 1 if you enable memory manager debugging.])
+ MM_DEBUG=1
+else
+ MM_DEBUG=0
fi
+AC_SUBST([MM_DEBUG])
AC_ARG_ENABLE([cache-stats],
AS_HELP_STRING([--enable-cache-stats],
--
2.30.2
- Re: [PATCH 03/19] mm: document grub internal memory management structures, (continued)
- [PATCH 01/19] grub-shell: Boot PowerPC using PMU instead of CUDA for power management, Daniel Axtens, 2021/10/12
- [PATCH 04/19] mm: assert that we preserve header vs region alignment, Daniel Axtens, 2021/10/12
- [PATCH 02/19] grub-shell: pseries: don't pass fw_opt to qemu, Daniel Axtens, 2021/10/12
- [PATCH 05/19] mm: when adding a region, merge with region after as well as before, Daniel Axtens, 2021/10/12
- [PATCH 06/19] configure: properly pass through MM_DEBUG,
Daniel Axtens <=
- [PATCH 07/19] Add memtool module with memory allocation stress-test, Daniel Axtens, 2021/10/12
- [PATCH 08/19] mm: Drop unused unloading of modules on OOM, Daniel Axtens, 2021/10/12
- [PATCH 10/19] efi: mm: Always request a fixed number of pages on init, Daniel Axtens, 2021/10/12
- [PATCH 12/19] efi: mm: Pass up errors from `add_memory_regions ()`, Daniel Axtens, 2021/10/12
- [PATCH 09/19] mm: Allow dynamically requesting additional memory regions, Daniel Axtens, 2021/10/12
- [PATCH 11/19] efi: mm: Extract function to add memory regions, Daniel Axtens, 2021/10/12