mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Display die information on CPU data graph.
This commit is contained in:
parent
2716311f51
commit
46e979e185
@ -80,6 +80,7 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
TextFocused( "Number of cores:", RealToString( cpuCnt ) );
|
TextFocused( "Number of cores:", RealToString( cpuCnt ) );
|
||||||
if( usage.own + usage.other != 0 )
|
if( usage.own + usage.other != 0 )
|
||||||
{
|
{
|
||||||
|
auto& topo = m_worker.GetCpuTopology();
|
||||||
const auto mt = m_vd.zvStart + ( ImGui::GetIO().MousePos.x - wpos.x ) * nspx;
|
const auto mt = m_vd.zvStart + ( ImGui::GetIO().MousePos.x - wpos.x ) * nspx;
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
for( int i=0; i<cpuCnt; i++ )
|
for( int i=0; i<cpuCnt; i++ )
|
||||||
@ -93,7 +94,14 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
auto tt = m_worker.GetThreadTopology( i );
|
auto tt = m_worker.GetThreadTopology( i );
|
||||||
if( tt )
|
if( tt )
|
||||||
{
|
{
|
||||||
ImGui::TextDisabled( "[%i:%i] CPU %i:", tt->package, tt->core, i );
|
if( topo.size() > 1 )
|
||||||
|
{
|
||||||
|
ImGui::TextDisabled( "[%i:%i:%i] CPU %i:", tt->package, tt->die, tt->core, i );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::TextDisabled( "[%i:%i] CPU %i:", tt->die, tt->core, i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -175,6 +183,8 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Package:", RealToString( tt->package ) );
|
TextFocused( "Package:", RealToString( tt->package ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Die:", RealToString( tt->die ) );
|
||||||
|
ImGui::SameLine();
|
||||||
TextFocused( "Core:", RealToString( tt->core ) );
|
TextFocused( "Core:", RealToString( tt->core ) );
|
||||||
}
|
}
|
||||||
TextFocused( "Context switch regions:", RealToString( v.num ) );
|
TextFocused( "Context switch regions:", RealToString( v.num ) );
|
||||||
@ -264,6 +274,8 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Package:", RealToString( tt->package ) );
|
TextFocused( "Package:", RealToString( tt->package ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Die:", RealToString( tt->die ) );
|
||||||
|
ImGui::SameLine();
|
||||||
TextFocused( "Core:", RealToString( tt->core ) );
|
TextFocused( "Core:", RealToString( tt->core ) );
|
||||||
}
|
}
|
||||||
if( local )
|
if( local )
|
||||||
@ -327,7 +339,15 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
char buf[64];
|
char buf[64];
|
||||||
if( tt )
|
if( tt )
|
||||||
{
|
{
|
||||||
sprintf( buf, "[%i:%i] CPU %i", tt->package, tt->core, i );
|
auto& topo = m_worker.GetCpuTopology();
|
||||||
|
if( topo.size() > 1 )
|
||||||
|
{
|
||||||
|
sprintf( buf, "[%i:%i:%i] CPU %i", tt->package, tt->die, tt->core, i );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf( buf, "[%i:%i] CPU %i", tt->die, tt->core, i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -347,6 +367,8 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Package:", RealToString( tt->package ) );
|
TextFocused( "Package:", RealToString( tt->package ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Die:", RealToString( tt->die ) );
|
||||||
|
ImGui::SameLine();
|
||||||
TextFocused( "Core:", RealToString( tt->core ) );
|
TextFocused( "Core:", RealToString( tt->core ) );
|
||||||
}
|
}
|
||||||
TextFocused( "Context switch regions:", RealToString( cpuData[i].cs.size() ) );
|
TextFocused( "Context switch regions:", RealToString( cpuData[i].cs.size() ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user