From fe98921e4c9799b805754b1d64dd06e58ca342ab Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 8 Apr 2020 15:52:53 +0200 Subject: [PATCH] Add UI for disabling inlines in sample statistics. --- manual/tracy.tex | 2 +- server/TracyView.cpp | 10 ++-------- server/TracyView.hpp | 1 + 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/manual/tracy.tex b/manual/tracy.tex index 80a1364b..96623345 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -2254,7 +2254,7 @@ First and foremost, the presented information is constructed from a number of ca The \emph{Name} column contains name of the function in which the sampling was done. Functions which were inlined are preceded with a '\faCaretRight{}' symbol and additionally display their parent function in parenthesis. Clicking on a function will open the call stack sample parents window (see chapter~\ref{sampleparents}). Note that if inclusive times are displayed, listed functions will be partially or completely coming from mid-stack frames, which will prevent, or limit the capability to display parent call stacks. -The \emph{Location} column displays the corresponding source file name and line number. Depending on the \emph{Location} option selection it can either show function entry address, or the instruction at which the sampling was performed. The \emph{Entry point} mode points at the beginning of a non-inlined function, or at the place where inlined function was inserted in its parent function. The \emph{Sample} mode is not useful for non-inlined functions, as it points to one randomly selected sampling point out of many that were captured. However, in case of inlined functions, this random sampling point is within the inlined function body. Using these options in tandem enable you to look at both the inlined function code and the place where it was inserted. If the \emph{Smart} location is selected, profiler will display entry point position for non-inlined functions and sample location for inlined functions. +The \emph{Location} column displays the corresponding source file name and line number. Depending on the \emph{Location} option selection it can either show function entry address, or the instruction at which the sampling was performed. The \emph{Entry} mode points at the beginning of a non-inlined function, or at the place where inlined function was inserted in its parent function. The \emph{Sample} mode is not useful for non-inlined functions, as it points to one randomly selected sampling point out of many that were captured. However, in case of inlined functions, this random sampling point is within the inlined function body. Using these options in tandem enable you to look at both the inlined function code and the place where it was inserted. If the \emph{Smart} location is selected, profiler will display entry point position for non-inlined functions and sample location for inlined functions. The location data is complemented by the originating executable image name, contained in the \emph{Image} column. diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 5b5ddaca..34ef6388 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11263,25 +11263,19 @@ void View::DrawStatistics() ImGui::SameLine(); ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime ); ImGui::SameLine(); - ImGui::Spacing(); - ImGui::SameLine(); ImGui::Checkbox( ICON_FA_CLOCK " Self time", &m_statSelf ); ImGui::SameLine(); - ImGui::Spacing(); - ImGui::SameLine(); ImGui::Checkbox( ICON_FA_EYE_SLASH " Hide unknown", &m_statHideUnknown ); ImGui::SameLine(); - ImGui::Spacing(); - ImGui::SameLine(); ImGui::Checkbox( ICON_FA_PUZZLE_PIECE " Show all", &m_showAllSymbols ); ImGui::SameLine(); - ImGui::Spacing(); + ImGui::Checkbox( ICON_FA_SITEMAP " Inlines", &m_statSeparateInlines ); ImGui::SameLine(); ImGui::TextUnformatted( "Location:" ); ImGui::SameLine(); ImGui::RadioButton( "Smart", &m_statSampleLocation, 2 ); ImGui::SameLine(); - ImGui::RadioButton( "Entry point", &m_statSampleLocation, 0 ); + ImGui::RadioButton( "Entry", &m_statSampleLocation, 0 ); ImGui::SameLine(); ImGui::RadioButton( "Sample", &m_statSampleLocation, 1 ); ImGui::Separator(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index a33966ed..04f88d72 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -361,6 +361,7 @@ private: bool m_showAllSymbols = false; int m_showCallstackFrameAddress = 0; bool m_showUnknownFrames = true; + bool m_statSeparateInlines = true; bool m_groupChildrenLocations = false; bool m_allocTimeRelativeToZone = true; bool m_ctxSwitchTimeRelativeToZone = true;