mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Perform source file name substitution.
This commit is contained in:
parent
47cfb4ae35
commit
01d7fefe52
@ -113,6 +113,7 @@
|
|||||||
<ClCompile Include="..\..\..\nfd\nfd_win.cpp" />
|
<ClCompile Include="..\..\..\nfd\nfd_win.cpp" />
|
||||||
<ClCompile Include="..\..\..\server\TracyBadVersion.cpp" />
|
<ClCompile Include="..\..\..\server\TracyBadVersion.cpp" />
|
||||||
<ClCompile Include="..\..\..\server\TracyColor.cpp" />
|
<ClCompile Include="..\..\..\server\TracyColor.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\server\TracyFilesystem.cpp" />
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
|
<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
|
<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
|
||||||
<ClCompile Include="..\..\..\server\TracyPrint.cpp" />
|
<ClCompile Include="..\..\..\server\TracyPrint.cpp" />
|
||||||
|
@ -195,6 +195,9 @@
|
|||||||
<ClCompile Include="..\..\..\server\TracyColor.cpp">
|
<ClCompile Include="..\..\..\server\TracyColor.cpp">
|
||||||
<Filter>server</Filter>
|
<Filter>server</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\server\TracyFilesystem.cpp">
|
||||||
|
<Filter>server</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\..\common\tracy_lz4.hpp">
|
<ClInclude Include="..\..\..\common\tracy_lz4.hpp">
|
||||||
|
17
server/TracyFilesystem.cpp
Normal file
17
server/TracyFilesystem.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "TracyFilesystem.hpp"
|
||||||
|
#include "TracyView.hpp"
|
||||||
|
|
||||||
|
namespace tracy
|
||||||
|
{
|
||||||
|
|
||||||
|
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view )
|
||||||
|
{
|
||||||
|
struct stat buf;
|
||||||
|
if( stat( view.SourceSubstitution( fn ), &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||||
|
{
|
||||||
|
return (uint64_t)buf.st_mtime < olderThan;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,26 +1,21 @@
|
|||||||
#ifndef __TRACYFILESYSTEM_HPP__
|
#ifndef __TRACYFILESYSTEM_HPP__
|
||||||
#define __TRACYFILESYSTEM_HPP__
|
#define __TRACYFILESYSTEM_HPP__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class View;
|
||||||
|
|
||||||
static inline bool FileExists( const char* fn )
|
static inline bool FileExists( const char* fn )
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
|
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool SourceFileValid( const char* fn, uint64_t olderThan )
|
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view );
|
||||||
{
|
|
||||||
struct stat buf;
|
|
||||||
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
|
||||||
{
|
|
||||||
return (uint64_t)buf.st_mtime < olderThan;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::Render( const Worker& worker )
|
void SourceView::Render( const Worker& worker, const View& view )
|
||||||
{
|
{
|
||||||
m_highlightAddr.Decay( 0 );
|
m_highlightAddr.Decay( 0 );
|
||||||
m_hoveredLine.Decay( 0 );
|
m_hoveredLine.Decay( 0 );
|
||||||
@ -342,7 +342,7 @@ void SourceView::Render( const Worker& worker )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RenderSymbolView( worker );
|
RenderSymbolView( worker, view );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ void SourceView::RenderSimpleSourceView()
|
|||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::RenderSymbolView( const Worker& worker )
|
void SourceView::RenderSymbolView( const Worker& worker, const View& view )
|
||||||
{
|
{
|
||||||
assert( m_symAddr != 0 );
|
assert( m_symAddr != 0 );
|
||||||
|
|
||||||
@ -558,16 +558,16 @@ void SourceView::RenderSymbolView( const Worker& worker )
|
|||||||
switch( m_displayMode )
|
switch( m_displayMode )
|
||||||
{
|
{
|
||||||
case DisplaySource:
|
case DisplaySource:
|
||||||
RenderSymbolSourceView( iptotalSrc, ipcountSrc, ipcountAsm, ipmaxSrc, worker );
|
RenderSymbolSourceView( iptotalSrc, ipcountSrc, ipcountAsm, ipmaxSrc, worker, view );
|
||||||
break;
|
break;
|
||||||
case DisplayAsm:
|
case DisplayAsm:
|
||||||
jumpOut = RenderSymbolAsmView( iptotalAsm, ipcountAsm, ipmaxAsm, worker );
|
jumpOut = RenderSymbolAsmView( iptotalAsm, ipcountAsm, ipmaxAsm, worker, view );
|
||||||
break;
|
break;
|
||||||
case DisplayMixed:
|
case DisplayMixed:
|
||||||
ImGui::Columns( 2 );
|
ImGui::Columns( 2 );
|
||||||
RenderSymbolSourceView( iptotalSrc, ipcountSrc, ipcountAsm, ipmaxSrc, worker );
|
RenderSymbolSourceView( iptotalSrc, ipcountSrc, ipcountAsm, ipmaxSrc, worker, view );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
jumpOut = RenderSymbolAsmView( iptotalAsm, ipcountAsm, ipmaxAsm, worker );
|
jumpOut = RenderSymbolAsmView( iptotalAsm, ipcountAsm, ipmaxAsm, worker, view );
|
||||||
ImGui::EndColumns();
|
ImGui::EndColumns();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -582,7 +582,7 @@ void SourceView::RenderSymbolView( const Worker& worker )
|
|||||||
{
|
{
|
||||||
auto line = sym->line;
|
auto line = sym->line;
|
||||||
auto file = line == 0 ? nullptr : worker.GetString( sym->file );
|
auto file = line == 0 ? nullptr : worker.GetString( sym->file );
|
||||||
if( file && !SourceFileValid( file, worker.GetCaptureTime() ) )
|
if( file && !SourceFileValid( file, worker.GetCaptureTime(), view ) )
|
||||||
{
|
{
|
||||||
file = nullptr;
|
file = nullptr;
|
||||||
line = 0;
|
line = 0;
|
||||||
@ -620,7 +620,7 @@ static uint32_t GetHotnessColor( uint32_t ipSum, uint32_t maxIpCount )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, unordered_flat_map<uint64_t, uint32_t> ipcountAsm, uint32_t ipmax, const Worker& worker )
|
void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, unordered_flat_map<uint64_t, uint32_t> ipcountAsm, uint32_t ipmax, const Worker& worker, const View& view )
|
||||||
{
|
{
|
||||||
if( m_sourceFiles.empty() )
|
if( m_sourceFiles.empty() )
|
||||||
{
|
{
|
||||||
@ -661,7 +661,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
|
|||||||
SmallColorBox( color );
|
SmallColorBox( color );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
auto fstr = worker.GetString( StringIdx( v.first ) );
|
auto fstr = worker.GetString( StringIdx( v.first ) );
|
||||||
if( SourceFileValid( fstr, worker.GetCaptureTime() ) )
|
if( SourceFileValid( fstr, worker.GetCaptureTime(), view ) )
|
||||||
{
|
{
|
||||||
ImGui::PushID( v.first );
|
ImGui::PushID( v.first );
|
||||||
if( ImGui::Selectable( fstr, fstr == m_file ) )
|
if( ImGui::Selectable( fstr, fstr == m_file ) )
|
||||||
@ -740,7 +740,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
|
|||||||
SmallColorBox( color );
|
SmallColorBox( color );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
auto fstr = worker.GetString( StringIdx( v.first ) );
|
auto fstr = worker.GetString( StringIdx( v.first ) );
|
||||||
if( SourceFileValid( fstr, worker.GetCaptureTime() ) )
|
if( SourceFileValid( fstr, worker.GetCaptureTime(), view ) )
|
||||||
{
|
{
|
||||||
ImGui::PushID( v.first );
|
ImGui::PushID( v.first );
|
||||||
if( ImGui::Selectable( fstr, fstr == m_file, ImGuiSelectableFlags_SpanAllColumns ) )
|
if( ImGui::Selectable( fstr, fstr == m_file, ImGuiSelectableFlags_SpanAllColumns ) )
|
||||||
@ -880,7 +880,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
|
|||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, uint32_t ipmax, const Worker& worker )
|
uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, uint32_t ipmax, const Worker& worker, const View& view )
|
||||||
{
|
{
|
||||||
SmallCheckbox( ICON_FA_SEARCH_LOCATION " Relative locations", &m_asmRelative );
|
SmallCheckbox( ICON_FA_SEARCH_LOCATION " Relative locations", &m_asmRelative );
|
||||||
if( !m_sourceFiles.empty() )
|
if( !m_sourceFiles.empty() )
|
||||||
@ -919,7 +919,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
m_targetAddr = 0;
|
m_targetAddr = 0;
|
||||||
ImGui::SetScrollHereY();
|
ImGui::SetScrollHereY();
|
||||||
}
|
}
|
||||||
RenderAsmLine( line, 0, iptotal, ipmax, worker, jumpOut, maxAddrLen );
|
RenderAsmLine( line, 0, iptotal, ipmax, worker, jumpOut, maxAddrLen, view );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -936,7 +936,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
{
|
{
|
||||||
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
|
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
|
||||||
{
|
{
|
||||||
RenderAsmLine( m_asm[i], 0, 0, 0, worker, jumpOut, maxAddrLen );
|
RenderAsmLine( m_asm[i], 0, 0, 0, worker, jumpOut, maxAddrLen, view );
|
||||||
insList.emplace_back( m_asm[i].addr );
|
insList.emplace_back( m_asm[i].addr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -947,7 +947,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
|
|||||||
auto& line = m_asm[i];
|
auto& line = m_asm[i];
|
||||||
auto it = ipcount.find( line.addr );
|
auto it = ipcount.find( line.addr );
|
||||||
const auto ipcnt = it == ipcount.end() ? 0 : it->second;
|
const auto ipcnt = it == ipcount.end() ? 0 : it->second;
|
||||||
RenderAsmLine( line, ipcnt, iptotal, ipmax, worker, jumpOut, maxAddrLen );
|
RenderAsmLine( line, ipcnt, iptotal, ipmax, worker, jumpOut, maxAddrLen, view );
|
||||||
insList.emplace_back( line.addr );
|
insList.emplace_back( line.addr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1279,7 +1279,7 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint
|
|||||||
draw->AddLine( wpos + ImVec2( 0, ty+2 ), wpos + ImVec2( w, ty+2 ), 0x08FFFFFF );
|
draw->AddLine( wpos + ImVec2( 0, ty+2 ), wpos + ImVec2( w, ty+2 ), 0x08FFFFFF );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker& worker, uint64_t& jumpOut, int maxAddrLen )
|
void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker& worker, uint64_t& jumpOut, int maxAddrLen, const View& view )
|
||||||
{
|
{
|
||||||
const auto ty = ImGui::GetFontSize();
|
const auto ty = ImGui::GetFontSize();
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
@ -1379,7 +1379,7 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
|
|||||||
SelectLine( srcline, &worker, false );
|
SelectLine( srcline, &worker, false );
|
||||||
m_displayMode = DisplayMixed;
|
m_displayMode = DisplayMixed;
|
||||||
}
|
}
|
||||||
else if( SourceFileValid( fileName, worker.GetCaptureTime() ) )
|
else if( SourceFileValid( fileName, worker.GetCaptureTime(), view ) )
|
||||||
{
|
{
|
||||||
ParseSource( fileName, &worker );
|
ParseSource( fileName, &worker );
|
||||||
m_targetLine = srcline;
|
m_targetLine = srcline;
|
||||||
|
@ -12,6 +12,7 @@ struct ImFont;
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class View;
|
||||||
class Worker;
|
class Worker;
|
||||||
|
|
||||||
class SourceView
|
class SourceView
|
||||||
@ -51,7 +52,7 @@ public:
|
|||||||
|
|
||||||
void OpenSource( const char* fileName, int line );
|
void OpenSource( const char* fileName, int line );
|
||||||
void OpenSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr, const Worker& worker );
|
void OpenSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr, const Worker& worker );
|
||||||
void Render( const Worker& worker );
|
void Render( const Worker& worker, const View& view );
|
||||||
|
|
||||||
void CalcInlineStats( bool val ) { m_calcInlineStats = val; }
|
void CalcInlineStats( bool val ) { m_calcInlineStats = val; }
|
||||||
|
|
||||||
@ -60,13 +61,13 @@ private:
|
|||||||
bool Disassemble( uint64_t symAddr, const Worker& worker );
|
bool Disassemble( uint64_t symAddr, const Worker& worker );
|
||||||
|
|
||||||
void RenderSimpleSourceView();
|
void RenderSimpleSourceView();
|
||||||
void RenderSymbolView( const Worker& worker );
|
void RenderSymbolView( const Worker& worker, const View& view );
|
||||||
|
|
||||||
void RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, unordered_flat_map<uint64_t, uint32_t> ipcountAsm, uint32_t ipmax, const Worker& worker );
|
void RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, unordered_flat_map<uint64_t, uint32_t> ipcountAsm, uint32_t ipmax, const Worker& worker, const View& view );
|
||||||
uint64_t RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, uint32_t ipmax, const Worker& worker );
|
uint64_t RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<uint64_t, uint32_t> ipcount, uint32_t ipmax, const Worker& worker, const View& view );
|
||||||
|
|
||||||
void RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker* worker );
|
void RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker* worker );
|
||||||
void RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker& worker, uint64_t& jumpOut, int maxAddrLen );
|
void RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, uint32_t ipmax, const Worker& worker, uint64_t& jumpOut, int maxAddrLen, const View& view );
|
||||||
|
|
||||||
void SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
void SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
||||||
void SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
void SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
|
||||||
|
@ -27,12 +27,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "tracy_pdqsort.h"
|
#include "tracy_pdqsort.h"
|
||||||
#include "TracyBadVersion.hpp"
|
|
||||||
#include "TracyColor.hpp"
|
#include "TracyColor.hpp"
|
||||||
#include "TracyFileRead.hpp"
|
#include "TracyFileRead.hpp"
|
||||||
#include "TracyFileWrite.hpp"
|
#include "TracyFileWrite.hpp"
|
||||||
#include "TracyFilesystem.hpp"
|
#include "TracyFilesystem.hpp"
|
||||||
#include "TracyImGui.hpp"
|
|
||||||
#include "TracyPopcnt.hpp"
|
#include "TracyPopcnt.hpp"
|
||||||
#include "TracyPrint.hpp"
|
#include "TracyPrint.hpp"
|
||||||
#include "TracySort.hpp"
|
#include "TracySort.hpp"
|
||||||
@ -215,7 +213,7 @@ bool View::ViewDispatch( const char* fileName, int line, uint64_t symAddr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( !SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( !SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
fileName = nullptr;
|
fileName = nullptr;
|
||||||
line = 0;
|
line = 0;
|
||||||
@ -6264,7 +6262,7 @@ void View::DrawZoneInfoWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto fileName = m_worker.GetString( srcloc.file );
|
const auto fileName = m_worker.GetString( srcloc.file );
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
bool hilite = m_sourceViewFile == fileName;
|
bool hilite = m_sourceViewFile == fileName;
|
||||||
@ -6795,7 +6793,7 @@ void View::DrawZoneInfoWindow()
|
|||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, srcloc.line );
|
ViewSource( fileName, srcloc.line );
|
||||||
}
|
}
|
||||||
@ -7217,7 +7215,7 @@ void View::DrawGpuInfoWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto fileName = m_worker.GetString( srcloc.file );
|
const auto fileName = m_worker.GetString( srcloc.file );
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
bool hilite = m_sourceViewFile == fileName;
|
bool hilite = m_sourceViewFile == fileName;
|
||||||
@ -7332,7 +7330,7 @@ void View::DrawGpuInfoWindow()
|
|||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, srcloc.line );
|
ViewSource( fileName, srcloc.line );
|
||||||
}
|
}
|
||||||
@ -7908,7 +7906,7 @@ void View::DrawOptions()
|
|||||||
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, sl.line );
|
ViewSource( fileName, sl.line );
|
||||||
}
|
}
|
||||||
@ -7982,7 +7980,7 @@ void View::DrawOptions()
|
|||||||
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, sl.line );
|
ViewSource( fileName, sl.line );
|
||||||
}
|
}
|
||||||
@ -8056,7 +8054,7 @@ void View::DrawOptions()
|
|||||||
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, sl.line );
|
ViewSource( fileName, sl.line );
|
||||||
}
|
}
|
||||||
@ -8627,7 +8625,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::TextColored( ImVec4( 0.5, 0.5, 0.5, 1 ), "(%s) %s:%i", RealToString( zones.size() ), fileName, srcloc.line );
|
ImGui::TextColored( ImVec4( 0.5, 0.5, 0.5, 1 ), "(%s) %s:%i", RealToString( zones.size() ), fileName, srcloc.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, srcloc.line );
|
ViewSource( fileName, srcloc.line );
|
||||||
}
|
}
|
||||||
@ -11260,7 +11258,7 @@ void View::DrawStatistics()
|
|||||||
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
|
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( file, srcloc.line );
|
ViewSource( file, srcloc.line );
|
||||||
}
|
}
|
||||||
@ -11625,7 +11623,7 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSymbol( file, line, codeAddr, v.symAddr );
|
ViewSymbol( file, line, codeAddr, v.symAddr );
|
||||||
if( !m_statSeparateInlines ) m_sourceView->CalcInlineStats( false );
|
if( !m_statSeparateInlines ) m_sourceView->CalcInlineStats( false );
|
||||||
@ -11783,7 +11781,7 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSymbol( file, line, codeAddr, iv.symAddr );
|
ViewSymbol( file, line, codeAddr, iv.symAddr );
|
||||||
if( !m_statSeparateInlines ) m_sourceView->CalcInlineStats( true );
|
if( !m_statSeparateInlines ) m_sourceView->CalcInlineStats( true );
|
||||||
@ -13078,7 +13076,7 @@ void View::DrawTextEditor()
|
|||||||
ImGui::SetNextWindowSize( ImVec2( 700, 800 ), ImGuiCond_FirstUseEver );
|
ImGui::SetNextWindowSize( ImVec2( 700, 800 ), ImGuiCond_FirstUseEver );
|
||||||
bool show = true;
|
bool show = true;
|
||||||
ImGui::Begin( "Source view", &show, ImGuiWindowFlags_NoScrollbar );
|
ImGui::Begin( "Source view", &show, ImGuiWindowFlags_NoScrollbar );
|
||||||
m_sourceView->Render( m_worker );
|
m_sourceView->Render( m_worker, *this );
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
if( !show ) m_sourceViewFile = nullptr;
|
if( !show ) m_sourceViewFile = nullptr;
|
||||||
}
|
}
|
||||||
@ -13205,7 +13203,7 @@ void View::DrawLockInfoWindow()
|
|||||||
ImGui::Text( "%s:%i", fileName, srcloc.line );
|
ImGui::Text( "%s:%i", fileName, srcloc.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
if( SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this ) )
|
||||||
{
|
{
|
||||||
ViewSource( fileName, srcloc.line );
|
ViewSource( fileName, srcloc.line );
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
#include <regex>
|
#include <regex>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "TracyBadVersion.hpp"
|
||||||
#include "TracyBuzzAnim.hpp"
|
#include "TracyBuzzAnim.hpp"
|
||||||
#include "TracyDecayValue.hpp"
|
#include "TracyDecayValue.hpp"
|
||||||
|
#include "TracyImGui.hpp"
|
||||||
#include "TracyShortPtr.hpp"
|
#include "TracyShortPtr.hpp"
|
||||||
#include "TracyTexture.hpp"
|
#include "TracyTexture.hpp"
|
||||||
#include "TracyUserData.hpp"
|
#include "TracyUserData.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user