Allow displaying instruction location.

This commit is contained in:
Bartosz Taudul 2020-02-27 15:10:50 +01:00
parent 7dd929a39e
commit bc18862dc6
2 changed files with 19 additions and 2 deletions

View File

@ -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,10 +11249,18 @@ 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 );
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 );
ImGui::NextColumn();

View File

@ -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;