summaryrefslogtreecommitdiffstats
path: root/arch/Kconfig
diff options
context:
space:
mode:
authorHassan Naveed <hnaveed@wavecomp.com>2019-11-15 23:44:42 +0000
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-11-22 19:47:41 -0500
commit0e24220821b0e0e330a18bfef29ac6396545d62e (patch)
treeb184533336bdad135bc7f38b3c06bceaac9c661b /arch/Kconfig
parent89ed42495ef4a020435f2b999093bb5731eeb8b9 (diff)
downloadlinux-0e24220821b0e0e330a18bfef29ac6396545d62e.tar.gz
linux-0e24220821b0e0e330a18bfef29ac6396545d62e.tar.bz2
linux-0e24220821b0e0e330a18bfef29ac6396545d62e.zip
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>
Diffstat (limited to 'arch/Kconfig')
-rw-r--r--arch/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 5f8a5d84dbbe..69c87e8608d8 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -960,6 +960,14 @@ config RELR
config ARCH_HAS_MEM_ENCRYPT
bool
+config HAVE_SPARSE_SYSCALL_NR
+ bool
+ help
+ An architecture should select this if its syscall numbering is sparse
+ to save space. For example, MIPS architecture has a syscall array with
+ entries at 4000, 5000 and 6000 locations. This option turns on syscall
+ related optimizations for a given architecture.
+
source "kernel/gcov/Kconfig"
source "scripts/gcc-plugins/Kconfig"