mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Mark local threads with different color.
This commit is contained in:
parent
19857473e3
commit
e60b2884f4
@ -10474,6 +10474,11 @@ void View::DrawCpuDataWindow()
|
|||||||
pdqsort_branchless( pid.second.tids.begin(), pid.second.tids.end() );
|
pdqsort_branchless( pid.second.tids.begin(), pid.second.tids.end() );
|
||||||
for( auto& tid : pid.second.tids )
|
for( auto& tid : pid.second.tids )
|
||||||
{
|
{
|
||||||
|
const auto tidMatch = pidMatch && m_worker.IsThreadLocal( tid );
|
||||||
|
if( tidMatch )
|
||||||
|
{
|
||||||
|
ImGui::PushStyleColor( ImGuiCol_Text, ImVec4( 1.0f, 1.0f, 0.2f, 1.0f ) );
|
||||||
|
}
|
||||||
const auto& tit = ctd.find( tid );
|
const auto& tit = ctd.find( tid );
|
||||||
assert( tit != ctd.end() );
|
assert( tit != ctd.end() );
|
||||||
ImGui::TextUnformatted( RealToString( tid, true ) );
|
ImGui::TextUnformatted( RealToString( tid, true ) );
|
||||||
@ -10489,6 +10494,10 @@ void View::DrawCpuDataWindow()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%.2f%%)", double( tit->second.migrations ) / tit->second.runningRegions * 100 );
|
ImGui::TextDisabled( "(%.2f%%)", double( tit->second.migrations ) / tit->second.runningRegions * 100 );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
if( tidMatch )
|
||||||
|
{
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user