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
path: root/update
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2020-07-17 23:06:15 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2020-07-17 23:06:15 +0300
commitcc63b6492f23b72eb8d92f8aef5045a08b6aa987 (patch)
treed49c8a75115201a9cad6fa118d585c1ce08b2500 /update
parent08c70cd6feffe8c31d71cb7f5a842c5124662665 (diff)
Allow stripping data from captures.
Diffstat (limited to 'update')
-rw-r--r--update/src/update.cpp51
1 files changed, 48 insertions, 3 deletions
diff --git a/update/src/update.cpp b/update/src/update.cpp
index 71db378e..bfe65e31 100644
--- a/update/src/update.cpp
+++ b/update/src/update.cpp
@@ -29,6 +29,9 @@ 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( " -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" );
exit( 1 );
}
@@ -43,10 +46,10 @@ int main( int argc, char** argv )
#endif
tracy::FileWrite::Compression clev = tracy::FileWrite::Compression::Fast;
-
+ uint32_t events = tracy::EventType::All;
int zstdLevel = 1;
int c;
- while( ( c = getopt( argc, argv, "hez:" ) ) != -1 )
+ while( ( c = getopt( argc, argv, "hez:s:" ) ) != -1 )
{
switch( c )
{
@@ -65,6 +68,48 @@ int main( int argc, char** argv )
exit( 1 );
}
break;
+ case 's':
+ {
+ auto ptr = optarg;
+ do
+ {
+ switch( *optarg )
+ {
+ case 'l':
+ events &= ~tracy::EventType::Locks;
+ break;
+ case 'm':
+ events &= ~tracy::EventType::Messages;
+ break;
+ case 'p':
+ events &= ~tracy::EventType::Plots;
+ break;
+ case 'M':
+ events &= ~tracy::EventType::Memory;
+ break;
+ case 'i':
+ events &= ~tracy::EventType::FrameImages;
+ break;
+ case 'c':
+ events &= ~tracy::EventType::ContextSwitches;
+ break;
+ case 's':
+ events &= ~tracy::EventType::Samples;
+ break;
+ case 'C':
+ events &= ~tracy::EventType::SymbolCode;
+ break;
+ case 'S':
+ events &= ~tracy::EventType::SourceCache;
+ break;
+ default:
+ Usage();
+ break;
+ }
+ }
+ while( *++optarg != '\0' );
+ break;
+ }
default:
Usage();
break;
@@ -91,7 +136,7 @@ int main( int argc, char** argv )
int inVer;
{
const auto t0 = std::chrono::high_resolution_clock::now();
- tracy::Worker worker( *f, tracy::EventType::All, false );
+ tracy::Worker worker( *f, (tracy::EventType::Type)events, false );
#ifndef TRACY_NO_STATISTICS
while( !worker.AreSourceLocationZonesReady() ) std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );