mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Highlight CPU data timeline from CPU data window.
This commit is contained in:
parent
cafb5d6a99
commit
3b8ab5715f
@ -11184,6 +11184,7 @@ void View::DrawCpuDataWindow()
|
|||||||
}
|
}
|
||||||
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
const auto pidtxt = pid.first == 0 ? "Unknown" : RealToString( pid.first, true );
|
||||||
const auto expand = ImGui::TreeNode( pidtxt );
|
const auto expand = ImGui::TreeNode( pidtxt );
|
||||||
|
if( ImGui::IsItemHovered() ) m_drawThreadHighlight = pid.first;
|
||||||
const auto tsz = pid.second.tids.size();
|
const auto tsz = pid.second.tids.size();
|
||||||
if( tsz > 1 )
|
if( tsz > 1 )
|
||||||
{
|
{
|
||||||
@ -11192,6 +11193,7 @@ void View::DrawCpuDataWindow()
|
|||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( pid.first == 0 ? "???" : name );
|
ImGui::TextUnformatted( pid.first == 0 ? "???" : name );
|
||||||
|
if( ImGui::IsItemHovered() ) m_drawThreadHighlight = pid.first;
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
sprintf( buf, "%s (%.2f%%)", TimeToString( pid.second.data.runningTime ), double( pid.second.data.runningTime ) * rtimespan * 100 );
|
||||||
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
ImGui::ProgressBar( double( pid.second.data.runningTime ) * rtimespan, ImVec2( -1, ty ), buf );
|
||||||
@ -11230,8 +11232,10 @@ void View::DrawCpuDataWindow()
|
|||||||
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 ) );
|
||||||
|
if( ImGui::IsItemHovered() ) m_drawThreadHighlight = tid;
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( tname );
|
ImGui::TextUnformatted( tname );
|
||||||
|
if( ImGui::IsItemHovered() ) m_drawThreadHighlight = tid;
|
||||||
if( tidMatch )
|
if( tidMatch )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user