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

Method MemDiscardCallstack

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

Source from the content-addressed store, hash-verified

4434}
4435
4436void Profiler::MemDiscardCallstack( const char* name, bool secure, int32_t depth )
4437{
4438 if( secure && !ProfilerAvailable() ) return;
4439 if( depth > 0 && has_callstack() )
4440 {
4441# ifdef TRACY_ON_DEMAND
4442 if( !GetProfiler().IsConnected() ) return;
4443# endif
4444 const auto thread = GetThreadHandle();
4445
4446 auto callstack = Callstack( depth );
4447
4448 GetProfiler().m_serialLock.lock();
4449 SendCallstackSerial( callstack );
4450 SendMemDiscard( QueueType::MemDiscard, thread, name );
4451 GetProfiler().m_serialLock.unlock();
4452 }
4453 else
4454 {
4455 MemDiscard( name, secure );
4456 }
4457}
4458
4459void Profiler::SendCallstack( int depth )
4460{

Callers

nothing calls this directly

Calls 8

ProfilerAvailableFunction · 0.85
has_callstackFunction · 0.85
CallstackFunction · 0.85
SendCallstackSerialFunction · 0.85
SendMemDiscardFunction · 0.85
GetThreadHandleFunction · 0.70
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected