mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Track locking thread on server side.
This commit is contained in:
parent
440d20b864
commit
4d40a9cb53
@ -706,6 +706,7 @@ struct LockMap
|
||||
int64_t timeTerminate;
|
||||
bool valid;
|
||||
bool isContended;
|
||||
uint64_t lockingThread;
|
||||
|
||||
TimeRange range[64];
|
||||
};
|
||||
|
@ -4674,7 +4674,7 @@ bool Worker::Process( const QueueItem& ev )
|
||||
ProcessLockSharedObtain( ev.lockObtain );
|
||||
break;
|
||||
case QueueType::LockSharedRelease:
|
||||
ProcessLockSharedRelease( ev.lockRelease );
|
||||
ProcessLockSharedRelease( ev.lockReleaseShared );
|
||||
break;
|
||||
case QueueType::LockMark:
|
||||
ProcessLockMark( ev.lockMark );
|
||||
@ -5458,6 +5458,7 @@ void Worker::ProcessLockAnnounce( const QueueLockAnnounce& ev )
|
||||
lm->timeTerminate = 0;
|
||||
lm->valid = true;
|
||||
lm->isContended = false;
|
||||
lm->lockingThread = 0;
|
||||
m_data.lockMap.emplace( ev.id, lm );
|
||||
CheckSourceLocation( ev.lckloc );
|
||||
}
|
||||
@ -5497,6 +5498,7 @@ void Worker::ProcessLockObtain( const QueueLockObtain& ev )
|
||||
lev->type = LockEvent::Type::Obtain;
|
||||
|
||||
InsertLockEvent( lock, lev, ev.thread, time );
|
||||
lock.lockingThread = ev.thread;
|
||||
}
|
||||
|
||||
void Worker::ProcessLockRelease( const QueueLockRelease& ev )
|
||||
@ -5511,7 +5513,7 @@ void Worker::ProcessLockRelease( const QueueLockRelease& ev )
|
||||
lev->SetSrcLoc( 0 );
|
||||
lev->type = LockEvent::Type::Release;
|
||||
|
||||
InsertLockEvent( lock, lev, ev.thread, time );
|
||||
InsertLockEvent( lock, lev, lock.lockingThread, time );
|
||||
}
|
||||
|
||||
void Worker::ProcessLockSharedWait( const QueueLockWait& ev )
|
||||
@ -5546,7 +5548,7 @@ void Worker::ProcessLockSharedObtain( const QueueLockObtain& ev )
|
||||
InsertLockEvent( lock, lev, ev.thread, time );
|
||||
}
|
||||
|
||||
void Worker::ProcessLockSharedRelease( const QueueLockRelease& ev )
|
||||
void Worker::ProcessLockSharedRelease( const QueueLockReleaseShared& ev )
|
||||
{
|
||||
auto it = m_data.lockMap.find( ev.id );
|
||||
assert( it != m_data.lockMap.end() );
|
||||
|
@ -695,7 +695,7 @@ private:
|
||||
tracy_force_inline void ProcessLockRelease( const QueueLockRelease& ev );
|
||||
tracy_force_inline void ProcessLockSharedWait( const QueueLockWait& ev );
|
||||
tracy_force_inline void ProcessLockSharedObtain( const QueueLockObtain& ev );
|
||||
tracy_force_inline void ProcessLockSharedRelease( const QueueLockRelease& ev );
|
||||
tracy_force_inline void ProcessLockSharedRelease( const QueueLockReleaseShared& ev );
|
||||
tracy_force_inline void ProcessLockMark( const QueueLockMark& ev );
|
||||
tracy_force_inline void ProcessLockName( const QueueLockName& ev );
|
||||
tracy_force_inline void ProcessPlotData( const QueuePlotData& ev );
|
||||
|
Loading…
Reference in New Issue
Block a user