mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +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( " -s flags: strip selected data from capture:\n" );
|
||||||
printf( " l: locks, m: messages, p: plots, M: memory, i: frame images\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: 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 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,8 +49,9 @@ int main( int argc, char** argv )
|
|||||||
uint32_t events = tracy::EventType::All;
|
uint32_t events = tracy::EventType::All;
|
||||||
int zstdLevel = 1;
|
int zstdLevel = 1;
|
||||||
bool buildDict = false;
|
bool buildDict = false;
|
||||||
|
bool cacheSource = false;
|
||||||
int c;
|
int c;
|
||||||
while( ( c = getopt( argc, argv, "hez:ds:" ) ) != -1 )
|
while( ( c = getopt( argc, argv, "hez:ds:c" ) ) != -1 )
|
||||||
{
|
{
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
@ -113,6 +115,9 @@ int main( int argc, char** argv )
|
|||||||
while( *++optarg != '\0' );
|
while( *++optarg != '\0' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'c':
|
||||||
|
cacheSource = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Usage();
|
Usage();
|
||||||
break;
|
break;
|
||||||
@ -145,6 +150,8 @@ int main( int argc, char** argv )
|
|||||||
while( !worker.AreSourceLocationZonesReady() ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
while( !worker.AreSourceLocationZonesReady() ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if( cacheSource ) worker.CacheSourceFiles();
|
||||||
|
|
||||||
auto w = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output, clev, zstdLevel ) );
|
auto w = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output, clev, zstdLevel ) );
|
||||||
if( !w )
|
if( !w )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user