Skip to content

Commit 169de64

Browse files
German Gomezacmel
authored andcommitted
perf arm-spe: Save context ID in record
This patch is to save context ID in record, this will be used to set TID for samples. Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: German Gomez <german.gomez@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20211111133625.193568-4-german.gomez@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 455c988 commit 169de64

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tools/perf/util/arm-spe-decoder/arm-spe-decoder.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
151151
u64 payload, ip;
152152

153153
memset(&decoder->record, 0x0, sizeof(decoder->record));
154+
decoder->record.context_id = (u64)-1;
154155

155156
while (1) {
156157
err = arm_spe_get_next_packet(decoder);
@@ -180,6 +181,7 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
180181
case ARM_SPE_COUNTER:
181182
break;
182183
case ARM_SPE_CONTEXT:
184+
decoder->record.context_id = payload;
183185
break;
184186
case ARM_SPE_OP_TYPE:
185187
if (idx == SPE_OP_PKT_HDR_CLASS_LD_ST_ATOMIC) {

tools/perf/util/arm-spe-decoder/arm-spe-decoder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct arm_spe_record {
3838
u64 timestamp;
3939
u64 virt_addr;
4040
u64 phys_addr;
41+
u64 context_id;
4142
};
4243

4344
struct arm_spe_insn;

0 commit comments

Comments
 (0)