perf sort: Sort disabled and full predicated flags

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 full predicated.

To provide complete results, introduce two predicate types for
these cases.

Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Leo Yan
2026-04-10 08:36:59 +01:00
committed by Namhyung Kim
parent faaf70f938
commit 0f648fc245
2 changed files with 19 additions and 9 deletions

View File

@@ -72,8 +72,8 @@ struct aux_sample {
struct simd_flags {
u8 arch: 2, /* architecture (isa) */
pred: 2, /* predication */
resv: 4; /* reserved */
pred: 3, /* predication */
resv: 3; /* reserved */
};
/* simd architecture flags */
@@ -85,8 +85,13 @@ enum simd_op_flags {
};
/* simd predicate flags */
#define SIMD_OP_FLAGS_PRED_PARTIAL 0x01 /* partial predicate */
#define SIMD_OP_FLAGS_PRED_EMPTY 0x02 /* empty predicate */
enum simd_pred_flags {
SIMD_OP_FLAGS_PRED_NONE = 0x0, /* Not available */
SIMD_OP_FLAGS_PRED_PARTIAL, /* partial predicate */
SIMD_OP_FLAGS_PRED_EMPTY, /* empty predicate */
SIMD_OP_FLAGS_PRED_FULL, /* full predicate */
SIMD_OP_FLAGS_PRED_DISABLED, /* disabled predicate */
};
/**
* struct perf_sample

View File

@@ -209,18 +209,23 @@ 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, "");
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);
else if (he->simd_flags.pred & SIMD_OP_FLAGS_PRED_PARTIAL)
return repsep_snprintf(bf, size, "[p] %s", name);
if (he->simd_flags.pred == SIMD_OP_FLAGS_PRED_EMPTY)
pred_str = "e";
else if (he->simd_flags.pred == SIMD_OP_FLAGS_PRED_PARTIAL)
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);
}
static struct sort_entry sort_simd = {