mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Use source contents callback.
This commit is contained in:
parent
ed7be2faaa
commit
a237f108c7
@ -3883,6 +3883,21 @@ void Profiler::HandleSourceCodeQuery()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if( !ok && m_sourceCallback )
|
||||||
|
{
|
||||||
|
size_t sz;
|
||||||
|
char* ptr = m_sourceCallback( m_sourceCallbackData, m_queryData, sz );
|
||||||
|
if( ptr )
|
||||||
|
{
|
||||||
|
if( sz < ( TargetFrameSize - 16 ) )
|
||||||
|
{
|
||||||
|
SendLongString( (uint64_t)ptr, ptr, sz, QueueType::SourceCode );
|
||||||
|
ok = true;
|
||||||
|
}
|
||||||
|
tracy_free_fast( ptr );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( !ok ) AckSourceCodeNotAvailable();
|
if( !ok ) AckSourceCodeNotAvailable();
|
||||||
|
|
||||||
tracy_free_fast( m_queryData );
|
tracy_free_fast( m_queryData );
|
||||||
|
Loading…
Reference in New Issue
Block a user