diff --git a/monitor/src/monitor.cpp b/monitor/src/monitor.cpp index 168a2bc0..e72cae9b 100644 --- a/monitor/src/monitor.cpp +++ b/monitor/src/monitor.cpp @@ -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() ) {