From: Carl Worth Date: Sat, 16 Feb 2013 00:31:11 +0000 (-0800) Subject: trim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=6e57af89424041f13fbaa519d15deba4aa6d523f trim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE The --prune option is documented precisely to prune calls with no side effects, so that's the flag it should examine. Previously, the trim --prune code was keying off of the VERBOSE flag. This hasn't made a substantial difference in the past, (the NO_SIDE_EFFECTS calls have historically all been VERBOSE as well). But NO_SIDE_EFFECTS has the advantage that it can objectively determined, so the set of calls that should have this flag should be unambiguous. (Meanwhile, whether any particular call should be classified as VERBOSE is inherently subjective.) --- diff --git a/cli/cli_trim.cpp b/cli/cli_trim.cpp index 5625a2c..b0cb8f1 100644 --- a/cli/cli_trim.cpp +++ b/cli/cli_trim.cpp @@ -210,8 +210,8 @@ trim_trace(const char *filename, struct trim_options *options) goto NEXT; } - /* Also, prune if uninteresting (unless the user asked for no pruning. */ - if (options->prune_uninteresting && call->flags & trace::CALL_FLAG_VERBOSE) { + /* Also, prune if no side effects (unless the user asked for no pruning. */ + if (options->prune_uninteresting && call->flags & trace::CALL_FLAG_NO_SIDE_EFFECTS) { goto NEXT; }