Refuse to start without tracefs.

The client's system tracing cannot start without a tracefs (or debugfs)
mount - the tracepoint ids live under it - so starting anyway would
capture no samples.
This commit is contained in:
Bartosz Taudul
2026-08-30 16:46:42 +02:00
parent 2f2d8a7ba9
commit b36c8f2fc5

View File

@@ -482,6 +482,12 @@ static int RunAttached( pid_t pid )
int hwErrno = 0;
if( !PreflightSamplingEvent( pid, kernelFrames, hwStats, hwErrno ) ) return 1;
if( !GetTraceFsPath() )
{
fprintf( stderr, "No tracefs mount found: the client's system tracing cannot start without it, so no samples would be captured.\n" );
return 1;
}
tracy::StartupProfiler();
if( tracy::IsSystemTracingFailed() )
{
@@ -608,6 +614,14 @@ static int RunForked( int argc, char** argv )
return 1;
}
if( !GetTraceFsPath() )
{
fprintf( stderr, "No tracefs mount found: the client's system tracing cannot start without it, so no samples would be captured.\n" );
kill( childPid, SIGKILL );
waitpid( childPid, nullptr, 0 );
return 1;
}
tracy::StartupProfiler();
if( tracy::IsSystemTracingFailed() )
{