haskell-cpu-instruction-counter
haskell-cpu-instruction-counter copied to clipboard
Measuring CPU instructions in Haskell using Linux Performance Counters
It would be nice if the package could be released on hackage to be easily retrievable with cabal-based infra.
`perf` can only monitor a specific OS process running on specific (or all) CPU core. It's unaware of Haskell's RTS and OS threads. I expect that running several counters concurrently...
From the [man page](http://man7.org/linux/man-pages/man2/perf_event_open.2.html): ``` The pid and cpu arguments allow specifying which process and CPU to monitor: pid == 0 and cpu == -1 This measures the calling process/thread...
It seems as though this both would complement and be improved by integration into criterion: - instruction counts as regression would be validated by criterion timing - a timing regression...
as per [man page](http://man7.org/linux/man-pages/man2/perf_event_open.2.html): ``` PERF_FLAG_FD_CLOEXEC (since Linux 3.14) This flag enables the close-on-exec flag for the created event file descriptor, so that the file descriptor is automatically closed on...