4 ms·
Why does it need a kernel module, rather than just using the MSR API like similar tools do? Intel's PCM tools for example, show quite similar information, and
by drewg123 4y ago
Why does it need a kernel module, rather than just using the MSR API like similar tools do? Intel's PCM tools for example, show quite similar information, and are available on a variety of OSes..
- jamesdwilson 4y agoCoreFreq 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