summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS20
-rw-r--r--lib/Kconfig.debug28
-rw-r--r--lib/Makefile1
-rw-r--r--mm/Kconfig.debug28
-rw-r--r--mm/Makefile1
-rw-r--r--mm/alloc_tag.c (renamed from lib/alloc_tag.c)0
6 files changed, 39 insertions, 39 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 90c5f76a09a0..143326dd2e55 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16886,16 +16886,6 @@ F: mm/mm_init.c
F: mm/rodata_test.c
F: tools/testing/memblock/
-MEMORY ALLOCATION PROFILING
-M: Suren Baghdasaryan <surenb@google.com>
-R: Hao Ge <hao.ge@linux.dev>
-L: linux-mm@kvack.org
-S: Maintained
-F: Documentation/mm/allocation-profiling.rst
-F: include/linux/alloc_tag.h
-F: include/linux/pgalloc_tag.h
-F: lib/alloc_tag.c
-
MEMORY CONTROLLER DRIVERS
M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-kernel@vger.kernel.org
@@ -16940,6 +16930,16 @@ T: quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new
F: mm/
F: tools/mm/
+MEMORY MANAGEMENT - ALLOCATION PROFILING (ALLOC TAG)
+M: Suren Baghdasaryan <surenb@google.com>
+R: Hao Ge <hao.ge@linux.dev>
+L: linux-mm@kvack.org
+S: Maintained
+F: Documentation/mm/allocation-profiling.rst
+F: include/linux/alloc_tag.h
+F: include/linux/pgalloc_tag.h
+F: mm/alloc_tag.c
+
MEMORY MANAGEMENT - BALLOON
M: Andrew Morton <akpm@linux-foundation.org>
M: David Hildenbrand <david@kernel.org>
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1244dcac2294..b82515cde538 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1048,34 +1048,6 @@ config CODE_TAGGING
bool
select KALLSYMS
-config MEM_ALLOC_PROFILING
- bool "Enable memory allocation profiling"
- default n
- depends on MMU
- depends on PROC_FS
- depends on !DEBUG_FORCE_WEAK_PER_CPU
- select CODE_TAGGING
- select PAGE_EXTENSION
- select SLAB_OBJ_EXT
- help
- Track allocation source code and record total allocation size
- initiated at that code location. The mechanism can be used to track
- memory leaks with a low performance and memory impact.
-
-config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
- bool "Enable memory allocation profiling by default"
- default y
- depends on MEM_ALLOC_PROFILING
-
-config MEM_ALLOC_PROFILING_DEBUG
- bool "Memory allocation profiler debugging"
- default n
- depends on MEM_ALLOC_PROFILING
- select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
- help
- Adds warnings with helpful error messages for memory allocation
- profiling.
-
source "lib/Kconfig.kasan"
source "lib/Kconfig.kfence"
source "lib/Kconfig.kmsan"
diff --git a/lib/Makefile b/lib/Makefile
index 7f75cc6edf94..531a0be88062 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -196,7 +196,6 @@ obj-$(CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT) += \
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
obj-$(CONFIG_CODE_TAGGING) += codetag.o
-obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
lib-$(CONFIG_GENERIC_BUG) += bug.o
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 91b3e027b753..5737a504efbb 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -320,3 +320,31 @@ config PER_VMA_LOCK_STATS
overhead in the page fault path.
If in doubt, say N.
+
+config MEM_ALLOC_PROFILING
+ bool "Enable memory allocation profiling"
+ default n
+ depends on MMU
+ depends on PROC_FS
+ depends on !DEBUG_FORCE_WEAK_PER_CPU
+ select CODE_TAGGING
+ select PAGE_EXTENSION
+ select SLAB_OBJ_EXT
+ help
+ Track allocation source code and record total allocation size
+ initiated at that code location. The mechanism can be used to track
+ memory leaks with a low performance and memory impact.
+
+config MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
+ bool "Enable memory allocation profiling by default"
+ default y
+ depends on MEM_ALLOC_PROFILING
+
+config MEM_ALLOC_PROFILING_DEBUG
+ bool "Memory allocation profiler debugging"
+ default n
+ depends on MEM_ALLOC_PROFILING
+ select MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
+ help
+ Adds warnings with helpful error messages for memory allocation
+ profiling.
diff --git a/mm/Makefile b/mm/Makefile
index eff9f9e7e061..4fc713867b9b 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -147,3 +147,4 @@ obj-$(CONFIG_SHRINKER_DEBUG) += shrinker_debug.o
obj-$(CONFIG_EXECMEM) += execmem.o
obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o
obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o
+obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o
diff --git a/lib/alloc_tag.c b/mm/alloc_tag.c
index d9be1cf5187d..d9be1cf5187d 100644
--- a/lib/alloc_tag.c
+++ b/mm/alloc_tag.c