[PATCH v7 7/8] perf tests: add noinline to __test_function
Himanshu Chauhan
himanshu.chauhan at oss.qualcomm.com
Tue Sep 29 23:39:18 PDT 2026
In the breakpoint signal handler test, a breakpoint is set on
__test_function. Compiler may optimize and inline __test_function.
This causes failure in the test.
Add noinline to __test_function so that it is not inlined.
Signed-off-by: Himanshu Chauhan <himanshu.chauhan at oss.qualcomm.com>
---
tools/perf/tests/bp_signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index f580ba7486b1..cc4a27224884 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -54,7 +54,7 @@ asm (
"ret\n"
".popsection\n");
#else
-static void __test_function(volatile long *ptr)
+static noinline void __test_function(volatile long *ptr)
{
*ptr = 0x1234;
}
--
2.43.0
More information about the linux-riscv
mailing list