Store memory name in MemData struct.

This commit is contained in:
Bartosz Taudul 2020-09-25 16:36:03 +02:00
parent 97e17a8d49
commit ba4315c286
2 changed files with 5 additions and 0 deletions

View File

@ -653,6 +653,7 @@ struct MemData
uint64_t low = std::numeric_limits<uint64_t>::max();
uint64_t usage = 0;
PlotData* plot = nullptr;
uint64_t name = 0;
};
struct FrameData

View File

@ -5284,6 +5284,7 @@ void Worker::ProcessMemAllocNamed( const QueueMemAlloc& ev )
{
CheckString( memname );
it = m_data.memNameMap.emplace( memname, m_slab.AllocInit<MemData>() ).first;
it->second->name = memname;
}
ProcessMemAllocImpl( memname, *it->second, ev );
}
@ -5304,6 +5305,7 @@ bool Worker::ProcessMemFreeNamed( const QueueMemFree& ev )
{
CheckString( memname );
it = m_data.memNameMap.emplace( memname, m_slab.AllocInit<MemData>() ).first;
it->second->name = memname;
}
return ProcessMemFreeImpl( memname, *it->second, ev );
}
@ -5326,6 +5328,7 @@ void Worker::ProcessMemAllocCallstackNamed( const QueueMemAlloc& ev )
{
CheckString( memname );
it = m_data.memNameMap.emplace( memname, m_slab.AllocInit<MemData>() ).first;
it->second->name = memname;
}
m_lastMemActionData = it->second;
m_lastMemActionCallstack = it->second->data.size();
@ -5357,6 +5360,7 @@ void Worker::ProcessMemFreeCallstackNamed( const QueueMemFree& ev )
{
CheckString( memname );
it = m_data.memNameMap.emplace( memname, m_slab.AllocInit<MemData>() ).first;
it->second->name = memname;
}
if( ProcessMemFreeImpl( memname, *it->second, ev ) )
{