What is the closest syscall to `perf_event_open` on MacOS

21 Views Asked by At

What syscalls should I use on MacOS (both Arm and Intel) to obtain CPU event counters?

Perfect for me would be something close to Linux's perf_event_open syscall.

For example: How would I count L2-cache-misses and branch-misses of some random function f() inside huge application via syscall?

0

There are 0 best solutions below