Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-08-17 16:42:16 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-08-17 17:04:20 +0300
commita237f108c71a483d1e0cbad2ee0cb0b9a2eda0dd (patch)
tree15a67fe42918031ae84baa94c56d2268907bb57a /public
parented7be2faaace363bdebfb67492fd46e7421b941c (diff)
Use source contents callback.
Diffstat (limited to 'public')
-rw-r--r--public/client/TracyProfiler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp
index 41131b84..8f5c210a 100644
--- a/public/client/TracyProfiler.cpp
+++ b/public/client/TracyProfiler.cpp
@@ -3883,6 +3883,21 @@ void Profiler::HandleSourceCodeQuery()
}
#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();
tracy_free_fast( m_queryData );