Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp797392ybe; Fri, 13 Sep 2019 06:32:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9tD64A7nqg5Jm/O6ZA6ujaen/DhoN5QWyPMl7vSnjg3WA2cGZyel9uyxTLzdJl8jowhoK X-Received: by 2002:a17:906:79ca:: with SMTP id m10mr3854977ejo.292.1568381558458; Fri, 13 Sep 2019 06:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568381558; cv=none; d=google.com; s=arc-20160816; b=Yl/GlrZJxRhmdfwG+mdUOe+vboUZ/+0RcCGSzouNttkp+G1Jc8AJHfnqGYQ93wHQWp fc5WzQJnYmw1fJwx3rOpRw04CxjrLUcY8JVAKShbfA+qnlu9f78HLkr6YMfAkPBFWXIv cpA3HtW1KWxt/XKNMdScz+oMGE7sxGOtxtaDSkNr8tz2XKGAQ6DsZkUWB2YIIitQhQHn QQTTDek3iVCCvzCmj9H3Bu6xx8RyPRlXmwX5YIjAQ7iRWdCOUdWdzTofyn5oMDT0Habw gOFoNhrioomqkrx7lDU1kNsA/LWuOxWkM0+ouSIDGxiASzGKwi2a5gf6MUFJScXoJ9nL 7SmQ== 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=UIWuLLSVWt/03m67TnK8TEwm3elGMxDWLwgh3grWEb0=; b=qlL2eGJKIdgf+zf4TH2xPrnJWuyVfUKD2MNajsx5Zy4I08m0Mh111kpGw0npTudB/l OceHEWbEO+3Z491UFEfDNGFAdy4C2vX6Trjaet+x8jtC6bps1Sxx7KhtZs1l7CWp1w55 z+q/LD/7Wtm0gy4EuTAJDDXxPBJHY+ydKrQ2tDxefnHXRdI+q6MixcEqUXsDj8lFYZXp I+2ReVsgMckA5Tv1Oj+y+vFQ1L29U+sr41sn7u3yeHhrGMEc+qoaBXM7z4OPGUqp5Fg5 gv9lfjDpYPkJ70rb2tPfmV8DwuGl7is6oAJlNJDH/+x+Uecl9Y6IIwLgaVH6riiRHQGj UY8Q== 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 e48si17509576edd.239.2019.09.13.06.32.12; Fri, 13 Sep 2019 06:32:38 -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 S2403796AbfIMN0Z (ORCPT + 99 others); Fri, 13 Sep 2019 09:26:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54180 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388734AbfIMN0Y (ORCPT ); Fri, 13 Sep 2019 09:26:24 -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 A482D3084025; Fri, 13 Sep 2019 13:26:23 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C2DB5C1D4; Fri, 13 Sep 2019 13:26:21 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan Subject: [PATCH 59/73] perf tools: Add perf_evlist__mmap_cb_mmap function Date: Fri, 13 Sep 2019 15:23:41 +0200 Message-Id: <20190913132355.21634-60-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.40]); Fri, 13 Sep 2019 13:26:23 +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 52a6af91e877..a0f09e78e89d 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -748,6 +748,16 @@ perf_evlist__mmap_cb_new(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) { @@ -945,8 +955,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, - .new = perf_evlist__mmap_cb_new, + .idx = perf_evlist__mmap_cb_idx, + .new = perf_evlist__mmap_cb_new, + .mmap = perf_evlist__mmap_cb_mmap, }; if (!evlist->mmap) -- 2.21.0