From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932545AbdJJTAT (ORCPT ); Tue, 10 Oct 2017 15:00:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:49654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932087AbdJJTAR (ORCPT ); Tue, 10 Oct 2017 15:00:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF36321902 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Tue, 10 Oct 2017 16:00:14 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: "Liang, Kan" , "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "jolsa@kernel.org" , "hekuang@huawei.com" , "namhyung@kernel.org" , "alexander.shishkin@linux.intel.com" , "Hunter, Adrian" , "ak@linux.intel.com" Subject: Re: [PATCH 03/10] perf tool: new iterfaces to read event from ring buffer Message-ID: <20171010190014.GM28623@kernel.org> References: <1507656023-177125-1-git-send-email-kan.liang@intel.com> <1507656023-177125-4-git-send-email-kan.liang@intel.com> <20171010181520.GH28623@kernel.org> <37D7C6CF3E00A74B8858931C1DB2F077537D1B11@SHSMSX103.ccr.corp.intel.com> <20171010183455.GK28623@kernel.org> <20171010183628.GL28623@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171010183628.GL28623@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > > > > > > > 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? - Arnaldo commit a0c6f451f90204847ce5f91c3268d83a76bde1b6 Author: Wang Nan 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.