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 Sparc supportE.g.: $ perf annotate --stdio2 Samples: 7K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 3086733887 __gettimeofday /lib32/libc-2.27.so [Percent: loc
perf annotate: Add Sparc supportE.g.: $ perf annotate --stdio2 Samples: 7K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 3086733887 __gettimeofday /lib32/libc-2.27.so [Percent: local period] Percent│ │ │ │ Disassembly of section .text: │ │ 000a6fa0 <__gettimeofday@@GLIBC_2.0>: 0.47 │ save %sp, -96, %sp 0.73 │ sethi %hi(0xe9000), %l7 │ → call __frame_state_for@@GLIBC_2.0+0x480 0.30 │ add %l7, 0x58, %l7 ! e9058 <nftw64@@GLIBC_2.3.3+0x818> 1.33 │ mov %i0, %o0 │ mov %i1, %o1 0.43 │ mov 0x74, %g1 │ ta 0x10 88.92 │ ↓ bcc 30 2.95 │ clr %g1 │ neg %o0 │ mov 1, %g1 0.31 │30: cmp %g1, 0 │ bne,pn %icc, a6fe4 <__gettimeofday@@GLIBC_2.0+0x44> │ mov %o0, %i0 1.96 │ ← return %i7 + 8 2.62 │ nop │ sethi %hi(0), %g1 │ neg %o0, %g2 │ add %g1, 0x160, %g1 │ ld [ %l7 + %g1 ], %g1 │ st %g2, [ %g7 + %g1 ] │ ← return %i7 + 8 │ mov -1, %o0Signed-off-by: David S. Miller <davem@davemloft.net>Link: http://lkml.kernel.org/r/20181016.205555.1070918198627611771.davem@davemloft.netSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>