1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Store intermediate results in registers, not in memory.

This commit is contained in:
Bartosz Taudul 2020-02-11 02:35:50 +01:00
parent caace1ce11
commit 86644ecda0

View File

@ -1782,6 +1782,8 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const
} }
#endif #endif
int cntOwn = 0;
int cntOther = 0;
for( int i=0; i<m_data.cpuDataCount; i++ ) for( int i=0; i<m_data.cpuDataCount; i++ )
{ {
auto& cs = m_data.cpuData[i].cs; auto& cs = m_data.cpuData[i].cs;
@ -1792,15 +1794,17 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const
{ {
if( GetPidFromTid( DecompressThreadExternal( it->Thread() ) ) == m_pid ) if( GetPidFromTid( DecompressThreadExternal( it->Thread() ) ) == m_pid )
{ {
own++; cntOwn++;
} }
else else
{ {
other++; cntOther++;
} }
} }
} }
} }
own = cntOwn;
other = cntOther;
} }
const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread ) const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )