mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Display number of context switch regions.
This commit is contained in:
parent
0b03fed61c
commit
8c494eabbf
@ -8602,6 +8602,7 @@ void View::DrawInfo()
|
|||||||
TextFocused( "Call stacks:", RealToString( m_worker.GetCallstackPayloadCount(), true ) );
|
TextFocused( "Call stacks:", RealToString( m_worker.GetCallstackPayloadCount(), true ) );
|
||||||
TextFocused( "Call stack frames:", RealToString( m_worker.GetCallstackFrameCount(), true ) );
|
TextFocused( "Call stack frames:", RealToString( m_worker.GetCallstackFrameCount(), true ) );
|
||||||
TextFocused( "Frame images:", RealToString( ficnt, true ) );
|
TextFocused( "Frame images:", RealToString( ficnt, true ) );
|
||||||
|
TextFocused( "Context switch regions:", RealToString( m_worker.GetContextSwitchCount(), true ) );
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,6 +1246,16 @@ uint64_t Worker::GetPlotCount() const
|
|||||||
return cnt;
|
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
|
const ContextSwitch* const Worker::GetContextSwitchData( uint64_t thread ) const
|
||||||
{
|
{
|
||||||
auto it = m_data.ctxSwitch.find( thread );
|
auto it = m_data.ctxSwitch.find( thread );
|
||||||
|
@ -267,6 +267,7 @@ public:
|
|||||||
uint64_t GetZoneCount() const { return m_data.zonesCnt; }
|
uint64_t GetZoneCount() const { return m_data.zonesCnt; }
|
||||||
uint64_t GetLockCount() const;
|
uint64_t GetLockCount() const;
|
||||||
uint64_t GetPlotCount() const;
|
uint64_t GetPlotCount() const;
|
||||||
|
uint64_t GetContextSwitchCount() const;
|
||||||
uint64_t GetSrcLocCount() const { return m_data.sourceLocationPayload.size() + m_data.sourceLocation.size(); }
|
uint64_t GetSrcLocCount() const { return m_data.sourceLocationPayload.size() + m_data.sourceLocation.size(); }
|
||||||
uint64_t GetCallstackPayloadCount() const { return m_data.callstackPayload.size() - 1; }
|
uint64_t GetCallstackPayloadCount() const { return m_data.callstackPayload.size() - 1; }
|
||||||
uint64_t GetCallstackFrameCount() const { return m_data.callstackFrameMap.size(); }
|
uint64_t GetCallstackFrameCount() const { return m_data.callstackFrameMap.size(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user