mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Send single string for callstack frame size.
This commit is contained in:
parent
e3dfa96055
commit
61e3acde06
@ -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] );
|
||||
}
|
||||
|
@ -379,7 +379,6 @@ struct QueueCallstackFrameSize
|
||||
{
|
||||
uint64_t ptr;
|
||||
uint8_t size;
|
||||
uint64_t imageName;
|
||||
};
|
||||
|
||||
struct QueueCallstackFrame
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user