From 75e5a5a1a61cbe334439ce919cda37ae422d571c Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Thu, 29 Aug 2013 13:44:25 +0000 Subject: [PATCH] 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 --- src/sampler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sampler.cc b/src/sampler.cc index c5551e1..85597e5 100644 --- a/src/sampler.cc +++ b/src/sampler.cc @@ -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 -- 2.7.4