Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751355AbaK0Nyt (ORCPT ); Thu, 27 Nov 2014 08:54:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36987 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750926AbaK0Nyr (ORCPT ); Thu, 27 Nov 2014 08:54:47 -0500 Date: Thu, 27 Nov 2014 11:54:35 -0200 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Ingo Molnar , Jiri Olsa , linux-kernel@vger.kernel.org, Linus Torvalds , Andi Kleen , Corey Ashford , David Ahern , Frederic Weisbecker , Matt Fleming , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian Subject: Re: [PATCH] perf tools: Do not fail on processing out of order event Message-ID: <20141127135435.GJ3808@redhat.com> References: <1417016371-30249-1-git-send-email-jolsa@kernel.org> <20141126154459.GD3808@redhat.com> <20141127105603.GA1987@gmail.com> <20141127125416.GA25752@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141127125416.GA25752@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Nov 27, 2014 at 01:54:16PM +0100, Jiri Olsa escreveu: > On Thu, Nov 27, 2014 at 11:56:03AM +0100, Ingo Molnar wrote: > > SNIP > > > > > - pr_oe_time(timestamp, "out of order event"); > > > > + pr_oe_time(timestamp, "out of order event\n"); > > > > pr_oe_time(oe->last_flush, "last flush, last_flush_type %d\n", > > > > oe->last_flush_type); > > > > > > > > - /* We could get out of order messages after forced flush. */ > > > > - if (oe->last_flush_type != OE_FLUSH__HALF) > > > > - return -EINVAL; > > > > + s->stats.nr_unordered_events++; > > > > Btw., in the forced flush case we'll get out of order events that > > are 'expected'. Shouldn't we count them separately and not warn > > about them, or so? > > hum, we warned about them anyway, we just did not fail processing.. > and the impact of both cases should be the same.. it's just at the > forced flush we expected/allowed out of order events > > so I think it's ok to share the same counter and warn about > them the same way Sure? See my other message, aren't those two kinds of reordering? I.e. one that we can "fix" (aka reorder as part of a flush), one that we can't? > > > > > > + if (session->stats.nr_unordered_events != 0) { > > > > + ui__warning("%u out of order events recorded.\n", > > > > + session->stats.nr_unordered_events); > > > > + } > > > > Nit: I'd suggest keeping the message printout on a single line: > > > > if (session->stats.nr_unordered_events != 0) { > > ui__warning("%u out of order events recorded.\n", session->stats.nr_unordered_events); > > > > as IMHO the cure for this col80 linebreak checkpatch warning is > > worse than the disease! :-) > > ok ;-) > > > > > Barring those details: > > > > Acked-by: Ingo Molnar > > thanks, > jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/