+Parallaft requires access to an accurate and deterministic branch-counting hardware performance counter that count branch instructions executed in userspace. On an Apple M2, this is simply the counter that counts `INST_BRANCH` event (see [this commit](https://github.com/CompArchCam/parallaft/commit/a5dc32e5cea9c53c4e72aecfff40a9c4488e89fc)). However, some processors like Intel Alder Lake overcount the number of branches executed by number of return from interrupts/exceptions from a higher privilege level to the userspace. To compensate this, a combination of branch counters are used. Specifically, Parallaft substrates the far branch count (which include the ret-from-irq-exc number above) from the all branch count (see [this](https://github.com/CompArchCam/parallaft/blob/ea1bc46c07ce7ce1e169f327c3bc22c8d29452ce/parallaft/src/types/perf_counter/symbolic_events/branch.rs#L58)).
0 commit comments