perf auxtrace: Add option to synthesize events for transactions
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 30 Apr 2015 14:37:28 +0000 (17:37 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 May 2015 21:12:55 +0000 (18:12 -0300)
Add AUX area tracing option 'x' to synthesize events for transactions.
This will be used by Intel PT to synthesize an event record for each TSX
start, commit or abort.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1430404667-10593-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-inject.txt
tools/perf/Documentation/perf-report.txt
tools/perf/Documentation/perf-script.txt
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h

index bb1f655e1361bf4e0f69eee853dc3bd5f21925ac..b876ae312699b9388f6565eec18e239305309f31 100644 (file)
@@ -52,11 +52,12 @@ OPTIONS
                b       synthesize branches events
                c       synthesize branches events (calls only)
                r       synthesize branches events (returns only)
+               x       synthesize transactions events
                e       synthesize error events
                d       create a debug log
-               g       synthesize a call chain for instructions events
+               g       synthesize a call chain (use with i or x)
 
-       The default is all events i.e. the same as --itrace=ibe
+       The default is all events i.e. the same as --itrace=ibxe
 
        In addition, the period (default 100000) for instructions events
        can be specified in units of:
@@ -67,8 +68,8 @@ OPTIONS
                us      microseconds
                ns      nanoseconds (default)
 
-       Also the call chain size (default 16, max. 1024) for instructions
-       events can be specified.
+       Also the call chain size (default 16, max. 1024) for instructions or
+       transactions events can be specified.
 
 SEE ALSO
 --------
index b771340d193d1c7de76f70a4a1bb96fc7d1c60a6..27190ed06f9cda13e7da17bee76826e46e19b622 100644 (file)
@@ -331,11 +331,12 @@ OPTIONS
                b       synthesize branches events
                c       synthesize branches events (calls only)
                r       synthesize branches events (returns only)
+               x       synthesize transactions events
                e       synthesize error events
                d       create a debug log
-               g       synthesize a call chain for instructions events
+               g       synthesize a call chain (use with i or x)
 
-       The default is all events i.e. the same as --itrace=ibe
+       The default is all events i.e. the same as --itrace=ibxe
 
        In addition, the period (default 100000) for instructions events
        can be specified in units of:
@@ -346,8 +347,8 @@ OPTIONS
                us      microseconds
                ns      nanoseconds (default)
 
-       Also the call chain size (default 16, max. 1024) for instructions
-       events can be specified.
+       Also the call chain size (default 16, max. 1024) for instructions or
+       transactions events can be specified.
 
        To disable decoding entirely, use --no-itrace.
 
index b29cd2f17d13a9bcd5be661307ae716e1382d917..c82df572fac2ed4b4285487485d0ed33492e36c5 100644 (file)
@@ -235,11 +235,12 @@ OPTIONS
                b       synthesize branches events
                c       synthesize branches events (calls only)
                r       synthesize branches events (returns only)
+               x       synthesize transactions events
                e       synthesize error events
                d       create a debug log
-               g       synthesize a call chain for instructions events
+               g       synthesize a call chain (use with i or x)
 
-       The default is all events i.e. the same as --itrace=ibe
+       The default is all events i.e. the same as --itrace=ibxe
 
        In addition, the period (default 100000) for instructions events
        can be specified in units of:
@@ -250,8 +251,8 @@ OPTIONS
                us      microseconds
                ns      nanoseconds (default)
 
-       Also the call chain size (default 16, max. 1024) for instructions
-       events can be specified.
+       Also the call chain size (default 16, max. 1024) for instructions or
+       transactions events can be specified.
 
        To disable decoding entirely, use --no-itrace.
 
index 28ce134a61ad8328cc90593c789558357ea1d4f1..129371048fc1c8aaed6b9726a10e35f17f3447ad 100644 (file)
@@ -888,6 +888,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->errors = true;
        synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE;
        synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD;
@@ -960,6 +961,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
                case 'b':
                        synth_opts->branches = true;
                        break;
+               case 'x':
+                       synth_opts->transactions = true;
+                       break;
                case 'e':
                        synth_opts->errors = true;
                        break;
@@ -975,7 +979,6 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
                        synth_opts->returns = true;
                        break;
                case 'g':
-                       synth_opts->instructions = true;
                        synth_opts->callchain = true;
                        synth_opts->callchain_sz =
                                        PERF_ITRACE_DEFAULT_CALLCHAIN_SZ;
index 77b46994e8eaaef3079d8ebdf78704f44d9e970a..8c6cbb123fe579334be690aae601318d548a25d9 100644 (file)
@@ -54,6 +54,7 @@ enum itrace_period_type {
  *          because 'perf inject' will write it out
  * @instructions: whether to synthesize 'instructions' events
  * @branches: whether to synthesize 'branches' events
+ * @transactions: whether to synthesize events for transactions
  * @errors: whether to synthesize decoder error events
  * @dont_decode: whether to skip decoding entirely
  * @log: write a decoding log
@@ -69,6 +70,7 @@ struct itrace_synth_opts {
        bool                    inject;
        bool                    instructions;
        bool                    branches;
+       bool                    transactions;
        bool                    errors;
        bool                    dont_decode;
        bool                    log;
This page took 0.028416 seconds and 5 git commands to generate.