1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Display number of context switch regions.

This commit is contained in:
Bartosz Taudul
2019-08-13 00:29:09 +02:00
parent 0b03fed61c
commit 8c494eabbf
3 changed files with 12 additions and 0 deletions
+10
View File
@@ -1246,6 +1246,16 @@ uint64_t Worker::GetPlotCount() const
return cnt;
}
uint64_t Worker::GetContextSwitchCount() const
{
uint64_t cnt = 0;
for( auto& v : m_data.ctxSwitch )
{
cnt += v.second->v.size();
}
return cnt;
}
const ContextSwitch* const Worker::GetContextSwitchData( uint64_t thread ) const
{
auto it = m_data.ctxSwitch.find( thread );