Fetch thread names in memory events.

This commit is contained in:
Bartosz Taudul 2018-08-28 01:48:19 +02:00
parent 0b568d55ba
commit bc6a553a3a

View File

@ -2468,6 +2468,7 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
void Worker::ProcessMemAlloc( const QueueMemAlloc& ev )
{
const auto time = TscTime( ev.time );
NoticeThread( ev.thread );
assert( m_data.memory.active.find( ev.ptr ) == m_data.memory.active.end() );
assert( m_data.memory.data.empty() || m_data.memory.data.back().timeAlloc <= time );
@ -2504,8 +2505,6 @@ void Worker::ProcessMemAlloc( const QueueMemAlloc& ev )
bool Worker::ProcessMemFree( const QueueMemFree& ev )
{
const auto time = TscTime( ev.time );
auto it = m_data.memory.active.find( ev.ptr );
if( it == m_data.memory.active.end() )
{
@ -2513,6 +2512,9 @@ bool Worker::ProcessMemFree( const QueueMemFree& ev )
return false;
}
const auto time = TscTime( ev.time );
NoticeThread( ev.thread );
m_data.memory.frees.push_back( it->second );
auto& mem = m_data.memory.data[it->second];
mem.timeFree = time;