-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX support #2
Comments
Hi! Although I'm not currently a macOS user, I've noticed that Processor Counter Monitor (PCM; an open source fork of the discontinued Intel Performance Counter Monitor) provides support: https://github.com/opcm/pcm In particular, its setup docs make a mention of the bundled MacMSRDriver: |
Thanks @MattPD - I noticed the same thing: see for example the PCM link in the original comment which points to an Intel SWF thread describing how a user modified the mac driver. I probably wont' get to this for a while, first I'll add Linux support for libpfc, then Windows, then ... |
Just linking in some additional comments on OSX support in an otherwise unrelated merge request. |
Not sure this is relevant, but macOS supports so called diagnostic calls [1], and one of them, namely dgEnaPMC [2], enables RDPMC from user mode [3]. It can be called via inline assembly as demonstrated in [1], but requires a kernel flag. I haven't tried it yet, but it looks promising. Also, performance counters can be configured via the private kperf.framework. XNU's source contains a useful example [4]. [1] http://newosxbook.com/MOXiI.pdf, page 292 |
No, dgEnaPMC call won't help. On my machine cpu_pmc_control is a no-op, probably due to |
Should be easy to support OSX, in fact perhaps it already works.
We don't have a solution for reading performance counters on OSX, and it isn't clear the effort required to port the
libpfc
counters to that platform. It seems like PAPI won't work, but maybe we can get a driver from PCM?The text was updated successfully, but these errors were encountered: