Page 1 of 1

Windows 7 support for current PAPI

PostPosted: Thu May 01, 2014 11:35 am
by Robert Bernecky
Thanks to some pointers from Phil Mucci, I now have a Windows 7 KMDF
kernel driver that sets CR4[PCE], allowing access to performance counter
registers in user mode, and setting of MSRs to permit event
selection.

I am going to attempt to integrate this stuff into the current PAPI
(I'm running with papi-4.1.3, because it sort-of had Windows
support in it already). Any suggestions on things I should or should
not do with the current PAPI are very welcome.

Bob

Re: Windows 7 support for current PAPI

PostPosted: Thu May 01, 2014 1:04 pm
by James Ralph
Hi Bob,

I still need to finish digesting the email thread you and Phil had,
but can offer some general impressions.

I take it you're content with system-wide counts? IIRC there is no way
to save the performance registers at context switch.

At the time one of the biggest issues I had was the visual C compiler
didn't support a few C99 constructs that appear widely in the code.
I'm not sure if this has changed, but at the time it appeared Microsoft
had no plans to add support. I vaguely recall trying to compile
the code as C++ to get around this?

Any code under $(papi)/src/libpfm4 is an external library and we prefer
to keep that in sync with the upstream codebase.

James

Re: Windows 7 support for current PAPI

PostPosted: Fri Jun 13, 2014 3:55 am
by zinsavage123
I am curious about this one myself. Did you ever get it figured out or answered exactly?