[PATCH v7 7/8] perf tests: add noinline to __test_function
Himanshu Chauhan
himanshu.chauhan at oss.qualcomm.com
Wed Nov 4 21:33:16 PST 2026
On Tue, Oct 27, 2026 at 03:52:20PM -0400, Jesse Taube wrote:
> On Wed, Sep 30, 2026 at 2:40 AM Himanshu Chauhan
> <himanshu.chauhan at oss.qualcomm.com> wrote:
> >
> > 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>
> Reviewed-by: Jesse Taube <jtaubepe at redhat.com>
>
> I would resend this to the perf list and not in a patch set as it is a
> separate fix.
perf list is already in the To: list
Regards
Himanshu
>
> There is also another fix to data_breakpoint.c that i have been
> meaning to send here:
> https://github.com/Mr-Bossman/linux/commit/db4faa52a66f6b7265cd397a2d44d7d38c3fdfb7
>
> Thanks,
> Jesse Taube
> > ---
> > 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