Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4259121ybp; Mon, 7 Oct 2019 05:55:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGQhFloCYSEFJzteHQeZoyUhAmHjpH9flFExJC/qtvIpQ77Dihk2kNkGET/LP6yRzs17q0 X-Received: by 2002:a17:906:22c1:: with SMTP id q1mr16223462eja.325.1570452941502; Mon, 07 Oct 2019 05:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570452941; cv=none; d=google.com; s=arc-20160816; b=yGjJ4yTha14ww7t1TawwbcqhXJx7UugMSypDT7crL6zjlNbcM1/JjNpzJwEGZ5Szro Tp/b0Sirv9YAtOSls6XMTX69QilOGF2xjZvJYzanCn+8fhakaZqzPSU3hj+5S/lSPSbn Cg1f7G3RZ3ALuyF3nYAOUN3/tt9GT17Ddp0oCjxZvJx2Uwrm54fsFNNWbtaJVIlIHYBj sdpnL2z/fU4ZIisB+EPW2isuBx0ExwSRizhrqCrcNPa2npDx4cYYjR5ubOPWmm6OPsTF dl0rYWNnQNknmlXzwwXYL6D9LNCWEPHg8Lh8IPAT7RRePLcBcUTrkjOkGToyeMlgLfwZ Q/5A== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=A0Be7LvSJmz1sfg2Yqs0FXcEMVFV2/+Rk5aulBBgC2k=; b=VnLXIqIHXuF032rJ7iU7KlGLIiBGiHLRbAOWjnFxUYdt7pmozSYwhPp9MVdl+EgbuL k5HqzFLVK6+uLzujs328fgoCrq2NYssB7JlxLh7+N8sqcDpY2HfOM66P0wbKmFnLaI1a QYKsrYLq7TVHpDR4YnMH8b7QfLwKN4KRfNjS6nUSpIbXNP7/zy6iNfUmUSiiFxbSgTCm 3IxBdsFzWahkCMBcqagWTyIBNZ4+lVWZZWd2wk/VR3NEfGqrtWAjViGAYNDVw2fpreMT 9xAL2d59wn8YAg6pjPYvh/R5oeLtAtOF6KBnOAU0sg0kXsrXuH4c60UdD1UuZ1NXbs+N +Fyg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18si7581845ejn.370.2019.10.07.05.55.17; Mon, 07 Oct 2019 05:55:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728340AbfJGMyd (ORCPT + 99 others); Mon, 7 Oct 2019 08:54:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44786 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727715AbfJGMyd (ORCPT ); Mon, 7 Oct 2019 08:54:33 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01D1C51EE1; Mon, 7 Oct 2019 12:54:33 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA8835D9CC; Mon, 7 Oct 2019 12:54:30 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 20/36] perf tools: Add perf_evlist__mmap_cb_mmap function Date: Mon, 7 Oct 2019 14:53:28 +0200 Message-Id: <20191007125344.14268-21-jolsa@kernel.org> In-Reply-To: <20191007125344.14268-1-jolsa@kernel.org> References: <20191007125344.14268-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 07 Oct 2019 12:54:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding perf_evlist__mmap_cb_mmap function to call perf specific mmap__mmap function during perf_evlist__mmap_ops call. Link: http://lkml.kernel.org/n/tip-38lonlyp6kzfartpl20qy2dy@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/util/evlist.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index a59303de3421..e7216139f37a 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -749,6 +749,16 @@ perf_evlist__mmap_cb_get(struct perf_evlist *_evlist, bool overwrite, int idx) return &maps[idx].core; } +static int +perf_evlist__mmap_cb_mmap(struct perf_mmap *_map, struct perf_mmap_param *_mp, + int output, int cpu) +{ + struct mmap *map = container_of(_map, struct mmap, core); + struct mmap_params *mp = container_of(_mp, struct mmap_params, core); + + return mmap__mmap(map, mp, output, cpu); +} + static int evlist__mmap_per_cpu(struct evlist *evlist, struct mmap_params *mp) { @@ -946,8 +956,9 @@ int evlist__mmap_ex(struct evlist *evlist, unsigned int pages, .comp_level = comp_level }; struct perf_evlist_mmap_ops ops __maybe_unused = { - .idx = perf_evlist__mmap_cb_idx, - .get = perf_evlist__mmap_cb_get, + .idx = perf_evlist__mmap_cb_idx, + .get = perf_evlist__mmap_cb_get, + .mmap = perf_evlist__mmap_cb_mmap, }; if (!evlist->mmap) -- 2.21.0