summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-09-20 07:40:43 -0700
committerIngo Molnar <mingo@kernel.org>2013-10-04 10:06:12 +0200
commit475eeab9f3c1579c8da89667496084db4867bf7c (patch)
treecacc059c63a8091d69f2cd024dba7c74a6b0d1d8 /tools/perf/util/evsel.c
parent0126d493b62e1306db09e1019c05e0bfe84ae8e7 (diff)
downloadop-kernel-dev-475eeab9f3c1579c8da89667496084db4867bf7c.zip
op-kernel-dev-475eeab9f3c1579c8da89667496084db4867bf7c.tar.gz
tools/perf: Add support for record transaction flags
Add support for recording and displaying the transaction flags. They are essentially a new sort key. Also display them in a nice way to the user. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1379688044-14173-6-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 0ce9feb..abe69af 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -681,6 +681,9 @@ void perf_evsel__config(struct perf_evsel *evsel,
attr->mmap2 = track && !perf_missing_features.mmap2;
attr->comm = track;
+ if (opts->sample_transaction)
+ attr->sample_type |= PERF_SAMPLE_TRANSACTION;
+
/*
* XXX see the function comment above
*
@@ -1470,6 +1473,12 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
array++;
}
+ data->transaction = 0;
+ if (type & PERF_SAMPLE_TRANSACTION) {
+ data->transaction = *array;
+ array++;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud