From patchwork Wed Dec 6 14:41:05 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: 120854 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7140335qgn; Wed, 6 Dec 2017 06:43:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMap7NZnwSiTjkrnPtCxYTrYEqULt5QvtS2vSfiMPU0V2mjanhniI0kG9HsQdyCSx1BnHP+E X-Received: by 10.84.128.229 with SMTP id a92mr22144259pla.71.1512571400587; Wed, 06 Dec 2017 06:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512571400; cv=none; d=google.com; s=arc-20160816; b=C9gff3LQXcXs+n1s/zHIKlH2dOxGk2kYXljoz6eu5LOEQtQD/BfYmGm2ALWSs5zMc9 toU9kATwA4E12gqd3mNPqTm1Opgb2hX7hVdhh+7nY46jARLhMSySFZCJZltnsZkepnQ+ FiSwmNJ2AT54LozM08B/SYfxzX0uHDXb7Zga85tPjOru1P0kXCaAJx70+FkZ4gGWuK0n TC7AWFTMqORoStoz9PFBa0eNDvDtfidO/QK+B/qbOeiVEsEgx+Q/nOWd1nS5RKMwJxAO lYfLaPwrtFpXwFH/OAaVOFBEOSUGblFqRW/+vnTpY2xsrAssiyOvLnrCbhfRWPGhR7gu 9IPA== 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=PA2j11dwj/rE392sJRT3LjnBh2UPyHu87S5yi1FFRT8=; b=yHDYt7YAmnje1JzwFpHJ/xo0nEspA8KdbwsStDLUPuKcSbRZHbt4kf1uyYL/ged5e8 pm27zqdpb3kUIpncp2QMmT5L2pc8KfvFYzmfTEQ4D2K05G4Z8zBELP8GN7G3XUmrChTx uZ1vwltVDhT81MUBzly8H/HBd8x+v0iC9JRejZSnynVOCM2ThYuVfe5S2gsSGHhvQ3Us VwGwbYPZy1ATMBOzjJ6unVJh+qiUpnMLtJuS8u3JgSuLeuWWQ/bUO+0EV9TGgq4qTLgN l3/NLVqeJQ8sNcm15C7v1ExNCemPR/FyRbtHBL3DtwYmwKyqbwJauA3WcIkxf7VatYrA dLyQ== 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 bj4si2145990plb.283.2017.12.06.06.43.20; Wed, 06 Dec 2017 06:43:20 -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 S1752879AbdLFOnS (ORCPT + 28 others); Wed, 6 Dec 2017 09:43:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:58286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183AbdLFOnO (ORCPT ); Wed, 6 Dec 2017 09:43:14 -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 93705219A5; Wed, 6 Dec 2017 14:43:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93705219A5 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 26/36] perf evlist: Remove 'overwrite' parameter from perf_evlist__mmap_ex Date: Wed, 6 Dec 2017 11:41:05 -0300 Message-Id: <20171206144115.15097-27-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 All users of perf_evlist__mmap_ex set !overwrite. Remove it from its arguments list. Signed-off-by: Wang Nan Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/20171203020044.81680-3-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 2 +- tools/perf/util/evlist.c | 8 ++++---- tools/perf/util/evlist.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) -- 2.13.6 diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index e304bc47fe9b..08070f87d489 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -301,7 +301,7 @@ static int record__mmap_evlist(struct record *rec, struct record_opts *opts = &rec->opts; char msg[512]; - if (perf_evlist__mmap_ex(evlist, opts->mmap_pages, false, + if (perf_evlist__mmap_ex(evlist, opts->mmap_pages, opts->auxtrace_mmap_pages, opts->auxtrace_snapshot_mode) < 0) { if (errno == EPERM) { diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 3c1778b500e0..93272d932407 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1052,14 +1052,14 @@ int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str, * Return: %0 on success, negative error code otherwise. */ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, - bool overwrite, unsigned int auxtrace_pages, + unsigned int auxtrace_pages, bool auxtrace_overwrite) { struct perf_evsel *evsel; const struct cpu_map *cpus = evlist->cpus; const struct thread_map *threads = evlist->threads; struct mmap_params mp = { - .prot = PROT_READ | (overwrite ? 0 : PROT_WRITE), + .prot = PROT_READ | PROT_WRITE, }; if (!evlist->mmap) @@ -1070,7 +1070,7 @@ 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 = overwrite; + 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; @@ -1093,7 +1093,7 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages) { - return perf_evlist__mmap_ex(evlist, pages, false, 0, false); + return perf_evlist__mmap_ex(evlist, pages, 0, false); } int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target) diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index f0f2c8b2504b..424a3d6015af 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -169,7 +169,7 @@ int perf_evlist__parse_mmap_pages(const struct option *opt, unsigned long perf_event_mlock_kb_in_pages(void); int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, - bool overwrite, unsigned int auxtrace_pages, + unsigned int auxtrace_pages, bool auxtrace_overwrite); int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages); void perf_evlist__munmap(struct perf_evlist *evlist);