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.