Send single string for callstack frame size.

This commit is contained in:
Bartosz Taudul 2020-07-26 00:38:59 +02:00
parent e3dfa96055
commit 61e3acde06
3 changed files with 3 additions and 8 deletions

View File

@ -2390,13 +2390,12 @@ void Profiler::SendCallstackFrame( uint64_t ptr )
const auto frameData = DecodeCallstackPtr( ptr );
{
SendString( uint64_t( frameData.imageName ), frameData.imageName, QueueType::CustomStringData );
SendSingleString( frameData.imageName );
QueueItem item;
MemWrite( &item.hdr.type, QueueType::CallstackFrameSize );
MemWrite( &item.callstackFrameSize.ptr, ptr );
MemWrite( &item.callstackFrameSize.size, frameData.size );
MemWrite( &item.callstackFrameSize.imageName, (uint64_t)frameData.imageName );
AppendData( &item, QueueDataSize[(int)QueueType::CallstackFrameSize] );
}

View File

@ -379,7 +379,6 @@ struct QueueCallstackFrameSize
{
uint64_t ptr;
uint8_t size;
uint64_t imageName;
};
struct QueueCallstackFrame

View File

@ -5416,8 +5416,7 @@ void Worker::ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev )
m_data.newFramesWereReceived = true;
#endif
auto iit = m_pendingCustomStrings.find( ev.imageName );
assert( iit != m_pendingCustomStrings.end() );
const auto idx = GetSingleStringIdx();
// Frames may be duplicated due to recursion
auto fmit = m_data.callstackFrameMap.find( PackPointer( ev.ptr ) );
@ -5426,12 +5425,10 @@ void Worker::ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev )
m_callstackFrameStaging = m_slab.Alloc<CallstackFrameData>();
m_callstackFrameStaging->size = ev.size;
m_callstackFrameStaging->data = m_slab.Alloc<CallstackFrame>( ev.size );
m_callstackFrameStaging->imageName = StringIdx( iit->second.idx );
m_callstackFrameStaging->imageName = StringIdx( idx );
m_callstackFrameStagingPtr = ev.ptr;
}
m_pendingCustomStrings.erase( iit );
}
void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev )