From patchwork Wed Dec 6 14:41:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 120860 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7142685qgn; Wed, 6 Dec 2017 06:45:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ9R6QU/dvghTELhxX6kqqW4Aq2Sc00HjpzB7tBbTZvHZeXJ3jfhvLkTyJb/9c7QWf8O96x X-Received: by 10.159.218.132 with SMTP id w4mr2038816plp.122.1512571534195; Wed, 06 Dec 2017 06:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512571534; cv=none; d=google.com; s=arc-20160816; b=CIfUHw+BZKoFhYRQNrqwW6NT+Bo0GttaHwDDscokRjZA38woliwAygPwF72Iwklvie Aj7pP5M8A2y8QK6ae2g8ovB48Ow5GtMofI6DhQM3b0/tefm2XHDo1oTswgNDpIxSqOHk t60QtNRXugfPBIUUy+InUUej40i6ouXyykv+GVE3fJUTATnm0+kSN6RtIf2D7UtHFUfl 6juNgrsFj0zhKHKTOQsuMZkC4R1l6SQpIJ1OnjwOa3+mUIkhvOKXQv59tpw5TEUIDTmP GFgyYzq3dStTSbGF3ks71la3f6FFnxRU2zVJVrcxp9tWc5sD6oMDrLsF0YLbnYz9DHj6 TVYw== 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:dmarc-filter:arc-authentication-results; bh=i3SJmQwSnfMQ6wcXJVeH6aD2xUtzGJPpz4KaKKgi6uk=; b=OxnGQR4VIvdCYolfvgyE6aDYfRdlDXs8gvkE9tdVYC0Tn/S6FACfAs+hQ9OqQRI33R FqFO6U+GifwfqQHsAsS5RoDm+CAmFTpdzxxVRfpMmZnADyv4/TFqhGc+reLe35JUcABa QFGufmfEOur0G7IHS1m3BrO5eDyliWQbdg5ZgcyBR7Q6lbOzMacu7Kn1lIghmLPlmwUy m1iYEBuPk3Q2Qz94VKHy2ar0hWPPtTYLjZe8qtNeMY4dSyNpYEEsksLi89wOfKUWB+0X HHZHwiXOnDPSZWzLPTLVZaAKWSW+CHEr24Hvmif9kLgCIremby7s3BCSuZMhqKrHk17T 1kMQ== 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 f9si2082372plt.372.2017.12.06.06.45.33; Wed, 06 Dec 2017 06:45:34 -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 S1753097AbdLFOpc (ORCPT + 28 others); Wed, 6 Dec 2017 09:45:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:58380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbdLFOnS (ORCPT ); Wed, 6 Dec 2017 09:43:18 -0500 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D62E1219A0; Wed, 6 Dec 2017 14:43:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D62E1219A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Wang Nan , Jiri Olsa , Kan Liang , Arnaldo Carvalho de Melo Subject: [PATCH 27/36] perf evlist: Remove evlist->overwrite Date: Wed, 6 Dec 2017 11:41:06 -0300 Message-Id: <20171206144115.15097-28-acme@kernel.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171206144115.15097-1-acme@kernel.org> References: <20171206144115.15097-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Nan evlist->overwrite is set to false in all users. It can be removed. Signed-off-by: Wang Nan Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/20171203020044.81680-4-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 2 +- tools/perf/util/evlist.c | 5 ++--- tools/perf/util/evlist.h | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) -- 2.13.6 diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 08070f87d489..3bc6ceeae1f9 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -500,7 +500,7 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli struct auxtrace_mmap *mm = &maps[i].auxtrace_mmap; if (maps[i].base) { - if (perf_mmap__push(&maps[i], evlist->overwrite, backward, rec, record__pushfn) != 0) { + if (perf_mmap__push(&maps[i], false, backward, rec, record__pushfn) != 0) { rc = -1; goto out; } diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 93272d932407..a59134fb141f 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -711,7 +711,7 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int * No need for read-write ring buffer: kernel stop outputting when * it hit md->prev (perf_mmap__consume()). */ - return perf_mmap__read_forward(md, evlist->overwrite); + return perf_mmap__read_forward(md, false); } union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx) @@ -738,7 +738,7 @@ void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx) void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx) { - perf_mmap__consume(&evlist->mmap[idx], evlist->overwrite); + perf_mmap__consume(&evlist->mmap[idx], false); } static void perf_evlist__munmap_nofree(struct perf_evlist *evlist) @@ -1070,7 +1070,6 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) return -ENOMEM; - evlist->overwrite = false; evlist->mmap_len = perf_evlist__mmap_size(pages); pr_debug("mmap size %zuB\n", evlist->mmap_len); mp.mask = evlist->mmap_len - page_size - 1; diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 424a3d6015af..eec33770b8e6 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -31,7 +31,6 @@ struct perf_evlist { int nr_entries; int nr_groups; int nr_mmaps; - bool overwrite; bool enabled; bool has_user_cpus; size_t mmap_len;