aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2017-05-26 04:17:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-06-27 11:09:20 -0400
commit3bdafdffa9baf2b34aebad1c98bc17b50202cb78 (patch)
tree725631920fc13703b9378efbb0265a7ba0d58804
parent07fda552f14830e71f0b5e8e4e31124369903aa3 (diff)
perf auxtrace: Add itrace option to output ptwrite events
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>
-rw-r--r--tools/perf/Documentation/itrace.txt7
-rw-r--r--tools/perf/util/auxtrace.c4
-rw-r--r--tools/perf/util/auxtrace.h2
3 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt
index e2a4c5e0dbe5..deafd16692b6 100644
--- a/tools/perf/Documentation/itrace.txt
+++ b/tools/perf/Documentation/itrace.txt
@@ -3,13 +3,14 @@
3 c synthesize branches events (calls only) 3 c synthesize branches events (calls only)
4 r synthesize branches events (returns only) 4 r synthesize branches events (returns only)
5 x synthesize transactions events 5 x synthesize transactions events
6 w synthesize ptwrite events
6 e synthesize error events 7 e synthesize error events
7 d create a debug log 8 d create a debug log
8 g synthesize a call chain (use with i or x) 9 g synthesize a call chain (use with i or x)
9 l synthesize last branch entries (use with i or x) 10 l synthesize last branch entries (use with i or x)
10 s skip initial number of events 11 s skip initial number of events
11 12
12 The default is all events i.e. the same as --itrace=ibxe 13 The default is all events i.e. the same as --itrace=ibxwe
13 14
14 In addition, the period (default 100000) for instructions events 15 In addition, the period (default 100000) for instructions events
15 can be specified in units of: 16 can be specified in units of:
@@ -26,8 +27,8 @@
26 Also the number of last branch entries (default 64, max. 1024) for 27 Also the number of last branch entries (default 64, max. 1024) for
27 instructions or transactions events can be specified. 28 instructions or transactions events can be specified.
28 29
29 It is also possible to skip events generated (instructions, branches, transactions) 30 It is also possible to skip events generated (instructions, branches, transactions,
30 at the beginning. This is useful to ignore initialization code. 31 ptwrite) at the beginning. This is useful to ignore initialization code.
31 32
32 --itrace=i0nss1000000 33 --itrace=i0nss1000000
33 34
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index 0daf63b9ee3e..baad91ed1e05 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -947,6 +947,7 @@ void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts)
947 synth_opts->instructions = true; 947 synth_opts->instructions = true;
948 synth_opts->branches = true; 948 synth_opts->branches = true;
949 synth_opts->transactions = true; 949 synth_opts->transactions = true;
950 synth_opts->ptwrites = true;
950 synth_opts->errors = true; 951 synth_opts->errors = true;
951 synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE; 952 synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE;
952 synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD; 953 synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD;
@@ -1030,6 +1031,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
1030 case 'x': 1031 case 'x':
1031 synth_opts->transactions = true; 1032 synth_opts->transactions = true;
1032 break; 1033 break;
1034 case 'w':
1035 synth_opts->ptwrites = true;
1036 break;
1033 case 'e': 1037 case 'e':
1034 synth_opts->errors = true; 1038 synth_opts->errors = true;
1035 break; 1039 break;
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 9f0de72d58e2..b48afb2f18f3 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -59,6 +59,7 @@ enum itrace_period_type {
59 * @instructions: whether to synthesize 'instructions' events 59 * @instructions: whether to synthesize 'instructions' events
60 * @branches: whether to synthesize 'branches' events 60 * @branches: whether to synthesize 'branches' events
61 * @transactions: whether to synthesize events for transactions 61 * @transactions: whether to synthesize events for transactions
62 * @ptwrites: whether to synthesize events for ptwrites
62 * @errors: whether to synthesize decoder error events 63 * @errors: whether to synthesize decoder error events
63 * @dont_decode: whether to skip decoding entirely 64 * @dont_decode: whether to skip decoding entirely
64 * @log: write a decoding log 65 * @log: write a decoding log
@@ -79,6 +80,7 @@ struct itrace_synth_opts {
79 bool instructions; 80 bool instructions;
80 bool branches; 81 bool branches;
81 bool transactions; 82 bool transactions;
83 bool ptwrites;
82 bool errors; 84 bool errors;
83 bool dont_decode; 85 bool dont_decode;
84 bool log; 86 bool log;