From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3C02ECE58D for ; Fri, 11 Oct 2019 20:11:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B869520673 for ; Fri, 11 Oct 2019 20:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570824684; bh=iUXnGaxn1alWNiSeYdp9M1nblfM9RQCjdIfucXr3a8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gUbEQtXQvTDILYc0PO909E1z7PqeEqgppRWw2+lQkZ319HCS8CLn2TzaG6v50F9Zn VRkuA/0J6IfKT0KCJbtksj1NcQaW3K0iMnyeyX84KCs4OOjzJ8po8WQNl5A7Kc5xRX Zne6gzsiYDmgOujvGJjhEYWLSxaX+rqI088lpuYA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729799AbfJKULW (ORCPT ); Fri, 11 Oct 2019 16:11:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729396AbfJKULU (ORCPT ); Fri, 11 Oct 2019 16:11:20 -0400 Received: from quaco.ghostprotocols.net (189-94-137-67.3g.claro.net.br [189.94.137.67]) (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 5BC1721D71; Fri, 11 Oct 2019 20:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570824680; bh=iUXnGaxn1alWNiSeYdp9M1nblfM9RQCjdIfucXr3a8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBIRTwvj4jzO/xbJb5hXvJ60oeSHnBTFlkX9FOF8PRuGaQcKE3qWf94MFJVf/Bnvw UdFyhmyZcfoZbpsCKR9BGLFE8XhQ7TLisv8Mbn0eyR81gvxU/rxwvMn2GG9T4P1XdC yb3R3AbE1aWjPnuHkJ1tzm28akusPLqu9q59LWoc= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Alexander Shishkin , Michael Petlan , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 59/69] perf tools: Introduce perf_evlist__mmap_cb_idx() Date: Fri, 11 Oct 2019 17:05:49 -0300 Message-Id: <20191011200559.7156-60-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191011200559.7156-1-acme@kernel.org> References: <20191011200559.7156-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa Add perf_evlist__mmap_cb_idx function to call auxtrace_mmap_params__set_idx() on each new index during perf_evlist__mmap_ops call. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191007125344.14268-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index a9b189ac859b..11716f2b965a 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -739,6 +739,17 @@ static int evlist__mmap_per_evsel(struct evlist *evlist, int idx, return 0; } +static void +perf_evlist__mmap_cb_idx(struct perf_evlist *_evlist, + struct perf_mmap_param *_mp, + int idx, bool per_cpu) +{ + struct evlist *evlist = container_of(_evlist, struct evlist, core); + struct mmap_params *mp = container_of(_mp, struct mmap_params, core); + + auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, idx, per_cpu); +} + static int evlist__mmap_per_cpu(struct evlist *evlist, struct mmap_params *mp) { @@ -935,6 +946,9 @@ int evlist__mmap_ex(struct evlist *evlist, unsigned int pages, .flush = flush, .comp_level = comp_level }; + struct perf_evlist_mmap_ops ops __maybe_unused = { + .idx = perf_evlist__mmap_cb_idx, + }; if (!evlist->mmap) evlist->mmap = evlist__alloc_mmap(evlist, false); -- 2.21.0