From 86644ecda06e77295027b55adfbf839af71cd02c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 11 Feb 2020 02:35:50 +0100 Subject: [PATCH] Store intermediate results in registers, not in memory. --- server/TracyWorker.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 68ecc840..40c0b5c9 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1782,6 +1782,8 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const } #endif + int cntOwn = 0; + int cntOther = 0; for( int i=0; iThread() ) ) == m_pid ) { - own++; + cntOwn++; } else { - other++; + cntOther++; } } } } + own = cntOwn; + other = cntOther; } const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )