Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

German Gomez and committed by
Arnaldo Carvalho de Melo
169de64f 455c9882

+3
+2
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
··· 151 151 u64 payload, ip; 152 152 153 153 memset(&decoder->record, 0x0, sizeof(decoder->record)); 154 + decoder->record.context_id = (u64)-1; 154 155 155 156 while (1) { 156 157 err = arm_spe_get_next_packet(decoder); ··· 181 180 case ARM_SPE_COUNTER: 182 181 break; 183 182 case ARM_SPE_CONTEXT: 183 + decoder->record.context_id = payload; 184 184 break; 185 185 case ARM_SPE_OP_TYPE: 186 186 if (idx == SPE_OP_PKT_HDR_CLASS_LD_ST_ATOMIC) {
+1
tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
··· 38 38 u64 timestamp; 39 39 u64 virt_addr; 40 40 u64 phys_addr; 41 + u64 context_id; 41 42 }; 42 43 43 44 struct arm_spe_insn;