`{start,stop}_sampling` has a different semantics in unix and windows
I just noticed by looking at the implementation: on unix, we use a counter, while on windows it's a simple boolean. This means that this code behave differently:
_vmprof.stop_sampling()
_vmprof.stop_sampling()
_vmprof.start_sampling()
on widows, it will restart to take samples, while on unix it won't. I propose to tweak the windows implementation to behave like the unix one, to prevent subtle bugs and/or different behaviors.
Yep, I agree. Specifically this is about vmprof_ignore_signals which behaves differently. The reason for being a counter on linux is because of the CAS (compare and swap) operations supported by gcc. MVSC supports those?
yes, it seems so: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683560(v=vs.85).aspx