Received: by 10.223.176.46 with SMTP id f43csp32552wra; Thu, 18 Jan 2018 13:29:21 -0800 (PST) X-Google-Smtp-Source: ACJfBougV8c4PQqcm98AKlqkMl/Zktuobw7w/576nZa5Mi5oRde4Qsamo0IKXG5EBYqX/AtRLY4/ X-Received: by 10.99.150.18 with SMTP id c18mr37562217pge.136.1516310961114; Thu, 18 Jan 2018 13:29:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516310961; cv=none; d=google.com; s=arc-20160816; b=smf18QiXzcCoMznbh/qh20S40EcfmQ3JwfMfi5RPi0dOrxf+GBKM0kJSnY5AcUgEK6 qgUR9F1We2grT1DDvhlivdsNk/GZuoPYXttdKzf8NF00D8kFwEicThPK/HPNtwcOnQwz ILVdQEmfNQPINJTjDfnbxgBUpr48D09lljoBUSpwR2oPRqT/ECXfnkMscGOgRd3NwTub A69btIe4fiXojHV1F1LKIsCOsRTG4d2nRJ/sshmhAeB5uAjkomQkWUjkR4IAqc2OtLft ej3HKqcoDtRxv7hWcmx197Dmj7lsRti3KmSh77bjX/ifGA1AP0+TGCKTJtWRzzNhEg7u vRjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Tfq5sBOYuJHkr3O/1zz5WSnFxfjz3gBWgCTYUW17D8Y=; b=r+Fljgoa+rU1nVsXXBrcmfVCkwc0P03FR7McuoeF0t+4GFXgITd2lIYuCJSvU7MVwl TsuPQLx9DEaUTUt54fpbLiGdx3V7rphVPSyT/anDNFAqRiT6g4KcaS9lpPZDMMSygu3S X3OjKb+XVYP2ok8MLh6AJBp7qXUNzs/H4lOFSJht/8hwoPwzUemQAnk9Qk/wZdsXdlf8 qOJCCdhScJB5UrDyKwlplec2q+Ar+Hx3N2ZBrHlhWlrAg0pICOPycp0MAD+l8orZBj0I duASbO8Pbcui2Qq2Tutm3JartlfbHk93X0d5m98xsdKvjHMMSwG6UwaK6SIukPby8rfJ YhSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si218473plc.650.2018.01.18.13.29.07; Thu, 18 Jan 2018 13:29:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754732AbeARV2O (ORCPT + 99 others); Thu, 18 Jan 2018 16:28:14 -0500 Received: from mga04.intel.com ([192.55.52.120]:47419 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932195AbeARV1b (ORCPT ); Thu, 18 Jan 2018 16:27:31 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2018 13:27:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,378,1511856000"; d="scan'208";a="11477199" Received: from otc-knm-01.jf.intel.com ([10.54.39.34]) by fmsmga008.fm.intel.com with ESMTP; 18 Jan 2018 13:27:30 -0800 From: kan.liang@intel.com To: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: wangnan0@huawei.com, jolsa@kernel.org, namhyung@kernel.org, ak@linux.intel.com, yao.jin@linux.intel.com, Kan Liang Subject: [PATCH V5 01/17] perf evlist: remove stale mmap read for backward Date: Thu, 18 Jan 2018 13:26:16 -0800 Message-Id: <1516310792-208685-2-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1516310792-208685-1-git-send-email-kan.liang@intel.com> References: <1516310792-208685-1-git-send-email-kan.liang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Acked-by: Wang Nan Signed-off-by: Kan Liang --- 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 f0a5e09..cf0fd35 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 e7fbca6..bbf53b1 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -134,10 +134,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); -- 2.5.5