Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4918698ybg; Mon, 21 Oct 2019 17:04:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1ZMbYuv/ZIoCQvf6ImtimOx5RjRB5VpIY+w8iXRGEgjVP6itZX8I1KIKAX9Lk1lBB4/Oy X-Received: by 2002:aa7:cc95:: with SMTP id p21mr649495edt.189.1571702672337; Mon, 21 Oct 2019 17:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571702672; cv=none; d=google.com; s=arc-20160816; b=BOOyM5z1gBT4hFnSqYqVcPY8IgK+r0SRaBxwmrruIuj9ELRK3RCJ8wJGkjvOEaNIoa GRLB7ks3/LiPXl+ltZi1CPkPpp5dVHzzGnNpipmigv0HgV+p1o8RnZvgbi8O92/ie31R f7ssgPi17Oytgd1ZXQhpfFDBxwbvtcfWaBJJH4phinUhi680fhmJTz1VRtPQ+w605PVP Fw6hnWTfxyaI1vl9S9kHmhnt+rW2bdXitW1isHPK0enn3ZioINHXp2dSfwx2s/bklbpx gwLC99ifq/Fg3+/xOt2a46Ah5OwwX0LUS4p8X0lihuCZbUvJZ5KHp0/VgG6Zay6E6iLg EbIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=9w7aSe9Z3BViUenQqCbfY8HrUdEf8vS/f/M/6EzGB0g=; b=FqIN/DnM24ZMz/4pn6lzj8zaG01KfLfflVJu0IFXXWaHLLAoHckrB3zOwbO8qNK7KF dkffuRD7L2n1cPry+KxqOzMrmcOnSThMb35IgJzwp9vnkJqEW+qySIfD22azbmMOiYio gElfw63E0HbUSRKPhXlN7HEqjk5fhqXvE9z2slzClP/7sr2x7d1gF6fw8RmhO6Jb5SLw xPxpgFPVd+AORrPCJ9pGbasmj/NqlfDLZx1T4s2r+MJZF4wqozMb7/VucBriBmsf+CXK 8demtBg14xxH8+jSyyzhdnuANsjDYSyt2Sko2Z3Es6zvLtAHM/1EbS5DkCQnmYegJD9Y C7GA== 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 e12si7208009edj.70.2019.10.21.17.04.06; Mon, 21 Oct 2019 17:04:32 -0700 (PDT) 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 S1730428AbfJVADh (ORCPT + 99 others); Mon, 21 Oct 2019 20:03:37 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38895 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730220AbfJVADg (ORCPT ); Mon, 21 Oct 2019 20:03:36 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iMgwv-0003tF-4y; Tue, 22 Oct 2019 01:18:53 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 7DCDE1C047B; Tue, 22 Oct 2019 01:18:52 +0200 (CEST) Date: Mon, 21 Oct 2019 23:18:52 -0000 From: "tip-bot2 for Jiri Olsa" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] libperf: Move mask setup to perf_evlist__mmap_ops() Cc: Jiri Olsa , Alexander Shishkin , Alexey Budankov , Andi Kleen , Jin Yao , Michael Petlan , Namhyung Kim , Peter Zijlstra , Stephane Eranian , Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191017105918.20873-4-jolsa@kernel.org> References: <20191017105918.20873-4-jolsa@kernel.org> MIME-Version: 1.0 Message-ID: <157169993210.29376.12340799034453879917.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: b6cd35e4e09c12f9478ed98cb015d4352fa98056 Gitweb: https://git.kernel.org/tip/b6cd35e4e09c12f9478ed98cb015d4352fa98056 Author: Jiri Olsa AuthorDate: Thu, 17 Oct 2019 12:59:11 +02:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Sat, 19 Oct 2019 15:35:01 -03:00 libperf: Move mask setup to perf_evlist__mmap_ops() Move the mask setup to perf_evlist__mmap_ops(), because it's the same on both perf and libperf path. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jin Yao Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20191017105918.20873-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/lib/evlist.c | 3 ++- tools/perf/util/evlist.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/lib/evlist.c b/tools/perf/lib/evlist.c index 73aac6b..205ddbb 100644 --- a/tools/perf/lib/evlist.c +++ b/tools/perf/lib/evlist.c @@ -578,6 +578,8 @@ int perf_evlist__mmap_ops(struct perf_evlist *evlist, if (!ops || !ops->get || !ops->mmap) return -EINVAL; + mp->mask = evlist->mmap_len - page_size - 1; + evlist->nr_mmaps = perf_evlist__nr_mmaps(evlist); perf_evlist__for_each_entry(evlist, evsel) { @@ -605,7 +607,6 @@ int perf_evlist__mmap(struct perf_evlist *evlist, int pages) }; evlist->mmap_len = (pages + 1) * page_size; - mp.mask = evlist->mmap_len - page_size - 1; return perf_evlist__mmap_ops(evlist, &ops, &mp); } diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 5cded4e..fdce590 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -813,7 +813,6 @@ int evlist__mmap_ex(struct evlist *evlist, unsigned int pages, evlist->core.mmap_len = evlist__mmap_size(pages); pr_debug("mmap size %zuB\n", evlist->core.mmap_len); - mp.core.mask = evlist->core.mmap_len - page_size - 1; auxtrace_mmap_params__init(&mp.auxtrace_mp, evlist->core.mmap_len, auxtrace_pages, auxtrace_overwrite);