Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp24544lqt; Thu, 18 Apr 2024 07:33:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGjUbdXI7QhdARJi8iy7DrURMxLrcT1JeRcxhSQU0mGKCTO0frBG6qc4MVlzOdWsim1shdFp2Uy4r8bIyfLpilVwO2ZHmcx1TCVDG8kA== X-Google-Smtp-Source: AGHT+IE7wXY5x53+974np/w4GNQocmHUzNyctzvt+owOw/MiB8SvV+FNZM4OIYMwWNgJTB6JpNeg X-Received: by 2002:a05:6808:f07:b0:3c6:e8d:3ef0 with SMTP id m7-20020a0568080f0700b003c60e8d3ef0mr3891948oiw.49.1713450816721; Thu, 18 Apr 2024 07:33:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713450816; cv=pass; d=google.com; s=arc-20160816; b=B3kSaKgKa2xvnLqzDrBYK6FBjpapWAj/ZsqGx3ANLWrlhOvmwJKFnEf/lGkmMc0mzw VSgI8lhSCMSnQna0UQCknCk8y0zTJYlZrfgpibCh0VUdwSLvv6yEUEg96Yi7m2M61qR7 rWb1D3+2H8Cam/o0toU3VIsJHkOfRBttZccrDtZ3udgxb4mjA8VpDOoOMutWXRIvYquZ tZu8HehgHi3yq7f3fdlP72vnNhKMpAclEoh9DOk78sMjrkRH557OEvXT/wY3878K472h BWrdsQl/dZKYPBzC1lEwvZYT6VHHnI1zfzPqTwo824K91G1Pvi2//EVuloy0Jb7qTt+9 eIRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N7a1P2h+nACWjJ6twr59mhCji9SevM1WPyFGMeGlq1o=; fh=XYwUmfRS7PLgZGzU0Y0urfr+XHYz5q8Sp7T2C2ikEvs=; b=xrCqWjTFtUzAYoX5z6KHxZJPY3BIpYw/znjtrENZIOL5ykahnYITFmryCH/T9bPmnL nEh3gKbtjJIt/JudGmQF1K7A1zDbvO8juiPFvoyCcUz5hx7VxY+aNbxFDdy56Uz+91qe lVpE8TtP6QpooomCWSVs3XqXJC10KkZoi3DcbzNN4urx5+HpB/p85/OGtgkExjixF4xX WLb05Sd0fMTD776ClCxvxe6/0J1koX7Z4sc6wkH49qV9CXp2sEqSOkb+HgKbP4lwUZoO giEt3KlflGCwlfQgTDrJM5HWrrpflWlVQq+fkJ5GuweXRUxVOupEBhSYYcgY0LvpTX5D rEDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="U/gEZ6Da"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y22-20020a05622a005600b0043674389636si1611278qtw.744.2024.04.18.07.33.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="U/gEZ6Da"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7FABE1C2216B for ; Thu, 18 Apr 2024 14:33:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE11816EBE5; Thu, 18 Apr 2024 14:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U/gEZ6Da" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1E79D16E860; Thu, 18 Apr 2024 14:31:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450665; cv=none; b=oAVtUftmUPoruHLYonTb8R2DlQZk6Ytd4K1Sm8YN4aa8i4NRe3E5F1pLre31v60fy+zvMD/t9QW+DlpMZ/WSwx954PUeY9DtlivyOWxQWqeBaIm9i83gSd4dz8o3ad+7fAp970n+gW8n3+4QZN2ORtUG+Xs+chEDSeKJZDOU+y0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450665; c=relaxed/simple; bh=JNWOYInEppemZQhyMubvU6G/hY2DOYhQpgoRO85vT90=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UnPXnQu2bCG1ughM2a3xmBGd8Fkh2c/gsPjEfmRRwMim+4FHiZG4Vh9c5CGS6/x5wTKP/iqaSXhk0bG13Nh25ixmk0Lg98vp/sqmEIFlrXvOvaFT6dg3KrZLZD4Je7ribk0pMb9bsdOinCzdabX5UaP51OAP+XW1L1Hat2D38Rg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U/gEZ6Da; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1793FC113CC; Thu, 18 Apr 2024 14:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713450664; bh=JNWOYInEppemZQhyMubvU6G/hY2DOYhQpgoRO85vT90=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U/gEZ6DaX909LOqPE6dfWYYOZfN/XmXB1cqg+/hZoHbGJu5ftjO3zN2w3IRaIlRJg GxYs7gDvzWaf/5QGMAdWXRatI+nncjiifGvTYVcoc62/Of0jxYZPlF37mseqoLHJQr 8plTVWBoe+t8HveKXBzNUoMT0Hcox4ACsm8Pv6ARJMfA+yFLXwaL3pkmx1m5gcm07B qzCJWYoTInasE297lrtEvAQl3aUYWGhKQcFUxWlG8DvAQP9Qby1RkweRRPAPCBAv6g 6jX01K9kqf5dN0QKR+WPLvSqnBIxnTYAgazrl5IaIQeRMMaV06h3Bsqvc/3nV2AqXl gv2k+8tvpP0Jw== Date: Thu, 18 Apr 2024 11:31:01 -0300 From: Arnaldo Carvalho de Melo To: Changbin Du Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] perf trace beauty: Always show mprotect prot even though PROT_NONE Message-ID: References: <20240418131304.3188385-1-changbin.du@huawei.com> <20240418131304.3188385-5-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240418131304.3188385-5-changbin.du@huawei.com> On Thu, Apr 18, 2024 at 09:13:04PM +0800, Changbin Du wrote: > Do not omit the flags even though it is PROT_NONE. > > Signed-off-by: Changbin Du > --- > tools/perf/builtin-trace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c > index 349550b02f79..7f936f1b5519 100644 > --- a/tools/perf/builtin-trace.c > +++ b/tools/perf/builtin-trace.c > @@ -1042,7 +1042,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 */ }, }, }, So since syscall_arg__scnprintf_mmap_prot() special cases 0 to print NONE for prot... Ok, I'll expand a bit the commit log message _and_ the syscall_fmts entry for mprotect. - Arnaldo > { .name = "mq_unlink", > .arg = { [0] = { .scnprintf = SCA_FILENAME, /* u_name */ }, }, }, > { .name = "mremap", .hexret = true, > -- > 2.34.1