mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 06:34:36 +00:00
Expose source file scan in update utility.
This commit is contained in:
parent
a335efe9e6
commit
8532c2d1e0
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user