mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 17:07:36 +08:00
<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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user