Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-08-14 21:16:11 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-08-14 21:16:11 +0300
commit9a364fe5fe14724a4cfc11c81d94b87f8dc46465 (patch)
tree351108a1318130c05675964b9e176693456fa40d /server/TracyWorker.cpp
parentcf4e04440edf0630675ad28ea9cd0e7964e5c756 (diff)
Cache context switch data queries.
Diffstat (limited to 'server/TracyWorker.cpp')
-rw-r--r--server/TracyWorker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
index a0e184d6..6f2a329e 100644
--- a/server/TracyWorker.cpp
+++ b/server/TracyWorker.cpp
@@ -1318,11 +1318,13 @@ uint64_t Worker::GetContextSwitchCount() const
return cnt;
}
-const ContextSwitch* const Worker::GetContextSwitchData( uint64_t thread ) const
+const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )
{
auto it = m_data.ctxSwitch.find( thread );
if( it != m_data.ctxSwitch.end() )
{
+ m_data.ctxSwitchLast.first = thread;
+ m_data.ctxSwitchLast.second = it->second;
return it->second;
}
else