mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Display count of messages and locks in thread tooltip.
This commit is contained in:
parent
6dceec4ea8
commit
62162d4cdb
@ -2091,12 +2091,14 @@ void View::DrawZones()
|
||||
first = std::min( first, v->messages.front()->time );
|
||||
last = std::max( last, v->messages.back()->time );
|
||||
}
|
||||
size_t lockCnt = 0;
|
||||
for( const auto& lock : m_worker.GetLockMap() )
|
||||
{
|
||||
const auto& lockmap = lock.second;
|
||||
if( !lockmap.valid ) continue;
|
||||
auto it = lockmap.threadMap.find( v->id );
|
||||
if( it == lockmap.threadMap.end() ) continue;
|
||||
lockCnt++;
|
||||
const auto thread = it->second;
|
||||
const auto threadBit = GetThreadBit( thread );
|
||||
if( lockmap.type == LockType::Lockable )
|
||||
@ -2132,12 +2134,20 @@ void View::DrawZones()
|
||||
ImGui::TextDisabled( "(%.2f%%)", activity / double( traceLen ) * 100 );
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
if( !v->timeline.empty() )
|
||||
{
|
||||
ImGui::Separator();
|
||||
TextFocused( "Zone count:", RealToString( v->count, true ) );
|
||||
TextFocused( "Top-level zones:", RealToString( v->timeline.size(), true ) );
|
||||
}
|
||||
if( !v->messages.empty() )
|
||||
{
|
||||
TextFocused( "Messages:", RealToString( v->messages.size(), true ) );
|
||||
}
|
||||
if( lockCnt != 0 )
|
||||
{
|
||||
TextFocused( "Locks:", RealToString( lockCnt, true ) );
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user