Support higher CPU profiler sampling rate on Windows

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
This commit is contained in:
yurys@chromium.org 2013-08-29 13:44:25 +00:00
parent b3cbe51f1c
commit 75e5a5a1a6

View File

@ -609,6 +609,8 @@ void Sampler::SampleStack(const RegisterState& state) {
bool Sampler::CanSampleOnProfilerEventsProcessorThread() {
#if defined(USE_SIGNALS)
return true;
#elif V8_OS_WIN || V8_OS_CYGWIN
return true;
#else
return false;
#endif