[PATCH 1/7] perf annotate-data: Skip sample histogram for stack canary

From: Namhyung Kim
Date: Wed Apr 10 2024 - 23:33:22 EST


It's a pseudo data type and has no field.

Fixes: b3c95109c131 ("perf annotate-data: Add stack canary type")
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/annotate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 11da27801d88..ec79c120a7d2 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -2399,8 +2399,9 @@ struct annotated_data_type *hist_entry__get_data_type(struct hist_entry *he)
mem_type = find_data_type(&dloc);

if (mem_type == NULL && is_stack_canary(arch, op_loc)) {
- mem_type = &canary_type;
- dloc.type_offset = 0;
+ istat->good++;
+ he->mem_type_off = 0;
+ return &canary_type;
}

if (mem_type)
--
2.44.0.478.gd926399ef9-goog