]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - mm/slob.c
mm: Don't build mm_dump_obj() on CONFIG_PRINTK=n kernels
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Jan 2021 21:46:11 +0000 (13:46 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Mar 2021 22:18:46 +0000 (14:18 -0800)
commit5bb1bb353cfe343fc3c84faf06f72ba309fde541
tree7a6f234b6247c3821fa2acb95c9a99e38ba24b65
parenta38fd8748464831584a19438cbb3082b5a2dab15
mm: Don't build mm_dump_obj() on CONFIG_PRINTK=n kernels

The mem_dump_obj() functionality adds a few hundred bytes, which is a
small price to pay.  Except on kernels built with CONFIG_PRINTK=n, in
which mem_dump_obj() messages will be suppressed.  This commit therefore
makes mem_dump_obj() be a static inline empty function on kernels built
with CONFIG_PRINTK=n and excludes all of its support functions as well.
This avoids kernel bloat on systems that cannot use mem_dump_obj().

Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: <linux-mm@kvack.org>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
include/linux/mm.h
include/linux/slab.h
include/linux/vmalloc.h
mm/slab.c
mm/slab.h
mm/slab_common.c
mm/slob.c
mm/slub.c
mm/util.c
mm/vmalloc.c