]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf thread: Add support for reading the e_machine type for a thread
authorIan Rogers <irogers@google.com>
Wed, 19 Mar 2025 05:07:34 +0000 (22:07 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 21 Mar 2025 05:58:05 +0000 (22:58 -0700)
commit70351029b55677ebfe5af60477a79f68724ff72f
tree25e4eee453c17bdd46fd6a3e393a2d5692c1b080
parentafffec6f032926f70fc9f43f5d07cdfa09a0a184
perf thread: Add support for reading the e_machine type for a thread

First try to read the e_machine from the dsos associated with the
thread's maps. If live use the executable from /proc/pid/exe and read
the e_machine from the ELF header. On failure use EM_HOST. Change
builtin-trace syscall functions to pass e_machine from the thread
rather than EM_HOST, so that in later patches when syscalltbl can use
the e_machine the system calls are specific to the architecture.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Link: https://lore.kernel.org/r/20250319050741.269828-8-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-trace.c
tools/perf/util/thread.c
tools/perf/util/thread.h