From: James Clark Date: Thu, 11 Jun 2026 11:13:46 +0000 (+0100) Subject: perf test: Compile named_threads workload with -O0 X-Git-Tag: v7.2-rc1~60^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=904708945c07b2b27558b6ffe8923b3df99448f4;p=thirdparty%2Flinux.git perf test: Compile named_threads workload with -O0 The work loop relies on the compiler not optimizing it away, although named_threads_work is not static for that reason, the compiler could still do it. Fix it by compiling without optimization. Also add -fno-inline for consistency and in case anyone wants to look at callstacks. Fixes: b5dd510be55e8670 ("perf test: Add named_threads workload") Closes: https://lore.kernel.org/all/20260609160001.2739E1F00893@smtp.kernel.org Reported-by: sashiko-bot Reviewed-by: Leo Yan Signed-off-by: James Clark Cc: Ian Rogers Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/workloads/Build b/tools/perf/tests/workloads/Build index 75b377934a0e6..7bb4b9829ba24 100644 --- a/tools/perf/tests/workloads/Build +++ b/tools/perf/tests/workloads/Build @@ -26,3 +26,4 @@ CFLAGS_datasym.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE CFLAGS_traploop.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE CFLAGS_inlineloop.o = -g -O2 CFLAGS_deterministic.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE +CFLAGS_named_threads.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE