AMD CPU cache monitoring

Marko Zec zec at fer.hr
Fri May 5 11:16:12 UTC 2017


I'm looking for a simple, vendor-neutral tool for monitoring
per-CPU-core data cache hits and misses (L2, L3).

Adrian mentioned https://github.com/opcm/pcm in his article on
profiling:
http://adrianchadd.blogspot.hr/2013/08/profiling-on-superscalar-architectures.html

This tool works fine on FBSD 11 and Intel silicon, and would be almost
ideal for my needs, but unfortunately it doesn't work with AMD CPUs.

OTOH, pmc(3) seems to be a more generic mechanism for working with
performance counters, but I couldn't find useful examples on how to
harvest per-cpu counters.  Most of the pmc-related examples I bumped
itno seem to be focused on call stack profiling, which isn't what I'm
looking for.

Any ideas on how to monitor CPU cache hits / misses on AMD CPUs?

Thanks,

Marko


More information about the freebsd-hackers mailing list