diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index a7dde8c6..2268aae2 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -314,13 +314,18 @@ enum { MemEventSize = sizeof( MemEvent ) }; static_assert( std::is_standard_layout::value, "MemEvent is not standard layout" ); -struct CallstackFrame +struct CallstackFrameBasic { StringIdx name; StringIdx file; uint32_t line; }; +struct CallstackFrame : public CallstackFrameBasic +{ + uint64_t symAddr; +}; + enum { CallstackFrameSize = sizeof( CallstackFrame ) }; struct CallstackFrameData diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index cd787b2c..5558d09a 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 6 }; -enum { Patch = 4 }; +enum { Patch = 5 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 149b783b..a4b48742 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1330,7 +1330,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) m_data.callstackPayload.push_back_no_space_check( arr ); } - if( fileVer >= FileVersion( 0, 5, 8 ) ) + if( fileVer >= FileVersion( 0, 6, 5 ) ) { f.Read( sz ); m_data.callstackFrameMap.reserve( sz ); @@ -1346,6 +1346,26 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) m_data.callstackFrameMap.emplace( id, frameData ); } } + else if( fileVer >= FileVersion( 0, 5, 8 ) ) + { + f.Read( sz ); + m_data.callstackFrameMap.reserve( sz ); + for( uint64_t i=0; i(); + f.Read2( id, frameData->size ); + + frameData->data = m_slab.Alloc( frameData->size ); + for( uint8_t j=0; jsize; j++ ) + { + f.Read3( frameData->data[j].name, frameData->data[j].file, frameData->data[j].line ); + frameData->data[j].symAddr = 0; + } + + m_data.callstackFrameMap.emplace( id, frameData ); + } + } else { f.Read( sz ); @@ -1365,6 +1385,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) f.Read( str ); if( str.active ) frameData->data[j].file.SetIdx( str.idx ); f.Read( frameData->data[j].line ); + frameData->data[j].symAddr = 0; } m_data.callstackFrameMap.emplace( id, frameData ); @@ -3093,6 +3114,7 @@ void Worker::AddCallstackAllocPayload( uint64_t ptr, const char* data, size_t _s cf.name = StoreString( data, sz ).idx; data += sz; memcpy( &sz, data, 4 ); data += 4; cf.file = StoreString( data, sz ).idx; data += sz; + cf.symAddr = 0; CallstackFrameData cfd = { &cf, 1 }; CallstackFrameId id; @@ -4683,6 +4705,7 @@ void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev ) m_callstackFrameStaging->data[idx].name = StringIdx( nit->second.idx ); m_callstackFrameStaging->data[idx].file = StringIdx( fit->second.idx ); m_callstackFrameStaging->data[idx].line = ev.line; + m_callstackFrameStaging->data[idx].symAddr = ev.symAddr; if( --m_pendingCallstackSubframes == 0 ) { diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index aee44ae6..72ef4ec3 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -172,7 +172,7 @@ private: if( lhs->size != rhs->size ) return false; for( uint8_t i=0; isize; i++ ) { - if( memcmp( lhs->data + i, rhs->data + i, sizeof( CallstackFrame ) ) != 0 ) return false; + if( memcmp( lhs->data + i, rhs->data + i, sizeof( CallstackFrameBasic ) ) != 0 ) return false; } return true; }