diff options
author | Hyeonggon Yoo <42.hyeyoo@gmail.com> | 2022-08-17 13:18:24 +0300 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2022-09-01 12:44:26 +0300 |
commit | 2c1d697fb8ba6d2d44f914d4268ae1ccdf025f1b (patch) | |
tree | a2e3b945b6a96e59c319083739023ba52e932fcb /include/linux/slab.h | |
parent | 11e9734bcb6a7361943f993eba4e97f5812120d8 (diff) | |
download | linux-2c1d697fb8ba6d2d44f914d4268ae1ccdf025f1b.tar.xz |
mm/slab_common: drop kmem_alloc & avoid dereferencing fields when not using
Drop kmem_alloc event class, and define kmalloc and kmem_cache_alloc
using TRACE_EVENT() macro.
And then this patch does:
- Do not pass pointer to struct kmem_cache to trace_kmalloc.
gfp flag is enough to know if it's accounted or not.
- Avoid dereferencing s->object_size and s->size when not using kmem_cache_alloc event.
- Avoid dereferencing s->name in when not using kmem_cache_free event.
- Adjust s->size to SLOB_UNITS(s->size) * SLOB_UNIT in SLOB
Cc: Vasily Averin <vasily.averin@linux.dev>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'include/linux/slab.h')
0 files changed, 0 insertions, 0 deletions