mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Don't iterate over 256 CPUs.
This commit is contained in:
parent
eccb0b1e4a
commit
3ce6b1205f
@ -4406,7 +4406,8 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
|
||||
|
||||
const auto origOffset = offset;
|
||||
auto cpuData = m_worker.GetCpuData();
|
||||
for( int i=0; i<256; i++ )
|
||||
const auto cpuCnt = m_worker.GetCpuDataCpuCount();
|
||||
for( int i=0; i<cpuCnt; i++ )
|
||||
{
|
||||
if( !cpuData[i].cs.empty() )
|
||||
{
|
||||
|
@ -1830,7 +1830,7 @@ uint64_t Worker::GetContextSwitchCount() const
|
||||
uint64_t Worker::GetContextSwitchPerCpuCount() const
|
||||
{
|
||||
uint64_t cnt = 0;
|
||||
for( int i=0; i<256; i++ )
|
||||
for( int i=0; i<m_data.cpuDataCount; i++ )
|
||||
{
|
||||
cnt += m_data.cpuData[i].cs.size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user