Skip to content
  • Paul E. McKenney's avatar
    mm: Don't build mm_dump_obj() on CONFIG_PRINTK=n kernels · 5bb1bb35
    Paul E. McKenney authored
    
    
    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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    5bb1bb35