I've used cachegrind a few times (nice tool, easy to use), but it is only good for userspace so it wouldn't help here.
A coworker mentioned to me a while ago that our hardware (a rather obscure processor) provides counters of these events, which is why I asked about that specifically. In fact, he said such features were common.
I googled a bit and found this document describing event counters on AMD Opteron processors. I'm not sure if there's existing code in the Linux kernel to take advantage of this instrumentation or not.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds