Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934303AbeAKO0K (ORCPT + 1 other); Thu, 11 Jan 2018 09:26:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58074 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933486AbeAKO0I (ORCPT ); Thu, 11 Jan 2018 09:26:08 -0500 Date: Thu, 11 Jan 2018 15:25:58 +0100 From: Jiri Olsa To: kan.liang@intel.com Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, yao.jin@linux.intel.com Subject: Re: [PATCH V3 07/12] perf mmap: discard legacy interface for mmap read Message-ID: <20180111142558.GE16655@krava> References: <1513879734-237492-1-git-send-email-kan.liang@intel.com> <1513879734-237492-8-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513879734-237492-8-git-send-email-kan.liang@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 11 Jan 2018 14:26:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Dec 21, 2017 at 10:08:49AM -0800, kan.liang@intel.com wrote: > From: Kan Liang > > Discards perf_mmap__read_backward and perf_mmap__read_catchup. No tools > use them. > > There are tools still use perf_mmap__read_forward. Keep it, but add > comments to point to the new interface for future use. > > Signed-off-by: Kan Liang > --- > tools/perf/util/mmap.c | 50 ++++---------------------------------------------- > tools/perf/util/mmap.h | 3 --- > 2 files changed, 4 insertions(+), 49 deletions(-) > > diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c > index d0ca3ba..650e0a7 100644 > --- a/tools/perf/util/mmap.c > +++ b/tools/perf/util/mmap.c > @@ -63,6 +63,10 @@ static union perf_event *perf_mmap__read(struct perf_mmap *map, > return event; > } > > +/* > + * legacy interface for mmap read. > + * Don't use it. Use perf_mmap__read_event(). > + */ could we get rid of it then? looks like it's not much work, seems it's used only in: perf_evlist__mmap_read perf_evlist__mmap_read_forward it'd prove the new interface work correctly for both cases thanks, jirka > union perf_event *perf_mmap__read_forward(struct perf_mmap *map) > { > u64 head; > @@ -78,41 +82,6 @@ union perf_event *perf_mmap__read_forward(struct perf_mmap *map) > return perf_mmap__read(map, &map->prev, head); > } SNIP