<rdar://problem/13259230>

Remember to set m_profile_thread to NULL once the profile thread is turned off.

llvm-svn: 175761
This commit is contained in:
Han Ming Ong
2013-02-21 16:31:31 +00:00
parent 1615f193eb
commit 0137455fab

View File

@@ -313,10 +313,15 @@ MachProcess::SetEnableAsyncProfiling(bool enable, uint64_t interval_usec)
m_profile_enabled = enable;
m_profile_interval_usec = interval_usec;
if (m_profile_enabled && (m_profile_thread == 0))
if (m_profile_enabled && (m_profile_thread == NULL))
{
StartProfileThread();
}
else if (!m_profile_enabled && m_profile_thread)
{
pthread_join(m_profile_thread, NULL);
m_profile_thread = NULL;
}
}
bool