1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Moving ThreadExitHandler to a commonly accessible space, adding thread handler usage to SysTrace worker threads

This commit is contained in:
Andrey Voroshilov
2020-07-18 18:24:49 -07:00
parent 416259fdb7
commit 175ec3e3d8
3 changed files with 15 additions and 11 deletions
+4
View File
@@ -321,6 +321,7 @@ static void SetupVsync()
s_threadVsync = (Thread*)tracy_malloc( sizeof( Thread ) );
new(s_threadVsync) Thread( [] (void*) {
ThreadExitHandler threadExitHandler;
SetThreadName( "Tracy Vsync" );
ProcessTrace( &s_traceHandleVsync2, 1, nullptr, nullptr );
}, nullptr );
@@ -455,6 +456,7 @@ void SysTraceStop()
void SysTraceWorker( void* ptr )
{
ThreadExitHandler threadExitHandler;
SetThreadName( "Tracy SysTrace" );
ProcessTrace( &s_traceHandle2, 1, 0, 0 );
ControlTrace( 0, KERNEL_LOGGER_NAME, s_prop, EVENT_TRACE_CONTROL_STOP );
@@ -955,6 +957,7 @@ static void ProcessTraceLines( int fd )
void SysTraceWorker( void* ptr )
{
ThreadExitHandler threadExitHandler;
SetThreadName( "Tracy SysTrace" );
int pipefd[2];
if( pipe( pipefd ) == 0 )
@@ -1028,6 +1031,7 @@ static void ProcessTraceLines( int fd )
void SysTraceWorker( void* ptr )
{
ThreadExitHandler threadExitHandler;
SetThreadName( "Tracy SysTrace" );
char tmp[256];
memcpy( tmp, BasePath, sizeof( BasePath ) - 1 );