1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Add a function for showing sample parents.

This commit is contained in:
Bartosz Taudul 2020-05-10 16:07:45 +02:00
parent 91bb392678
commit fdd50840a7
2 changed files with 5 additions and 6 deletions

View File

@ -11714,8 +11714,7 @@ void View::DrawStatistics()
ImGui::PushID( idx++ ); ImGui::PushID( idx++ );
if( ImGui::Selectable( name, m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ) ) if( ImGui::Selectable( name, m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ) )
{ {
m_sampleParents.symAddr = v.symAddr; ShowSampleParents( v.symAddr );
m_sampleParents.sel = 0;
} }
ImGui::PopID(); ImGui::PopID();
} }
@ -11883,8 +11882,7 @@ void View::DrawStatistics()
} }
else if( ImGui::Selectable( name, m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ) ) else if( ImGui::Selectable( name, m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ) )
{ {
m_sampleParents.symAddr = iv.symAddr; ShowSampleParents( iv.symAddr );
m_sampleParents.sel = 0;
} }
ImGui::PopID(); ImGui::PopID();
ImGui::NextColumn(); ImGui::NextColumn();
@ -11997,8 +11995,7 @@ void View::DrawCallstackWindow()
ImGui::SameLine(); ImGui::SameLine();
if( ImGui::Button( ICON_FA_DOOR_OPEN " Global entry statistics" ) ) if( ImGui::Button( ICON_FA_DOOR_OPEN " Global entry statistics" ) )
{ {
m_sampleParents.symAddr = frame->data[0].symAddr; ShowSampleParents( frame->data[0].symAddr );
m_sampleParents.sel = 0;
} }
} }
} }

View File

@ -92,6 +92,8 @@ public:
const char* SourceSubstitution( const char* srcFile ) const; const char* SourceSubstitution( const char* srcFile ) const;
void ShowSampleParents( uint64_t symAddr ) { m_sampleParents.symAddr = symAddr; m_sampleParents.sel = 0; }
private: private:
enum class Namespace : uint8_t enum class Namespace : uint8_t
{ {