From 0c1388958917731327cc0cca3a9c84bec6cc3fee Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 12 Jun 2021 16:09:15 +0200 Subject: [PATCH] Distinguish kernel symbols on statistics list. --- server/TracyView.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7bcac8ae..7f40ba3f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -13082,15 +13082,22 @@ void View::DrawStatistics() } if( v.symAddr == 0 || excl == 0 ) { - ImGui::TextUnformatted( name ); + if( isKernel ) + { + TextColoredUnformatted( 0xFF8888FF, name ); + } + else + { + ImGui::TextUnformatted( name ); + } } else { ImGui::PushID( idx++ ); - if( ImGui::Selectable( name, m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ) ) - { - ShowSampleParents( v.symAddr ); - } + if( isKernel ) ImGui::PushStyleColor( ImGuiCol_Text, 0xFF8888FF ); + const auto clicked = ImGui::Selectable( name, m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ); + if( isKernel ) ImGui::PopStyleColor(); + if( clicked ) ShowSampleParents( v.symAddr ); ImGui::PopID(); } if( parentName )