diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2020-04-08 13:49:58 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2020-04-08 13:52:06 +0300 |
commit | 2a06f1545b389e89053e8826629c0c7ab8480590 (patch) | |
tree | 27e5527434abe4575294c75b075f257c2f1441dc /server | |
parent | 1da1d31e1cc04cf0c39a84cd83d51aa855b8195d (diff) |
Store count of proper and inline symbols in trace dump.
Diffstat (limited to 'server')
-rw-r--r-- | server/TracyVersion.hpp | 2 | ||||
-rw-r--r-- | server/TracyWorker.cpp | 64 |
2 files changed, 51 insertions, 15 deletions
diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 8b11bc77..5cc38dd2 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 6 }; -enum { Patch = 10 }; +enum { Patch = 11 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 9c5a6d1b..283b4a8d 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1687,24 +1687,56 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) if( fileVer >= FileVersion( 0, 6, 7 ) ) { - f.Read( sz ); - m_data.symbolMap.reserve( sz ); - for( uint64_t i=0; i<sz; i++ ) + if( fileVer >= FileVersion( 0, 6, 11 ) ) { - uint64_t symAddr; - StringIdx name, file, imageName, callFile; - uint32_t line, callLine; - uint8_t isInline; - Int24 size; - f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, size ); - m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline, size } ); - if( isInline ) + f.Read( sz ); + m_data.symbolLoc.reserve_exact( sz, m_slab ); + f.Read( sz ); + m_data.symbolLocInline.reserve_exact( sz, m_slab ); + f.Read( sz ); + m_data.symbolMap.reserve( sz ); + int symIdx = 0; + int symInlineIdx = 0; + for( uint64_t i=0; i<sz; i++ ) { - m_data.symbolLocInline.push_back( symAddr ); + uint64_t symAddr; + StringIdx name, file, imageName, callFile; + uint32_t line, callLine; + uint8_t isInline; + Int24 size; + f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, size ); + m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline, size } ); + if( isInline ) + { + m_data.symbolLocInline[symInlineIdx++] = symAddr; + } + else + { + m_data.symbolLoc[symIdx++] = SymbolLocation { symAddr, size.Val() }; + } } - else + } + else + { + f.Read( sz ); + m_data.symbolMap.reserve( sz ); + for( uint64_t i=0; i<sz; i++ ) { - m_data.symbolLoc.push_back( SymbolLocation { symAddr, size.Val() } ); + uint64_t symAddr; + StringIdx name, file, imageName, callFile; + uint32_t line, callLine; + uint8_t isInline; + Int24 size; + f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, size ); + m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline, size } ); + if( isInline ) + { + m_data.symbolLocInline.push_back( symAddr ); + } + else + { + m_data.symbolLoc.push_back( SymbolLocation { symAddr, size.Val() } ); + } } } #ifdef NO_PARALLEL_SORT @@ -7018,6 +7050,10 @@ void Worker::Write( FileWrite& f ) f.Write( &v.second, sizeof( v.second ) ); } + sz = m_data.symbolLoc.size(); + f.Write( &sz, sizeof( sz ) ); + sz = m_data.symbolLocInline.size(); + f.Write( &sz, sizeof( sz ) ); sz = m_data.symbolMap.size(); f.Write( &sz, sizeof( sz ) ); for( auto& v : m_data.symbolMap ) |