[PATCH v1 4/6] perf annotate: Skip annotating data types to lea instructions
From: Zecheng Li
Date: Fri Jul 25 2025 - 16:29:33 EST
Remove type annotation on lea instructions since they are not accessing
memory. It should be counted as `no_mem_ops`.
Signed-off-by: Zecheng Li <zecheng@xxxxxxxxxx>
---
tools/perf/util/annotate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 0dd475a744b6..0d6f85ab9170 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -2729,6 +2729,11 @@ __hist_entry__get_data_type(struct hist_entry *he, struct arch *arch,
return &stackop_type;
}
+ if (!strncmp(dl->ins.name, "lea", 3)) {
+ istat->bad++;
+ return NULL;
+ }
+
for_each_insn_op_loc(&loc, i, op_loc) {
struct data_loc_info dloc = {
.arch = arch,
--
2.50.1.470.g6ba607880d-goog