Add debug logging for debuginfod queries.

This commit is contained in:
Bartosz Taudul 2022-08-16 15:22:28 +02:00
parent ed733a4b15
commit d32dc47845
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 3 additions and 0 deletions

View File

@ -755,6 +755,7 @@ int GetDebugInfoDescriptor( const char* buildid_data, size_t buildid_size, const
it->filename = (char*)tracy_malloc( fnsz ); it->filename = (char*)tracy_malloc( fnsz );
memcpy( it->filename, filename, fnsz ); memcpy( it->filename, filename, fnsz );
it->fd = fd >= 0 ? fd : -1; it->fd = fd >= 0 ? fd : -1;
TracyDebug( "DebugInfo descriptor query: %i, fn: %s\n", fd, filename );
return it->fd; return it->fd;
} }

View File

@ -64,6 +64,7 @@
#include "../common/tracy_lz4.hpp" #include "../common/tracy_lz4.hpp"
#include "tracy_rpmalloc.hpp" #include "tracy_rpmalloc.hpp"
#include "TracyCallstack.hpp" #include "TracyCallstack.hpp"
#include "TracyDebug.hpp"
#include "TracyDxt1.hpp" #include "TracyDxt1.hpp"
#include "TracyScoped.hpp" #include "TracyScoped.hpp"
#include "TracyProfiler.hpp" #include "TracyProfiler.hpp"
@ -3854,6 +3855,7 @@ void Profiler::HandleSourceCodeQuery()
if( buildid ) if( buildid )
{ {
auto d = debuginfod_find_source( GetDebuginfodClient(), buildid, size, m_queryData, nullptr ); auto d = debuginfod_find_source( GetDebuginfodClient(), buildid, size, m_queryData, nullptr );
TracyDebug( "DebugInfo source query: %s, fn: %s, image: %s\n", d >= 0 ? " ok " : "fail", m_queryData, m_queryImage );
if( d >= 0 ) if( d >= 0 )
{ {
struct stat st; struct stat st;