mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Fetch thread names in memory events.
This commit is contained in:
parent
0b568d55ba
commit
bc6a553a3a
@ -2468,6 +2468,7 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
|||||||
void Worker::ProcessMemAlloc( const QueueMemAlloc& ev )
|
void Worker::ProcessMemAlloc( const QueueMemAlloc& ev )
|
||||||
{
|
{
|
||||||
const auto time = TscTime( ev.time );
|
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.active.find( ev.ptr ) == m_data.memory.active.end() );
|
||||||
assert( m_data.memory.data.empty() || m_data.memory.data.back().timeAlloc <= time );
|
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 )
|
bool Worker::ProcessMemFree( const QueueMemFree& ev )
|
||||||
{
|
{
|
||||||
const auto time = TscTime( ev.time );
|
|
||||||
|
|
||||||
auto it = m_data.memory.active.find( ev.ptr );
|
auto it = m_data.memory.active.find( ev.ptr );
|
||||||
if( it == m_data.memory.active.end() )
|
if( it == m_data.memory.active.end() )
|
||||||
{
|
{
|
||||||
@ -2513,6 +2512,9 @@ bool Worker::ProcessMemFree( const QueueMemFree& ev )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto time = TscTime( ev.time );
|
||||||
|
NoticeThread( ev.thread );
|
||||||
|
|
||||||
m_data.memory.frees.push_back( it->second );
|
m_data.memory.frees.push_back( it->second );
|
||||||
auto& mem = m_data.memory.data[it->second];
|
auto& mem = m_data.memory.data[it->second];
|
||||||
mem.timeFree = time;
|
mem.timeFree = time;
|
||||||
|
Loading…
Reference in New Issue
Block a user