1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Don't display hw samples as time in selected lines summary.

This commit is contained in:
Bartosz Taudul 2021-06-20 16:01:19 +02:00
parent e9aca02880
commit 0e0692b7f7
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1936,6 +1936,8 @@ void SourceView::RenderSymbolSourceView( const AddrStat& iptotal, const unordere
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
if( m_cost == CostType::SampleCount )
{
if( m_childCalls ) if( m_childCalls )
{ {
TextFocused( "Time:", TimeToString( ( count.local + count.ext ) * worker.GetSamplingPeriod() ) ); TextFocused( "Time:", TimeToString( ( count.local + count.ext ) * worker.GetSamplingPeriod() ) );
@ -1955,6 +1957,11 @@ void SourceView::RenderSymbolSourceView( const AddrStat& iptotal, const unordere
{ {
TextFocused( "Sample count:", RealToString( count.local ) ); TextFocused( "Sample count:", RealToString( count.local ) );
} }
}
else
{
TextFocused( "Events:", RealToString( count.local ) );
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
@ -2537,6 +2544,8 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStat& iptotal, const unorder
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();
if( m_cost == CostType::SampleCount )
{
if( m_childCalls ) if( m_childCalls )
{ {
TextFocused( "Time:", TimeToString( ( count.local + count.ext ) * worker.GetSamplingPeriod() ) ); TextFocused( "Time:", TimeToString( ( count.local + count.ext ) * worker.GetSamplingPeriod() ) );
@ -2556,6 +2565,11 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStat& iptotal, const unorder
{ {
TextFocused( "Sample count:", RealToString( count.local ) ); TextFocused( "Sample count:", RealToString( count.local ) );
} }
}
else
{
TextFocused( "Events:", RealToString( count.local ) );
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();
ImGui::SameLine(); ImGui::SameLine();