'Hardware performance counter APIs for Windows

I'd like to use hardware performance counter, specifically x86 CPUs to obtain cache misses or branch mis-prediction. Performance counters are heavily used in advanced profilers like Intel VTune. Please don't be confused performance counters on Windows operating systems.

In order to use these counters in C/C++ program, one may use PAPI: http://icl.cs.utk.edu/papi/

This allows you to easily use performance counters, but on only Linux. PAPI once supported Windows, but not now.

Is there anyone who recently tried PAPI or other APIs to use hardware performance counters on Windows?



Solution 1:[1]

What about this HCP Reference? Does it not provide what you want?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 wilx