Apple released their performance counters definition in /usr/share/kpep/a14.plist file on macOS. The file lists the branch counters (number of branch instructions and branch mispredictions):
"INST_BRANCH" => {
"counters_mask" => 224
"description" => "Retired branch instructions including calls and
returns"
"number" => 141
}
and
"BRANCH_MISPRED_NONSPEC" => {
"counters_mask" => 224
"description" => "Retired branch instructions including calls and
returns that mispredicted"
"number" => 203
}
In this commit, the performance counters numbered 0x8d(141) and 0xcb(203) are renamed to their actual names and the mappings from generalized performence event types in enum perf_hw_id to hardware performance counters are added respectively.
Apple released their performance counters definition in /usr/share/kpep/a14.plist file on macOS. The file lists the branch counters (number of branch instructions and branch mispredictions):
"INST_BRANCH" => { "counters_mask" => 224 "description" => "Retired branch instructions including calls and returns" "number" => 141 }
and
"BRANCH_MISPRED_NONSPEC" => { "counters_mask" => 224 "description" => "Retired branch instructions including calls and returns that mispredicted" "number" => 203 }
In this commit, the performance counters numbered 0x8d(141) and 0xcb(203) are renamed to their actual names and the mappings from generalized performence event types in
enum perf_hw_id
to hardware performance counters are added respectively.