diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-05-11 08:13:55 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-11 08:13:55 +0200 |
commit | 5dcefda0fd87fefa440abc9b9d3f1089229f8911 (patch) | |
tree | f19697dc461b40e277109fbba659d614892bb0d2 /tools/perf/util/session.c | |
parent | Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | perf hists browser: Use '/' for search/filter instead of 's' (diff) | |
download | linux-5dcefda0fd87fefa440abc9b9d3f1089229f8911.tar.xz linux-5dcefda0fd87fefa440abc9b9d3f1089229f8911.zip |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Fixes and improvements for perf/core:
- perf_target: abstraction for --uid, --pid, --tid, --cpu, --all-cpus handling,
eliminating code duplicated in the tools, having constraints that apply to
all of them, from Namhyung Kim
- Fixes for handling fallback to cpu-clock on PPC, from David Ahern
- Fix for processing events with unknown size, from Jiri Olsa
- Compilation fix on 32-bit, from Jiri Olsa
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 1efd3bee6336..4dcc8f3190cf 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1108,16 +1108,10 @@ more: } if ((skip = perf_session__process_event(self, &event, tool, head)) < 0) { - dump_printf("%#" PRIx64 " [%#x]: skipping unknown header type: %d\n", - head, event.header.size, event.header.type); - /* - * assume we lost track of the stream, check alignment, and - * increment a single u64 in the hope to catch on again 'soon'. - */ - if (unlikely(head & 7)) - head &= ~7ULL; - - size = 8; + pr_err("%#" PRIx64 " [%#x]: failed to process type: %d\n", + head, event.header.size, event.header.type); + err = -EINVAL; + goto out_err; } head += size; @@ -1226,17 +1220,11 @@ more: if (size == 0 || perf_session__process_event(session, event, tool, file_pos) < 0) { - dump_printf("%#" PRIx64 " [%#x]: skipping unknown header type: %d\n", - file_offset + head, event->header.size, - event->header.type); - /* - * assume we lost track of the stream, check alignment, and - * increment a single u64 in the hope to catch on again 'soon'. - */ - if (unlikely(head & 7)) - head &= ~7ULL; - - size = 8; + pr_err("%#" PRIx64 " [%#x]: failed to process type: %d\n", + file_offset + head, event->header.size, + event->header.type); + err = -EINVAL; + goto out_err; } head += size; |