mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Check string availability.
This commit is contained in:
@@ -116,6 +116,8 @@ void View::ProcessZoneBegin( uint64_t id, const QueueZoneBegin& ev )
|
||||
{
|
||||
auto it = m_pendingEndZone.find( id );
|
||||
const auto idx = m_data.size();
|
||||
CheckString( ev.filename );
|
||||
CheckString( ev.function );
|
||||
std::unique_lock<std::mutex> lock( m_lock );
|
||||
if( it == m_pendingEndZone.end() )
|
||||
{
|
||||
@@ -152,4 +154,13 @@ void View::ProcessZoneEnd( uint64_t id, const QueueZoneEnd& ev )
|
||||
}
|
||||
}
|
||||
|
||||
void View::CheckString( uint64_t ptr )
|
||||
{
|
||||
if( m_strings.find( ptr ) != m_strings.end() ) return;
|
||||
if( m_pendingStrings.find( ptr ) != m_pendingStrings.end() ) return;
|
||||
|
||||
m_pendingStrings.emplace( ptr );
|
||||
m_sock.Send( &ptr, sizeof( ptr ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user