| Index: src/platform-macos.cc
|
| diff --git a/src/platform-macos.cc b/src/platform-macos.cc
|
| index 22d2bcfe76b1dca86b68df1758aaa973022b563d..e69833885cbaad2284feac6d93f7b32fa0573c98 100644
|
| --- a/src/platform-macos.cc
|
| +++ b/src/platform-macos.cc
|
| @@ -787,24 +787,13 @@ class SamplerThread : public Thread {
|
| SamplerRegistry::State state;
|
| while ((state = SamplerRegistry::GetState()) !=
|
| SamplerRegistry::HAS_NO_SAMPLERS) {
|
| - bool cpu_profiling_enabled =
|
| - (state == SamplerRegistry::HAS_CPU_PROFILING_SAMPLERS);
|
| - bool runtime_profiler_enabled = RuntimeProfiler::IsEnabled();
|
| // When CPU profiling is enabled both JavaScript and C++ code is
|
| // profiled. We must not suspend.
|
| - if (!cpu_profiling_enabled) {
|
| + if (state == SamplerRegistry::HAS_CPU_PROFILING_SAMPLERS) {
|
| + SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this);
|
| + } else {
|
| if (rate_limiter_.SuspendIfNecessary()) continue;
|
| }
|
| - if (cpu_profiling_enabled) {
|
| - if (!SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this)) {
|
| - return;
|
| - }
|
| - }
|
| - if (runtime_profiler_enabled) {
|
| - if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, NULL)) {
|
| - return;
|
| - }
|
| - }
|
| OS::Sleep(interval_);
|
| }
|
| }
|
| @@ -817,11 +806,6 @@ class SamplerThread : public Thread {
|
| sampler_thread->SampleContext(sampler);
|
| }
|
|
|
| - static void DoRuntimeProfile(Sampler* sampler, void* ignored) {
|
| - if (!sampler->isolate()->IsInitialized()) return;
|
| - sampler->isolate()->runtime_profiler()->NotifyTick();
|
| - }
|
| -
|
| void SampleContext(Sampler* sampler) {
|
| thread_act_t profiled_thread = sampler->platform_data()->profiled_thread();
|
| TickSample sample_obj;
|
|
|