MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / SymbolWorker

Method SymbolWorker

Dependencies/tracy/client/TracyProfiler.cpp:3406–3452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3404}
3405
3406void Profiler::SymbolWorker()
3407{
3408#if defined __linux__ && !defined TRACY_NO_CRASH_HANDLER
3409 s_symbolTid = syscall( SYS_gettid );
3410#endif
3411
3412 ThreadExitHandler threadExitHandler;
3413 SetThreadName( "Tracy Symbol Worker" );
3414#ifdef TRACY_USE_RPMALLOC
3415 InitRpmalloc();
3416#endif
3417 InitCallstack();
3418 while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
3419
3420 for(;;)
3421 {
3422 const auto shouldExit = ShouldExit();
3423#ifdef TRACY_ON_DEMAND
3424 if( !IsConnected() )
3425 {
3426 if( shouldExit )
3427 {
3428 s_symbolThreadGone.store( true, std::memory_order_release );
3429 return;
3430 }
3431 while( m_symbolQueue.front() ) m_symbolQueue.pop();
3432 std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
3433 continue;
3434 }
3435#endif
3436 auto si = m_symbolQueue.front();
3437 if( si )
3438 {
3439 HandleSymbolQueueItem( *si );
3440 m_symbolQueue.pop();
3441 }
3442 else
3443 {
3444 if( shouldExit )
3445 {
3446 s_symbolThreadGone.store( true, std::memory_order_release );
3447 return;
3448 }
3449 std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
3450 }
3451 }
3452}
3453#endif
3454
3455bool Profiler::HandleServerQuery()

Callers 1

LaunchSymbolWorkerMethod · 0.80

Calls 6

SetThreadNameFunction · 0.85
InitCallstackFunction · 0.85
frontMethod · 0.80
InitRpmallocFunction · 0.70
loadMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected