mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Display raw callstack payload.
This commit is contained in:
parent
4eea85fdad
commit
4ba95145da
@ -4774,7 +4774,7 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
||||
const auto ty = ImGui::GetTextLineHeight() + style.ItemSpacing.y;
|
||||
|
||||
ImGui::BeginChild( "##memScroll", ImVec2( 0, std::max( ty * std::min<int64_t>( dist, 5 ), std::min( ty * dist, ImGui::GetContentRegionAvail().y ) ) ) );
|
||||
ImGui::Columns( 7 );
|
||||
ImGui::Columns( 8 );
|
||||
ImGui::Text( "Address" );
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text( "Size" );
|
||||
@ -4815,6 +4815,8 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text( "Callstack" );
|
||||
ImGui::NextColumn();
|
||||
ImGui::Separator();
|
||||
int idx = 0;
|
||||
while( ptr != end )
|
||||
@ -4918,6 +4920,34 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
||||
}
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
if( v->csAlloc == 0 )
|
||||
{
|
||||
ImGui::TextDisabled( "[alloc]" );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text( "[alloc]" );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
CallstackTooltip( v->csAlloc );
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
if( v->csFree == 0 )
|
||||
{
|
||||
ImGui::TextDisabled( "[free]" );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text( "[free]" );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
CallstackTooltip( v->csFree );
|
||||
}
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
ptr++;
|
||||
}
|
||||
ImGui::EndColumns();
|
||||
@ -5537,6 +5567,18 @@ void View::ZoneTooltip( const GpuEvent& ev )
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
void View::CallstackTooltip( uint32_t idx )
|
||||
{
|
||||
auto& cs = m_worker.GetCallstack( idx );
|
||||
|
||||
ImGui::BeginTooltip();
|
||||
for( auto& entry : cs )
|
||||
{
|
||||
ImGui::Text( "0x%" PRIX64, entry );
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const
|
||||
{
|
||||
for( const auto& thread : m_worker.GetThreadData() )
|
||||
|
@ -110,6 +110,8 @@ private:
|
||||
|
||||
void ZoneTooltip( const ZoneEvent& ev );
|
||||
void ZoneTooltip( const GpuEvent& ev );
|
||||
void CallstackTooltip( uint32_t idx );
|
||||
|
||||
const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;
|
||||
const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;
|
||||
uint64_t GetZoneThread( const ZoneEvent& zone ) const;
|
||||
|
Loading…
Reference in New Issue
Block a user