diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 6d22ee01..a59058e8 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11163,6 +11163,14 @@ void View::DrawStatistics() #else ImGui::Checkbox( "Exclusive", &m_statSelf ); #endif + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + ImGui::TextUnformatted( "Location:" ); + ImGui::SameLine(); + ImGui::RadioButton( "Function entry", &m_statSampleLocation, 0 ); + ImGui::SameLine(); + ImGui::RadioButton( "Instruction", &m_statSampleLocation, 1 ); ImGui::Separator(); ImGui::BeginChild( "##statisticsSampling" ); @@ -11241,9 +11249,17 @@ void View::DrawStatistics() if( sit != symMap.end() ) { name = m_worker.GetString( sit->second.name ); - file = m_worker.GetString( sit->second.file ); imageName = m_worker.GetString( sit->second.imageName ); - line = sit->second.line; + if( m_statSampleLocation == 0 ) + { + file = m_worker.GetString( sit->second.file ); + line = sit->second.line; + } + else + { + file = m_worker.GetString( sit->second.callFile ); + line = sit->second.callLine; + } } ImGui::TextUnformatted( name ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 92a317bc..95a24212 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -345,6 +345,7 @@ private: bool m_statSelf = true; bool m_statSampleTime = true; int m_statMode = 0; + int m_statSampleLocation = 0; int m_showCallstackFrameAddress = 0; bool m_showUnknownFrames = true; bool m_groupChildrenLocations = false;