diff options
| author | Ian Rogers <[email protected]> | 2024-11-08 23:45:50 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2024-11-09 16:39:13 +0000 |
| commit | 9fc4489a16f41d9306af6c94ca97be6364d51ea9 (patch) | |
| tree | b598dff33bc0491e920fe816db3b399e8265c6b4 /tools/perf/util/annotate.c | |
| parent | perf disasm: Add e_machine/e_flags to struct arch (diff) | |
| download | kernel-9fc4489a16f41d9306af6c94ca97be6364d51ea9.tar.gz kernel-9fc4489a16f41d9306af6c94ca97be6364d51ea9.zip | |
perf dwarf-regs: Pass accurate disassembly machine to get_dwarf_regnum
Rather than pass 0/EM_NONE, use the value computed in the disasm
struct arch. Switch the EM_NONE case to EM_HOST, rewriting EM_NONE if
it were passed to get_dwarf_regnum. Pass a flags value as
architectures like csky need the flags to determine the ABI variant.
Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Cc: Anup Patel <[email protected]>
Cc: Yang Jihong <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Albert Ou <[email protected]>
Cc: Shenlin Liang <[email protected]>
Cc: Nick Terrell <[email protected]>
Cc: Guilherme Amadio <[email protected]>
Cc: Steinar H. Gunderson <[email protected]>
Cc: Changbin Du <[email protected]>
Cc: Alexander Lobakin <[email protected]>
Cc: Przemek Kitszel <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: Guo Ren <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: James Clark <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Chen Pei <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Aditya Gupta <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Bibo Mao <[email protected]>
Cc: John Garry <[email protected]>
Cc: Atish Patra <[email protected]>
Cc: Dima Kogan <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
| -rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 37ce43c4eb8f..b1d98da79be8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -2292,7 +2292,7 @@ static int extract_reg_offset(struct arch *arch, const char *str, if (regname == NULL) return -1; - op_loc->reg1 = get_dwarf_regnum(regname, 0); + op_loc->reg1 = get_dwarf_regnum(regname, arch->e_machine, arch->e_flags); free(regname); /* Get the second register */ @@ -2305,7 +2305,7 @@ static int extract_reg_offset(struct arch *arch, const char *str, if (regname == NULL) return -1; - op_loc->reg2 = get_dwarf_regnum(regname, 0); + op_loc->reg2 = get_dwarf_regnum(regname, arch->e_machine, arch->e_flags); free(regname); } return 0; @@ -2405,7 +2405,7 @@ int annotate_get_insn_location(struct arch *arch, struct disasm_line *dl, return -1; if (*s == arch->objdump.register_char) - op_loc->reg1 = get_dwarf_regnum(s, 0); + op_loc->reg1 = get_dwarf_regnum(s, arch->e_machine, arch->e_flags); else if (*s == arch->objdump.imm_char) { op_loc->offset = strtol(s + 1, &p, 0); if (p && p != s + 1) |
