perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembl
perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembly these can be used to allow cross platform disassembly.Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>Signed-off-by: Ian Rogers <irogers@google.com>Cc: Anup Patel <anup@brainfault.org>Cc: Yang Jihong <yangjihong@bytedance.com>Cc: Palmer Dabbelt <palmer@dabbelt.com>Cc: David S. Miller <davem@davemloft.net>Cc: Albert Ou <aou@eecs.berkeley.edu>Cc: Shenlin Liang <liangshenlin@eswincomputing.com>Cc: Nick Terrell <terrelln@fb.com>Cc: Guilherme Amadio <amadio@gentoo.org>Cc: Steinar H. Gunderson <sesse@google.com>Cc: Changbin Du <changbin.du@huawei.com>Cc: Alexander Lobakin <aleksander.lobakin@intel.com>Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>Cc: Huacai Chen <chenhuacai@kernel.org>Cc: Guo Ren <guoren@kernel.org>Cc: Masahiro Yamada <masahiroy@kernel.org>Cc: Will Deacon <will@kernel.org>Cc: James Clark <james.clark@linaro.org>Cc: Mike Leach <mike.leach@linaro.org>Cc: Chen Pei <cp0613@linux.alibaba.com>Cc: Leo Yan <leo.yan@linux.dev>Cc: Oliver Upton <oliver.upton@linux.dev>Cc: Aditya Gupta <adityag@linux.ibm.com>Cc: Kajol Jain <kjain@linux.ibm.com>Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Cc: linux-arm-kernel@lists.infradead.orgCc: linux-riscv@lists.infradead.orgCc: Bibo Mao <maobibo@loongson.cn>Cc: John Garry <john.g.garry@oracle.com>Cc: Atish Patra <atishp@rivosinc.com>Cc: Dima Kogan <dima@secretsauce.net>Cc: Paul Walmsley <paul.walmsley@sifive.com>Cc: Dr. David Alan Gilbert <linux@treblig.org>Cc: linux-csky@vger.kernel.orgLink: https://lore.kernel.org/r/20241108234606.429459-5-irogers@google.comSigned-off-by: Namhyung Kim <namhyung@kernel.org>
show more ...
perf annotate: Add csky supportThis patch add basic arch initialization and instruction associatesupport for the csky CPU architecture.E.g.: $ perf annotate --stdio2 Samples: 161 of event
perf annotate: Add csky supportThis patch add basic arch initialization and instruction associatesupport for the csky CPU architecture.E.g.: $ perf annotate --stdio2 Samples: 161 of event 'cpu-clock:pppH', 4000 Hz, Event count (approx.): 40250000, [percent: local period] test_4() /usr/lib/perf-test/callchain_test Percent Disassembly of section .text: 00008420 <test_4>: test_4(): subi sp, sp, 4 st.w r8, (sp, 0x0) mov r8, sp subi sp, sp, 8 subi r3, r8, 4 movi r2, 0 st.w r2, (r3, 0x0) ↓ br 2e 100.00 14: subi r3, r8, 4 ld.w r2, (r3, 0x0) subi r3, r8, 8 st.w r2, (r3, 0x0) subi r3, r8, 4 ld.w r3, (r3, 0x0) addi r2, r3, 1 subi r3, r8, 4 st.w r2, (r3, 0x0) 2e: subi r3, r8, 4 ld.w r2, (r3, 0x0) lrw r3, 0x98967f // 8598 <main+0x28> cmplt r3, r2 ↑ bf 14 mov r0, r0 mov r0, r0 mov sp, r8 ld.w r8, (sp, 0x0) addi sp, sp, 4 ← rtsSigned-off-by: Mao Han <han_mao@c-sky.com>Acked-by: Guo Ren <guoren@kernel.org>Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>Cc: Jiri Olsa <jolsa@redhat.com>Cc: Namhyung Kim <namhyung@kernel.org>Cc: Peter Zijlstra <peterz@infradead.org>Cc: linux-csky@vger.kernel.orgLink: http://lkml.kernel.org/r/d874d7782d9acdad5d98f2f5c4a6fb26fbe41c5d.1561531557.git.han_mao@c-sky.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>