mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Cache last CheckSourceLocation query.
Just knowing that the query was performed is enough here -- this function adds a new source location entry, if there already isn't one.
This commit is contained in:
@@ -2563,9 +2563,13 @@ bool Worker::DispatchProcess( const QueueItem& ev, char*& ptr )
|
||||
|
||||
void Worker::CheckSourceLocation( uint64_t ptr )
|
||||
{
|
||||
if( m_data.sourceLocation.find( ptr ) == m_data.sourceLocation.end() )
|
||||
if( m_data.checkSrclocLast != ptr )
|
||||
{
|
||||
NewSourceLocation( ptr );
|
||||
m_data.checkSrclocLast = ptr;
|
||||
if( m_data.sourceLocation.find( ptr ) == m_data.sourceLocation.end() )
|
||||
{
|
||||
NewSourceLocation( ptr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user