mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
String adding functionality.
This commit is contained in:
parent
ff07576d96
commit
bbbf52eafd
@ -163,4 +163,14 @@ void View::CheckString( uint64_t ptr )
|
||||
m_sock.Send( &ptr, sizeof( ptr ) );
|
||||
}
|
||||
|
||||
void View::AddString( uint64_t ptr, std::string&& str )
|
||||
{
|
||||
assert( m_strings.find( ptr ) == m_strings.end( ptr ) );
|
||||
auto it = m_pendingStrings.find( ptr );
|
||||
assert( it != m_pendingStrings.end() );
|
||||
m_pendingStrings.erase( it );
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
m_strings.emplace( ptr, std::move( str ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ private:
|
||||
void ProcessZoneEnd( uint64_t id, const QueueZoneEnd& ev );
|
||||
|
||||
void CheckString( uint64_t ptr );
|
||||
void AddString( uint64_t ptr, std::string&& str );
|
||||
|
||||
std::string m_addr;
|
||||
|
||||
@ -44,6 +45,7 @@ private:
|
||||
|
||||
int64_t m_timeBegin;
|
||||
|
||||
// this block must be locked
|
||||
std::mutex m_lock;
|
||||
std::vector<Event> m_data;
|
||||
std::vector<uint64_t> m_timeline;
|
||||
|
Loading…
Reference in New Issue
Block a user