Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1731021pxk; Sun, 13 Sep 2020 14:08:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQZHGzfHzRTUpNGXkd4SCrb83QinbHQ3yX6ajo5Nc7IxAhvgLA0P5bvIxG9Jp02/VUqi8i X-Received: by 2002:a17:906:2e83:: with SMTP id o3mr12075543eji.47.1600031332015; Sun, 13 Sep 2020 14:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600031332; cv=none; d=google.com; s=arc-20160816; b=juYQRXV0PhLElSl0AXdeUDUZj+vrdlKeY32IU+L7dL0+t6EeDeX5M9MJjSoto4DBsv NeVJom0gxNIv89HBkqHwI6eUapHHeKH4eRzi9xbLaODpmilkYONn9WqaOY+6sYRnGr6g ZC+nsGYL0JQO3ARkLwBJSF9e59SmYKZy+Rg7C9EITpSEphcycwKhmRosG4+AwepBRkH5 Cmpk3XwjdoghKyxFLeppAdwwG7XsYqLR+frYMtqMGzHPodDhOYCrsr4M0iivDyOZDaPU xisj0E66oPsB/mxAZNjhIIxnotvYgtq7/sq9aZ48pRRxBUR0q3WWIt8lRiyN67q7TazK tGKA== 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=rvyltv7qOjMByjgRoLAIi1WGGsTf7zVixc3rBQGLAN8=; b=Gpk/A0vkAUirq+80R/QksvUSdYdan7qC+TCU/HJ8AhGo6D70mK4Hhp+cNAn62lX5Tr 28a6jHSvugl2cQh2wNrekjVAo39SjbEeFCFqx5QDKDr6wrYSCPUEPT8lMCbSQuD/nBRb lh/2yO+8QznD1oZsHjPdneFj1n8rnHozejfCycqk8wsctIPheh6i46surwdCiziLLcUT ijTk4CmzQ4W1nTfRL9Ft0GJYWaElUmrJU9xjQjJu6iuWt97gtc2J1L190fIAf3JlrBRV Dk6kE/6aio0qwWlZimMUyo5NLBSn9pWSpt1sblHl9CiU/+aEbej3988z/nAUCQHqTP77 HNAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si5952043ejq.747.2020.09.13.14.08.29; Sun, 13 Sep 2020 14:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725969AbgIMVFT convert rfc822-to-8bit (ORCPT + 99 others); Sun, 13 Sep 2020 17:05:19 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:47660 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725945AbgIMVEt (ORCPT ); Sun, 13 Sep 2020 17:04:49 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-202-08eBv_XMOLyAfeuTlk8vBQ-1; Sun, 13 Sep 2020 17:04:45 -0400 X-MC-Unique: 08eBv_XMOLyAfeuTlk8vBQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24F141882FA1; Sun, 13 Sep 2020 21:04:43 +0000 (UTC) Received: from krava.redhat.com (ovpn-112-4.ams2.redhat.com [10.36.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81E311002393; Sun, 13 Sep 2020 21:04:39 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Song Liu , "Frank Ch. Eigler" , Ian Rogers , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: [PATCH 18/26] perf tests: Add mmap3 support for perf record test Date: Sun, 13 Sep 2020 23:03:05 +0200 Message-Id: <20200913210313.1985612-19-jolsa@kernel.org> In-Reply-To: <20200913210313.1985612-1-jolsa@kernel.org> References: <20200913210313.1985612-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding mmap3 support for perf record test so it can pass for kernel with mmap3 support. Signed-off-by: Jiri Olsa --- tools/perf/tests/perf-record.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index 67d3f5aad016..722c0cc02e57 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c @@ -224,6 +224,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus if ((type == PERF_RECORD_COMM || type == PERF_RECORD_MMAP || type == PERF_RECORD_MMAP2 || + type == PERF_RECORD_MMAP3 || type == PERF_RECORD_FORK || type == PERF_RECORD_EXIT) && (pid_t)event->comm.pid != evlist->workload.pid) { @@ -233,7 +234,8 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus if ((type == PERF_RECORD_COMM || type == PERF_RECORD_MMAP || - type == PERF_RECORD_MMAP2) && + type == PERF_RECORD_MMAP2 || + type == PERF_RECORD_MMAP3) && event->comm.pid != event->comm.tid) { pr_debug("%s with different pid/tid!\n", name); ++errs; @@ -253,6 +255,9 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus goto check_bname; case PERF_RECORD_MMAP2: mmap_filename = event->mmap2.filename; + goto check_bname; + case PERF_RECORD_MMAP3: + mmap_filename = event->mmap3.filename; check_bname: bname = strrchr(mmap_filename, '/'); if (bname != NULL) { -- 2.26.2