I am seeing issue(log below) with this patchset on our platfrom.Hi,
i have tried using your v2 branch [1]
root@borg-1>perf_acme>> ./perf --version
perf version 4.16.rc1.g087f7ca
root@borg-1>perf_acme>> ./perf stat -e bus_access_rd sleep 1
Performance counter stats for 'sleep 1':
23,099 bus_access_rd
1.000708516 seconds time elapsed
root@borg-1>perf_acme>> cd -
/ganapat/perf/linux-hisi/tools/perf
root@borg-1>perf>> ./perf --version
perf version 4.16.rc1.gcb5a74
root@borg-1>perf>> ./perf stat -e bus_access_rd sleep 1
Performance counter stats for 'sleep 1':
0 bus_access_rd
1.000709162 seconds time elapsed
root@borg-1>perf>>
[1] https://github.com/hisilicon/linux-hisi.git
I took a slightly different tack and compared the output of "perf list --details" to see if the event numbers numbers were the same. For the common events borrowed from the armv8-recommended.json all the events are 0 for the cortex a53. That would explain why the bus_access_rd above were counts were different if it was counting the SW_INCR event instead of bus_access_rd.
Why not key the matching of common events off the "EventName" rather than "EventCode"? The EventName would be more descriptive. Then the json files could eliminate the "BriefDescription" and just have the EventName with nothing else for each event. This would further reduce the amount of redundant fields between the specific implementations and the common set.
-Will
.