Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4260548ybp; Mon, 7 Oct 2019 05:57:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUe2bWaO12NEluAtsZxynmSNt4NoFoPs3S/dkUx/A7EhFpLPFYRDEB9RyTTErSe3a+Wa0Z X-Received: by 2002:a17:906:c7d4:: with SMTP id dc20mr23795171ejb.235.1570453023567; Mon, 07 Oct 2019 05:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570453023; cv=none; d=google.com; s=arc-20160816; b=kIVID97dm1ROkp2ILI8Lpspkf+RWCgaVrJiod8jv55owNjtn7vg1i/B131YmtWi/5b RSstRYhQJn4cjrLzpIHeTgpNqxiiI9a6ZwHG0isX9aPiZihFLqSU90QUsPx45BSHqo2n 9It2MD5h3Ju/NIIvfw6LjgmEPeVEedL48gOXCvBdN8NdHp2wtlfHn6SG1Rj9t8m6SITG fBCh8H9jfVa//XiXcMeu29WWuisb+TM967wX57vwvm6hqUhYqk/QnvXldpuh3fSiqZOg fylGFnWyRQvz+M8n5oUsxNFHwiy52biV5XV79NiF6V7lH5I8U0HkEh4QAQniLztv/E4I Z0nA== 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=hiX1uRmSiauoMcv5A84cZ5Zx+jFydLvyE34VV6OpPDc=; b=EGG+IkpdUPoadhFAGIxDVxuJzQnjcuMVfBZp3LAs2QpXXWz26Ktjcd5mWnFkqGYNQ7 EupUZjEOw1aMliWjbc/ixhQzkukO2nYcwsR6TmkYiaqQbSpG5TfypuBCMbPzWVYG5lBk Ybd6GuK53s92etZ8KmGhRc13GqFfEULeJzJfILXE2tCp+5qmpFEyveq0GXJ8JR1yxaqX lqfkYuANfpIbS8+TuZYujwhBxlebYcH6PUJHo+slMPwhzrojlR4U5SrL/rrNBbfm4BAp gCgbADa8CwG6IDZ5AddD3obwYPLaUG+q78Fq8gV0Tt8hCmaJxZhB4gQGEu17L7Xex6Ha Z7mw== 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 gh3si6631842ejb.306.2019.10.07.05.56.39; Mon, 07 Oct 2019 05:57:03 -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 S1728313AbfJGMyb (ORCPT + 99 others); Mon, 7 Oct 2019 08:54:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbfJGMy2 (ORCPT ); Mon, 7 Oct 2019 08:54:28 -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 C1B7230624D0; Mon, 7 Oct 2019 12:54:27 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73C875D9CC; Mon, 7 Oct 2019 12:54:25 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 18/36] perf tools: Add perf_evlist__mmap_cb_idx function Date: Mon, 7 Oct 2019 14:53:26 +0200 Message-Id: <20191007125344.14268-19-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.44]); Mon, 07 Oct 2019 12:54:27 +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 09fe8fe9805d..71fdc6c92920 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -715,6 +715,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) { @@ -911,6 +922,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