]> git.ipfire.org Git - thirdparty/linux.git/commit
perf script: Fix script_fetch_insn for more than just x86
authorIan Rogers <irogers@google.com>
Mon, 26 Jan 2026 22:05:48 +0000 (14:05 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jan 2026 04:35:22 +0000 (01:35 -0300)
commit7ce6dfc603ed01044ebe58472a584d9995281ca2
tree8222b98ed628a606bab37222482a42830a4f4c21
parent0a6fb6604746c92bccc71867fd0bf3d3294335d1
perf script: Fix script_fetch_insn for more than just x86

The script_fetch_insn code was only supported on natively running x86.

Implement a crude elf_machine_max_instruction_length function and use to
give an instruction length on more than just x86.

Use the ELF machine to determine the length to use to support
cross-architecture development.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shimin Guo <shimin.guo@skydio.com>
Cc: Yujie Liu <yujie.liu@intel.com>
[ Conditionally define EM_CSKY and EM_LOONGARCH for older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/Build
tools/perf/arch/x86/util/archinsn.c [deleted file]
tools/perf/builtin-script.c
tools/perf/scripts/python/Perf-Trace-Util/Context.c
tools/perf/tests/dlfilter-test.c
tools/perf/util/archinsn.h [deleted file]
tools/perf/util/dlfilter.c
tools/perf/util/sample.c
tools/perf/util/sample.h
tools/perf/util/trace-event-scripting.c
tools/perf/util/trace-event.h