1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Split srcloc check and creation.

This commit is contained in:
Bartosz Taudul 2017-11-24 01:05:42 +01:00
parent 184039d500
commit 7a13892754
2 changed files with 14 additions and 2 deletions

View File

@ -939,8 +939,18 @@ static const SourceLocation emptySourceLocation = {};
void View::CheckSourceLocation( uint64_t ptr )
{
if( m_sourceLocation.find( ptr ) != m_sourceLocation.end() ) return;
if( m_sourceLocation.find( ptr ) != m_sourceLocation.end() )
{
return;
}
else
{
NewSourceLocation( ptr );
}
}
void View::NewSourceLocation( uint64_t ptr )
{
m_sourceLocation.emplace( ptr, emptySourceLocation );
m_pendingSourceLocation++;
m_sourceLocationQueue.push_back( ptr );

View File

@ -79,7 +79,9 @@ private:
void CheckString( uint64_t ptr );
void CheckThreadString( uint64_t id );
void CheckSourceLocation( uint64_t ptr );
tracy_force_inline void CheckSourceLocation( uint64_t ptr );
void NewSourceLocation( uint64_t ptr );
void AddString( uint64_t ptr, char* str, size_t sz );
void AddThreadString( uint64_t id, char* str, size_t sz );