All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: He Kuang <hekuang@huawei.com>
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
Date: Tue, 7 Apr 2015 08:59:15 -0300	[thread overview]
Message-ID: <20150407115915.GE11983@kernel.org> (raw)
In-Reply-To: <1428399071-7141-1-git-send-email-hekuang@huawei.com>

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

  parent reply	other threads:[~2015-04-07 11:59 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 ` Arnaldo Carvalho de Melo [this message]
2015-04-08 15:10 ` [tip:perf/core] perf evlist: Fix inverted logic in perf_mmap__empty tip-bot for He Kuang

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=20150407115915.GE11983@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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.