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-16 17:36:33 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-08-16 17:51:18 +0300
commit8bc4258e295db520d3795d1b1b2427cdb977d6a0 (patch)
treeca003106e7c218a0bc0487fd638568299ed46b30 /server/TracyWorker.cpp
parenta92034d59deae290a39b86f15fc7c4c8cde3ee06 (diff)
Display count of per-cpu context switch data.
Diffstat (limited to 'server/TracyWorker.cpp')
-rw-r--r--server/TracyWorker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
index 2bae4c07..b8870817 100644
--- a/server/TracyWorker.cpp
+++ b/server/TracyWorker.cpp
@@ -1553,6 +1553,16 @@ uint64_t Worker::GetContextSwitchCount() const
return cnt;
}
+uint64_t Worker::GetContextSwitchPerCpuCount() const
+{
+ uint64_t cnt = 0;
+ for( int i=0; i<256; i++ )
+ {
+ cnt += m_data.cpuData[i].cs.size();
+ }
+ return cnt;
+}
+
const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )
{
auto it = m_data.ctxSwitch.find( thread );