mirror of
https://github.com/wolfpld/tracy.git
synced 2024-12-02 09:44:35 +00:00
Store count of proper and inline symbols in trace dump.
This commit is contained in:
parent
1da1d31e1c
commit
2a06f1545b
@ -7,7 +7,7 @@ namespace Version
|
|||||||
{
|
{
|
||||||
enum { Major = 0 };
|
enum { Major = 0 };
|
||||||
enum { Minor = 6 };
|
enum { Minor = 6 };
|
||||||
enum { Patch = 10 };
|
enum { Patch = 11 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1687,24 +1687,56 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
|
|
||||||
if( fileVer >= FileVersion( 0, 6, 7 ) )
|
if( fileVer >= FileVersion( 0, 6, 7 ) )
|
||||||
{
|
{
|
||||||
f.Read( sz );
|
if( fileVer >= FileVersion( 0, 6, 11 ) )
|
||||||
m_data.symbolMap.reserve( sz );
|
|
||||||
for( uint64_t i=0; i<sz; i++ )
|
|
||||||
{
|
{
|
||||||
uint64_t symAddr;
|
f.Read( sz );
|
||||||
StringIdx name, file, imageName, callFile;
|
m_data.symbolLoc.reserve_exact( sz, m_slab );
|
||||||
uint32_t line, callLine;
|
f.Read( sz );
|
||||||
uint8_t isInline;
|
m_data.symbolLocInline.reserve_exact( sz, m_slab );
|
||||||
Int24 size;
|
f.Read( sz );
|
||||||
f.Read9( symAddr, name, file, line, imageName, callFile, callLine, isInline, size );
|
m_data.symbolMap.reserve( sz );
|
||||||
m_data.symbolMap.emplace( symAddr, SymbolData { name, file, line, imageName, callFile, callLine, isInline, size } );
|
int symIdx = 0;
|
||||||
if( isInline )
|
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
|
#ifdef NO_PARALLEL_SORT
|
||||||
@ -7018,6 +7050,10 @@ void Worker::Write( FileWrite& f )
|
|||||||
f.Write( &v.second, sizeof( v.second ) );
|
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();
|
sz = m_data.symbolMap.size();
|
||||||
f.Write( &sz, sizeof( sz ) );
|
f.Write( &sz, sizeof( sz ) );
|
||||||
for( auto& v : m_data.symbolMap )
|
for( auto& v : m_data.symbolMap )
|
||||||
|
Loading…
Reference in New Issue
Block a user