[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250430131516.24287-3-yangtiezhu@loongson.cn>
Date: Wed, 30 Apr 2025 21:15:13 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/5] LoongArch: Enable tracing infrastructure in defconfig
When executing the command "perf list", I met "Error: failed to open
tracing events directory" twice, the first reason is that there is no
"/sys/kernel/tracing/events" directory due to it does not enable the
kernel tracing infrastructure with CONFIG_FTRACE, the second reason
is that there is no root privileges.
Although the error string was added to tell the users what happened
and what should to do in commit b48543c451c3 ("perf list: Give clues
if failed to open tracing events directory"), it is better to enable
CONFIG_FTRACE in defconfig to avoid the error message at runtime:
$ ./perf list
Error: failed to open tracing events directory
/sys/kernel/tracing/events: No such file or directory
Additionally, CONFIG_UPROBE_EVENTS is default y only if CONFIG_FTRACE
is set, otherwise there exists the following error:
$ ./perf probe -x /usr/lib64/libcrypto.so BN_mod_mul_montgomery
/sys/kernel/tracing//uprobe_events does not exist.
Please rebuild kernel with CONFIG_UPROBE_EVENTS=y.
Error: Failed to add events.
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
arch/loongarch/configs/loongson3_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index a3c9d189a627..eaaf3419555c 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -1006,5 +1006,4 @@ CONFIG_STRIP_ASM_SYMS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_SCHEDSTATS=y
-# CONFIG_FTRACE is not set
CONFIG_UNWINDER_ORC=y
--
2.42.0
Powered by blists - more mailing lists