diff options
| author | Namhyung Kim <[email protected]> | 2024-01-17 06:26:51 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2024-01-22 20:08:19 +0000 |
| commit | d3030191d3a6292408c5cf999ebcc1d10e00e9c2 (patch) | |
| tree | b0722a4a99b653e35c08faf71325bf7735c46b22 /tools/perf/util/annotate.h | |
| parent | perf annotate-data: Handle macro fusion on x86 (diff) | |
| download | kernel-d3030191d3a6292408c5cf999ebcc1d10e00e9c2.tar.gz kernel-d3030191d3a6292408c5cf999ebcc1d10e00e9c2.zip | |
perf annotate-data: Handle array style accesses
On x86, instructions for array access often looks like below.
mov 0x1234(%rax,%rbx,8), %rcx
Usually the first register holds the type information and the second one
has the index. And the current code only looks up a variable for the
first register. But it's possible to be in the other way around so it
needs to check the second register if the first one failed.
The stat changed like this.
Annotate data type stats:
total 294, ok 148 (50.3%), bad 146 (49.7%)
-----------------------------------------------------------
30 : no_sym
32 : no_mem_ops
66 : no_var
10 : no_typeinfo
8 : bad_offset
Reviewed-by: Ian Rogers <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.h')
| -rw-r--r-- | tools/perf/util/annotate.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index dba50762c6e8..d0ff677b460c 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -442,14 +442,18 @@ int annotate_check_args(void); /** * struct annotated_op_loc - Location info of instruction operand - * @reg: Register in the operand + * @reg1: First register in the operand + * @reg2: Second register in the operand * @offset: Memory access offset in the operand * @mem_ref: Whether the operand accesses memory + * @multi_regs: Whether the second register is used */ struct annotated_op_loc { - int reg; + int reg1; + int reg2; int offset; bool mem_ref; + bool multi_regs; }; enum annotated_insn_ops { |
