X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=cli%2Fcli_trim.cpp;h=342e66b02e831c2b22a5d9a63d4a17e98c9a48d1;hb=ec8f5a61f393e75e4c3e3e22f84c773af66810e9;hp=d7568449269d39f6820f17374628595b7ca18d71;hpb=a0931fd50d69c136535b2afbb53d129c30e404c5;p=apitrace diff --git a/cli/cli_trim.cpp b/cli/cli_trim.cpp index d756844..342e66b 100644 --- a/cli/cli_trim.cpp +++ b/cli/cli_trim.cpp @@ -82,12 +82,14 @@ help() " --deps Perform dependency analysis and include dependent\n" " calls as needed, (even if those calls were not\n" " explicitly requested with --calls or --frames).\n" + " (On by default. See --no-deps or --exact)\n" " --no-deps Do not perform dependency analysis. Output will\n" " not include any additional calls beyond those\n" " explicitly requested with --calls or --frames).\n" "\n" " --prune Omit calls with no side effects, even if the call\n" " is within the range specified by --calls/--frames.\n" + " (On by default. See --no-prune or --exact)\n" "\n" " --no-prune Never omit any calls from the range specified\n" " --calls/--frames.\n" @@ -96,7 +98,8 @@ help() " of uninteresting calls the resulting trace may\n" " include more and less calls than specified.\n" " This option is equivalent\n" - " to passing both --deps and --prune.\n" + " to passing both --deps and --prune and is on by\n" + " default (see --no-deps, --no-prune and --exact)\n" "\n" " --exact Trim output to exact the calls or frames\n" " specified with --calls or --frames.\n" @@ -200,7 +203,7 @@ trim_trace(const char *filename, struct trim_options *options) trace::ParseBookmark beginning; trace::Parser p; TraceAnalyzer analyzer(options->trim_flags); - std::set *required; + trace::FastCallSet *required; unsigned frame; int call_range_first, call_range_last; @@ -293,7 +296,7 @@ trim_trace(const char *filename, struct trim_options *options) break; } - if (required->find(call->no) != required->end()) { + if (required->contains(call->no)) { writer.writeCall(call); if (options->print_callset) { @@ -370,8 +373,8 @@ command(int argc, char *argv[]) options.calls = trace::CallSet(trace::FREQUENCY_NONE); options.frames = trace::CallSet(trace::FREQUENCY_NONE); - options.dependency_analysis = false; - options.prune_uninteresting = false; + options.dependency_analysis = true; + options.prune_uninteresting = true; options.output = ""; options.thread = -1; options.print_callset = 0;