From: tip-bot for He Kuang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/core] perf evlist: Fix inverted logic in perf_mmap__empty
Date: Wed, 8 Apr 2015 08:10:30 -0700 [thread overview]
Message-ID: <tip-8ea92ceb748535799e3e9f35afb85bdc23bf6d7c@git.kernel.org> (raw)
In-Reply-To: <1428399071-7141-1-git-send-email-hekuang@huawei.com>
Commit-ID: 8ea92ceb748535799e3e9f35afb85bdc23bf6d7c
Gitweb: http://git.kernel.org/tip/8ea92ceb748535799e3e9f35afb85bdc23bf6d7c
Author: He Kuang <hekuang@huawei.com>
AuthorDate: Tue, 7 Apr 2015 17:31:10 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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 <hekuang@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1428399071-7141-1-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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)
prev parent reply other threads:[~2015-04-08 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 9:31 [PATCH 1/2] perf evlist: Fix inverted logic in perf_mmap__empty He Kuang
2015-04-07 9:31 ` [PATCH 2/2] perf trace: Fix segmentfault on perf trace He Kuang
2015-04-07 12:36 ` Arnaldo Carvalho de Melo
2015-04-08 3:15 ` He Kuang
2015-05-11 12:11 ` He Kuang
2015-05-11 13:47 ` Arnaldo Carvalho de Melo
2015-05-11 13:57 ` Arnaldo Carvalho de Melo
2015-04-07 11:59 ` [PATCH 1/2] perf evlist: Fix inverted logic in perf_mmap__empty Arnaldo Carvalho de Melo
2015-04-08 15:10 ` tip-bot for He Kuang [this message]
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-8ea92ceb748535799e3e9f35afb85bdc23bf6d7c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=hekuang@huawei.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangnan0@huawei.com \
/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.