mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 21:53:52 +00:00
Display number of selected lines.
This commit is contained in:
parent
b9a4446fc1
commit
8cbd209ede
@ -1444,10 +1444,15 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
|
|||||||
if( !m_srcSampleSelect.empty() )
|
if( !m_srcSampleSelect.empty() )
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
|
uint32_t numLines = 0;
|
||||||
for( auto& idx : m_srcSampleSelect )
|
for( auto& idx : m_srcSampleSelect )
|
||||||
{
|
{
|
||||||
auto it = ipcount.find( idx );
|
auto it = ipcount.find( idx );
|
||||||
if( it != ipcount.end() ) count += it->second;
|
if( it != ipcount.end() )
|
||||||
|
{
|
||||||
|
count += it->second;
|
||||||
|
numLines++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::BeginChild( "##srcSelect" );
|
ImGui::BeginChild( "##srcSelect" );
|
||||||
@ -1469,6 +1474,10 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Sample count:", RealToString( count ) );
|
TextFocused( "Sample count:", RealToString( count ) );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Lines:", RealToString( numLines ) );
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1959,10 +1968,15 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
if( !m_asmSampleSelect.empty() )
|
if( !m_asmSampleSelect.empty() )
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
|
uint32_t numLines = 0;
|
||||||
for( auto& idx : m_asmSampleSelect )
|
for( auto& idx : m_asmSampleSelect )
|
||||||
{
|
{
|
||||||
auto it = ipcount.find( m_asm[idx].addr );
|
auto it = ipcount.find( m_asm[idx].addr );
|
||||||
if( it != ipcount.end() ) count += it->second;
|
if( it != ipcount.end() )
|
||||||
|
{
|
||||||
|
count += it->second;
|
||||||
|
numLines++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::BeginChild( "##asmSelect" );
|
ImGui::BeginChild( "##asmSelect" );
|
||||||
@ -1984,6 +1998,10 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Sample count:", RealToString( count ) );
|
TextFocused( "Sample count:", RealToString( count ) );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
|
TextFocused( "Lines:", RealToString( numLines ) );
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user