mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +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;
|
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::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::Text( "Address" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Text( "Size" );
|
ImGui::Text( "Size" );
|
||||||
@ -4815,6 +4815,8 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
ImGui::Text( "Callstack" );
|
||||||
|
ImGui::NextColumn();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
while( ptr != end )
|
while( ptr != end )
|
||||||
@ -4918,6 +4920,34 @@ void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAdd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
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++;
|
ptr++;
|
||||||
}
|
}
|
||||||
ImGui::EndColumns();
|
ImGui::EndColumns();
|
||||||
@ -5537,6 +5567,18 @@ void View::ZoneTooltip( const GpuEvent& ev )
|
|||||||
ImGui::EndTooltip();
|
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
|
const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const
|
||||||
{
|
{
|
||||||
for( const auto& thread : m_worker.GetThreadData() )
|
for( const auto& thread : m_worker.GetThreadData() )
|
||||||
|
@ -110,6 +110,8 @@ private:
|
|||||||
|
|
||||||
void ZoneTooltip( const ZoneEvent& ev );
|
void ZoneTooltip( const ZoneEvent& ev );
|
||||||
void ZoneTooltip( const GpuEvent& ev );
|
void ZoneTooltip( const GpuEvent& ev );
|
||||||
|
void CallstackTooltip( uint32_t idx );
|
||||||
|
|
||||||
const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;
|
const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;
|
||||||
const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;
|
const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;
|
||||||
uint64_t GetZoneThread( const ZoneEvent& zone ) const;
|
uint64_t GetZoneThread( const ZoneEvent& zone ) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user