mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 08:54:34 +00:00
Transfer executable image name in source file queries.
This commit is contained in:
parent
fd55c1e975
commit
aa2bbfe5f9
@ -1354,6 +1354,7 @@ Profiler::Profiler()
|
||||
, m_deferredQueue( 64*1024 )
|
||||
#endif
|
||||
, m_paramCallback( nullptr )
|
||||
, m_queryImage( nullptr )
|
||||
, m_queryData( nullptr )
|
||||
, m_crashHandlerInstalled( false )
|
||||
{
|
||||
@ -3384,7 +3385,11 @@ bool Profiler::HandleServerQuery()
|
||||
HandleSourceCodeQuery();
|
||||
break;
|
||||
case ServerQueryDataTransfer:
|
||||
assert( !m_queryData );
|
||||
if( m_queryData )
|
||||
{
|
||||
assert( !m_queryImage );
|
||||
m_queryImage = m_queryData;
|
||||
}
|
||||
m_queryDataPtr = m_queryData = (char*)tracy_malloc( ptr + 11 );
|
||||
AckServerQuery();
|
||||
break;
|
||||
@ -3840,6 +3845,12 @@ void Profiler::HandleSourceCodeQuery()
|
||||
AckSourceCodeNotAvailable();
|
||||
}
|
||||
m_queryData = nullptr;
|
||||
|
||||
if( m_queryImage )
|
||||
{
|
||||
tracy_free_fast( m_queryImage );
|
||||
m_queryImage = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined _WIN32 && defined TRACY_TIMER_QPC
|
||||
|
@ -923,6 +923,7 @@ private:
|
||||
|
||||
ParameterCallback m_paramCallback;
|
||||
|
||||
char* m_queryImage;
|
||||
char* m_queryData;
|
||||
char* m_queryDataPtr;
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace tracy
|
||||
|
||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||
|
||||
enum : uint32_t { ProtocolVersion = 56 };
|
||||
enum : uint32_t { ProtocolVersion = 57 };
|
||||
enum : uint16_t { BroadcastVersion = 2 };
|
||||
|
||||
using lz4sz_t = uint32_t;
|
||||
|
@ -3373,6 +3373,7 @@ void Worker::QueryTerminate()
|
||||
|
||||
void Worker::QuerySourceFile( const char* fn, const char* image )
|
||||
{
|
||||
if( image ) QueryDataTransfer( image, strlen( image ) + 1 );
|
||||
QueryDataTransfer( fn, strlen( fn ) + 1 );
|
||||
Query( ServerQuerySourceCode, 0 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user