mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add interface for frame images dict building.
This commit is contained in:
@@ -29,6 +29,7 @@ void Usage()
|
||||
printf( " -h: enable LZ4HC compression\n" );
|
||||
printf( " -e: enable extreme LZ4HC compression (very slow)\n" );
|
||||
printf( " -z level: use Zstd compression with given compression level\n" );
|
||||
printf( " -d: build dictionary for frame images\n" );
|
||||
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" );
|
||||
@@ -48,8 +49,9 @@ int main( int argc, char** argv )
|
||||
tracy::FileWrite::Compression clev = tracy::FileWrite::Compression::Fast;
|
||||
uint32_t events = tracy::EventType::All;
|
||||
int zstdLevel = 1;
|
||||
bool buildDict = false;
|
||||
int c;
|
||||
while( ( c = getopt( argc, argv, "hez:s:" ) ) != -1 )
|
||||
while( ( c = getopt( argc, argv, "hez:ds:" ) ) != -1 )
|
||||
{
|
||||
switch( c )
|
||||
{
|
||||
@@ -68,6 +70,9 @@ int main( int argc, char** argv )
|
||||
exit( 1 );
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
buildDict = true;
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
auto ptr = optarg;
|
||||
@@ -150,7 +155,7 @@ int main( int argc, char** argv )
|
||||
}
|
||||
printf( "Saving... \r" );
|
||||
fflush( stdout );
|
||||
worker.Write( *w );
|
||||
worker.Write( *w, buildDict );
|
||||
w->Finish();
|
||||
const auto t1 = std::chrono::high_resolution_clock::now();
|
||||
const auto stats = w->GetCompressionStatistics();
|
||||
|
||||
Reference in New Issue
Block a user