| Index: src/platform-win32.cc
|
| diff --git a/src/platform-win32.cc b/src/platform-win32.cc
|
| index c1ec2fc9e9c8190a827e1307143331877556dc11..04e786005d1be867d78155d8b40ff2c4086e856f 100644
|
| --- a/src/platform-win32.cc
|
| +++ b/src/platform-win32.cc
|
| @@ -1750,7 +1750,6 @@ class Sampler::PlatformData : public Malloced {
|
| SuspendThread(profiled_thread_);
|
| context.ContextFlags = CONTEXT_FULL;
|
| GetThreadContext(profiled_thread_, &context);
|
| - ResumeThread(profiled_thread_);
|
| // Invoke tick handler with program counter and stack pointer.
|
| sample.pc = context.Eip;
|
| sample.sp = context.Esp;
|
| @@ -1761,6 +1760,10 @@ class Sampler::PlatformData : public Malloced {
|
| sample.state = Logger::state();
|
| sampler_->Tick(&sample);
|
|
|
| + if (sampler_->IsProfiling()) {
|
| + ResumeThread(profiled_thread_);
|
| + }
|
| +
|
| // Wait until next sampling.
|
| Sleep(sampler_->interval_);
|
| }
|
|
|