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

Implement children messages filtering in zone tooltip.

This commit is contained in:
Bartosz Taudul 2022-07-23 13:19:30 +02:00
parent c44075544a
commit 57f03dfe9a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 8 additions and 0 deletions

View File

@ -470,6 +470,7 @@ private:
bool m_allocTimeRelativeToZone = true;
bool m_ctxSwitchTimeRelativeToZone = true;
bool m_messageTimeRelativeToZone = true;
bool m_messagesExcludeChildren = true;
uint64_t m_zoneInfoMemPool = 0;
int m_waitStack = 0;
int m_waitStackMode = 0;

View File

@ -871,6 +871,8 @@ void View::DrawZoneInfoWindow()
{
ImGui::SameLine();
SmallCheckbox( "Time relative to zone start", &m_messageTimeRelativeToZone );
ImGui::SameLine();
SmallCheckbox( "Exclude children", &m_messagesExcludeChildren );
if( ImGui::BeginTable( "##messages", 2, ImGuiTableFlags_ScrollY | ImGuiTableFlags_BordersInnerV, ImVec2( 0, ImGui::GetTextLineHeightWithSpacing() * std::min<int64_t>( msgend-msgit+1, 15 ) ) ) )
{
ImGui::TableSetupScrollFreeze( 0, 1 );
@ -879,6 +881,11 @@ void View::DrawZoneInfoWindow()
ImGui::TableHeadersRow();
do
{
if( m_messagesExcludeChildren )
{
auto msgzone = FindZoneAtTime( tid, (*msgit)->time );
if( msgzone != &ev ) continue;
}
ImGui::PushID( *msgit );
ImGui::TableNextRow();
ImGui::TableNextColumn();