mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 08:54:34 +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()];
|
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[] = {
|
static const char* BadExternalThreadNames[] = {
|
||||||
"ntdll.dll",
|
"ntdll.dll",
|
||||||
"???",
|
"???",
|
||||||
|
@ -667,7 +667,7 @@ public:
|
|||||||
|
|
||||||
void CacheSourceFiles();
|
void CacheSourceFiles();
|
||||||
|
|
||||||
uint32_t AddNewString(const char* newString);
|
StringLocation StoreString(const char* str, size_t sz);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Network();
|
void Network();
|
||||||
@ -896,7 +896,6 @@ private:
|
|||||||
|
|
||||||
uint32_t GetSingleStringIdx();
|
uint32_t GetSingleStringIdx();
|
||||||
uint32_t GetSecondStringIdx();
|
uint32_t GetSecondStringIdx();
|
||||||
StringLocation StoreString( const char* str, size_t sz );
|
|
||||||
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
|
const ContextSwitch* const GetContextSwitchDataImpl( uint64_t thread );
|
||||||
|
|
||||||
void CacheSource( const StringRef& str, const StringIdx& image = StringIdx() );
|
void CacheSource( const StringRef& str, const StringIdx& image = StringIdx() );
|
||||||
|
Loading…
Reference in New Issue
Block a user