mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Normalize frame names in sample parents call stack view.
This commit is contained in:
parent
6932eb4b79
commit
389cf135c0
@ -664,8 +664,10 @@ void View::DrawSampleParents()
|
|||||||
}
|
}
|
||||||
assert( !stats.empty() );
|
assert( !stats.empty() );
|
||||||
|
|
||||||
|
const auto symName = m_worker.GetString( symbol->name );
|
||||||
|
const char* normalized = m_shortenName != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : nullptr;
|
||||||
ImGui::PushFont( m_bigFont );
|
ImGui::PushFont( m_bigFont );
|
||||||
TextFocused( "Symbol:", m_worker.GetString( symbol->name ) );
|
TextFocused( "Symbol:", normalized ? normalized : symName );
|
||||||
if( symbol->isInline )
|
if( symbol->isInline )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -677,6 +679,12 @@ void View::DrawSampleParents()
|
|||||||
TextDisabledUnformatted( "(without inlines)" );
|
TextDisabledUnformatted( "(without inlines)" );
|
||||||
}
|
}
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
|
if( normalized && normalized != symName && strcmp( normalized, symName ) != 0 )
|
||||||
|
{
|
||||||
|
ImGui::PushFont( m_smallFont );
|
||||||
|
TextDisabledUnformatted( symName );
|
||||||
|
ImGui::PopFont();
|
||||||
|
}
|
||||||
TextDisabledUnformatted( "Location:" );
|
TextDisabledUnformatted( "Location:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
const auto callFile = m_worker.GetString( symbol->callFile );
|
const auto callFile = m_worker.GetString( symbol->callFile );
|
||||||
@ -816,10 +824,16 @@ void View::DrawSampleParents()
|
|||||||
{
|
{
|
||||||
TextColoredUnformatted( 0xFF8888FF, txt );
|
TextColoredUnformatted( 0xFF8888FF, txt );
|
||||||
}
|
}
|
||||||
else
|
else if( m_shortenName == ShortenName::Never )
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( txt );
|
ImGui::TextUnformatted( txt );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, txt );
|
||||||
|
ImGui::TextUnformatted( normalized );
|
||||||
|
TooltipNormalizedName( txt, normalized );
|
||||||
|
}
|
||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
}
|
}
|
||||||
if( ImGui::IsItemClicked() )
|
if( ImGui::IsItemClicked() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user