Skip to content

Commit

Permalink
perf arm-spe: Save context ID in record
Browse files Browse the repository at this point in the history
This patch is to save context ID in record, this will be used to set TID
for samples.

Reviewed-by: Leo Yan <[email protected]>
Signed-off-by: German Gomez <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
German Gomez authored and acmel committed Nov 13, 2021
1 parent 455c988 commit 169de64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
u64 payload, ip;

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

while (1) {
err = arm_spe_get_next_packet(decoder);
Expand Down Expand Up @@ -180,6 +181,7 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
case ARM_SPE_COUNTER:
break;
case ARM_SPE_CONTEXT:
decoder->record.context_id = payload;
break;
case ARM_SPE_OP_TYPE:
if (idx == SPE_OP_PKT_HDR_CLASS_LD_ST_ATOMIC) {
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct arm_spe_record {
u64 timestamp;
u64 virt_addr;
u64 phys_addr;
u64 context_id;
};

struct arm_spe_insn;
Expand Down

0 comments on commit 169de64

Please sign in to comment.