Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update/src/update.cpp')
-rw-r--r--update/src/update.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/update/src/update.cpp b/update/src/update.cpp
index 0823fea8..62a30ebd 100644
--- a/update/src/update.cpp
+++ b/update/src/update.cpp
@@ -31,6 +31,7 @@ void Usage()
printf( " -s flags: strip selected data from capture:\n" );
printf( " l: locks, m: messages, p: plots, M: memory, i: frame images\n" );
printf( " c: context switches, s: sampling data, C: symbol code, S: source cache\n" );
+ printf( " -c: scan for source files missing in cache and add if found\n" );
exit( 1 );
}
@@ -48,8 +49,9 @@ int main( int argc, char** argv )
uint32_t events = tracy::EventType::All;
int zstdLevel = 1;
bool buildDict = false;
+ bool cacheSource = false;
int c;
- while( ( c = getopt( argc, argv, "hez:ds:" ) ) != -1 )
+ while( ( c = getopt( argc, argv, "hez:ds:c" ) ) != -1 )
{
switch( c )
{
@@ -113,6 +115,9 @@ int main( int argc, char** argv )
while( *++optarg != '\0' );
break;
}
+ case 'c':
+ cacheSource = true;
+ break;
default:
Usage();
break;
@@ -145,6 +150,8 @@ int main( int argc, char** argv )
while( !worker.AreSourceLocationZonesReady() ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
#endif
+ if( cacheSource ) worker.CacheSourceFiles();
+
auto w = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output, clev, zstdLevel ) );
if( !w )
{