Dim external frames in local call stacks.

This commit is contained in:
Bartosz Taudul
2026-05-29 00:34:05 +02:00
parent d06755652f
commit 33905b2f15
2 changed files with 21 additions and 3 deletions

View File

@@ -2624,9 +2624,13 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : symName;
const auto fn = worker.GetString( lcs->data[i].file );
const auto srcline = lcs->data[i].line;
const auto external = worker.IsFrameExternal( lcs->data[i].file, lcs->imageName );
if( srcline != 0 )
{
if( ImGui::BeginMenu( normalized ) )
if( external ) ImGui::PushStyleColor( ImGuiCol_Text, ImGui::GetStyle().Colors[ImGuiCol_TextDisabled] );
const auto extend = ImGui::BeginMenu( normalized );
if( external ) ImGui::PopStyleColor();
if( extend )
{
if( SourceFileValid( fn, worker.GetCaptureTime(), view, worker ) )
{
@@ -2666,7 +2670,14 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
}
else
{
ImGui::TextDisabled( "%s", normalized );
if( external )
{
TextDisabledUnformatted( normalized );
}
else
{
ImGui::TextUnformatted( normalized );
}
}
ImGui::PopID();
}

View File

@@ -223,7 +223,14 @@ void PrintLocalStack( const CallstackFrameData* frame, const Worker& worker, con
ImGui::SameLine();
const auto symName = worker.GetString( frame->data[i].name );
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : symName;
ImGui::Text( "%s", normalized );
if( worker.IsFrameExternal( frame->data[i].file, frame->imageName ) )
{
TextDisabledUnformatted( normalized );
}
else
{
ImGui::TextUnformatted( normalized );
}
ImGui::SameLine();
ImGui::PushFont( g_fonts.normal, FontSmall );
ImGui::AlignTextToFramePadding();