>I'm not sure if there's existing code in the Linux kernel to take advantage of this instrumentation or not.
Indeed, there is, and it is Good:
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds