Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754365AbbDHPLK (ORCPT ); Wed, 8 Apr 2015 11:11:10 -0400 Received: from terminus.zytor.com ([198.137.202.10]:40208 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbbDHPLF (ORCPT ); Wed, 8 Apr 2015 11:11:05 -0400 Date: Wed, 8 Apr 2015 08:10:30 -0700 From: tip-bot for He Kuang Message-ID: Cc: wangnan0@huawei.com, tglx@linutronix.de, jolsa@kernel.org, acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, a.p.zijlstra@chello.nl, hekuang@huawei.com Reply-To: tglx@linutronix.de, wangnan0@huawei.com, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, acme@redhat.com, jolsa@kernel.org, hekuang@huawei.com, a.p.zijlstra@chello.nl In-Reply-To: <1428399071-7141-1-git-send-email-hekuang@huawei.com> References: <1428399071-7141-1-git-send-email-hekuang@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf evlist: Fix inverted logic in perf_mmap__empty Git-Commit-ID: 8ea92ceb748535799e3e9f35afb85bdc23bf6d7c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 42 Commit-ID: 8ea92ceb748535799e3e9f35afb85bdc23bf6d7c Gitweb: http://git.kernel.org/tip/8ea92ceb748535799e3e9f35afb85bdc23bf6d7c Author: He Kuang AuthorDate: Tue, 7 Apr 2015 17:31:10 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 8 Apr 2015 09:06:58 -0300 perf evlist: Fix inverted logic in perf_mmap__empty 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. Signed-off-by: He Kuang Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1428399071-7141-1-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 82bf224..76ef7ee 100644 --- 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) -- 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/