summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2013-08-27 10:23:10 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-08-29 21:10:58 +0200
commit5b95a4a3b52a1de84022dfaf580df4b5251f4a15 (patch)
tree44aac01a7b1efa2fbd4597c1b76286751bc40fca /tools/perf/util/evsel.c
parentperf tools: Add support for PERF_SAMPLE_IDENTIFIER (diff)
downloadlinux-5b95a4a3b52a1de84022dfaf580df4b5251f4a15.tar.xz
linux-5b95a4a3b52a1de84022dfaf580df4b5251f4a15.zip
perf tools: Add missing 'abi' member to 'struct regs_dump'
And store the parsed value there. Note that the 'abi' is 0 (no registers), 1 (32-bit registers) or 2 (64-bit registers), but the registers are anyway copied one-by-one as 64-bit values onto the event i.e. see 'perf_output_sample_regs()' Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1377591794-30553-9-git-send-email-adrian.hunter@intel.com Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index db4e431cb6ca..11841881cef9 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1416,13 +1416,12 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
}
if (type & PERF_SAMPLE_REGS_USER) {
- u64 avail;
-
/* First u64 tells us if we have any regs in sample. */
OVERFLOW_CHECK_u64(array);
- avail = *array++;
+ data->user_regs.abi = *array;
+ array++;
- if (avail) {
+ if (data->user_regs.abi) {
u64 regs_user = evsel->attr.sample_regs_user;
sz = hweight_long(regs_user) * sizeof(u64);