Received: by 10.223.185.116 with SMTP id b49csp3557832wrg; Tue, 13 Feb 2018 04:17:39 -0800 (PST) X-Google-Smtp-Source: AH8x224jr4kB9rotSCYR1/EHLPeUDRce8PIKLmndODsbpq0bfVhHM0237WBPhKZQdWcogCAZjvfq X-Received: by 2002:a17:902:7b94:: with SMTP id w20-v6mr938644pll.195.1518524259433; Tue, 13 Feb 2018 04:17:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518524259; cv=none; d=google.com; s=arc-20160816; b=z2Z59tbs7dpsgUaQuEcp9D/IcHxIBxsNIgopuSl+e2smsTs2mxqN1sbSvCFTqF2/tp tBM82XRGBmnRTZRw/oPrEaqs/q1oPektyiqg8KubCQGoY1fP1NbYSLkx/5nHSNV3sZGJ qpfzpGZf7k1qbXqGn781P3jSiB2w3W2e4UR3CMHpjJd29HZJpOY895NdsIno6XDerrf9 BTxQisMcY6OXrL6xQTl5RH2Xz3mLubl+9mum+x4DQvwZzQOTaXRIBEj600RrLerHkKpc PnxD/3nabK82FZVs7y5kjb+Mqch5VzqGA1dEejEe1EEjj1eHj7RGqmYffsWO4HytqtVl zhYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=3V97OOFZd1O3yon6jkX9PcqOhTG9I891f4C86X7034g=; b=AmZT9oHvLo8J2rdHCcl1rQ0FS0mS5iRY2mZvFoBgJus716aYt14sH98Hw7WHDkySKj +SBeHfG/+k8H40sGEh9aBBsadEtLzqGBdN4W2bD1pewjJmvIZqRuh6cqZ9SxlMeConiq 6C/GMDMiyGcByt6oG/0DIY3xBFvEaFjeILhfmytBa5ZuSMrOb2NKD23FJnuBDnuwXI4z JlMH3a/DHO4jiiHyYQG3KQV5Du/oKXx+BOWXFMlm8FTo6eSHVPvwqh66RlBwkY48SrOr q2widvIT8kYuh56+k1D+CkNActs5AEOvvETbFFPRb4zGANLb966ffIubmaFsdWJsUZhe fpxA== 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 a3si1618810pfh.413.2018.02.13.04.17.24; Tue, 13 Feb 2018 04:17:39 -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 S935152AbeBMMPv (ORCPT + 99 others); Tue, 13 Feb 2018 07:15:51 -0500 Received: from terminus.zytor.com ([198.137.202.136]:44403 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934827AbeBMMPs (ORCPT ); Tue, 13 Feb 2018 07:15:48 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w1DC4MaR028067; Tue, 13 Feb 2018 04:04:22 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w1DC4LIp028064; Tue, 13 Feb 2018 04:04:21 -0800 Date: Tue, 13 Feb 2018 04:04:21 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Kan Liang Message-ID: Cc: peterz@infradead.org, wangnan0@huawei.com, hpa@zytor.com, acme@redhat.com, yao.jin@linux.intel.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, ak@linux.intel.com, kan.liang@intel.com Reply-To: yao.jin@linux.intel.com, acme@redhat.com, wangnan0@huawei.com, peterz@infradead.org, hpa@zytor.com, kan.liang@intel.com, ak@linux.intel.com, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, linux-kernel@vger.kernel.org, namhyung@kernel.org In-Reply-To: <1516310792-208685-2-git-send-email-kan.liang@intel.com> References: <1516310792-208685-2-git-send-email-kan.liang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf evlist: Remove stale mmap read for backward Git-Commit-ID: d3035da2c854545f915ff5bcb54572860fe18ee7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d3035da2c854545f915ff5bcb54572860fe18ee7 Gitweb: https://git.kernel.org/tip/d3035da2c854545f915ff5bcb54572860fe18ee7 Author: Kan Liang AuthorDate: Thu, 18 Jan 2018 13:26:16 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 6 Feb 2018 10:11:49 -0300 perf evlist: Remove stale mmap read for backward 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: Jiri Olsa Acked-by: Wang Nan Cc: Andi Kleen Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1516310792-208685-2-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 ac35cd2..e5fc14e 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -715,28 +715,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 75f8e0a..336b838 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -133,10 +133,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);