Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753517AbbDGL7R (ORCPT ); Tue, 7 Apr 2015 07:59:17 -0400 Received: from mail.kernel.org ([198.145.29.136]:55415 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbbDGL7O (ORCPT ); Tue, 7 Apr 2015 07:59:14 -0400 Date: Tue, 7 Apr 2015 08:59:15 -0300 From: Arnaldo Carvalho de Melo To: He Kuang Cc: a.p.zijlstra@chello.nl, mingo@redhat.com, jolsa@kernel.org, wangnan0@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] perf evlist: Fix inverted logic in perf_mmap__empty Message-ID: <20150407115915.GE11983@kernel.org> References: <1428399071-7141-1-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428399071-7141-1-git-send-email-hekuang@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 924 Lines: 24 Em Tue, Apr 07, 2015 at 05:31:10PM +0800, He Kuang escreveu: > perf_evlist__mmap_consume() uses perf_mmap__empty() to judge whether > perf_mmap is empty and can be released. But the result is inverted so > fix it. > diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c > @@ -695,7 +695,7 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) > > static bool perf_mmap__empty(struct perf_mmap *md) > { > - return perf_mmap__read_head(md) != md->prev; > + return perf_mmap__read_head(md) == md->prev; > } > > static void perf_evlist__mmap_get(struct perf_evlist *evlist, int idx) Argh, thanks, good spotting, applying... - Arnaldo -- 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/