mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Store memory name in MemData struct.
This commit is contained in:
parent
97e17a8d49
commit
ba4315c286
@ -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
|
||||
|
@ -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 ) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user