| Index: src/platform-win32.cc
|
| diff --git a/src/platform-win32.cc b/src/platform-win32.cc
|
| index fcf1f8f18b360ffe451243ea1dddc6b3457937d0..7f3d95a4c4f7539baba145fc502e0259f153f925 100644
|
| --- a/src/platform-win32.cc
|
| +++ b/src/platform-win32.cc
|
| @@ -1805,15 +1805,12 @@ class Sampler::PlatformData : public Malloced {
|
| memset(&context, 0, sizeof(context));
|
| // Loop until the sampler is disengaged, keeping the specified samling freq.
|
| for ( ; sampler_->IsActive(); Sleep(sampler_->interval_)) {
|
| -#ifdef ENABLE_CPP_PROFILES_PROCESSOR
|
| - TickSample* sample = CpuProfiler::TickSampleEvent();
|
| - if (sample == NULL) continue;
|
| - sample->pc = NULL; // Impossible value if sampling succeeds.
|
| - sample->frames_count = 0;
|
| -#else
|
| TickSample sample_obj;
|
| - TickSample* sample = &sample_obj;
|
| -#endif // ENABLE_CPP_PROFILES_PROCESSOR
|
| + TickSample* sample = NULL;
|
| +#ifdef ENABLE_CPP_PROFILES_PROCESSOR
|
| + sample = CpuProfiler::TickSampleEvent();
|
| +#endif
|
| + if (sample == NULL) sample = &sample_obj;
|
|
|
| // We always sample the VM state.
|
| sample->state = VMState::current_state();
|
| @@ -1836,10 +1833,8 @@ class Sampler::PlatformData : public Malloced {
|
| ResumeThread(profiled_thread_);
|
| }
|
|
|
| -#ifndef ENABLE_CPP_PROFILES_PROCESSOR
|
| // Invoke tick handler with program counter and stack pointer.
|
| sampler_->Tick(sample);
|
| -#endif
|
| }
|
| }
|
| };
|
|
|