Performance profiling in Visual Studio under Virtual Machine (Sampling VS Instrumentation)
The bad news is that Visual Studio’s own, excellent Performance Profiler does not support Sampling under any virtual machine environment – only Instrumentation. It will not fail, but will not be able to collect any performance data if you try to do sampling while running in a virtual machine (like Parallels Desktop or VMWare Player / Workstation). Visual Studio - Branch Mispredition with Sampling Sampling accesses the hardware directly, so it is very fast and detailed: it gives you line level performance audit and even can give branch misprediction results if you are interested (to see the latter one, go to Properties of the Performance Explorer, go to Sampling section, switch to Performance Counter them open the Branch Events tree node). On the other hand, instrumentations needs a special build, it basically injects data collection functions into your compiled code. Hence the runtime performance of the instrumented code is generally a magnitude (10x) slow...