]> Git Repo - linux.git/commitdiff
perf arm-spe: Store operation type in packet
authorLeo Yan <[email protected]>
Thu, 11 Feb 2021 13:38:53 +0000 (15:38 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 12 Feb 2021 20:43:24 +0000 (17:43 -0300)
This patch is to store operation type in packet structure.

Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: James Clark <[email protected]>
Tested-by: James Clark <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Al Grant <[email protected]>
Cc: Andre Przywara <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wei Li <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: James Clark <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
tools/perf/util/arm-spe-decoder/arm-spe-decoder.h

index 7aac3048b0903e4b5cd8461beff1ebdcaae885f4..32fe41835fa6862510dbf021d08679ff05e7deae 100644 (file)
@@ -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))
index 7b845001afe74ec5827fcac76d224b58edafcd2a..59bdb730967413d30daf6560652a96fdc519902b 100644 (file)
@@ -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;
This page took 0.0700809999999999 seconds and 4 git commands to generate.