]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Use xarray for syscall trace events
authorHassan Naveed <hnaveed@wavecomp.com>
Fri, 15 Nov 2019 23:44:42 +0000 (23:44 +0000)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 23 Nov 2019 00:47:41 +0000 (19:47 -0500)
commitb7ba13b1ad39e5e45e3d27b942980a25d662816d
treeb184533336bdad135bc7f38b3c06bceaac9c661b
parent863fe3cc2f0e86b1360275ea6c4a9a69eecaf8da
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: Hassan Naveed <hnaveed@wavecomp.com>
Reviewed-by: Paul Burton <paulburton@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/Kconfig
kernel/trace/trace_syscalls.c