Support serial callstacks when processing GPU zones.

This commit is contained in:
Bartosz Taudul 2021-01-15 21:40:51 +01:00
parent 90de2d2f73
commit a4764141c6

View File

@ -5276,10 +5276,19 @@ void Worker::ProcessGpuZoneBeginCallstack( const QueueGpuZoneBegin& ev, bool ser
{
auto zone = m_slab.Alloc<GpuEvent>();
ProcessGpuZoneBeginImpl( zone, ev, serial );
auto it = m_nextCallstack.find( m_threadCtx );
assert( it != m_nextCallstack.end() );
zone->callstack.SetVal( it->second );
it->second = 0;
if( serial )
{
assert( m_serialNextCallstack != 0 );
zone->callstack.SetVal( m_serialNextCallstack );
m_serialNextCallstack = 0;
}
else
{
auto it = m_nextCallstack.find( m_threadCtx );
assert( it != m_nextCallstack.end() );
zone->callstack.SetVal( it->second );
it->second = 0;
}
}
void Worker::ProcessGpuZoneBeginAllocSrcLoc( const QueueGpuZoneBeginLean& ev, bool serial )
@ -5292,10 +5301,19 @@ void Worker::ProcessGpuZoneBeginAllocSrcLocCallstack( const QueueGpuZoneBeginLea
{
auto zone = m_slab.Alloc<GpuEvent>();
ProcessGpuZoneBeginAllocSrcLocImpl( zone, ev, serial );
auto it = m_nextCallstack.find( m_threadCtx );
assert( it != m_nextCallstack.end() );
zone->callstack.SetVal( it->second );
it->second = 0;
if( serial )
{
assert( m_serialNextCallstack != 0 );
zone->callstack.SetVal( m_serialNextCallstack );
m_serialNextCallstack = 0;
}
else
{
auto it = m_nextCallstack.find( m_threadCtx );
assert( it != m_nextCallstack.end() );
zone->callstack.SetVal( it->second );
it->second = 0;
}
}
void Worker::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial )