mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Instead of adding new method, make StoreString public
This commit is contained in:
parent
c302b509fe
commit
687d681764
@ -2426,19 +2426,6 @@ const char* Worker::GetString( const StringIdx& idx ) const
|
||||
return m_data.stringData[idx.Idx()];
|
||||
}
|
||||
|
||||
uint32_t Worker::AddNewString(const char* newString)
|
||||
{
|
||||
assert(m_allowStringModification);
|
||||
uint64_t sz = strlen(newString);
|
||||
auto ptr = m_slab.Alloc<char>( sz+1 );
|
||||
memcpy( ptr, newString, sz );
|
||||
ptr[sz] = '\0';
|
||||
uint32_t idx = m_data.stringData.size();
|
||||
m_data.stringMap.emplace( charutil::StringKey { ptr, sz }, idx );
|
||||
m_data.stringData.push_back( ptr );
|
||||
return idx;
|
||||
}
|
||||
|
||||
static const char* BadExternalThreadNames[] = {
|
||||
"ntdll.dll",
|
||||
"???",
|
||||
|
@ -667,7 +667,7 @@ public:
|
||||
|
||||
void CacheSourceFiles();
|
||||
|
||||
uint32_t AddNewString(const char* newString);
|
||||
StringLocation StoreString(const char* str, size_t sz);
|
||||
|
||||
private:
|
||||
void Network();
|
||||
@ -896,7 +896,6 @@ private:
|
||||
|
||||
uint32_t GetSingleStringIdx();
|
||||
uint32_t GetSecondStringIdx();
|
||||
StringLocation StoreString( const char* str, size_t sz );
|
||||
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
|
||||
|
||||
void CacheSource( const StringRef& str, const StringIdx& image = StringIdx() );
|
||||
|
Loading…
Reference in New Issue
Block a user