From 90f5ae536c983a443dfbc67e7ee07a7ec89f2507 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 29 Feb 2020 16:32:33 +0100 Subject: [PATCH] Display count of parent call stacks and frames. --- server/TracyView.cpp | 22 ++++++++++++++++++++++ server/TracyWorker.hpp | 2 ++ 2 files changed, 24 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d31cefc7..0d398e15 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11888,7 +11888,29 @@ void View::DrawInfo() TextFocused( "Strings:", RealToString( m_worker.GetStringsCount() ) ); TextFocused( "Symbols:", RealToString( m_worker.GetSymbolsCount() ) ); TextFocused( "Call stacks:", RealToString( m_worker.GetCallstackPayloadCount() ) ); + if( m_worker.AreCallstackSamplesReady() ) + { + ImGui::SameLine(); + TextFocused( "+", RealToString( m_worker.GetCallstackParentPayloadCount() ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Parent call stacks for stack samples" ); + ImGui::EndTooltip(); + } + } TextFocused( "Call stack frames:", RealToString( m_worker.GetCallstackFrameCount() ) ); + if( m_worker.AreCallstackSamplesReady() ) + { + ImGui::SameLine(); + TextFocused( "+", RealToString( m_worker.GetCallstackParentFrameCount() ) ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Parent call stack frames for stack samples" ); + ImGui::EndTooltip(); + } + } TextFocused( "Call stack samples:", RealToString( m_worker.GetCallstackSampleCount() ) ); TextFocused( "Frame images:", RealToString( ficnt ) ); TextFocused( "Context switch regions:", RealToString( m_worker.GetContextSwitchCount() ) ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 335ae285..d6abfaf5 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -361,7 +361,9 @@ public: bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); } uint64_t GetSrcLocCount() const { return m_data.sourceLocationPayload.size() + m_data.sourceLocation.size(); } uint64_t GetCallstackPayloadCount() const { return m_data.callstackPayload.size() - 1; } + uint64_t GetCallstackParentPayloadCount() const { return m_data.parentCallstackPayload.size(); } uint64_t GetCallstackFrameCount() const { return m_data.callstackFrameMap.size(); } + uint64_t GetCallstackParentFrameCount() const { return m_callstackParentNextIdx; } uint64_t GetCallstackSampleCount() const { return m_data.samplesCnt; } uint64_t GetSymbolsCount() const { return m_data.symbolMap.size(); } uint32_t GetFrameImageCount() const { return (uint32_t)m_data.frameImage.size(); }