From 7ce915c4f6d9b9d5327627cb13819e26ef7bb728 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 30 May 2020 15:31:41 +0200 Subject: [PATCH] Allow display of symbol address in statistics view. --- server/TracyView.cpp | 14 ++++++++++++-- server/TracyView.hpp | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index f214e9ac..a0471528 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11538,6 +11538,8 @@ void View::DrawStatistics() ImGui::SameLine(); ImGui::Checkbox( ICON_FA_SITEMAP " Inlines", &m_statSeparateInlines ); ImGui::SameLine(); + ImGui::Checkbox( ICON_FA_AT " Address", &m_statShowAddress ); + ImGui::SameLine(); ImGui::TextUnformatted( "Location:" ); ImGui::SameLine(); const char* locationTable = "Entry\0Sample\0Smart"; @@ -11847,7 +11849,11 @@ void View::DrawStatistics() indentVal = sin( time * 60.f ) * 10.f * time; ImGui::Indent( indentVal ); } - if( line > 0 ) + if( m_statShowAddress ) + { + ImGui::TextDisabled( "0x%" PRIx64, v.symAddr ); + } + else if( line > 0 ) { ImGui::TextDisabled( "%s:%i", file, line ); } @@ -12008,7 +12014,11 @@ void View::DrawStatistics() indentVal = sin( time * 60.f ) * 10.f * time; ImGui::Indent( indentVal ); } - if( line > 0 ) + if( m_statShowAddress ) + { + ImGui::TextDisabled( "0x%" PRIx64, iv.symAddr ); + } + else if( line > 0 ) { ImGui::TextDisabled( "%s:%i", file, line ); } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index c40d9558..3bad1bc9 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -371,6 +371,7 @@ private: int m_showCallstackFrameAddress = 0; bool m_showUnknownFrames = true; bool m_statSeparateInlines = false; + bool m_statShowAddress = false; bool m_groupChildrenLocations = false; bool m_allocTimeRelativeToZone = true; bool m_ctxSwitchTimeRelativeToZone = true;