Condense hw samples.

This commit is contained in:
Bartosz Taudul 2021-12-29 14:07:37 +01:00
parent 0d5fbff07f
commit 36068d1f2b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3029,7 +3029,7 @@ void SourceView::RenderLine( const Tokenizer::Line& line, int lineNum, const Add
} }
else else
{ {
ImGui::ItemSize( ImVec2( 19 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 17 * ts.x, ts.y ) );
} }
ImGui::SameLine( 0, ty ); ImGui::SameLine( 0, ty );
} }
@ -3340,7 +3340,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
} }
else else
{ {
ImGui::ItemSize( ImVec2( 19 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 17 * ts.x, ts.y ) );
} }
ImGui::SameLine( 0, ty ); ImGui::SameLine( 0, ty );
} }
@ -4084,7 +4084,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
*buf = ' '; *buf = ' ';
const auto end = PrintFloat( buf+1, buf+16, ipc, 2 ); const auto end = PrintFloat( buf+1, buf+16, ipc, 2 );
assert( end == buf + 5 ); assert( end == buf + 5 );
memcpy( end, " ", 3 ); memcpy( end, " ", 2 );
TextColoredUnformatted( col, buf ); TextColoredUnformatted( col, buf );
} }
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
@ -4104,7 +4104,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
} }
else else
{ {
ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 6 * ts.x, ts.y ) );
} }
ImGui::SameLine( 0, 0 ); ImGui::SameLine( 0, 0 );
if( m_hwSamplesRelative ) if( m_hwSamplesRelative )
@ -4131,7 +4131,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
const auto end = PrintFloat( buf+1, buf+16, rate * 100, 1 ); const auto end = PrintFloat( buf+1, buf+16, rate * 100, 1 );
assert( end == buf+4 ); assert( end == buf+4 );
} }
memcpy( buf+4, "% ", 4 ); memcpy( buf+4, "% ", 3 );
TextColoredUnformatted( col, buf ); TextColoredUnformatted( col, buf );
} }
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
@ -4150,7 +4150,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
} }
else else
{ {
ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 6 * ts.x, ts.y ) );
} }
ImGui::SameLine( 0, 0 ); ImGui::SameLine( 0, 0 );
if( cacheRel && cacheRelMax ) if( cacheRel && cacheRelMax )
@ -4224,7 +4224,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
const auto end = PrintFloat( buf+1, buf+16, rate * 100, 1 ); const auto end = PrintFloat( buf+1, buf+16, rate * 100, 1 );
assert( end == buf+4 ); assert( end == buf+4 );
} }
memcpy( buf+4, "% ", 4 ); memcpy( buf+4, "% ", 3 );
TextColoredUnformatted( col, buf ); TextColoredUnformatted( col, buf );
} }
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
@ -4244,7 +4244,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
} }
else else
{ {
ImGui::ItemSize( ImVec2( 7 * ts.x, ts.y ) ); ImGui::ItemSize( ImVec2( 6 * ts.x, ts.y ) );
} }
ImGui::SameLine( 0, 0 ); ImGui::SameLine( 0, 0 );
if( cacheRef ) if( cacheRef )