]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf test: Remove /usr/bin/cc dependency from Intel PT shell test
authorIan Rogers <irogers@google.com>
Tue, 2 Jun 2026 17:41:27 +0000 (10:41 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 4 Jun 2026 14:41:46 +0000 (11:41 -0300)
commita77ecea7ced2fef7cc0a8ad0323542f781ad9788
treea02f26ca28b8c2b22ef01bf0b70b6d4bb750f0df
parent0dd6025171436822e54ae556dc48aed89c42b6a9
perf test: Remove /usr/bin/cc dependency from Intel PT shell test

In test_intel_pt.sh, the test script compiled two external C programs at
runtime using /usr/bin/cc (a thread loop workload and a JIT self-
modifying workload). Relying on external C compilers inside shell tests
frequently causes failures in continuous integration environments.

Create a built-in 'jitdump' workload and switch test_intel_pt.sh to use
'perf test -w thloop' and 'perf test -w jitdump'. Also add multi-
architecture compatibility without external C compiler dependencies, the
workload instruction arrays dynamically encode CHK_BYTE into opcodes
across x86, ARM32, ARM64, RISC-V, PowerPC, MIPS, LoongArch, and s390x.

Some minor include fixes for util/jitdump.h.

Assisted-by: Gemini-CLI:Google Gemini 3
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/builtin-test.c
tools/perf/tests/shell/test_intel_pt.sh
tools/perf/tests/tests.h
tools/perf/tests/workloads/Build
tools/perf/tests/workloads/jitdump.c [new file with mode: 0644]
tools/perf/util/jitdump.h