This patch makes print kernel memory allocation information controlled by mem_alloc_profiling_enabled() so that we won't see all zero numbers in production. Signed-off-by: Yueyang Pan --- mm/show_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/show_mem.c b/mm/show_mem.c index 41999e94a56d..b71e222fde86 100644 --- a/mm/show_mem.c +++ b/mm/show_mem.c @@ -419,7 +419,7 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages)); #endif #ifdef CONFIG_MEM_ALLOC_PROFILING - { + if (mem_alloc_profiling_enabled()) { struct codetag_bytes tags[10]; size_t i, nr; -- 2.47.3