All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Wangnan (F)" <wangnan0@huawei.com>
Cc: "Liang, Kan" <kan.liang@intel.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"hekuang@huawei.com" <hekuang@huawei.com>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"alexander.shishkin@linux.intel.com" 
	<alexander.shishkin@linux.intel.com>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer
Date: Tue, 10 Oct 2017 16:17:37 -0300	[thread overview]
Message-ID: <20171010191737.GQ28623@kernel.org> (raw)
In-Reply-To: <af48ee95-a471-7b79-a486-2a630eaf0b3d@huawei.com>

Em Wed, Oct 11, 2017 at 03:10:37AM +0800, Wangnan (F) escreveu:
> 
> 
> On 2017/10/11 3:00, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Oct 10, 2017 at 03:36:28PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Tue, Oct 10, 2017 at 03:34:55PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Tue, Oct 10, 2017 at 06:28:18PM +0000, Liang, Kan escreveu:
> > > > > > Em Tue, Oct 10, 2017 at 10:20:16AM -0700, kan.liang@intel.com escreveu:
> > > > > > > From: Kan Liang <kan.liang@intel.com>
> > > > > > > 
> > > > > > > The perf_evlist__mmap_read only support forward mode. It needs a
> > > > > > > common function to support both forward and backward mode.
> > > > > > > The perf_evlist__mmap_read_backward is buggy.
> > > > > > So, what is the bug? You state that it is buggy, but don't spell out the bug,
> > > > > > please do so.
> > > > > > 
> > > > > union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx)
> > > > > {
> > > > > 	struct perf_mmap *md = &evlist->mmap[idx];  <--- it should be backward_mmap
> > > > > 
> > > > > > If it fixes an existing bug, then it should go separate from this patchkit, right?
> > > > > There is no one use perf_evlist__mmap_read_backward. So it doesn't trigger any issue.
> > > > There is no one at the end of your patchkit? Or no user _right now_? If
> > > > there is a user now, lemme see... yeah, no user right now, so _that_ is
> > > > yet another bug, i.e. it should be used, no? If this is just a left
> > > > over, then we should just throw it away, now, its a cleanup.
> > > Wang, can you take a look at these two issues?
> > So it looks leftover that should've been removed by the following cset, right Wang?

> > commit a0c6f451f90204847ce5f91c3268d83a76bde1b6
> > Author: Wang Nan <wangnan0@huawei.com>
> > Date:   Thu Jul 14 08:34:41 2016 +0000

> >      perf evlist: Drop evlist->backward
> >      Now there's no real user of evlist->backward. Drop it. We are going to
> >      use evlist->backward_mmap as a container for backward ring buffer.
 
> Yes, it should be removed, but then there will be no corresponding
> function to perf_evlist__mmap_read(), which read an record from forward
> ring buffer.
 
> I think Kan wants to become the first user of this function because
> he is trying to make 'perf top' utilizing backward ring buffer. It needs
> perf_evlist__mmap_read_backward(), and he triggers the bug use his
> unpublished patch set.
 
> I think we can remove it now, let Kan fix and add it back in his 'perf top'
> patch set.

Well, if there will be a user, perhaps we should fix it, as it seems
interesting to have now for, as you said, a counterpart for the forward
ring buffer, and one that we have plans for using soon, right?

It doesn't need to go via perf/urgent as there is no current user, but I
could just fix it so that we have more info about its history in the git
commit logs.

- Arnaldo

  reply	other threads:[~2017-10-10 19:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 17:20 [PATCH 00/10] new mmap_read interfaces for ring buffer kan.liang
2017-10-10 17:20 ` [PATCH 01/10] perf record: new interfaces to read ring buffer to file kan.liang
2017-10-10 18:24   ` Arnaldo Carvalho de Melo
2017-10-10 18:30   ` Arnaldo Carvalho de Melo
2017-10-11  4:12     ` Liang, Kan
2017-10-11 14:45       ` Arnaldo Carvalho de Melo
2017-10-11 15:16         ` Liang, Kan
2017-10-10 17:20 ` [PATCH 02/10] perf tool: fix: Don't discard prev in backward mode kan.liang
2017-10-10 18:14   ` Arnaldo Carvalho de Melo
2017-10-10 18:18     ` Liang, Kan
2017-10-13 12:55     ` Liang, Kan
2017-10-13 13:13       ` Arnaldo Carvalho de Melo
2017-10-13 13:14         ` Liang, Kan
2017-10-10 18:23   ` Wangnan (F)
2017-10-10 18:50     ` Wangnan (F)
2017-10-10 19:50       ` Liang, Kan
2017-10-10 20:18         ` Wangnan (F)
2017-10-11  2:12           ` Liang, Kan
2017-10-11 14:57             ` Liang, Kan
2017-10-12  1:11               ` Wangnan (F)
2017-10-12 12:49                 ` Liang, Kan
2017-10-12 14:43                   ` Wangnan (F)
2017-10-10 19:36     ` Liang, Kan
2017-10-10 17:20 ` [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer kan.liang
2017-10-10 18:15   ` Arnaldo Carvalho de Melo
2017-10-10 18:28     ` Liang, Kan
2017-10-10 18:34       ` Arnaldo Carvalho de Melo
2017-10-10 18:36         ` Arnaldo Carvalho de Melo
2017-10-10 19:00           ` Arnaldo Carvalho de Melo
2017-10-10 19:10             ` Wangnan (F)
2017-10-10 19:17               ` Arnaldo Carvalho de Melo [this message]
2017-10-10 19:22                 ` Wangnan (F)
2017-10-10 19:55                   ` Liang, Kan
2017-10-10 19:59                     ` Wangnan (F)
2017-10-10 17:20 ` [PATCH 04/10] perf tool: perf_mmap__read_init wrapper for evlist kan.liang
2017-10-10 17:20 ` [PATCH 05/10] perf top: apply new mmap_read interfaces kan.liang
2017-10-10 17:20 ` [PATCH 06/10] perf trace: " kan.liang
2017-10-10 17:20 ` [PATCH 07/10] perf kvm: " kan.liang
2017-10-10 17:20 ` [PATCH 08/10] perf python: " kan.liang
2017-10-10 17:20 ` [PATCH 09/10] perf tests: " kan.liang
2017-10-10 17:20 ` [PATCH 10/10] perf tool: remove stale " kan.liang

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=20171010191737.GQ28623@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --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.