From: Uladzislau Rezki (Sony) Date: Tue, 18 Oct 2022 18:10:50 +0000 (+0200) Subject: mm: vmalloc: use trace_alloc_vmap_area event X-Git-Tag: io_uring-6.2-2022-12-19~10^2~272 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cf243da6ab3987b65b95357194926a31415095b8;p=linux-block.git mm: vmalloc: use trace_alloc_vmap_area event This is for debug purpose and is called when an allocation attempt occurs. This event gives some information about: - start address of allocated area; - size that is requested; - alignment that is required; - vstart/vend restriction; - if an allocation fails. Link: https://lkml.kernel.org/r/20221018181053.434508-5-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ccaa461998f3..849563d334fb 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -43,6 +43,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include "internal.h" #include "pgalloc-track.h" @@ -1620,6 +1623,8 @@ retry: size, align, vstart, vend); spin_unlock(&free_vmap_area_lock); + trace_alloc_vmap_area(addr, size, align, vstart, vend, addr == vend); + /* * If an allocation fails, the "vend" address is * returned. Therefore trigger the overflow path.