AmpereComputing / ampere-lts-kernel---DEPRECATED

Linux 5.4 and 5.10 Longterm kernel (LTS) with Ampere patches
20 stars 17 forks source link

patch: perf tool: arm_spe #85

Open adamliyi opened 2 years ago

adamliyi commented 2 years ago

Refer to wiki: https://github.com/AmpereComputing/ampere-lts-kernel/wiki/enable-perf-arm_spe

spe_pmu kernel driver (drivers/perf/arm_spe_pmu.c) functionality is ready in 5.4 LTS kernel. Bellow patches enables perf-tool (tools/perf/) support for arm-spe.

adamliyi commented 2 years ago

perf-tool arm-spe support: Accepted kernel: 5.14 Ampere 5.10 kernel commits:

d128fd3dc06d perf arm-spe: Don't wait for PERF_RECORD_EXIT event fd9361e5c541 perf arm-spe: Bail out if the trace is later than perf event 0a5f1f98d402 perf arm-spe: Assign kernel time to synthesized event 29fe8c076283 perf arm-spe: Convert event kernel time to counter value 127ffcfd226d perf arm-spe: Save clock parameters from TIME_CONV event 93cc48a8b0ff perf arm-spe: Remove redundant checking for "full_auxtrace" 97543640a669 perf arm-spe: Enable timestamp for per-cpu mode c0ce175f7f85 perf arm-spe: Correct sample flags for dummy event ccc38cc967f7 perf arm-spe: Correct sample flags for SPE event 7b9325e30fbc perf session: Dump PERF_RECORD_TIME_CONV event 68346c2c5735 perf session: Add swap operation for event TIME_CONV 5fdab9a4c5cf perf jit: Let convert_timestamp() to be backwards-compatible e760fb244b3e perf tools: Change fields type in perf_record_time_conv 6cd5720a999d perf arm-spe: Avoid potential buffer overrun 95682db0e0a8 perf arm-spe: Set sample's data source field 95e40e1033a5 perf arm-spe: Synthesize memory event 6d5e54cd1b23 perf arm-spe: Fill address info for samples 63d3e68dfd94 perf arm-spe: Store operation type in packet ed7ddb2c4013 perf arm-spe: Store memory address in packet e1051f87b8fa perf arm-spe: Enable sample type PERF_SAMPLE_DATA_SRC deddd0179acb perf arm-spe: Add support for ARMv8.3-SPE 101d9ad92684 perf arm-spe: Add more sub classes for operation packet d0ce08567874 perf arm-spe: Refactor operation packet handling f2c94a0144c4 perf arm-spe: Add new function arm_spe_pkt_desc_op_type() e25ae90c3451 perf arm-spe: Remove size condition checking for events 065088221c7e perf arm-spe: Refactor event type handling 379736be322f perf arm-spe: Add new function arm_spe_pkt_desc_event() f650de114114 perf arm-spe: Refactor counter packet handling 229780bf4653 perf arm-spe: Add new function arm_spe_pkt_desc_counter() b2ff6a4b9356 perf arm-spe: Refactor context packet handling 6cff60c3a8e0 perf arm-spe: Refactor address packet handling c1007fa6bf66 perf arm-spe: Add new function arm_spe_pkt_desc_addr() ce8a9b1e5710 perf arm-spe: Refactor packet header parsing b0912ffc72f0 perf arm-spe: Refactor printing string to buffer d8c3bfff975e perf arm-spe: Fix packet length handling 52cefd095fb9 perf arm-spe: Refactor arm_spe_get_events() b10908084600 perf arm-spe: Refactor payload size calculation 88411033e593 perf arm-spe: Fix a typo in comment 2bf6932a6782 perf arm-spe: Include bitops.h for BIT() macro b18f3a08d529 perf mem: Support ARM SPE events 0e487ff9b11e perf c2c: Support AUX trace 43be68ac57e9 perf mem: Support AUX trace 062d03970370 perf auxtrace: Add itrace option '-M' for memory events d128fd3dc06d perf arm-spe: Don't wait for PERF_RECORD_EXIT event fd9361e5c541 perf arm-spe: Bail out if the trace is later than perf event 0a5f1f98d402 perf arm-spe: Assign kernel time to synthesized event 29fe8c076283 perf arm-spe: Convert event kernel time to counter value 127ffcfd226d perf arm-spe: Save clock parameters from TIME_CONV event 93cc48a8b0ff perf arm-spe: Remove redundant checking for "full_auxtrace" 97543640a669 perf arm-spe: Enable timestamp for per-cpu mode c0ce175f7f85 perf arm-spe: Correct sample flags for dummy event ccc38cc967f7 perf arm-spe: Correct sample flags for SPE event 7b9325e30fbc perf session: Dump PERF_RECORD_TIME_CONV event 68346c2c5735 perf session: Add swap operation for event TIME_CONV 5fdab9a4c5cf perf jit: Let convert_timestamp() to be backwards-compatible e760fb244b3e perf tools: Change fields type in perf_record_time_conv 6cd5720a999d perf arm-spe: Avoid potential buffer overrun 95682db0e0a8 perf arm-spe: Set sample's data source field 95e40e1033a5 perf arm-spe: Synthesize memory event 6d5e54cd1b23 perf arm-spe: Fill address info for samples 63d3e68dfd94 perf arm-spe: Store operation type in packet ed7ddb2c4013 perf arm-spe: Store memory address in packet e1051f87b8fa perf arm-spe: Enable sample type PERF_SAMPLE_DATA_SRC deddd0179acb perf arm-spe: Add support for ARMv8.3-SPE 101d9ad92684 perf arm-spe: Add more sub classes for operation packet d0ce08567874 perf arm-spe: Refactor operation packet handling f2c94a0144c4 perf arm-spe: Add new function arm_spe_pkt_desc_op_type() e25ae90c3451 perf arm-spe: Remove size condition checking for events 065088221c7e perf arm-spe: Refactor event type handling 379736be322f perf arm-spe: Add new function arm_spe_pkt_desc_event() f650de114114 perf arm-spe: Refactor counter packet handling 229780bf4653 perf arm-spe: Add new function arm_spe_pkt_desc_counter() b2ff6a4b9356 perf arm-spe: Refactor context packet handling 6cff60c3a8e0 perf arm-spe: Refactor address packet handling c1007fa6bf66 perf arm-spe: Add new function arm_spe_pkt_desc_addr() ce8a9b1e5710 perf arm-spe: Refactor packet header parsing b0912ffc72f0 perf arm-spe: Refactor printing string to buffer d8c3bfff975e perf arm-spe: Fix packet length handling 52cefd095fb9 perf arm-spe: Refactor arm_spe_get_events() b10908084600 perf arm-spe: Refactor payload size calculation 88411033e593 perf arm-spe: Fix a typo in comment 2bf6932a6782 perf arm-spe: Include bitops.h for BIT() macro b18f3a08d529 perf mem: Support ARM SPE events 0e487ff9b11e perf c2c: Support AUX trace 43be68ac57e9 perf mem: Support AUX trace 062d03970370 perf auxtrace: Add itrace option '-M' for memory events

adamliyi commented 2 years ago

5.4 LTS kernel backport: perf-tool arm spe event support Accepted kernel: v5.8 Ampere 5.4 commit: https://github.com/AmpereComputing/ampere-lts-kernel/commit/cf58a1cc2bdc7a4a7936f40e02cb466732b349aa, https://github.com/AmpereComputing/ampere-lts-kernel/commit/49e7f4660eb99e0f4175acc73712db891292a2e7, https://github.com/AmpereComputing/ampere-lts-kernel/commit/d06cfb882f4589a0b46ace89bf09ca2d46271583