mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Adjust kernel tracing threads priorities.
This commit is contained in:
parent
1f4bfb68a0
commit
b1b7be0a46
@ -974,6 +974,8 @@ void SysTraceWorker( void* ptr )
|
|||||||
if( dup2( pipefd[1], STDOUT_FILENO ) >= 0 )
|
if( dup2( pipefd[1], STDOUT_FILENO ) >= 0 )
|
||||||
{
|
{
|
||||||
close( pipefd[1] );
|
close( pipefd[1] );
|
||||||
|
sched_param sp = { 4 };
|
||||||
|
pthread_setschedparam( pthread_self(), SCHED_FIFO, &sp );
|
||||||
#if defined __ANDROID__ && ( defined __aarch64__ || defined __ARM_ARCH )
|
#if defined __ANDROID__ && ( defined __aarch64__ || defined __ARM_ARCH )
|
||||||
execlp( "su", "su", "-c", "/data/tracy_systrace", (char*)nullptr );
|
execlp( "su", "su", "-c", "/data/tracy_systrace", (char*)nullptr );
|
||||||
#endif
|
#endif
|
||||||
@ -985,6 +987,8 @@ void SysTraceWorker( void* ptr )
|
|||||||
{
|
{
|
||||||
// parent
|
// parent
|
||||||
close( pipefd[1] );
|
close( pipefd[1] );
|
||||||
|
sched_param sp = { 5 };
|
||||||
|
pthread_setschedparam( pthread_self(), SCHED_FIFO, &sp );
|
||||||
ProcessTraceLines( pipefd[0] );
|
ProcessTraceLines( pipefd[0] );
|
||||||
close( pipefd[0] );
|
close( pipefd[0] );
|
||||||
}
|
}
|
||||||
@ -1042,6 +1046,8 @@ void SysTraceWorker( void* ptr )
|
|||||||
|
|
||||||
int fd = open( tmp, O_RDONLY );
|
int fd = open( tmp, O_RDONLY );
|
||||||
if( fd < 0 ) return;
|
if( fd < 0 ) return;
|
||||||
|
sched_param sp = { 5 };
|
||||||
|
pthread_setschedparam( pthread_self(), SCHED_FIFO, &sp );
|
||||||
ProcessTraceLines( fd );
|
ProcessTraceLines( fd );
|
||||||
close( fd );
|
close( fd );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user