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 )
|
, m_deferredQueue( 64*1024 )
|
||||||
#endif
|
#endif
|
||||||
, m_paramCallback( nullptr )
|
, m_paramCallback( nullptr )
|
||||||
|
, m_queryImage( nullptr )
|
||||||
, m_queryData( nullptr )
|
, m_queryData( nullptr )
|
||||||
, m_crashHandlerInstalled( false )
|
, m_crashHandlerInstalled( false )
|
||||||
{
|
{
|
||||||
@ -3384,7 +3385,11 @@ bool Profiler::HandleServerQuery()
|
|||||||
HandleSourceCodeQuery();
|
HandleSourceCodeQuery();
|
||||||
break;
|
break;
|
||||||
case ServerQueryDataTransfer:
|
case ServerQueryDataTransfer:
|
||||||
assert( !m_queryData );
|
if( m_queryData )
|
||||||
|
{
|
||||||
|
assert( !m_queryImage );
|
||||||
|
m_queryImage = m_queryData;
|
||||||
|
}
|
||||||
m_queryDataPtr = m_queryData = (char*)tracy_malloc( ptr + 11 );
|
m_queryDataPtr = m_queryData = (char*)tracy_malloc( ptr + 11 );
|
||||||
AckServerQuery();
|
AckServerQuery();
|
||||||
break;
|
break;
|
||||||
@ -3840,6 +3845,12 @@ void Profiler::HandleSourceCodeQuery()
|
|||||||
AckSourceCodeNotAvailable();
|
AckSourceCodeNotAvailable();
|
||||||
}
|
}
|
||||||
m_queryData = nullptr;
|
m_queryData = nullptr;
|
||||||
|
|
||||||
|
if( m_queryImage )
|
||||||
|
{
|
||||||
|
tracy_free_fast( m_queryImage );
|
||||||
|
m_queryImage = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined _WIN32 && defined TRACY_TIMER_QPC
|
#if defined _WIN32 && defined TRACY_TIMER_QPC
|
||||||
|
@ -923,6 +923,7 @@ private:
|
|||||||
|
|
||||||
ParameterCallback m_paramCallback;
|
ParameterCallback m_paramCallback;
|
||||||
|
|
||||||
|
char* m_queryImage;
|
||||||
char* m_queryData;
|
char* m_queryData;
|
||||||
char* m_queryDataPtr;
|
char* m_queryDataPtr;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ namespace tracy
|
|||||||
|
|
||||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
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 };
|
enum : uint16_t { BroadcastVersion = 2 };
|
||||||
|
|
||||||
using lz4sz_t = uint32_t;
|
using lz4sz_t = uint32_t;
|
||||||
|
@ -3373,6 +3373,7 @@ void Worker::QueryTerminate()
|
|||||||
|
|
||||||
void Worker::QuerySourceFile( const char* fn, const char* image )
|
void Worker::QuerySourceFile( const char* fn, const char* image )
|
||||||
{
|
{
|
||||||
|
if( image ) QueryDataTransfer( image, strlen( image ) + 1 );
|
||||||
QueryDataTransfer( fn, strlen( fn ) + 1 );
|
QueryDataTransfer( fn, strlen( fn ) + 1 );
|
||||||
Query( ServerQuerySourceCode, 0 );
|
Query( ServerQuerySourceCode, 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user