Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1404059ybe; Fri, 13 Sep 2019 16:24:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvmSmiT37Ar4+CcDxXMcVD7/bCUvMC7WfbnBL/ysGJQ6cNHZ78QuWzxkQeyWeHeMHPrDYj X-Received: by 2002:a17:906:1d11:: with SMTP id n17mr41910331ejh.68.1568417059122; Fri, 13 Sep 2019 16:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568417059; cv=none; d=google.com; s=arc-20160816; b=nmUs8HyjwONXqpmsAMBUggj/CgqVXROypO5tGN8BR3SzC956g7LIn4Ufrgxm++WEpz YcVfQLRkozrhDhFZFdY2nD1z2ddRVu1GyE/TNT8yTTwIFHzpaPpE1A6MWqbEVQHda/XM vwU9b1tUBnHNHPafrrjWq80c2MTLZtQ92lSLUPsCexSGE+Enefd2LuBf0hTlR7hYnlqC wC15FkI65p3RG+NxH5qCymClEw35kUsuhBBzTrLqb0gk8V9+Iv5ocVx16jgywqaBwKCD tEWjyfRh4R1rHJaty99FWGb+HnqN+sftqy0sp8UxEQlWLEc8qp+klAhdvTGbZB0VsxLU L3jg== 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=MpFmB5G08/RQOsGKMkKcY2X/+sTQR4oUD98EYg1p3QI=; b=xaWGDlLC9a76AgBntES/6m2rSYI2rbTKfr0x032wCf1H6lJSWGwsL7C0n9+7bebNLE Qvan/57wnrKn3Nh9etUR0mUSdjMz0Nlqer9+poeuNul34D5y+Mc+sSq7ZOmmhghw5C3y tp7lKD3vYFQ7/gW2EuUVFtf9G3I9uIJi8BC2E+ea1R4mpn5bTjtPgCGRWU4sd7t3UpAH /AzB29D+p0qhSvBQswrW2ZOBX0GpAcJQgBm+bWACzhHUCT1A1GGK/mgwnZzfB82+ZBjO ql1qYcpqRT7AVwo5zGdvWWtg8lmSlmFy+iiZzn4P/cG/PB3F78+fb+U6NwUsyBY+qEng JIzg== 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 v53si18486006edc.378.2019.09.13.16.23.55; Fri, 13 Sep 2019 16:24:19 -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 S2403772AbfIMN0U (ORCPT + 99 others); Fri, 13 Sep 2019 09:26:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57234 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391556AbfIMN0T (ORCPT ); Fri, 13 Sep 2019 09:26:19 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C71FF30860BD; Fri, 13 Sep 2019 13:26:18 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id B54D95C1D4; Fri, 13 Sep 2019 13:26:16 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 57/73] perf tools: Add perf_evlist__mmap_cb_idx function Date: Fri, 13 Sep 2019 15:23:39 +0200 Message-Id: <20190913132355.21634-58-jolsa@kernel.org> In-Reply-To: <20190913132355.21634-1-jolsa@kernel.org> References: <20190913132355.21634-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 13 Sep 2019 13:26:18 +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_idx function to call auxtrace_mmap_params__set_idx on each new index during perf_evlist__mmap_ops call. Link: http://lkml.kernel.org/n/tip-26emdgzve9miryyzvcr77qgh@git.kernel.org Signed-off-by: Jiri Olsa --- 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 a9fc35d25a59..850dacf7bf97 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -714,6 +714,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) { @@ -910,6 +921,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