Skip to content
Commit 0e242208 authored by Hassan Naveed's avatar Hassan Naveed Committed by Steven Rostedt (VMware)
Browse files

tracing: Use xarray for syscall trace events

Currently, a lot of memory is wasted for architectures like MIPS when
init_ftrace_syscalls() allocates the array for syscalls using kcalloc.
This is because syscalls numbers start from 4000, 5000 or 6000 and
array elements up to that point are unused.
Fix this by using a data structure more suited to storing sparsely
populated arrays. The XARRAY data structure, implemented using radix
trees, is much more memory efficient for storing the syscalls in
question.

Link: http://lkml.kernel.org/r/20191115234314.21599-1-hnaveed@wavecomp.com



Signed-off-by: default avatarHassan Naveed <hnaveed@wavecomp.com>
Reviewed-by: default avatarPaul Burton <paulburton@kernel.org>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 89ed4249
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment