mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Assembly lines spacing improvements.
This commit is contained in:
parent
3fa5b8f15a
commit
3d0e461140
@ -3248,7 +3248,7 @@ void SourceView::RenderLine( const Tokenizer::Line& line, int lineNum, const Add
|
|||||||
const auto itemsWidth = ( endPos - startPos ).x;
|
const auto itemsWidth = ( endPos - startPos ).x;
|
||||||
const auto fixedWidth = 17 * ts.x;
|
const auto fixedWidth = 17 * ts.x;
|
||||||
ImGui::ItemSize( ImVec2( fixedWidth - itemsWidth, 0 ) );
|
ImGui::ItemSize( ImVec2( fixedWidth - itemsWidth, 0 ) );
|
||||||
ImGui::SameLine( 0, ty );
|
ImGui::SameLine( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto lineCount = m_source.get().size();
|
const auto lineCount = m_source.get().size();
|
||||||
@ -3585,7 +3585,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
const auto itemsWidth = ( endPos - startPos ).x;
|
const auto itemsWidth = ( endPos - startPos ).x;
|
||||||
const auto fixedWidth = 17 * ts.x;
|
const auto fixedWidth = 17 * ts.x;
|
||||||
ImGui::ItemSize( ImVec2( fixedWidth - itemsWidth, 0 ) );
|
ImGui::ItemSize( ImVec2( fixedWidth - itemsWidth, 0 ) );
|
||||||
ImGui::SameLine( 0, ty );
|
ImGui::SameLine( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
@ -3654,7 +3654,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
bool lineHovered = false;
|
bool lineHovered = false;
|
||||||
if( m_asmShowSourceLocation && !m_sourceFiles.empty() )
|
if( m_asmShowSourceLocation && !m_sourceFiles.empty() )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine( 0, stw );
|
||||||
ImVec2 startPos;
|
ImVec2 startPos;
|
||||||
uint32_t srcline;
|
uint32_t srcline;
|
||||||
const auto srcidx = worker.GetLocationForAddress( line.addr, srcline );
|
const auto srcidx = worker.GetLocationForAddress( line.addr, srcline );
|
||||||
@ -3768,7 +3768,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
{
|
{
|
||||||
auto code = (const uint8_t*)worker.GetSymbolCode( m_baseAddr, m_codeLen );
|
auto code = (const uint8_t*)worker.GetSymbolCode( m_baseAddr, m_codeLen );
|
||||||
assert( code );
|
assert( code );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine( 0, stw );
|
||||||
const auto len = PrintHexBytes( code + line.addr - m_baseAddr, line.len, worker.GetCpuArch() );
|
const auto len = PrintHexBytes( code + line.addr - m_baseAddr, line.len, worker.GetCpuArch() );
|
||||||
ImGui::SameLine( 0, 0 );
|
ImGui::SameLine( 0, 0 );
|
||||||
ImGui::ItemSize( ImVec2( stw * ( m_maxAsmBytes*2 - len ), ty ), 0 );
|
ImGui::ItemSize( ImVec2( stw * ( m_maxAsmBytes*2 - len ), ty ), 0 );
|
||||||
@ -4419,9 +4419,8 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16];
|
||||||
*buf = ' ';
|
const auto end = PrintFloat( buf, buf+16, ipc, 2 );
|
||||||
const auto end = PrintFloat( buf+1, buf+16, ipc, 2 );
|
assert( end == buf + 4 );
|
||||||
assert( end == buf + 5 );
|
|
||||||
memcpy( end, " ", 2 );
|
memcpy( end, " ", 2 );
|
||||||
TextColoredUnformatted( col, buf );
|
TextColoredUnformatted( col, buf );
|
||||||
}
|
}
|
||||||
@ -4442,7 +4441,7 @@ void SourceView::RenderHwLinePart( size_t cycles, size_t retired, size_t branchR
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui::ItemSize( ImVec2( 6 * ts.x, ts.y ) );
|
ImGui::ItemSize( ImVec2( 5 * ts.x, ts.y ) );
|
||||||
}
|
}
|
||||||
ImGui::SameLine( 0, 0 );
|
ImGui::SameLine( 0, 0 );
|
||||||
if( m_hwSamplesRelative )
|
if( m_hwSamplesRelative )
|
||||||
|
Loading…
Reference in New Issue
Block a user