[PATCH 2/8] tracing: do not trace kernel_text_address()
Andy Chiu
andy.chiu at sifive.com
Thu Jun 13 00:11:07 PDT 2024
kernel_text_address() and __kernel_text_address() are called in
arch_stack_walk() of riscv. This results in excess amount of un-related
traces when the kernel is compiled with CONFIG_TRACE_IRQFLAGS. The
situation worsens when function_graph is active, as it calls
local_irq_save/restore in each function's entry/exit. This patch adds
both functions to notrace, so they won't show up on the trace records.
Signed-off-by: Andy Chiu <andy.chiu at sifive.com>
---
kernel/extable.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/extable.c b/kernel/extable.c
index 71f482581cab..d03fa462fa8b 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -74,7 +74,7 @@ int notrace core_kernel_text(unsigned long addr)
return 0;
}
-int __kernel_text_address(unsigned long addr)
+int notrace __kernel_text_address(unsigned long addr)
{
if (kernel_text_address(addr))
return 1;
@@ -91,7 +91,7 @@ int __kernel_text_address(unsigned long addr)
return 0;
}
-int kernel_text_address(unsigned long addr)
+int notrace kernel_text_address(unsigned long addr)
{
bool no_rcu;
int ret = 1;
--
2.43.0
More information about the linux-riscv
mailing list