aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/shared/um_malloc.h
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2024-03-21 16:36:52 +0000
committerAndrew Morton <[email protected]>2024-04-26 03:55:57 +0000
commit88ae5fb755b0d45f790b392f578924d1ca5693a7 (patch)
treee7c795a12f96533d46ae65731e2315adb3db0108 /arch/um/include/shared/um_malloc.h
parentmm: percpu: enable per-cpu allocation tagging (diff)
downloadkernel-88ae5fb755b0d45f790b392f578924d1ca5693a7.tar.gz
kernel-88ae5fb755b0d45f790b392f578924d1ca5693a7.zip
mm: vmalloc: enable memory allocation profiling
This wrapps all external vmalloc allocation functions with the alloc_hooks() wrapper, and switches internal allocations to _noprof variants where appropriate, for the new memory allocation profiling feature. [[email protected]: arch/um: fix forward declaration for vmalloc] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: undo _noprof additions in the documentation] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kent Overstreet <[email protected]> Signed-off-by: Suren Baghdasaryan <[email protected]> Tested-by: Kees Cook <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Alex Gaynor <[email protected]> Cc: Alice Ryhl <[email protected]> Cc: Andreas Hindborg <[email protected]> Cc: Benno Lossin <[email protected]> Cc: "Björn Roy Baron" <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Gary Guo <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Pasha Tatashin <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Wedson Almeida Filho <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'arch/um/include/shared/um_malloc.h')
-rw-r--r--arch/um/include/shared/um_malloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/include/shared/um_malloc.h b/arch/um/include/shared/um_malloc.h
index 13da93284c2c..bf503658f08e 100644
--- a/arch/um/include/shared/um_malloc.h
+++ b/arch/um/include/shared/um_malloc.h
@@ -11,7 +11,8 @@
extern void *uml_kmalloc(int size, int flags);
extern void kfree(const void *ptr);
-extern void *vmalloc(unsigned long size);
+extern void *vmalloc_noprof(unsigned long size);
+#define vmalloc(...) vmalloc_noprof(__VA_ARGS__)
extern void vfree(void *ptr);
#endif /* __UM_MALLOC_H__ */