From: Leo Yan Date: Fri, 10 Apr 2026 07:36:58 +0000 (+0100) Subject: perf sort: Support sort ASE and SME X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=faaf70f938236b94b150320e452fe2d577936a42;p=thirdparty%2Fkernel%2Flinux.git perf sort: Support sort ASE and SME Support sort Advance SIMD extension (ASE) and SME. Reviewed-by: James Clark Reviewed-by: Ian Rogers Signed-off-by: Leo Yan Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/sample.h b/tools/perf/util/sample.h index 3d27a0daef8fb..0e5ee7e0fb94f 100644 --- a/tools/perf/util/sample.h +++ b/tools/perf/util/sample.h @@ -71,12 +71,18 @@ struct aux_sample { }; struct simd_flags { - u8 arch:1, /* architecture (isa) */ - pred:2; /* predication */ + u8 arch: 2, /* architecture (isa) */ + pred: 2, /* predication */ + resv: 4; /* reserved */ }; /* simd architecture flags */ -#define SIMD_OP_FLAGS_ARCH_SVE 0x01 /* ARM SVE */ +enum simd_op_flags { + SIMD_OP_FLAGS_ARCH_NONE = 0x0, /* No SIMD operation */ + SIMD_OP_FLAGS_ARCH_SVE, /* Arm SVE */ + SIMD_OP_FLAGS_ARCH_SME, /* Arm SME */ + SIMD_OP_FLAGS_ARCH_ASE, /* Arm Advanced SIMD */ +}; /* simd predicate flags */ #define SIMD_OP_FLAGS_PRED_PARTIAL 0x01 /* partial predicate */ diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 6ce684d68bd61..7198eb3ae560c 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -195,8 +195,12 @@ static const char *hist_entry__get_simd_name(struct simd_flags *simd_flags) { u64 arch = simd_flags->arch; - if (arch & SIMD_OP_FLAGS_ARCH_SVE) + if (arch == SIMD_OP_FLAGS_ARCH_SVE) return "SVE"; + else if (arch == SIMD_OP_FLAGS_ARCH_SME) + return "SME"; + else if (arch == SIMD_OP_FLAGS_ARCH_ASE) + return "ASE"; else return "n/a"; }