Commit 97ae666a authored by Leo Yan's avatar Leo Yan Committed by Arnaldo Carvalho de Melo

perf arm-spe: Store operation type in packet

This patch is to store operation type in packet structure.
Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Reviewed-by: default avatarJames Clark <james.clark@arm.com>
Tested-by: default avatarJames Clark <james.clark@arm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Al Grant <al.grant@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wei Li <liwei391@huawei.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: default avatarJames Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20210211133856.2137-3-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 265cfb95
......@@ -182,6 +182,12 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
case ARM_SPE_CONTEXT:
break;
case ARM_SPE_OP_TYPE:
if (idx == SPE_OP_PKT_HDR_CLASS_LD_ST_ATOMIC) {
if (payload & 0x1)
decoder->record.op = ARM_SPE_ST;
else
decoder->record.op = ARM_SPE_LD;
}
break;
case ARM_SPE_EVENTS:
if (payload & BIT(EV_L1D_REFILL))
......
......@@ -24,9 +24,15 @@ enum arm_spe_sample_type {
ARM_SPE_REMOTE_ACCESS = 1 << 7,
};
enum arm_spe_op_type {
ARM_SPE_LD = 1 << 0,
ARM_SPE_ST = 1 << 1,
};
struct arm_spe_record {
enum arm_spe_sample_type type;
int err;
u32 op;
u64 from_ip;
u64 to_ip;
u64 timestamp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment