mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Store LockEvent type as an enum class.
This commit is contained in:
parent
bcf2bf1c5c
commit
398eecbb94
@ -107,7 +107,7 @@ struct LockEvent
|
|||||||
int32_t srcloc;
|
int32_t srcloc;
|
||||||
uint8_t thread;
|
uint8_t thread;
|
||||||
uint8_t lockingThread;
|
uint8_t lockingThread;
|
||||||
uint8_t type;
|
Type type;
|
||||||
uint8_t lockCount;
|
uint8_t lockCount;
|
||||||
uint64_t waitList;
|
uint64_t waitList;
|
||||||
};
|
};
|
||||||
|
@ -753,7 +753,7 @@ void View::ProcessLockWait( const QueueLockWait& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Wait;
|
lev->type = LockEvent::Type::Wait;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
auto it = m_lockMap.find( ev.id );
|
auto it = m_lockMap.find( ev.id );
|
||||||
@ -771,7 +771,7 @@ void View::ProcessLockObtain( const QueueLockObtain& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Obtain;
|
lev->type = LockEvent::Type::Obtain;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
||||||
@ -782,7 +782,7 @@ void View::ProcessLockRelease( const QueueLockRelease& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Release;
|
lev->type = LockEvent::Type::Release;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
||||||
@ -793,7 +793,7 @@ void View::ProcessLockSharedWait( const QueueLockWait& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Wait;
|
lev->type = LockEvent::Type::Wait;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
auto it = m_lockMap.find( ev.id );
|
auto it = m_lockMap.find( ev.id );
|
||||||
@ -811,7 +811,7 @@ void View::ProcessLockSharedObtain( const QueueLockObtain& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Obtain;
|
lev->type = LockEvent::Type::Obtain;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
||||||
@ -822,7 +822,7 @@ void View::ProcessLockSharedRelease( const QueueLockRelease& ev )
|
|||||||
{
|
{
|
||||||
auto lev = m_slab.Alloc<LockEvent>();
|
auto lev = m_slab.Alloc<LockEvent>();
|
||||||
lev->time = ev.time * m_timerMul;
|
lev->time = ev.time * m_timerMul;
|
||||||
lev->type = (uint8_t)LockEvent::Type::Release;
|
lev->type = LockEvent::Type::Release;
|
||||||
lev->srcloc = 0;
|
lev->srcloc = 0;
|
||||||
|
|
||||||
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
assert( m_lockMap.find( ev.id ) != m_lockMap.end() );
|
||||||
@ -844,7 +844,7 @@ void View::ProcessLockMark( const QueueLockMark& ev )
|
|||||||
--it;
|
--it;
|
||||||
if( (*it)->thread == thread )
|
if( (*it)->thread == thread )
|
||||||
{
|
{
|
||||||
switch( (LockEvent::Type)(*it)->type )
|
switch( (*it)->type )
|
||||||
{
|
{
|
||||||
case LockEvent::Type::Obtain:
|
case LockEvent::Type::Obtain:
|
||||||
case LockEvent::Type::Wait:
|
case LockEvent::Type::Wait:
|
||||||
|
Loading…
Reference in New Issue
Block a user