Commit 75e5a5a1 authored by yurys@chromium.org's avatar yurys@chromium.org

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
parent b3cbe51f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment