diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7a0aab51..c6c005ad 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -266,6 +266,31 @@ View::View( FileRead& f ) m_sourceLocationExpand.push_back( v ); } + f.Read( &sz, sizeof( sz ) ); + m_sourceLocationPayload.reserve( sz ); + for( uint64_t i=0; i( fsz+1 ); + f.Read( func, fsz ); + func[fsz] = '\0'; + f.Read( &fsz, sizeof( fsz ) ); + auto file = m_slab.Alloc( fsz+1 ); + f.Read( file, fsz ); + file[fsz] = '\0'; + auto srcloc = m_slab.Alloc(); + srcloc->function = (uint64_t)func; + srcloc->file = (uint64_t)file; + srcloc->line = line; + srcloc->color = color; + srcloc->stringsAllocated = 1; + m_sourceLocationPayload.push_back( srcloc ); + } + f.Read( &sz, sizeof( sz ) ); for( uint64_t i=0; istringsAllocated == 1 ); + uint32_t color = v->color; + f.Write( &color, sizeof( color ) ); + f.Write( &v->line, sizeof( v->line ) ); + auto func = (const char*)v->function; + sz = strlen( func ); + f.Write( &sz, sizeof( sz ) ); + f.Write( func, sz ); + auto file = (const char*)v->file; + sz = strlen( file ); + f.Write( &sz, sizeof( sz ) ); + f.Write( file, sz ); + } + sz = m_lockMap.size(); f.Write( &sz, sizeof( sz ) ); for( auto& v : m_lockMap )