Index: src/platform-solaris.cc |
diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc |
index 004a6ed428e5febc4302f409abe0b170ae941ed5..50ad35339216a7493534ba98dc21d59b3c2c0ae2 100644 |
--- a/src/platform-solaris.cc |
+++ b/src/platform-solaris.cc |
@@ -733,7 +733,7 @@ class SignalSender : public Thread { |
} |
static void AddActiveSampler(Sampler* sampler) { |
- ScopedLock lock(mutex_); |
+ ScopedLock lock(mutex_.Pointer()); |
SamplerRegistry::AddActiveSampler(sampler); |
if (instance_ == NULL) { |
// Start a thread that will send SIGPROF signal to VM threads, |
@@ -746,7 +746,7 @@ class SignalSender : 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_); |
@@ -840,7 +840,7 @@ class SignalSender : public Thread { |
RuntimeProfilerRateLimiter rate_limiter_; |
// Protects the process wide state below. |
- static Mutex* mutex_; |
+ static LazyMutex mutex_; |
static SignalSender* instance_; |
static bool signal_handler_installed_; |
static struct sigaction old_signal_handler_; |
@@ -849,7 +849,7 @@ class SignalSender : public Thread { |
DISALLOW_COPY_AND_ASSIGN(SignalSender); |
}; |
-Mutex* SignalSender::mutex_ = OS::CreateMutex(); |
+LazyMutex SignalSender::mutex_ = LAZY_MUTEX_INITIALIZER; |
SignalSender* SignalSender::instance_ = NULL; |
struct sigaction SignalSender::old_signal_handler_; |
bool SignalSender::signal_handler_installed_ = false; |