You need to sign in or sign up before continuing.
[wperf] WPERF-1134: Add CMN events (for all devices) to `wperf list`
Introduction
In this patch I've added support for CMN devices in wperf list
. I've used previously implemented "short CMN event name" in [wperf] WPERF-1090: add short CMN event names t... (!828 - merged) this MR to print. We can always change for "original long CMN event names" if needed (they have PMU_
prefix and sometimes _EVENT
suffix.
Also minor refactoring, I've added const
to few extractors.
I've added some new event type notations (just strings in wperf list
):
-
arm_cmn_0//
->[Kernel PMU event]
or - for Gicen CMN device, e.g.
XP
->[CMN XP PMU event]
.
Also added two new extractors to get data I want:
std::vector<std::pair<cmn_mesh_device_ids, std::wstring>> get_cmn_device_name_list(cmn_mesh_family _mesh_family) const;
std::vector<const cmd_device_event_description*> get_cmn_device_event_list(cmn_mesh_device_ids _device_id, cmn_mesh_family _mesh_family) const;
wperf list
Example output PS> wperf list
arm_cmn_0// [Kernel PMU event]
dn_tlbi_count 0x0001 [CMN DN PMU event]
dn_bpi_count 0x0002 [CMN DN PMU event]
dn_pici_count 0x0003 [CMN DN PMU event]
dn_vici_count 0x0004 [CMN DN PMU event]
dn_dvmsync_count 0x0005 [CMN DN PMU event]
...
cmn_xp_txsnp_deviceport2_count 0x0059 [CMN XP PMU event]
cmn_xp_txsnp_deviceport2_stall_count 0x005a [CMN XP PMU event]
cmn_xp_txsnp_deviceport2_partial_dat_flit_count 0x005b [CMN XP PMU event]
cmn_xp_txsnp_deviceport3_count 0x005d [CMN XP PMU event]
...
hnp_p2p_rd_rdt_rd_alloc 0x0014 [CMN HNP PMU event]
hnp_p2p_rd_arvalid_no_arready 0x0015 [CMN HNP PMU event]
hnp_p2p_rd_arready_no_arvalid 0x0016 [CMN HNP PMU event]
...
In this patch:
- wperf: add CMN events (for all devices) to 'wperf list'
- wperf: add new extractors for list of devices and events
Testing
wperf list
and wperf list -v
for CMN-700:
See files with
list
and JSON schemas
Regression for >pytest wperf_cli_list_test.py -v
================================================================= test session starts =================================================================
platform win32 -- Python 3.12.3, pytest-8.2.0, pluggy-1.5.0 -- C:\Users\przemek\AppData\Local\Programs\Python\Python312-arm64\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\przemek\Workspace\4.3.1-release
configfile: pytest.ini
collected 6 items
wperf_cli_list_test.py::test_wperf_list_json PASSED [ 16%]
wperf_cli_list_test.py::test_wperf_list_json_file_output_exists PASSED [ 33%]
wperf_cli_list_test.py::test_wperf_list_json_file_output_valid PASSED [ 50%]
wperf_cli_list_test.py::test_wperf_list_metric_json_verbose PASSED [ 66%]
wperf_cli_list_test.py::test_wperf_list_events_json_verbose PASSED [ 83%]
wperf_cli_list_test.py::test_wperf_list_spe_available PASSED [100%]
=========================================================== WindowsPerf Test Configuration ============================================================
OS: Windows-11-10.0.26100-SP0, ARM64
CPU: 80 x ARMv8 (64-bit) Family 8 Model D0C Revision 301, Ampere(R)
Python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:18:48) [MSC v.1938 64 bit (ARM64)]
Time: 07/03/2025, 20:40:13
wperf: 4.3.1.94e9ea72-dirty+etw-app+spe+cmn
wperf-driver: 4.3.1.f4621af3+trace+spe+cmn
Configuration: --use=None
================================================================== 6 passed in 2.46s ==================================================================
>pytest wperf_cli_json_validator_test.py -v
================================================================= test session starts =================================================================
platform win32 -- Python 3.12.3, pytest-8.2.0, pluggy-1.5.0 -- C:\Users\przemek\AppData\Local\Programs\Python\Python312-arm64\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\przemek\Workspace\4.3.1-release
configfile: pytest.ini
collected 17 items
wperf_cli_json_validator_test.py::test_wperf_json_schema[version] PASSED [ 5%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[list] PASSED [ 11%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[test] PASSED [ 17%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[stat] PASSED [ 23%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[detect] PASSED [ 29%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[man] PASSED [ 35%]
wperf_cli_json_validator_test.py::test_wperf_json_schema[cpuinfo] PASSED [ 41%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[version] PASSED [ 47%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[list] PASSED [ 52%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[test] PASSED [ 58%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[stat] PASSED [ 64%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[detect] PASSED [ 70%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[man] PASSED [ 76%]
wperf_cli_json_validator_test.py::test_wperf_json_stdout_schema[cpuinfo] PASSED [ 82%]
wperf_cli_json_validator_test.py::test_wperf_timeline_json_schema PASSED [ 88%]
wperf_cli_json_validator_test.py::test_wperf_timeline_json_stdout_schema PASSED [ 94%]
wperf_cli_json_validator_test.py::test_wperf_dmc_json_output[ddr_bw] PASSED [100%]
=========================================================== WindowsPerf Test Configuration ============================================================
OS: Windows-11-10.0.26100-SP0, ARM64
CPU: 80 x ARMv8 (64-bit) Family 8 Model D0C Revision 301, Ampere(R)
Python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:18:48) [MSC v.1938 64 bit (ARM64)]
Time: 07/03/2025, 20:41:08
wperf: 4.3.1.94e9ea72-dirty+etw-app+spe+cmn
wperf-driver: 4.3.1.f4621af3+trace+spe+cmn
Configuration: --use=None
================================================================= 17 passed in 17.54s =================================================================
Unit tests
Edited by Przemyslaw Wirkus