4 ms·
CoreFreq has a lot more info available to it: performance counters and events within the CPU, including instructions retired, cache accesses and misses, branch
by jamesdwilson 4y ago
CoreFreq has a lot more info available to it: performance counters and events within the CPU, including instructions retired, cache accesses and misses, branch instructions, etc.
- amluto 4y agoWhich you can read quite nicely from userspace using perf_event_open.
- jamesdwilson 4y agoBut doesn't the kernel module approach yield better performance and therefore more accurate data?
- amluto 4y agoMaybe, although you can use RDPMC to read quite a few performance counters from user mode after enabling them with perf_event_open. But using perf_event_open interoperates with the rest of the system, whereas a random kernel module is likely to interfere with other perf users.
- jamesdwilson 4y agoBut without the module, it wouldn't be able to get real-time statistics for individual cores or logical processors, specific data from the kernel's performance counters, or some system-level statistics
- drewg123 4y agoThe Intel PCM suite does what you seem to be describing w/o a kernel module, and it uses nicely abstracted MSR accesses so that its portable to any OS. https://github.com/intel/pcm https://github.com/intel/pcm