Report system tracing setup failures.

SysTraceStart previously reported success even when no perf events
could be opened, leaving a worker thread running over no buffers
and an empty CPU section without explanation; it now fails in that
case. Also log when /proc/kallsyms cannot be read, which otherwise
silently results in ??? kernel stack frames.
This commit is contained in:
Bartosz Taudul
2026-08-19 22:14:33 +02:00
parent 05f0508684
commit 6b58f7d8d0
2 changed files with 13 additions and 1 deletions

View File

@@ -1167,7 +1167,11 @@ size_t s_kernelSymCnt;
static void InitKernelSymbols()
{
FILE* f = fopen( "/proc/kallsyms", "rb" );
if( !f ) return;
if( !f )
{
TracyDebug( "Failed to read /proc/kallsyms, kernel symbols will be unavailable." );
return;
}
tracy::FastVector<KernelSymbol> tmpSym( 512 * 1024 );
size_t linelen = 16 * 1024; // linelen must be big enough to prevent reallocs in getline()
auto linebuf = (char*)tracy_malloc( linelen );