mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-01 16:08:30 +00:00
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:
@@ -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() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user