I have written a simple program where I get a PCM instance and call 'program()'.
PCM* m = PCM::getInstance();
std::cout << m->program() << std::endl;
My output is always 2 (PMUBusy). I see these warnings outputted as well:
WARNING: Core 0 IA32_PERFEVTSEL0_ADDR are not zeroed 5439548
WARNING: Core 0 IA32_PERFEVTSEL0_ADDR are not zeroed 5439548
Im not entirely sure what this indicates to me. I *think* it means that there are more than the limited number of allowed processes monitoring the PCM; though, I don't think any other process is running that is using the PCM.
Link Copied
For more complete information about compiler optimizations, see our Optimization Notice.