mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Add minimal trace info window.
This commit is contained in:
parent
a51da71fa4
commit
29c6498890
@ -241,6 +241,7 @@ View::View( const char* addr )
|
||||
, m_showOptions( false )
|
||||
, m_showMessages( false )
|
||||
, m_showStatistics( false )
|
||||
, m_showInfo( false )
|
||||
, m_drawGpuZones( true )
|
||||
, m_drawZones( true )
|
||||
, m_drawLocks( true )
|
||||
@ -283,6 +284,7 @@ View::View( FileRead& f )
|
||||
, m_showOptions( false )
|
||||
, m_showMessages( false )
|
||||
, m_showStatistics( false )
|
||||
, m_showInfo( false )
|
||||
, m_drawGpuZones( true )
|
||||
, m_drawZones( true )
|
||||
, m_drawLocks( true )
|
||||
@ -422,6 +424,8 @@ bool View::DrawImpl()
|
||||
ImGui::SameLine();
|
||||
if( ImGui::Button( "Compare" ) ) m_compare.show = true;
|
||||
ImGui::SameLine();
|
||||
if( ImGui::Button( "Info" ) ) m_showInfo = true;
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( "<" ) ) ZoomToPrevFrame();
|
||||
ImGui::SameLine();
|
||||
{
|
||||
@ -475,6 +479,7 @@ bool View::DrawImpl()
|
||||
if( m_compare.show ) DrawCompare();
|
||||
if( m_callstackInfoWindow != 0 ) DrawCallstackWindow();
|
||||
if( m_memoryAllocInfoWindow >= 0 ) DrawMemoryAllocWindow();
|
||||
if( m_showInfo ) DrawInfo();
|
||||
|
||||
if( m_zoomAnim.active )
|
||||
{
|
||||
@ -5655,6 +5660,22 @@ void View::DrawMemoryAllocWindow()
|
||||
if( !show ) m_memoryAllocInfoWindow = -1;
|
||||
}
|
||||
|
||||
void View::DrawInfo()
|
||||
{
|
||||
ImGui::Begin( "Trace information", &m_showInfo );
|
||||
TextFocused( "Queue delay:", TimeToString( m_worker.GetDelay() ) );
|
||||
TextFocused( "Timer resolution:", TimeToString( m_worker.GetResolution() ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Zones:", RealToString( m_worker.GetZoneCount(), true ) );
|
||||
TextFocused( "Lock events:", RealToString( m_worker.GetLockCount(), true ) );
|
||||
TextFocused( "Plot data points:", RealToString( m_worker.GetPlotCount(), true ) );
|
||||
TextFocused( "Memory allocations:", RealToString( m_worker.GetMemData().data.size(), true ) );
|
||||
ImGui::Separator();
|
||||
TextFocused( "Frame set:", m_frames->name == 0 ? "Frames" : m_worker.GetString( m_frames->name ) );
|
||||
TextFocused( "Count:", RealToString( m_frames->frames.size(), true ) );
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id )
|
||||
{
|
||||
|
@ -85,6 +85,7 @@ private:
|
||||
void DrawCompare();
|
||||
void DrawCallstackWindow();
|
||||
void DrawMemoryAllocWindow();
|
||||
void DrawInfo();
|
||||
|
||||
template<class T>
|
||||
void ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const char* id = nullptr );
|
||||
@ -209,6 +210,7 @@ private:
|
||||
bool m_showOptions;
|
||||
bool m_showMessages;
|
||||
bool m_showStatistics;
|
||||
bool m_showInfo;
|
||||
bool m_drawGpuZones;
|
||||
bool m_drawZones;
|
||||
bool m_drawLocks;
|
||||
|
Loading…
Reference in New Issue
Block a user