[PATCH 3/5] LoongArch: Enable tracing syscalls in defconfig

Tiezhu Yang posted 5 patches 9 months, 2 weeks ago
[PATCH 3/5] LoongArch: Enable tracing syscalls in defconfig
Posted by Tiezhu Yang 9 months, 2 weeks ago
There exist the following errors when building bpf selftest:

  $ cd tools/testing/selftests/bpf/
  $ make
  ...
  CLNG-BPF [test_progs] profiler1.bpf.o
  In file included from progs/profiler1.c:5:
  progs/profiler.inc.h:599:49: error: declaration of 'struct syscall_trace_enter' will not be visible outside of this function [-Werror,-Wvisibility]
  ...
  progs/profiler.inc.h:604:15: error: incomplete definition of type 'struct syscall_trace_enter'
  ...
  progs/profiler.inc.h:605:15: error: incomplete definition of type 'struct syscall_trace_enter'
  ...
  3 errors generated.

This is because there is no basic tracer to catch the syscall entry
and exit events, it is better to enable the kernel tracing syscalls
with CONFIG_FTRACE_SYSCALLS in defconfig to avoid the building errors.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/loongarch/configs/loongson3_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index eaaf3419555c..4289e3abf8c7 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -1006,4 +1006,5 @@ CONFIG_STRIP_ASM_SYMS=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 CONFIG_SCHEDSTATS=y
+CONFIG_FTRACE_SYSCALLS=y
 CONFIG_UNWINDER_ORC=y
-- 
2.42.0