| Index: src/platform-macos.cc
|
| diff --git a/src/platform-macos.cc b/src/platform-macos.cc
|
| index e367d21a41cd9de7ac6460e572ba50ae1ab494c4..c7b1f12f9923107df1f36ff99b7d2b2908aae4ef 100644
|
| --- a/src/platform-macos.cc
|
| +++ b/src/platform-macos.cc
|
| @@ -740,7 +740,7 @@ class SamplerThread : public Thread {
|
| interval_(interval) {}
|
|
|
| static void AddActiveSampler(Sampler* sampler) {
|
| - ScopedLock lock(mutex_);
|
| + ScopedLock lock(mutex_.Pointer());
|
| SamplerRegistry::AddActiveSampler(sampler);
|
| if (instance_ == NULL) {
|
| instance_ = new SamplerThread(sampler->interval());
|
| @@ -751,7 +751,7 @@ class SamplerThread : public Thread {
|
| }
|
|
|
| static void RemoveActiveSampler(Sampler* sampler) {
|
| - ScopedLock lock(mutex_);
|
| + ScopedLock lock(mutex_.Pointer());
|
| SamplerRegistry::RemoveActiveSampler(sampler);
|
| if (SamplerRegistry::GetState() == SamplerRegistry::HAS_NO_SAMPLERS) {
|
| RuntimeProfiler::StopRuntimeProfilerThreadBeforeShutdown(instance_);
|
| @@ -848,7 +848,7 @@ class SamplerThread : public Thread {
|
| RuntimeProfilerRateLimiter rate_limiter_;
|
|
|
| // Protects the process wide state below.
|
| - static Mutex* mutex_;
|
| + static LazyMutex mutex_;
|
| static SamplerThread* instance_;
|
|
|
| private:
|
| @@ -858,7 +858,7 @@ class SamplerThread : public Thread {
|
| #undef REGISTER_FIELD
|
|
|
|
|
| -Mutex* SamplerThread::mutex_ = OS::CreateMutex();
|
| +LazyMutex SamplerThread::mutex_ = LAZY_MUTEX_INITIALIZER;
|
| SamplerThread* SamplerThread::instance_ = NULL;
|
|
|
|
|
|
|