Messages in this thread Patch in this message | | | From | Ali Saidi <> | Subject | [PATCH 1/2] perf arm-spe: Add arm_spe_record to synthesized sample | Date | Tue, 25 Jan 2022 19:20:09 +0000 |
| |
Providing the arm_spe_record as raw data to the synthesized SPE samples allows perf scripts to read and separately process the data in ways existing perf tools don't support and mirrors functionality available for PEBS.
Signed-off-by: Ali Saidi <alisaidi@amazon.com> --- tools/perf/util/arm-spe.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index d2b64e3f588b..a7499cde6fc0 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -336,6 +336,8 @@ static int arm_spe__synth_mem_sample(struct arm_spe_queue *speq, sample.phys_addr = record->phys_addr; sample.data_src = data_src; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); } @@ -354,6 +356,8 @@ static int arm_spe__synth_branch_sample(struct arm_spe_queue *speq, sample.stream_id = spe_events_id; sample.addr = record->to_ip; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); } @@ -383,6 +387,8 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq, sample.data_src = data_src; sample.period = spe->instructions_sample_period; sample.weight = record->latency; + sample.raw_size = sizeof(*record); + sample.raw_data = record; return arm_spe_deliver_synth_event(spe, speq, event, &sample); } -- 2.24.4.AMZN
| |