perf auxtrace: Add itrace 'q' option for quicker, less detailed decoding
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 10 Jul 2020 15:11:02 +0000 (18:11 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 6 Aug 2020 11:24:03 +0000 (08:24 -0300)
The 'q' option is for modes of decoding that are quicker because they
skip or omit decoding some aspects of trace data.

If supported, the 'q' option may be repeated to increase the effect.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200710151104.15137-11-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/itrace.txt
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h

index 9c0e8586ed4741d44ff4cf1a60538a64cc8b3fbd..d3740c8f399bac1a03b75cc8484a40d21080fb60 100644 (file)
@@ -18,6 +18,7 @@
                l       synthesize last branch entries (use with i or x)
                L       synthesize last branch entries on existing event records
                s       skip initial number of events
+               q       quicker (less detailed) decoding
 
        The default is all events i.e. the same as --itrace=ibxwpe,
        except for perf script where it is --itrace=ce
@@ -58,3 +59,5 @@
        debug messages will or will not be logged. Each flag must be preceded
        by either '+' or '-'. The flags are:
                a       all perf events
+
+       If supported, the 'q' option may be repeated to increase the effect.
index e028187c51fe8b51f2cb684771a279154818e87b..42a85c86421d73d7da55f9f1e87e40de4fca291e 100644 (file)
@@ -1554,6 +1554,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
                case 'a':
                        synth_opts->remote_access = true;
                        break;
+               case 'q':
+                       synth_opts->quick += 1;
+                       break;
                case ' ':
                case ',':
                        break;
index 821ef5446a13585090cb8823dad9d1c92fd7436a..951d2d14cf249b3729d2dc9e3391fac1f5bf903e 100644 (file)
@@ -100,6 +100,7 @@ enum itrace_period_type {
  * @error_minus_flags: flags to affect what errors are reported
  * @log_plus_flags: flags to affect what is logged
  * @log_minus_flags: flags to affect what is logged
+ * @quick: quicker (less detailed) decoding
  */
 struct itrace_synth_opts {
        bool                    set;
@@ -137,6 +138,7 @@ struct itrace_synth_opts {
        unsigned int            error_minus_flags;
        unsigned int            log_plus_flags;
        unsigned int            log_minus_flags;
+       unsigned int            quick;
 };
 
 /**
@@ -642,6 +644,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
 "                              l[len]:                 synthesize last branch entries (use with i or x)\n" \
 "                              L[len]:                 synthesize last branch entries on existing event records\n" \
 "                              sNUMBER:                skip initial number of events\n"                \
+"                              q:                      quicker (less detailed) decoding\n" \
 "                              PERIOD[ns|us|ms|i|t]:   specify period to sample stream\n" \
 "                              concatenate multiple options. Default is ibxwpe or cewp\n"