Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932422AbdLRGqT (ORCPT ); Mon, 18 Dec 2017 01:46:19 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58779 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932306AbdLRGqS (ORCPT ); Mon, 18 Dec 2017 01:46:18 -0500 Subject: Re: [PATCH V2 1/8] perf tools: remove stale perf evlist mmap read for backward To: , , , , References: <1512603183-42754-1-git-send-email-kan.liang@intel.com> <1512603183-42754-2-git-send-email-kan.liang@intel.com> CC: , , , From: "Wangnan (F)" Message-ID: <3fc4a685-92de-bdc1-a3c5-11d44a95f600@huawei.com> Date: Mon, 18 Dec 2017 14:44:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1512603183-42754-2-git-send-email-kan.liang@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.194.139] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2439 Lines: 72 On 2017/12/7 7:32, kan.liang@intel.com wrote: > From: Kan Liang > > perf_evlist__mmap_read_catchup and perf_evlist__mmap_read_backward are > only for overwrite mode. > But they read the evlist->mmap buffer which is for non-overwrite mode. > > It did not bring any serious problem yet, because there is no one use > it. > > Remove the unused interfaces. > > Signed-off-by: Kan Liang Acked-by: Wang Nan > --- > tools/perf/util/evlist.c | 17 ----------------- > tools/perf/util/evlist.h | 4 ---- > 2 files changed, 21 deletions(-) > > diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c > index 3570355..4b6a06d 100644 > --- a/tools/perf/util/evlist.c > +++ b/tools/perf/util/evlist.c > @@ -714,28 +714,11 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int > return perf_mmap__read_forward(md); > } > > -union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx) > -{ > - struct perf_mmap *md = &evlist->mmap[idx]; > - > - /* > - * No need to check messup for backward ring buffer: > - * We can always read arbitrary long data from a backward > - * ring buffer unless we forget to pause it before reading. > - */ > - return perf_mmap__read_backward(md); > -} > - > union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) > { > return perf_evlist__mmap_read_forward(evlist, idx); > } > > -void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx) > -{ > - perf_mmap__read_catchup(&evlist->mmap[idx]); > -} > - > void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx) > { > perf_mmap__consume(&evlist->mmap[idx], false); > diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h > index 7516066..a80fd47 100644 > --- a/tools/perf/util/evlist.h > +++ b/tools/perf/util/evlist.h > @@ -132,10 +132,6 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx); > > union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, > int idx); > -union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, > - int idx); > -void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx); > - > void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx); > > int perf_evlist__open(struct perf_evlist *evlist);