MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SymbolWorker

Method SymbolWorker

Source/ThirdParty/tracy/client/TracyProfiler.cpp:3533–3579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3531}
3532
3533void Profiler::SymbolWorker()
3534{
3535#if defined __linux__ && !defined TRACY_NO_CRASH_HANDLER
3536 s_symbolTid = syscall( SYS_gettid );
3537#endif
3538
3539 ThreadExitHandler threadExitHandler;
3540 SetThreadName( "Tracy Symbol Worker" );
3541#ifdef TRACY_USE_RPMALLOC
3542 InitRpmalloc();
3543#endif
3544 InitCallstack();
3545 while( m_timeBegin.load( std::memory_order_relaxed ) == 0 ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
3546
3547 for(;;)
3548 {
3549 const auto shouldExit = ShouldExit();
3550#ifdef TRACY_ON_DEMAND
3551 if( !IsConnected() )
3552 {
3553 if( shouldExit )
3554 {
3555 s_symbolThreadGone.store( true, std::memory_order_release );
3556 return;
3557 }
3558 while( m_symbolQueue.front() ) m_symbolQueue.pop();
3559 std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
3560 continue;
3561 }
3562#endif
3563 auto si = m_symbolQueue.front();
3564 if( si )
3565 {
3566 HandleSymbolQueueItem( *si );
3567 m_symbolQueue.pop();
3568 }
3569 else
3570 {
3571 if( shouldExit )
3572 {
3573 s_symbolThreadGone.store( true, std::memory_order_release );
3574 return;
3575 }
3576 std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
3577 }
3578 }
3579}
3580#endif
3581
3582bool Profiler::HandleServerQuery()

Callers 1

LaunchSymbolWorkerFunction · 0.80

Calls 7

InitCallstackFunction · 0.85
InitRpmallocFunction · 0.70
IsConnectedFunction · 0.70
SetThreadNameFunction · 0.50
loadMethod · 0.45
frontMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected