[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1334233262-5679-3-git-send-email-jolsa@redhat.com>
Date: Thu, 12 Apr 2012 14:21:01 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: acme@...hat.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
paulus@...ba.org, cjashfor@...ux.vnet.ibm.com, fweisbec@...il.com
Cc: linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...hat.com>
Subject: [PATCH 2/3] perf, tool: 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: Jiri Olsa <jolsa@...hat.com>
---
tools/perf/util/session.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 9412e3b..9189751 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -868,11 +868,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:
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists