Skip to content
Snippets Groups Projects
Commit 6782206b authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

perf session: Skip event correctly for unknown id/machine


In case the perf_session__process_event function fails, we estimate the
next event offset.

This is not necessary for sample event failing on unknown ID or machine.
In such case we know proper size of the event, so we dont need to guess.
Also failure statistics are updated correctly so we don't miss any
information.

Forcing perf_session__process_event to return 0 in case of unknown ID or
machine.

Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1334233262-5679-3-git-send-email-jolsa@redhat.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7fb0a5ee
No related branches found
No related tags found
No related merge requests found
...@@ -876,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session, ...@@ -876,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session,
dump_sample(session, event, sample); dump_sample(session, event, sample);
if (evsel == NULL) { if (evsel == NULL) {
++session->hists.stats.nr_unknown_id; ++session->hists.stats.nr_unknown_id;
return -1; return 0;
} }
if (machine == NULL) { if (machine == NULL) {
++session->hists.stats.nr_unprocessable_samples; ++session->hists.stats.nr_unprocessable_samples;
return -1; return 0;
} }
return tool->sample(tool, event, sample, evsel, machine); return tool->sample(tool, event, sample, evsel, machine);
case PERF_RECORD_MMAP: case PERF_RECORD_MMAP:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment