| Index: src/platform-macos.cc
|
| diff --git a/src/platform-macos.cc b/src/platform-macos.cc
|
| index b3ee49e2c9968c6c8b0fd7c9eadfdd96595f4ae4..e50517c8faa57b6658b8ea6050562dab17297fa4 100644
|
| --- a/src/platform-macos.cc
|
| +++ b/src/platform-macos.cc
|
| @@ -546,15 +546,12 @@ class Sampler::PlatformData : public Malloced {
|
| void Runner() {
|
| // Loop until the sampler is disengaged, keeping the specified samling freq.
|
| for ( ; sampler_->IsActive(); OS::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();
|
| @@ -595,10 +592,8 @@ class Sampler::PlatformData : public Malloced {
|
| thread_resume(profiled_thread_);
|
| }
|
|
|
| -#ifndef ENABLE_CPP_PROFILES_PROCESSOR
|
| // Invoke tick handler with program counter and stack pointer.
|
| sampler_->Tick(sample);
|
| -#endif
|
| }
|
| }
|
| };
|
|
|