perf session: Skip event correctly for unknown id/machine
[linux-flexiantxendom0-3.2.10.git] / tools / perf / util / session.c
index 00923cd..1efd3be 100644 (file)
@@ -876,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session,
                dump_sample(session, event, sample);
                if (evsel == NULL) {
                        ++session->hists.stats.nr_unknown_id;
-                       return -1;
+                       return 0;
                }
                if (machine == NULL) {
                        ++session->hists.stats.nr_unprocessable_samples;
-                       return -1;
+                       return 0;
                }
                return tool->sample(tool, event, sample, evsel, machine);
        case PERF_RECORD_MMAP: