mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Implement scanning for source files missing in cache.
This commit is contained in:
parent
e086488928
commit
a335efe9e6
@ -8765,4 +8765,36 @@ uint64_t Worker::GetHwSampleCount() const
|
||||
return cnt;
|
||||
}
|
||||
|
||||
void Worker::CacheSourceFiles()
|
||||
{
|
||||
const auto execTime = GetExecutableTime();
|
||||
|
||||
for( auto& sl : m_data.sourceLocationPayload )
|
||||
{
|
||||
const char* file = GetString( sl->file );
|
||||
if( m_data.sourceFileCache.find( file ) == m_data.sourceFileCache.end() )
|
||||
{
|
||||
if( SourceFileValid( file, execTime != 0 ? execTime : GetCaptureTime() ) ) CacheSourceFromFile( file );
|
||||
}
|
||||
}
|
||||
|
||||
for( auto& sl : m_data.sourceLocation )
|
||||
{
|
||||
const char* file = GetString( sl.second.file );
|
||||
if( m_data.sourceFileCache.find( file ) == m_data.sourceFileCache.end() )
|
||||
{
|
||||
if( SourceFileValid( file, execTime != 0 ? execTime : GetCaptureTime() ) ) CacheSourceFromFile( file );
|
||||
}
|
||||
}
|
||||
|
||||
for( auto& sym : m_data.symbolMap )
|
||||
{
|
||||
const char* file = GetString( sym.second.file );
|
||||
if( m_data.sourceFileCache.find( file ) == m_data.sourceFileCache.end() )
|
||||
{
|
||||
if( SourceFileValid( file, execTime != 0 ? execTime : GetCaptureTime() ) ) CacheSourceFromFile( file );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -658,6 +658,8 @@ public:
|
||||
void DoPostponedWork();
|
||||
void DoPostponedWorkAll();
|
||||
|
||||
void CacheSourceFiles();
|
||||
|
||||
private:
|
||||
void Network();
|
||||
void Exec();
|
||||
|
Loading…
Reference in New Issue
Block a user