Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2661005lqt; Mon, 22 Apr 2024 18:54:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTMS2AT++UWxpClWtonIvTWMVcZomJlogUeKljs6L/M+8dvFWCHYkwQUoyY6LpeMiC7ZaxGwBlwUvNMuZFw1aPjM+CSZgYbM4SWghgWw== X-Google-Smtp-Source: AGHT+IGTFjmW6Q4vXg1mXDQX53ap2YCfRjn8ViPP7hOzglt7mr/OWisdh51dsMYwGFrNlZzZWRmS X-Received: by 2002:a17:902:8488:b0:1e0:e85b:b9ca with SMTP id c8-20020a170902848800b001e0e85bb9camr10430066plo.21.1713837261192; Mon, 22 Apr 2024 18:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713837261; cv=pass; d=google.com; s=arc-20160816; b=JxxLz4RytqSUZp4l5/6AOlhHQQo09w8Kqwt1oI06iOY8/ydhjhiMEjzFKNYpPvmAMn WcjnLaXggHBhsZUoUpf59eq+YPzlW+N5xLIEI/KB6YK7wLlPQhOIFexdXnKtKhvi7ci9 rGcrW8Ooscy68GeemGdEVQdWp9F6pQKGGENtLplRk6RpbVpbxdpH/3q78uNEReW3sH1X wBj3PNGkorawHwbbkBFzXqIjF2XrFNq1A+7U8rpihdTNqYRXblqrcLq6Z+RWb0ipg5l3 YMkBqXTeGs0f9ody36l5iqZjGRBvAuzYYii5g6h+afwriallStV8Kt+M2s9DrSIiPogc 25DQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=z89s6kcmUCBI/wa4PzMzgI9Iaxdt60ERID9Zwoz6X7Q=; fh=qYBgL0xDXiZbrLeipx8X/fz2jSxMbqgYzzneIVPF86s=; b=avAADfxdcvr4ZJE715N6uA3xodFyb/jxPsmMRR89rZubJFfk61zAX0TmE3wvo6vIy4 vA8eQ5zmo+pyPIwEyOMxwm8+5OrgJkHC/h0u0o7YX5qBFf+Plo7WsVc8oCFxRBB4hM/c MxXuYxeWyP6FNtVzwt+lxnTb0DkHHribvxevGH3WSyHwQzLV7r73uOf5kH8ckRGPtk9e tnmgbJr/8kpGtUEoAB/8BpQNtfmRUsGNJETYazPYLaK/F0SzqFiPFZlztfgOBAz4O49W 9u8igXFFbsQ6I7Vld9ScaqmVQGy9jVJ5WpDtCU5ozVL1fRTiC2b1F1tJgGA67QS+Ecwm cgiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-154408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p6-20020a170902b08600b001e3e6fe32aasi8598487plr.170.2024.04.22.18.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 18:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-154408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D2C3F2827BA for ; Tue, 23 Apr 2024 01:54:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A62561AACB; Tue, 23 Apr 2024 01:53:50 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E292F1947D; Tue, 23 Apr 2024 01:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713837230; cv=none; b=X4/iB4y45/HzU/NeG4qvkLnKyt+47GO9PH8Jc37WTE9j0klQbGh/Eq3D3epY2vTu6xjkXLYKfKafdK/2NaWBQxF6OFLzMyn0d9GjFMx1U0TAO3nJBHD8DCxJKVtzS3kXN4MC6EnHuig9C9HJAAWTczknFtXC4yDJnWwZS0LadKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713837230; c=relaxed/simple; bh=686Nk4Ui0iCP2dvu4CE6nvTnMNWhH+HUW0Ag95Z7vHo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AcMrJwPz6xbMY/KongcTdHchthN3kl7lHbr+/wKJ4A/OQA2sPML4fl1wZDTfTHo3G21zUW78IlhqIOzfxVS8eyIqHDF3k7aXp0rbbTc9koC58mSYc+7j1I+fnXbq8bFcZ+kv/pcUa8//Ne8C4O0QYmsVcB286EX8T4LyaPKWLuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4VNlTB3WCYz1ypGN; Tue, 23 Apr 2024 09:51:10 +0800 (CST) Received: from kwepemd100011.china.huawei.com (unknown [7.221.188.204]) by mail.maildlp.com (Postfix) with ESMTPS id ED9031A0188; Tue, 23 Apr 2024 09:53:39 +0800 (CST) Received: from M910t.huawei.com (10.110.54.157) by kwepemd100011.china.huawei.com (7.221.188.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Tue, 23 Apr 2024 09:53:38 +0800 From: Changbin Du To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim CC: Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , , , Changbin Du Subject: [PATCH v2 2/2] perf trace beauty: Always show mmap prot even though PROT_NONE Date: Tue, 23 Apr 2024 09:53:30 +0800 Message-ID: <20240423015330.2206892-3-changbin.du@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423015330.2206892-1-changbin.du@huawei.com> References: <20240423015330.2206892-1-changbin.du@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemd100011.china.huawei.com (7.221.188.204) PROT_NONE is also useful information, so do not omit the mmap prot even though it is 0. syscall_arg__scnprintf_mmap_prot() could print PROT_NONE for prot 0. Signed-off-by: Changbin Du --- tools/perf/builtin-trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a8407eee58a3..e82ed002890f 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1033,7 +1033,7 @@ static const struct syscall_fmt syscall_fmts[] = { #if defined(__s390x__) .alias = "old_mmap", #endif - .arg = { [2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ }, + .arg = { [2] = { .scnprintf = SCA_MMAP_PROT, .show_zero = true, /* prot */ }, [3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ .strtoul = STUL_STRARRAY_FLAGS, .parm = &strarray__mmap_flags, }, @@ -1050,7 +1050,7 @@ static const struct syscall_fmt syscall_fmts[] = { [4] = { .scnprintf = SCA_MOVE_MOUNT_FLAGS, /* flags */ }, }, }, { .name = "mprotect", .arg = { [0] = { .scnprintf = SCA_HEX, /* start */ }, - [2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ }, }, }, + [2] = { .scnprintf = SCA_MMAP_PROT, .show_zero = true, /* prot */ }, }, }, { .name = "mq_unlink", .arg = { [0] = { .scnprintf = SCA_FILENAME, /* u_name */ }, }, }, { .name = "mremap", .hexret = true, @@ -1084,7 +1084,7 @@ static const struct syscall_fmt syscall_fmts[] = { .arg = { [0] = { .scnprintf = SCA_INT, /* key */ }, }, }, { .name = "pkey_mprotect", .arg = { [0] = { .scnprintf = SCA_HEX, /* start */ }, - [2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ }, + [2] = { .scnprintf = SCA_MMAP_PROT, .show_zero = true, /* prot */ }, [3] = { .scnprintf = SCA_INT, /* pkey */ }, }, }, { .name = "poll", .timeout = true, }, { .name = "ppoll", .timeout = true, }, -- 2.34.1