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

Method MemAllocCallstack

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

Source from the content-addressed store, hash-verified

4290}
4291
4292void Profiler::MemAllocCallstack( const void* ptr, size_t size, int depth, bool secure )
4293{
4294 if( secure && !ProfilerAvailable() ) return;
4295 if( depth > 0 && has_callstack() )
4296 {
4297 auto& profiler = GetProfiler();
4298# ifdef TRACY_ON_DEMAND
4299 if( !profiler.IsConnected() ) return;
4300# endif
4301 const auto thread = GetThreadHandle();
4302
4303 auto callstack = Callstack( depth );
4304
4305 profiler.m_serialLock.lock();
4306 SendCallstackSerial( callstack );
4307 SendMemAlloc( QueueType::MemAllocCallstack, thread, ptr, size );
4308 profiler.m_serialLock.unlock();
4309 }
4310 else
4311 {
4312 MemAlloc( ptr, size, secure );
4313 }
4314}
4315
4316void Profiler::MemFreeCallstack( const void* ptr, int depth, bool secure )
4317{

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected