From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
Stephane Eranian <eranian@google.com>
Subject: [PATCH V3 07/25] perf auxtrace: Add option to synthesize events for transactions
Date: Fri, 24 Apr 2015 22:29:49 +0300 [thread overview]
Message-ID: <1429903807-20559-8-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1429903807-20559-1-git-send-email-adrian.hunter@intel.com>
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>
---
tools/perf/Documentation/perf-inject.txt | 9 +++++----
tools/perf/Documentation/perf-report.txt | 9 +++++----
tools/perf/Documentation/perf-script.txt | 9 +++++----
tools/perf/util/auxtrace.c | 5 ++++-
tools/perf/util/auxtrace.h | 2 ++
5 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/tools/perf/Documentation/perf-inject.txt b/tools/perf/Documentation/perf-inject.txt
index bb1f655..b876ae3 100644
--- a/tools/perf/Documentation/perf-inject.txt
+++ b/tools/perf/Documentation/perf-inject.txt
@@ -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
--------
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 4034ec7..cda85e1 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -330,11 +330,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:
@@ -345,8 +346,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.
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index b29cd2f..c82df57 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -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.
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index f94af20..2883376 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -889,6 +889,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;
@@ -961,6 +962,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;
@@ -976,7 +980,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;
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 77b4699..8c6cbb1 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -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;
--
1.9.1
next prev parent reply other threads:[~2015-04-24 19:38 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 19:29 [PATCH V3 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 01/25] perf tools: Amend mmap ref counting for the AUX area mmap Adrian Hunter
2015-05-06 3:11 ` [tip:perf/core] perf evlist: " tip-bot for Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 02/25] perf script: Always allow fields 'addr' and 'cpu' for auxtrace Adrian Hunter
2015-05-06 3:12 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 03/25] perf report: Add Instruction Tracing support Adrian Hunter
2015-05-06 3:12 ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 04/25] perf tools: Add AUX area tracing index Adrian Hunter
2015-04-28 12:07 ` Jiri Olsa
2015-04-29 11:26 ` Adrian Hunter
2015-04-28 12:32 ` Jiri Olsa
2015-04-29 12:11 ` Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 05/25] perf tools: Hit all build ids when AUX area tracing Adrian Hunter
2015-04-28 12:45 ` Jiri Olsa
2015-04-29 12:24 ` Adrian Hunter
2015-04-29 15:26 ` Jiri Olsa
2015-04-24 19:29 ` [PATCH V3 06/25] perf tools: Add build option NO_AUXTRACE to exclude " Adrian Hunter
2015-04-28 12:59 ` Jiri Olsa
2015-04-24 19:29 ` Adrian Hunter [this message]
2015-04-28 13:02 ` [PATCH V3 07/25] perf auxtrace: Add option to synthesize events for transactions Jiri Olsa
2015-04-24 19:29 ` [PATCH V3 08/25] perf tools: Add support for PERF_RECORD_AUX Adrian Hunter
2015-04-28 13:09 ` Jiri Olsa
2015-04-24 19:29 ` [PATCH V3 09/25] perf tools: Add support for PERF_RECORD_ITRACE_START Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 10/25] perf tools: Add AUX area tracing Snapshot Mode Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 11/25] perf record: Add AUX area tracing Snapshot Mode support Adrian Hunter
2015-04-28 13:24 ` Jiri Olsa
2015-04-29 13:14 ` Adrian Hunter
2015-04-29 15:23 ` Jiri Olsa
2015-04-24 19:29 ` [PATCH V3 12/25] perf auxtrace: Add Intel PT as an AUX area tracing type Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 13/25] perf tools: Add Intel PT packet decoder Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 14/25] perf tools: Add Intel PT instruction decoder Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 15/25] perf tools: Add Intel PT log Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 16/25] perf tools: Add Intel PT decoder Adrian Hunter
2015-04-24 19:29 ` [PATCH V3 17/25] perf tools: Add Intel PT support Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 18/25] perf tools: Take Intel PT into use Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 19/25] perf tools: Allow auxtrace data alignment Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 20/25] perf tools: Add Intel BTS support Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 21/25] perf tools: Output sample flags and insn_len from intel_pt Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 22/25] perf tools: Output sample flags and insn_len from intel_bts Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 23/25] perf tools: Intel PT to always update thread stack trace number Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 24/25] perf tools: Intel BTS " Adrian Hunter
2015-04-24 19:30 ` [PATCH V3 25/25] perf tools: Add example call-graph script Adrian Hunter
2015-04-24 20:33 ` [PATCH V3 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing Arnaldo Carvalho de Melo
2015-04-28 14:33 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429903807-20559-8-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox