Custom string data is no longer needed.

This commit is contained in:
Bartosz Taudul 2020-07-26 01:35:08 +02:00
parent c0b73c248f
commit 03f46d7228
4 changed files with 4 additions and 19 deletions

View File

@ -2229,7 +2229,6 @@ void Profiler::SendString( uint64_t str, const char* ptr, size_t len, QueueType
{
assert( type == QueueType::StringData ||
type == QueueType::ThreadName ||
type == QueueType::CustomStringData ||
type == QueueType::PlotName ||
type == QueueType::FrameName ||
type == QueueType::ExternalName ||

View File

@ -87,7 +87,6 @@ enum class QueueType : uint8_t
SecondStringData,
StringData,
ThreadName,
CustomStringData,
PlotName,
SourceLocationPayload,
CallstackPayload,
@ -629,7 +628,6 @@ static constexpr size_t QueueDataSize[] = {
// keep all QueueStringTransfer below
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // string data
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // thread name
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // custom string data
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // plot name
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // allocated source location payload
sizeof( QueueHeader ) + sizeof( QueueStringTransfer ), // callstack payload

View File

@ -2669,11 +2669,10 @@ void Worker::Exec()
if( m_terminate )
{
if( m_pendingStrings != 0 || m_pendingThreads != 0 || m_pendingSourceLocation != 0 || m_pendingCallstackFrames != 0 ||
!m_pendingCustomStrings.empty() || m_data.plots.IsPending() || m_pendingCallstackPtr != 0 ||
m_pendingExternalNames != 0 || m_pendingCallstackSubframes != 0 || m_pendingFrameImageData.image != nullptr ||
!m_pendingSymbols.empty() || !m_pendingSymbolCode.empty() || m_pendingCodeInformation != 0 ||
!m_serverQueryQueue.empty() || m_pendingSourceLocationPayload != 0 || m_pendingSingleString.ptr != nullptr ||
m_pendingSecondString.ptr != nullptr )
m_data.plots.IsPending() || m_pendingCallstackPtr != 0 || m_pendingExternalNames != 0 ||
m_pendingCallstackSubframes != 0 || m_pendingFrameImageData.image != nullptr || !m_pendingSymbols.empty() ||
!m_pendingSymbolCode.empty() || m_pendingCodeInformation != 0 || !m_serverQueryQueue.empty() ||
m_pendingSourceLocationPayload != 0 || m_pendingSingleString.ptr != nullptr || m_pendingSecondString.ptr != nullptr )
{
continue;
}
@ -2899,9 +2898,6 @@ bool Worker::DispatchProcess( const QueueItem& ev, const char*& ptr )
ptr += sizeof( sz );
switch( ev.hdr.type )
{
case QueueType::CustomStringData:
AddCustomString( ev.stringTransfer.ptr, ptr, sz );
break;
case QueueType::StringData:
AddString( ev.stringTransfer.ptr, ptr, sz );
m_serverQuerySpaceLeft++;
@ -3364,12 +3360,6 @@ void Worker::AddThreadString( uint64_t id, const char* str, size_t sz )
it->second = sl.ptr;
}
void Worker::AddCustomString( uint64_t ptr, const char* str, size_t sz )
{
assert( m_pendingCustomStrings.find( ptr ) == m_pendingCustomStrings.end() );
m_pendingCustomStrings.emplace( ptr, StoreString( str, sz ) );
}
void Worker::AddSingleString( const char* str, size_t sz )
{
assert( m_pendingSingleString.ptr == nullptr );

View File

@ -737,7 +737,6 @@ private:
void AddString( uint64_t ptr, const char* str, size_t sz );
void AddThreadString( uint64_t id, const char* str, size_t sz );
void AddCustomString( uint64_t ptr, const char* str, size_t sz );
void AddSingleString( const char* str, size_t sz );
void AddSecondString( const char* str, size_t sz );
void AddExternalName( uint64_t ptr, const char* str, size_t sz );
@ -847,7 +846,6 @@ private:
bool m_ignoreMemFreeFaults;
short_ptr<GpuCtxData> m_gpuCtxMap[256];
unordered_flat_map<uint64_t, StringLocation> m_pendingCustomStrings;
uint64_t m_pendingCallstackPtr = 0;
uint32_t m_pendingCallstackId;
int16_t m_pendingSourceLocationPayload = 0;