Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933022AbeAKV2O convert rfc822-to-8bit (ORCPT + 1 other); Thu, 11 Jan 2018 16:28:14 -0500 Received: from mga06.intel.com ([134.134.136.31]:29647 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472AbeAKV2N (ORCPT ); Thu, 11 Jan 2018 16:28:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,346,1511856000"; d="scan'208";a="166072222" From: "Liang, Kan" To: Jiri Olsa 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 Thread-Topic: [PATCH V3 07/12] perf mmap: discard legacy interface for mmap read Thread-Index: AQHTeohY6eH1Z7sYBECYUGT4pi3x8aNuVQQAgADiZxA= Date: Thu, 11 Jan 2018 21:28:07 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537FFC0E@SHSMSX103.ccr.corp.intel.com> References: <1513879734-237492-1-git-send-email-kan.liang@intel.com> <1513879734-237492-8-git-send-email-kan.liang@intel.com> <20180111142558.GE16655@krava> In-Reply-To: <20180111142558.GE16655@krava> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzVjNDRmYzAtYmMzNi00MzVhLTljMDgtYmQzZGI1OTE1ZTU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InhKbkVBZHp1eVZDOFNyYkRzQXRUUmFXNkpsdHlUVHZuT3VlRGNremNDRlE9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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: > To get rid of it, it has to introduce the whole perf_mmap__read_init/_read_event/_done. Besides perf top, kvm and trace need to be changed. There are also 11 perf test cases need to be changed as well. I think that would make current patch series too huge. I can submit a separated patch series later to get rid of the legacy interface. Is it OK? Thanks, Kan > 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