mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-27 08:05:27 +08:00
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) <urezki@gmail.com> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sony.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
fabc27f764
commit
cf243da6ab
@ -43,6 +43,9 @@
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/shmparam.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/vmalloc.h>
|
||||
|
||||
#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.
|
||||
|
Loading…
Reference in New Issue
Block a user