perf auxtrace: Add itrace option to output ptwrite events
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 26 May 2017 08:17:24 +0000 (11:17 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Jun 2017 15:09:20 +0000 (12:09 -0300)
Add itrace option to output ptwrite events.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1495786658-18063-24-git-send-email-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 e2a4c5e0dbe5b078a4a54b38a65007d00b06c94a..deafd16692b6b0064d05703486af25089734bf63 100644 (file)
@@ -3,13 +3,14 @@
                c       synthesize branches events (calls only)
                r       synthesize branches events (returns only)
                x       synthesize transactions events
+               w       synthesize ptwrite events
                e       synthesize error events
                d       create a debug log
                g       synthesize a call chain (use with i or x)
                l       synthesize last branch entries (use with i or x)
                s       skip initial number of events
 
-       The default is all events i.e. the same as --itrace=ibxe
+       The default is all events i.e. the same as --itrace=ibxwe
 
        In addition, the period (default 100000) for instructions events
        can be specified in units of:
@@ -26,8 +27,8 @@
        Also the number of last branch entries (default 64, max. 1024) for
        instructions or transactions events can be specified.
 
-       It is also possible to skip events generated (instructions, branches, transactions)
-       at the beginning. This is useful to ignore initialization code.
+       It is also possible to skip events generated (instructions, branches, transactions,
+       ptwrite) at the beginning. This is useful to ignore initialization code.
 
        --itrace=i0nss1000000
 
index 0daf63b9ee3e1482cdc5fc5e96a968c4117e3a0c..baad91ed1e054168989ede749d476fd39af22ff1 100644 (file)
@@ -947,6 +947,7 @@ void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts)
        synth_opts->instructions = true;
        synth_opts->branches = true;
        synth_opts->transactions = true;
+       synth_opts->ptwrites = true;
        synth_opts->errors = true;
        synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE;
        synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD;
@@ -1030,6 +1031,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
                case 'x':
                        synth_opts->transactions = true;
                        break;
+               case 'w':
+                       synth_opts->ptwrites = true;
+                       break;
                case 'e':
                        synth_opts->errors = true;
                        break;
index 9f0de72d58e26f07c479e53965cc106c365b3b70..b48afb2f18f35833467f689c1701de9ba271c4ee 100644 (file)
@@ -59,6 +59,7 @@ enum itrace_period_type {
  * @instructions: whether to synthesize 'instructions' events
  * @branches: whether to synthesize 'branches' events
  * @transactions: whether to synthesize events for transactions
+ * @ptwrites: whether to synthesize events for ptwrites
  * @errors: whether to synthesize decoder error events
  * @dont_decode: whether to skip decoding entirely
  * @log: write a decoding log
@@ -79,6 +80,7 @@ struct itrace_synth_opts {
        bool                    instructions;
        bool                    branches;
        bool                    transactions;
+       bool                    ptwrites;
        bool                    errors;
        bool                    dont_decode;
        bool                    log;