[PATCH 23/25] perf sort: Sort disabled and full predicated flags
Leo Yan
leo.yan at arm.com
Mon Sep 29 09:37:59 PDT 2025
According to the Arm ARM (ARM DDI 0487, L.a), section D18.2.6
"Events packet", apart from the empty predicate and partial
predicates, an SVE or SME operation can be predicate-disabled
or fully predicated.
To provide reliable results, introduce two predicate types for
these cases.
Signed-off-by: Leo Yan <leo.yan at arm.com>
---
tools/perf/util/sample.h | 6 ++++--
tools/perf/util/sort.c | 11 ++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h
index 405876885e1f273c039cb67187c6e5c39c91a612..d38810021fb9d6cb29f02267ae2a223cbe55839d 100644
--- a/tools/perf/util/sample.h
+++ b/tools/perf/util/sample.h
@@ -68,8 +68,8 @@ struct aux_sample {
struct simd_flags {
u8 arch: 3, /* architecture (isa) */
- pred: 2, /* predication */
- resv: 3; /* reserved */
+ pred: 4, /* predication */
+ resv: 1; /* reserved */
};
/* simd architecture flags */
@@ -80,6 +80,8 @@ struct simd_flags {
/* simd predicate flags */
#define SIMD_OP_FLAGS_PRED_PARTIAL 0x01 /* partial predicate */
#define SIMD_OP_FLAGS_PRED_EMPTY 0x02 /* empty predicate */
+#define SIMD_OP_FLAGS_PRED_FULL 0x04 /* full predicate */
+#define SIMD_OP_FLAGS_PRED_DISABLED 0x08 /* disabled predicate */
struct perf_sample {
u64 ip;
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index c7596e9ca089c170988dbc43a00f6973039261cd..44c2d2623d529cde78ea16f281a6501c2bde9c66 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -207,6 +207,7 @@ static int hist_entry__simd_snprintf(struct hist_entry *he, char *bf,
size_t size, unsigned int width __maybe_unused)
{
const char *name;
+ const char *pred_str = ".";
if (!he->simd_flags.arch)
return repsep_snprintf(bf, size, "");
@@ -214,11 +215,15 @@ static int hist_entry__simd_snprintf(struct hist_entry *he, char *bf,
name = hist_entry__get_simd_name(&he->simd_flags);
if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_EMPTY)
- return repsep_snprintf(bf, size, "[e] %s", name);
+ pred_str = "e";
else if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_PARTIAL)
- return repsep_snprintf(bf, size, "[p] %s", name);
+ pred_str = "p";
+ else if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_DISABLED)
+ pred_str = "d";
+ else if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_FULL)
+ pred_str = "f";
- return repsep_snprintf(bf, size, "[.] %s", name);
+ return repsep_snprintf(bf, size, "[%s] %s", pred_str, name);
}
struct sort_entry sort_simd = {
--
2.34.1
More information about the linux-arm-kernel
mailing list