All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <jolsa@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	jolsa@redhat.com, fweisbec@gmail.com, tglx@linutronix.de,
	cjashfor@linux.vnet.ibm.com, mingo@elte.hu
Subject: [tip:perf/urgent] perf session: Skip event correctly for unknown id/machine
Date: Sun, 15 Apr 2012 01:34:48 -0700	[thread overview]
Message-ID: <tip-6782206b5dfece4c51f587b3ca1540a4027f87dd@git.kernel.org> (raw)
In-Reply-To: <1334233262-5679-3-git-send-email-jolsa@redhat.com>

Commit-ID:  6782206b5dfece4c51f587b3ca1540a4027f87dd
Gitweb:     http://git.kernel.org/tip/6782206b5dfece4c51f587b3ca1540a4027f87dd
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Thu, 12 Apr 2012 14:21:01 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 12 Apr 2012 12:14:50 -0300

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: Jiri 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: Arnaldo Carvalho de Melo <acme@redhat.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 00923cd..1efd3be 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -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:

  reply	other threads:[~2012-04-15  8:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 12:20 [PATCH 0/3] perf, tool: kvm record & event processing fixies Jiri Olsa
2012-04-12 12:21 ` [PATCH 1/3] perf, tool: Force guest machine definition option Jiri Olsa
2012-04-12 14:40   ` David Ahern
2012-04-13 11:32     ` Jiri Olsa
2012-04-13 12:21       ` David Ahern
2012-04-13 12:41         ` Jiri Olsa
2012-04-13 14:15           ` David Ahern
2012-04-15 14:05             ` Jiri Olsa
2012-04-15 21:32               ` David Ahern
2012-04-12 12:21 ` [PATCH 2/3] perf, tool: Skip event correctly for unknown id/machine Jiri Olsa
2012-04-15  8:34   ` tip-bot for Jiri Olsa [this message]
2012-04-12 12:21 ` [PATCH 3/3] perf, tool: Fail on processing event with unknown size Jiri Olsa
2012-04-16 18:42   ` [PATCHv2 " Jiri Olsa
2012-05-11  6:37     ` [tip:perf/core] perf session: " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-6782206b5dfece4c51f587b3ca1540a4027f87dd@git.kernel.org \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.