This change moves sampling from SamplerThread to the profiler events processing thread and allows to configure sampling interval on Windows.
Custom tick counter is used instead of OS::Ticks as the latter has maximum presicion of 1ms while we need 100us. QueryPerformanceCounter is used to retrieve high-precision time as described in http://msdn.microsoft.com/en-us/library/
ee417693(VS.85).aspx
BUG=v8:2814
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/
23271003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16428
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bool Sampler::CanSampleOnProfilerEventsProcessorThread() {
#if defined(USE_SIGNALS)
return true;
+#elif V8_OS_WIN || V8_OS_CYGWIN
+ return true;
#else
return false;
#endif